From 13a059da881ba21abf2ea270901943e753eaa226 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Aug 2022 01:18:54 +0000 Subject: [PATCH] prod dependencies --- .github/dependabot.yml | 23 - .github/workflows/codeql-analysis.yml | 72 - .github/workflows/publish.yml | 14 - .github/workflows/validator.yml | 42 - node_modules/.bin/uuid | 1 + node_modules/.package-lock.json | 338 + node_modules/@actions/core/LICENSE.md | 9 + node_modules/@actions/core/README.md | 335 + node_modules/@actions/core/lib/command.d.ts | 15 + node_modules/@actions/core/lib/command.js | 92 + node_modules/@actions/core/lib/command.js.map | 1 + node_modules/@actions/core/lib/core.d.ts | 198 + node_modules/@actions/core/lib/core.js | 337 + node_modules/@actions/core/lib/core.js.map | 1 + .../@actions/core/lib/file-command.d.ts | 1 + .../@actions/core/lib/file-command.js | 42 + .../@actions/core/lib/file-command.js.map | 1 + .../@actions/core/lib/oidc-utils.d.ts | 7 + node_modules/@actions/core/lib/oidc-utils.js | 77 + .../@actions/core/lib/oidc-utils.js.map | 1 + .../@actions/core/lib/path-utils.d.ts | 25 + node_modules/@actions/core/lib/path-utils.js | 58 + .../@actions/core/lib/path-utils.js.map | 1 + node_modules/@actions/core/lib/summary.d.ts | 202 + node_modules/@actions/core/lib/summary.js | 283 + node_modules/@actions/core/lib/summary.js.map | 1 + node_modules/@actions/core/lib/utils.d.ts | 14 + node_modules/@actions/core/lib/utils.js | 40 + node_modules/@actions/core/lib/utils.js.map | 1 + node_modules/@actions/core/package.json | 46 + node_modules/@actions/github/LICENSE.md | 9 + node_modules/@actions/github/README.md | 98 + node_modules/@actions/github/lib/context.d.ts | 32 + node_modules/@actions/github/lib/context.js | 54 + .../@actions/github/lib/context.js.map | 1 + node_modules/@actions/github/lib/github.d.ts | 11 + node_modules/@actions/github/lib/github.js | 36 + .../@actions/github/lib/github.js.map | 1 + .../@actions/github/lib/interfaces.d.ts | 40 + .../@actions/github/lib/interfaces.js | 4 + .../@actions/github/lib/interfaces.js.map | 1 + .../@actions/github/lib/internal/utils.d.ts | 6 + .../@actions/github/lib/internal/utils.js | 43 + .../@actions/github/lib/internal/utils.js.map | 1 + node_modules/@actions/github/lib/utils.d.ts | 14 + node_modules/@actions/github/lib/utils.js | 54 + node_modules/@actions/github/lib/utils.js.map | 1 + node_modules/@actions/github/package.json | 49 + node_modules/@actions/http-client/LICENSE | 21 + node_modules/@actions/http-client/README.md | 73 + .../@actions/http-client/lib/auth.d.ts | 26 + node_modules/@actions/http-client/lib/auth.js | 81 + .../@actions/http-client/lib/auth.js.map | 1 + .../@actions/http-client/lib/index.d.ts | 123 + .../@actions/http-client/lib/index.js | 605 + .../@actions/http-client/lib/index.js.map | 1 + .../@actions/http-client/lib/interfaces.d.ts | 44 + .../@actions/http-client/lib/interfaces.js | 3 + .../http-client/lib/interfaces.js.map | 1 + .../@actions/http-client/lib/proxy.d.ts | 2 + .../@actions/http-client/lib/proxy.js | 61 + .../@actions/http-client/lib/proxy.js.map | 1 + .../@actions/http-client/package.json | 48 + node_modules/@octokit/auth-token/LICENSE | 21 + node_modules/@octokit/auth-token/README.md | 290 + .../@octokit/auth-token/dist-node/index.js | 55 + .../auth-token/dist-node/index.js.map | 1 + .../@octokit/auth-token/dist-src/auth.js | 21 + .../@octokit/auth-token/dist-src/hook.js | 6 + .../@octokit/auth-token/dist-src/index.js | 14 + .../@octokit/auth-token/dist-src/types.js | 1 + .../dist-src/with-authorization-prefix.js | 11 + .../@octokit/auth-token/dist-types/auth.d.ts | 2 + .../@octokit/auth-token/dist-types/hook.d.ts | 2 + .../@octokit/auth-token/dist-types/index.d.ts | 7 + .../@octokit/auth-token/dist-types/types.d.ts | 33 + .../dist-types/with-authorization-prefix.d.ts | 6 + .../@octokit/auth-token/dist-web/index.js | 55 + .../@octokit/auth-token/dist-web/index.js.map | 1 + node_modules/@octokit/auth-token/package.json | 45 + node_modules/@octokit/core/LICENSE | 21 + node_modules/@octokit/core/README.md | 448 + node_modules/@octokit/core/dist-node/index.js | 176 + .../@octokit/core/dist-node/index.js.map | 1 + node_modules/@octokit/core/dist-src/index.js | 125 + node_modules/@octokit/core/dist-src/types.js | 1 + .../@octokit/core/dist-src/version.js | 1 + .../@octokit/core/dist-types/index.d.ts | 30 + .../@octokit/core/dist-types/types.d.ts | 44 + .../@octokit/core/dist-types/version.d.ts | 1 + node_modules/@octokit/core/dist-web/index.js | 130 + .../@octokit/core/dist-web/index.js.map | 1 + node_modules/@octokit/core/package.json | 57 + node_modules/@octokit/endpoint/LICENSE | 21 + node_modules/@octokit/endpoint/README.md | 421 + .../@octokit/endpoint/dist-node/index.js | 390 + .../@octokit/endpoint/dist-node/index.js.map | 1 + .../@octokit/endpoint/dist-src/defaults.js | 17 + .../dist-src/endpoint-with-defaults.js | 5 + .../@octokit/endpoint/dist-src/index.js | 3 + .../@octokit/endpoint/dist-src/merge.js | 26 + .../@octokit/endpoint/dist-src/parse.js | 81 + .../dist-src/util/add-query-parameters.js | 17 + .../util/extract-url-variable-names.js | 11 + .../endpoint/dist-src/util/lowercase-keys.js | 9 + .../endpoint/dist-src/util/merge-deep.js | 16 + .../@octokit/endpoint/dist-src/util/omit.js | 8 + .../util/remove-undefined-properties.js | 8 + .../endpoint/dist-src/util/url-template.js | 164 + .../@octokit/endpoint/dist-src/version.js | 1 + .../endpoint/dist-src/with-defaults.js | 13 + .../endpoint/dist-types/defaults.d.ts | 2 + .../dist-types/endpoint-with-defaults.d.ts | 3 + .../@octokit/endpoint/dist-types/index.d.ts | 1 + .../@octokit/endpoint/dist-types/merge.d.ts | 2 + .../@octokit/endpoint/dist-types/parse.d.ts | 2 + .../dist-types/util/add-query-parameters.d.ts | 4 + .../util/extract-url-variable-names.d.ts | 1 + .../dist-types/util/lowercase-keys.d.ts | 5 + .../endpoint/dist-types/util/merge-deep.d.ts | 1 + .../endpoint/dist-types/util/omit.d.ts | 5 + .../util/remove-undefined-properties.d.ts | 1 + .../dist-types/util/url-template.d.ts | 3 + .../@octokit/endpoint/dist-types/version.d.ts | 1 + .../endpoint/dist-types/with-defaults.d.ts | 2 + .../@octokit/endpoint/dist-web/index.js | 381 + .../@octokit/endpoint/dist-web/index.js.map | 1 + node_modules/@octokit/endpoint/package.json | 44 + node_modules/@octokit/graphql/LICENSE | 21 + node_modules/@octokit/graphql/README.md | 409 + .../@octokit/graphql/dist-node/index.js | 118 + .../@octokit/graphql/dist-node/index.js.map | 1 + .../@octokit/graphql/dist-src/error.js | 21 + .../@octokit/graphql/dist-src/graphql.js | 52 + .../@octokit/graphql/dist-src/index.js | 18 + .../@octokit/graphql/dist-src/types.js | 1 + .../@octokit/graphql/dist-src/version.js | 1 + .../graphql/dist-src/with-defaults.js | 12 + .../@octokit/graphql/dist-types/error.d.ts | 13 + .../@octokit/graphql/dist-types/graphql.d.ts | 3 + .../@octokit/graphql/dist-types/index.d.ts | 5 + .../@octokit/graphql/dist-types/types.d.ts | 55 + .../@octokit/graphql/dist-types/version.d.ts | 1 + .../graphql/dist-types/with-defaults.d.ts | 3 + .../@octokit/graphql/dist-web/index.js | 106 + .../@octokit/graphql/dist-web/index.js.map | 1 + node_modules/@octokit/graphql/package.json | 47 + node_modules/@octokit/openapi-types/LICENSE | 7 + node_modules/@octokit/openapi-types/README.md | 17 + .../@octokit/openapi-types/package.json | 20 + .../@octokit/openapi-types/types.d.ts | 47095 ++++++++++++++++ .../@octokit/plugin-paginate-rest/LICENSE | 7 + .../@octokit/plugin-paginate-rest/README.md | 269 + .../plugin-paginate-rest/dist-node/index.js | 205 + .../dist-node/index.js.map | 1 + .../dist-src/compose-paginate.js | 5 + .../generated/paginating-endpoints.js | 216 + .../plugin-paginate-rest/dist-src/index.js | 17 + .../plugin-paginate-rest/dist-src/iterator.js | 39 + .../normalize-paginated-list-response.js | 47 + .../plugin-paginate-rest/dist-src/paginate.js | 24 + .../dist-src/paginating-endpoints.js | 10 + .../plugin-paginate-rest/dist-src/types.js | 1 + .../plugin-paginate-rest/dist-src/version.js | 1 + .../dist-types/compose-paginate.d.ts | 2 + .../generated/paginating-endpoints.d.ts | 1612 + .../dist-types/index.d.ts | 16 + .../dist-types/iterator.d.ts | 20 + .../normalize-paginated-list-response.d.ts | 18 + .../dist-types/paginate.d.ts | 3 + .../dist-types/paginating-endpoints.d.ts | 3 + .../dist-types/types.d.ts | 242 + .../dist-types/version.d.ts | 1 + .../plugin-paginate-rest/dist-web/index.js | 358 + .../dist-web/index.js.map | 1 + .../plugin-paginate-rest/package.json | 51 + .../plugin-rest-endpoint-methods/LICENSE | 7 + .../plugin-rest-endpoint-methods/README.md | 76 + .../dist-node/index.js | 1107 + .../dist-node/index.js.map | 1 + .../dist-src/endpoints-to-methods.js | 60 + .../dist-src/generated/endpoints.js | 1664 + .../dist-src/generated/method-types.js | 1 + .../parameters-and-response-types.js | 1 + .../dist-src/index.js | 18 + .../dist-src/types.js | 1 + .../dist-src/version.js | 1 + .../dist-types/endpoints-to-methods.d.ts | 4 + .../dist-types/generated/endpoints.d.ts | 3 + .../dist-types/generated/method-types.d.ts | 9945 ++++ .../parameters-and-response-types.d.ts | 3211 ++ .../dist-types/index.d.ts | 11 + .../dist-types/types.d.ts | 18 + .../dist-types/version.d.ts | 1 + .../dist-web/index.js | 1745 + .../dist-web/index.js.map | 1 + .../plugin-rest-endpoint-methods/package.json | 59 + node_modules/@octokit/request-error/LICENSE | 21 + node_modules/@octokit/request-error/README.md | 67 + .../@octokit/request-error/dist-node/index.js | 74 + .../request-error/dist-node/index.js.map | 1 + .../@octokit/request-error/dist-src/index.js | 55 + .../@octokit/request-error/dist-src/types.js | 1 + .../request-error/dist-types/index.d.ts | 33 + .../request-error/dist-types/types.d.ts | 9 + .../@octokit/request-error/dist-web/index.js | 59 + .../request-error/dist-web/index.js.map | 1 + .../@octokit/request-error/package.json | 47 + node_modules/@octokit/request/LICENSE | 21 + node_modules/@octokit/request/README.md | 551 + .../@octokit/request/dist-node/index.js | 177 + .../@octokit/request/dist-node/index.js.map | 1 + .../request/dist-src/fetch-wrapper.js | 119 + .../request/dist-src/get-buffer-response.js | 3 + .../@octokit/request/dist-src/index.js | 9 + .../@octokit/request/dist-src/version.js | 1 + .../request/dist-src/with-defaults.js | 22 + .../request/dist-types/fetch-wrapper.d.ts | 11 + .../dist-types/get-buffer-response.d.ts | 2 + .../@octokit/request/dist-types/index.d.ts | 1 + .../@octokit/request/dist-types/version.d.ts | 1 + .../request/dist-types/with-defaults.d.ts | 2 + .../@octokit/request/dist-web/index.js | 158 + .../@octokit/request/dist-web/index.js.map | 1 + node_modules/@octokit/request/package.json | 56 + node_modules/@octokit/types/LICENSE | 7 + node_modules/@octokit/types/README.md | 65 + .../@octokit/types/dist-node/index.js | 8 + .../@octokit/types/dist-node/index.js.map | 1 + .../@octokit/types/dist-src/AuthInterface.js | 1 + .../types/dist-src/EndpointDefaults.js | 1 + .../types/dist-src/EndpointInterface.js | 1 + .../types/dist-src/EndpointOptions.js | 1 + node_modules/@octokit/types/dist-src/Fetch.js | 1 + .../GetResponseTypeFromEndpointMethod.js | 1 + .../types/dist-src/OctokitResponse.js | 1 + .../@octokit/types/dist-src/RequestError.js | 1 + .../@octokit/types/dist-src/RequestHeaders.js | 1 + .../types/dist-src/RequestInterface.js | 1 + .../@octokit/types/dist-src/RequestMethod.js | 1 + .../@octokit/types/dist-src/RequestOptions.js | 1 + .../types/dist-src/RequestParameters.js | 1 + .../types/dist-src/RequestRequestOptions.js | 1 + .../types/dist-src/ResponseHeaders.js | 1 + node_modules/@octokit/types/dist-src/Route.js | 1 + .../@octokit/types/dist-src/Signal.js | 1 + .../types/dist-src/StrategyInterface.js | 1 + node_modules/@octokit/types/dist-src/Url.js | 1 + .../@octokit/types/dist-src/VERSION.js | 1 + .../types/dist-src/generated/Endpoints.js | 1 + node_modules/@octokit/types/dist-src/index.js | 21 + .../types/dist-types/AuthInterface.d.ts | 31 + .../types/dist-types/EndpointDefaults.d.ts | 21 + .../types/dist-types/EndpointInterface.d.ts | 65 + .../types/dist-types/EndpointOptions.d.ts | 7 + .../@octokit/types/dist-types/Fetch.d.ts | 4 + .../GetResponseTypeFromEndpointMethod.d.ts | 5 + .../types/dist-types/OctokitResponse.d.ts | 17 + .../types/dist-types/RequestError.d.ts | 11 + .../types/dist-types/RequestHeaders.d.ts | 15 + .../types/dist-types/RequestInterface.d.ts | 34 + .../types/dist-types/RequestMethod.d.ts | 4 + .../types/dist-types/RequestOptions.d.ts | 14 + .../types/dist-types/RequestParameters.d.ts | 45 + .../dist-types/RequestRequestOptions.d.ts | 26 + .../types/dist-types/ResponseHeaders.d.ts | 20 + .../@octokit/types/dist-types/Route.d.ts | 4 + .../@octokit/types/dist-types/Signal.d.ts | 6 + .../types/dist-types/StrategyInterface.d.ts | 4 + .../@octokit/types/dist-types/Url.d.ts | 4 + .../@octokit/types/dist-types/VERSION.d.ts | 1 + .../types/dist-types/generated/Endpoints.d.ts | 3571 ++ .../@octokit/types/dist-types/index.d.ts | 21 + node_modules/@octokit/types/dist-web/index.js | 4 + .../@octokit/types/dist-web/index.js.map | 1 + node_modules/@octokit/types/package.json | 54 + .../azure-devops-node-api/BuildApi.d.ts | 920 + .../azure-devops-node-api/BuildApi.js | 3126 + .../azure-devops-node-api/ClientApiBases.d.ts | 15 + .../azure-devops-node-api/ClientApiBases.js | 34 + .../azure-devops-node-api/CoreApi.d.ts | 249 + node_modules/azure-devops-node-api/CoreApi.js | 923 + .../azure-devops-node-api/DashboardApi.d.ts | 121 + .../azure-devops-node-api/DashboardApi.js | 482 + .../ExtensionManagementApi.d.ts | 210 + .../ExtensionManagementApi.js | 770 + .../FeatureManagementApi.d.ts | 89 + .../FeatureManagementApi.js | 296 + .../FileContainerApi.d.ts | 21 + .../azure-devops-node-api/FileContainerApi.js | 235 + .../FileContainerApiBase.d.ts | 50 + .../FileContainerApiBase.js | 168 + .../azure-devops-node-api/GalleryApi.d.ts | 677 + .../azure-devops-node-api/GalleryApi.js | 2491 + .../GalleryCompatHttpClientBase.d.ts | 32 + .../GalleryCompatHttpClientBase.js | 118 + .../azure-devops-node-api/GitApi.d.ts | 1397 + node_modules/azure-devops-node-api/GitApi.js | 4494 ++ node_modules/azure-devops-node-api/LICENSE | 21 + .../azure-devops-node-api/LocationsApi.d.ts | 68 + .../azure-devops-node-api/LocationsApi.js | 280 + .../NotificationApi.d.ts | 175 + .../azure-devops-node-api/NotificationApi.js | 646 + .../azure-devops-node-api/PolicyApi.d.ts | 113 + .../azure-devops-node-api/PolicyApi.js | 387 + .../azure-devops-node-api/ProfileApi.d.ts | 122 + .../azure-devops-node-api/ProfileApi.js | 494 + .../ProjectAnalysisApi.d.ts | 40 + .../ProjectAnalysisApi.js | 174 + node_modules/azure-devops-node-api/README.md | 161 + .../azure-devops-node-api/ReleaseApi.d.ts | 809 + .../azure-devops-node-api/ReleaseApi.js | 2796 + .../SecurityRolesApi.d.ts | 48 + .../azure-devops-node-api/SecurityRolesApi.js | 188 + .../azure-devops-node-api/Serialization.d.ts | 67 + .../azure-devops-node-api/Serialization.js | 271 + .../azure-devops-node-api/TaskAgentApi.d.ts | 50 + .../azure-devops-node-api/TaskAgentApi.js | 201 + .../TaskAgentApiBase.d.ts | 1229 + .../azure-devops-node-api/TaskAgentApiBase.js | 4646 ++ .../azure-devops-node-api/TaskApi.d.ts | 228 + node_modules/azure-devops-node-api/TaskApi.js | 826 + .../azure-devops-node-api/TestApi.d.ts | 705 + node_modules/azure-devops-node-api/TestApi.js | 2521 + .../azure-devops-node-api/TfvcApi.d.ts | 253 + node_modules/azure-devops-node-api/TfvcApi.js | 856 + .../ThirdPartyNotice.txt | 686 + .../azure-devops-node-api/VsoClient.d.ts | 53 + .../azure-devops-node-api/VsoClient.js | 253 + .../azure-devops-node-api/WebApi.d.ts | 92 + node_modules/azure-devops-node-api/WebApi.js | 437 + .../azure-devops-node-api/WikiApi.d.ts | 243 + node_modules/azure-devops-node-api/WikiApi.js | 766 + .../azure-devops-node-api/WorkApi.d.ts | 478 + node_modules/azure-devops-node-api/WorkApi.js | 1937 + .../WorkItemTrackingApi.d.ts | 829 + .../WorkItemTrackingApi.js | 2848 + .../WorkItemTrackingProcessApi.d.ts | 521 + .../WorkItemTrackingProcessApi.js | 1734 + ...WorkItemTrackingProcessDefinitionsApi.d.ts | 424 + .../WorkItemTrackingProcessDefinitionsApi.js | 1403 + .../handlers/basiccreds.d.ts | 5 + .../handlers/basiccreds.js | 11 + .../handlers/bearertoken.d.ts | 5 + .../handlers/bearertoken.js | 11 + .../azure-devops-node-api/handlers/ntlm.d.ts | 5 + .../azure-devops-node-api/handlers/ntlm.js | 11 + .../handlers/personalaccesstoken.d.ts | 5 + .../handlers/personalaccesstoken.js | 11 + .../interfaces/BuildInterfaces.d.ts | 3509 ++ .../interfaces/BuildInterfaces.js | 1507 + .../interfaces/CommentsInterfaces.d.ts | 355 + .../interfaces/CommentsInterfaces.js | 207 + .../interfaces/CoreInterfaces.d.ts | 568 + .../interfaces/CoreInterfaces.js | 201 + .../interfaces/DashboardInterfaces.d.ts | 417 + .../interfaces/DashboardInterfaces.js | 193 + .../DistributedTaskCommonInterfaces.d.ts | 103 + .../DistributedTaskCommonInterfaces.js | 11 + .../ExtensionManagementInterfaces.d.ts | 1287 + .../ExtensionManagementInterfaces.js | 586 + .../FeatureManagementInterfaces.d.ts | 172 + .../interfaces/FeatureManagementInterfaces.js | 51 + .../interfaces/FileContainerInterfaces.d.ts | 222 + .../interfaces/FileContainerInterfaces.js | 120 + .../interfaces/GalleryInterfaces.d.ts | 2220 + .../interfaces/GalleryInterfaces.js | 1460 + .../interfaces/GitInterfaces.d.ts | 4112 ++ .../interfaces/GitInterfaces.js | 2430 + .../interfaces/GraphInterfaces.d.ts | 442 + .../interfaces/GraphInterfaces.js | 52 + .../interfaces/IdentitiesInterfaces.d.ts | 274 + .../interfaces/IdentitiesInterfaces.js | 115 + .../interfaces/LocationsInterfaces.d.ts | 178 + .../interfaces/LocationsInterfaces.js | 88 + .../interfaces/NotificationInterfaces.d.ts | 1602 + .../interfaces/NotificationInterfaces.js | 872 + .../interfaces/PolicyInterfaces.d.ts | 174 + .../interfaces/PolicyInterfaces.js | 74 + .../interfaces/ProfileInterfaces.d.ts | 136 + .../interfaces/ProfileInterfaces.js | 117 + .../interfaces/ProjectAnalysisInterfaces.d.ts | 78 + .../interfaces/ProjectAnalysisInterfaces.js | 74 + .../interfaces/ReleaseInterfaces.d.ts | 4431 ++ .../interfaces/ReleaseInterfaces.js | 2164 + .../interfaces/SecurityRolesInterfaces.d.ts | 82 + .../interfaces/SecurityRolesInterfaces.js | 36 + .../interfaces/TaskAgentInterfaces.d.ts | 3829 ++ .../interfaces/TaskAgentInterfaces.js | 1791 + .../interfaces/TestInterfaces.d.ts | 5345 ++ .../interfaces/TestInterfaces.js | 2289 + .../interfaces/TfvcInterfaces.d.ts | 794 + .../interfaces/TfvcInterfaces.js | 310 + .../interfaces/WikiInterfaces.d.ts | 344 + .../interfaces/WikiInterfaces.js | 91 + .../interfaces/WorkInterfaces.d.ts | 1411 + .../interfaces/WorkInterfaces.js | 556 + .../WorkItemTrackingInterfaces.d.ts | 2139 + .../interfaces/WorkItemTrackingInterfaces.js | 841 + ...mTrackingProcessDefinitionsInterfaces.d.ts | 621 + ...temTrackingProcessDefinitionsInterfaces.js | 182 + .../WorkItemTrackingProcessInterfaces.d.ts | 1352 + .../WorkItemTrackingProcessInterfaces.js | 537 + .../common/FormInputInterfaces.d.ts | 283 + .../interfaces/common/FormInputInterfaces.js | 174 + .../common/OperationsInterfaces.d.ts | 58 + .../interfaces/common/OperationsInterfaces.js | 58 + .../interfaces/common/System.d.ts | 43 + .../interfaces/common/System.js | 46 + .../common/SystemDataInterfaces.d.ts | 166 + .../interfaces/common/SystemDataInterfaces.js | 172 + .../interfaces/common/VSSInterfaces.d.ts | 441 + .../interfaces/common/VSSInterfaces.js | 117 + .../interfaces/common/VsoBaseInterfaces.d.ts | 96 + .../interfaces/common/VsoBaseInterfaces.js | 5 + .../opensource/node-http-ntlm/ntlm.js | 390 + .../opensource/node-http-ntlm/readme.txt | 6 + .../azure-devops-node-api/package.json | 39 + node_modules/before-after-hook/LICENSE | 201 + node_modules/before-after-hook/README.md | 655 + node_modules/before-after-hook/index.d.ts | 186 + node_modules/before-after-hook/index.js | 57 + node_modules/before-after-hook/lib/add.js | 46 + .../before-after-hook/lib/register.js | 27 + node_modules/before-after-hook/lib/remove.js | 19 + node_modules/before-after-hook/package.json | 66 + node_modules/call-bind/.eslintignore | 1 + node_modules/call-bind/.eslintrc | 17 + node_modules/call-bind/.github/FUNDING.yml | 12 + node_modules/call-bind/.nycrc | 13 + node_modules/call-bind/CHANGELOG.md | 42 + node_modules/call-bind/LICENSE | 21 + node_modules/call-bind/README.md | 2 + node_modules/call-bind/callBound.js | 15 + node_modules/call-bind/index.js | 47 + node_modules/call-bind/package.json | 80 + node_modules/call-bind/test/callBound.js | 55 + node_modules/call-bind/test/index.js | 66 + node_modules/deprecation/LICENSE | 15 + node_modules/deprecation/README.md | 77 + node_modules/deprecation/dist-node/index.js | 20 + node_modules/deprecation/dist-src/index.js | 14 + .../deprecation/dist-types/index.d.ts | 3 + node_modules/deprecation/dist-web/index.js | 16 + node_modules/deprecation/package.json | 34 + node_modules/function-bind/.editorconfig | 20 + node_modules/function-bind/.eslintrc | 15 + node_modules/function-bind/.jscs.json | 176 + node_modules/function-bind/.npmignore | 22 + node_modules/function-bind/.travis.yml | 168 + node_modules/function-bind/LICENSE | 20 + node_modules/function-bind/README.md | 48 + node_modules/function-bind/implementation.js | 52 + node_modules/function-bind/index.js | 5 + node_modules/function-bind/package.json | 63 + node_modules/function-bind/test/.eslintrc | 9 + node_modules/function-bind/test/index.js | 252 + node_modules/get-intrinsic/.eslintrc | 37 + .../get-intrinsic/.github/FUNDING.yml | 12 + node_modules/get-intrinsic/.nycrc | 9 + node_modules/get-intrinsic/CHANGELOG.md | 91 + node_modules/get-intrinsic/LICENSE | 21 + node_modules/get-intrinsic/README.md | 71 + node_modules/get-intrinsic/index.js | 334 + node_modules/get-intrinsic/package.json | 88 + .../get-intrinsic/test/GetIntrinsic.js | 274 + node_modules/has-symbols/.eslintrc | 11 + node_modules/has-symbols/.github/FUNDING.yml | 12 + node_modules/has-symbols/.nycrc | 9 + node_modules/has-symbols/CHANGELOG.md | 75 + node_modules/has-symbols/LICENSE | 21 + node_modules/has-symbols/README.md | 46 + node_modules/has-symbols/index.js | 13 + node_modules/has-symbols/package.json | 101 + node_modules/has-symbols/shams.js | 42 + node_modules/has-symbols/test/index.js | 22 + .../has-symbols/test/shams/core-js.js | 28 + .../test/shams/get-own-property-symbols.js | 28 + node_modules/has-symbols/test/tests.js | 56 + node_modules/has/LICENSE-MIT | 22 + node_modules/has/README.md | 18 + node_modules/has/package.json | 48 + node_modules/has/src/index.js | 5 + node_modules/has/test/index.js | 10 + node_modules/is-plain-object/LICENSE | 21 + node_modules/is-plain-object/README.md | 125 + .../is-plain-object/dist/is-plain-object.js | 38 + .../is-plain-object/dist/is-plain-object.mjs | 34 + .../is-plain-object/is-plain-object.d.ts | 1 + node_modules/is-plain-object/package.json | 85 + node_modules/node-fetch/LICENSE.md | 22 + node_modules/node-fetch/README.md | 590 + node_modules/node-fetch/browser.js | 25 + node_modules/node-fetch/lib/index.es.js | 1688 + node_modules/node-fetch/lib/index.js | 1697 + node_modules/node-fetch/lib/index.mjs | 1686 + node_modules/node-fetch/package.json | 76 + node_modules/object-inspect/.eslintrc | 53 + .../object-inspect/.github/FUNDING.yml | 12 + node_modules/object-inspect/.nycrc | 13 + node_modules/object-inspect/CHANGELOG.md | 360 + node_modules/object-inspect/LICENSE | 21 + node_modules/object-inspect/example/all.js | 23 + .../object-inspect/example/circular.js | 6 + node_modules/object-inspect/example/fn.js | 5 + .../object-inspect/example/inspect.js | 10 + node_modules/object-inspect/index.js | 512 + .../object-inspect/package-support.json | 20 + node_modules/object-inspect/package.json | 94 + node_modules/object-inspect/readme.markdown | 86 + node_modules/object-inspect/test-core-js.js | 26 + node_modules/object-inspect/test/bigint.js | 58 + .../object-inspect/test/browser/dom.js | 15 + node_modules/object-inspect/test/circular.js | 16 + node_modules/object-inspect/test/deep.js | 12 + node_modules/object-inspect/test/element.js | 53 + node_modules/object-inspect/test/err.js | 48 + node_modules/object-inspect/test/fakes.js | 29 + node_modules/object-inspect/test/fn.js | 76 + node_modules/object-inspect/test/has.js | 15 + node_modules/object-inspect/test/holes.js | 15 + .../object-inspect/test/indent-option.js | 271 + node_modules/object-inspect/test/inspect.js | 139 + node_modules/object-inspect/test/lowbyte.js | 12 + node_modules/object-inspect/test/number.js | 58 + .../object-inspect/test/quoteStyle.js | 17 + .../object-inspect/test/toStringTag.js | 40 + node_modules/object-inspect/test/undef.js | 12 + node_modules/object-inspect/test/values.js | 211 + node_modules/object-inspect/util.inspect.js | 1 + node_modules/once/LICENSE | 15 + node_modules/once/README.md | 79 + node_modules/once/once.js | 42 + node_modules/once/package.json | 33 + node_modules/qs/.editorconfig | 43 + node_modules/qs/.eslintrc | 38 + node_modules/qs/.github/FUNDING.yml | 12 + node_modules/qs/.nycrc | 13 + node_modules/qs/CHANGELOG.md | 546 + node_modules/qs/LICENSE.md | 29 + node_modules/qs/README.md | 625 + node_modules/qs/dist/qs.js | 2054 + node_modules/qs/lib/formats.js | 23 + node_modules/qs/lib/index.js | 11 + node_modules/qs/lib/parse.js | 263 + node_modules/qs/lib/stringify.js | 326 + node_modules/qs/lib/utils.js | 252 + node_modules/qs/package.json | 77 + node_modules/qs/test/parse.js | 855 + node_modules/qs/test/stringify.js | 909 + node_modules/qs/test/utils.js | 136 + node_modules/side-channel/.eslintignore | 1 + node_modules/side-channel/.eslintrc | 11 + node_modules/side-channel/.github/FUNDING.yml | 12 + node_modules/side-channel/.nycrc | 13 + node_modules/side-channel/CHANGELOG.md | 65 + node_modules/side-channel/LICENSE | 21 + node_modules/side-channel/README.md | 2 + node_modules/side-channel/index.js | 124 + node_modules/side-channel/package.json | 67 + node_modules/side-channel/test/index.js | 78 + node_modules/tr46/.npmignore | 4 + node_modules/tr46/index.js | 193 + node_modules/tr46/lib/.gitkeep | 0 node_modules/tr46/lib/mappingTable.json | 1 + node_modules/tr46/package.json | 31 + node_modules/tunnel/.idea/encodings.xml | 6 + node_modules/tunnel/.idea/modules.xml | 8 + node_modules/tunnel/.idea/node-tunnel.iml | 12 + node_modules/tunnel/.idea/vcs.xml | 6 + node_modules/tunnel/.idea/workspace.xml | 797 + node_modules/tunnel/.travis.yml | 6 + node_modules/tunnel/CHANGELOG.md | 22 + node_modules/tunnel/LICENSE | 21 + node_modules/tunnel/README.md | 185 + node_modules/tunnel/index.js | 1 + node_modules/tunnel/lib/tunnel.js | 264 + node_modules/tunnel/package.json | 34 + node_modules/typed-rest-client/Handlers.d.ts | 4 + node_modules/typed-rest-client/Handlers.js | 10 + .../typed-rest-client/HttpClient.d.ts | 105 + node_modules/typed-rest-client/HttpClient.js | 502 + node_modules/typed-rest-client/Index.d.ts | 1 + node_modules/typed-rest-client/Index.js | 2 + .../typed-rest-client/Interfaces.d.ts | 74 + node_modules/typed-rest-client/Interfaces.js | 5 + node_modules/typed-rest-client/LICENSE | 39 + node_modules/typed-rest-client/README.md | 108 + .../typed-rest-client/RestClient.d.ts | 78 + node_modules/typed-rest-client/RestClient.js | 217 + .../typed-rest-client/ThirdPartyNotice.txt | 1318 + node_modules/typed-rest-client/Util.d.ts | 37 + node_modules/typed-rest-client/Util.js | 143 + .../handlers/basiccreds.d.ts | 11 + .../typed-rest-client/handlers/basiccreds.js | 31 + .../handlers/bearertoken.d.ts | 10 + .../typed-rest-client/handlers/bearertoken.js | 30 + .../typed-rest-client/handlers/ntlm.d.ts | 13 + .../typed-rest-client/handlers/ntlm.js | 137 + .../handlers/personalaccesstoken.d.ts | 10 + .../handlers/personalaccesstoken.js | 30 + .../opensource/Node-SMB/README.md | 5 + .../opensource/Node-SMB/lib/common.js | 61 + .../opensource/Node-SMB/lib/ntlm.js | 220 + .../opensource/Node-SMB/lib/smbhash.js | 64 + node_modules/typed-rest-client/package.json | 47 + node_modules/underscore/LICENSE | 22 + node_modules/underscore/README.md | 34 + node_modules/underscore/amd/_baseCreate.js | 21 + node_modules/underscore/amd/_baseIteratee.js | 15 + node_modules/underscore/amd/_cb.js | 12 + node_modules/underscore/amd/_chainResult.js | 10 + .../underscore/amd/_collectNonEnumProps.js | 42 + .../underscore/amd/_createAssigner.js | 24 + node_modules/underscore/amd/_createEscaper.js | 21 + .../underscore/amd/_createIndexFinder.js | 30 + .../amd/_createPredicateIndexFinder.js | 18 + node_modules/underscore/amd/_createReduce.js | 30 + .../amd/_createSizePropertyCheck.js | 13 + node_modules/underscore/amd/_deepGet.js | 15 + node_modules/underscore/amd/_escapeMap.js | 15 + node_modules/underscore/amd/_executeBound.js | 16 + node_modules/underscore/amd/_flatten.js | 32 + node_modules/underscore/amd/_getByteLength.js | 8 + node_modules/underscore/amd/_getLength.js | 8 + node_modules/underscore/amd/_group.js | 18 + node_modules/underscore/amd/_has.js | 10 + node_modules/underscore/amd/_hasObjectTag.js | 7 + node_modules/underscore/amd/_isArrayLike.js | 11 + node_modules/underscore/amd/_isBufferLike.js | 9 + node_modules/underscore/amd/_keyInObj.js | 11 + .../underscore/amd/_methodFingerprint.js | 44 + node_modules/underscore/amd/_optimizeCb.js | 27 + node_modules/underscore/amd/_setup.js | 70 + .../underscore/amd/_shallowProperty.js | 12 + node_modules/underscore/amd/_stringTagBug.js | 16 + node_modules/underscore/amd/_tagTester.js | 13 + node_modules/underscore/amd/_toBufferView.js | 15 + node_modules/underscore/amd/_toPath.js | 11 + node_modules/underscore/amd/_unescapeMap.js | 8 + node_modules/underscore/amd/after.js | 14 + node_modules/underscore/amd/allKeys.js | 15 + node_modules/underscore/amd/before.js | 18 + node_modules/underscore/amd/bind.js | 15 + node_modules/underscore/amd/bindAll.js | 19 + node_modules/underscore/amd/chain.js | 12 + node_modules/underscore/amd/chunk.js | 17 + node_modules/underscore/amd/clone.js | 11 + node_modules/underscore/amd/compact.js | 10 + node_modules/underscore/amd/compose.js | 18 + node_modules/underscore/amd/constant.js | 12 + node_modules/underscore/amd/contains.js | 12 + node_modules/underscore/amd/countBy.js | 12 + node_modules/underscore/amd/create.js | 14 + node_modules/underscore/amd/debounce.js | 43 + node_modules/underscore/amd/defaults.js | 8 + node_modules/underscore/amd/defer.js | 9 + node_modules/underscore/amd/delay.js | 13 + node_modules/underscore/amd/difference.js | 14 + node_modules/underscore/amd/each.js | 25 + node_modules/underscore/amd/escape.js | 8 + node_modules/underscore/amd/every.js | 17 + node_modules/underscore/amd/extend.js | 8 + node_modules/underscore/amd/extendOwn.js | 10 + node_modules/underscore/amd/filter.js | 15 + node_modules/underscore/amd/find.js | 12 + node_modules/underscore/amd/findIndex.js | 8 + node_modules/underscore/amd/findKey.js | 15 + node_modules/underscore/amd/findLastIndex.js | 8 + node_modules/underscore/amd/findWhere.js | 11 + node_modules/underscore/amd/first.js | 13 + node_modules/underscore/amd/flatten.js | 11 + node_modules/underscore/amd/functions.js | 14 + node_modules/underscore/amd/get.js | 14 + node_modules/underscore/amd/groupBy.js | 11 + node_modules/underscore/amd/has.js | 19 + node_modules/underscore/amd/identity.js | 10 + node_modules/underscore/amd/index-default.js | 12 + node_modules/underscore/amd/index.js | 154 + node_modules/underscore/amd/indexBy.js | 11 + node_modules/underscore/amd/indexOf.js | 11 + node_modules/underscore/amd/initial.js | 12 + node_modules/underscore/amd/intersection.js | 22 + node_modules/underscore/amd/invert.js | 15 + node_modules/underscore/amd/invoke.js | 28 + node_modules/underscore/amd/isArguments.js | 19 + node_modules/underscore/amd/isArray.js | 9 + node_modules/underscore/amd/isArrayBuffer.js | 7 + node_modules/underscore/amd/isBoolean.js | 10 + node_modules/underscore/amd/isDataView.js | 15 + node_modules/underscore/amd/isDate.js | 7 + node_modules/underscore/amd/isElement.js | 10 + node_modules/underscore/amd/isEmpty.js | 18 + node_modules/underscore/amd/isEqual.js | 133 + node_modules/underscore/amd/isError.js | 7 + node_modules/underscore/amd/isFinite.js | 10 + node_modules/underscore/amd/isFunction.js | 18 + node_modules/underscore/amd/isMap.js | 7 + node_modules/underscore/amd/isMatch.js | 17 + node_modules/underscore/amd/isNaN.js | 10 + node_modules/underscore/amd/isNull.js | 10 + node_modules/underscore/amd/isNumber.js | 7 + node_modules/underscore/amd/isObject.js | 11 + node_modules/underscore/amd/isRegExp.js | 7 + node_modules/underscore/amd/isSet.js | 7 + node_modules/underscore/amd/isString.js | 7 + node_modules/underscore/amd/isSymbol.js | 7 + node_modules/underscore/amd/isTypedArray.js | 16 + node_modules/underscore/amd/isUndefined.js | 10 + node_modules/underscore/amd/isWeakMap.js | 7 + node_modules/underscore/amd/isWeakSet.js | 7 + node_modules/underscore/amd/iteratee.js | 13 + node_modules/underscore/amd/keys.js | 17 + node_modules/underscore/amd/last.js | 13 + node_modules/underscore/amd/lastIndexOf.js | 9 + node_modules/underscore/amd/map.js | 18 + node_modules/underscore/amd/mapObject.js | 19 + node_modules/underscore/amd/matcher.js | 14 + node_modules/underscore/amd/max.js | 30 + node_modules/underscore/amd/memoize.js | 17 + node_modules/underscore/amd/min.js | 30 + node_modules/underscore/amd/mixin.js | 18 + node_modules/underscore/amd/negate.js | 12 + node_modules/underscore/amd/noop.js | 8 + node_modules/underscore/amd/now.js | 10 + node_modules/underscore/amd/object.js | 20 + node_modules/underscore/amd/omit.js | 20 + node_modules/underscore/amd/once.js | 9 + node_modules/underscore/amd/pairs.js | 17 + node_modules/underscore/amd/partial.js | 25 + node_modules/underscore/amd/partition.js | 11 + node_modules/underscore/amd/pick.js | 25 + node_modules/underscore/amd/pluck.js | 10 + node_modules/underscore/amd/property.js | 14 + node_modules/underscore/amd/propertyOf.js | 13 + node_modules/underscore/amd/random.js | 14 + node_modules/underscore/amd/range.js | 27 + node_modules/underscore/amd/reduce.js | 9 + node_modules/underscore/amd/reduceRight.js | 8 + node_modules/underscore/amd/reject.js | 10 + node_modules/underscore/amd/rest.js | 12 + node_modules/underscore/amd/restArguments.js | 33 + node_modules/underscore/amd/result.js | 25 + node_modules/underscore/amd/sample.js | 27 + node_modules/underscore/amd/shuffle.js | 10 + node_modules/underscore/amd/size.js | 11 + node_modules/underscore/amd/some.js | 17 + node_modules/underscore/amd/sortBy.js | 26 + node_modules/underscore/amd/sortedIndex.js | 18 + node_modules/underscore/amd/tap.js | 13 + node_modules/underscore/amd/template.js | 103 + .../underscore/amd/templateSettings.js | 13 + node_modules/underscore/amd/throttle.js | 51 + node_modules/underscore/amd/times.js | 13 + node_modules/underscore/amd/toArray.js | 18 + node_modules/underscore/amd/toPath.js | 12 + .../amd/underscore-array-methods.js | 30 + node_modules/underscore/amd/underscore.js | 29 + node_modules/underscore/amd/unescape.js | 8 + node_modules/underscore/amd/union.js | 11 + node_modules/underscore/amd/uniq.js | 37 + node_modules/underscore/amd/uniqueId.js | 13 + node_modules/underscore/amd/unzip.js | 17 + node_modules/underscore/amd/values.js | 16 + node_modules/underscore/amd/where.js | 11 + node_modules/underscore/amd/without.js | 10 + node_modules/underscore/amd/wrap.js | 12 + node_modules/underscore/amd/zip.js | 9 + node_modules/underscore/cjs/_baseCreate.js | 20 + node_modules/underscore/cjs/_baseIteratee.js | 19 + node_modules/underscore/cjs/_cb.js | 12 + node_modules/underscore/cjs/_chainResult.js | 8 + .../underscore/cjs/_collectNonEnumProps.js | 42 + .../underscore/cjs/_createAssigner.js | 20 + node_modules/underscore/cjs/_createEscaper.js | 19 + .../underscore/cjs/_createIndexFinder.js | 30 + .../cjs/_createPredicateIndexFinder.js | 17 + node_modules/underscore/cjs/_createReduce.js | 30 + .../cjs/_createSizePropertyCheck.js | 11 + node_modules/underscore/cjs/_deepGet.js | 11 + node_modules/underscore/cjs/_escapeMap.js | 11 + node_modules/underscore/cjs/_executeBound.js | 15 + node_modules/underscore/cjs/_flatten.js | 33 + node_modules/underscore/cjs/_getByteLength.js | 6 + node_modules/underscore/cjs/_getLength.js | 6 + node_modules/underscore/cjs/_group.js | 17 + node_modules/underscore/cjs/_has.js | 8 + node_modules/underscore/cjs/_hasObjectTag.js | 5 + node_modules/underscore/cjs/_isArrayLike.js | 10 + node_modules/underscore/cjs/_isBufferLike.js | 8 + node_modules/underscore/cjs/_keyInObj.js | 7 + .../underscore/cjs/_methodFingerprint.js | 44 + node_modules/underscore/cjs/_optimizeCb.js | 23 + node_modules/underscore/cjs/_setup.js | 66 + .../underscore/cjs/_shallowProperty.js | 8 + node_modules/underscore/cjs/_stringTagBug.js | 15 + node_modules/underscore/cjs/_tagTester.js | 11 + node_modules/underscore/cjs/_toBufferView.js | 13 + node_modules/underscore/cjs/_toPath.js | 10 + node_modules/underscore/cjs/_unescapeMap.js | 7 + node_modules/underscore/cjs/after.js | 10 + node_modules/underscore/cjs/allKeys.js | 15 + node_modules/underscore/cjs/before.js | 14 + node_modules/underscore/cjs/bind.js | 15 + node_modules/underscore/cjs/bindAll.js | 19 + node_modules/underscore/cjs/chain.js | 10 + node_modules/underscore/cjs/chunk.js | 15 + node_modules/underscore/cjs/clone.js | 11 + node_modules/underscore/cjs/compact.js | 8 + node_modules/underscore/cjs/compose.js | 14 + node_modules/underscore/cjs/constant.js | 8 + node_modules/underscore/cjs/contains.js | 12 + node_modules/underscore/cjs/countBy.js | 11 + node_modules/underscore/cjs/create.js | 13 + node_modules/underscore/cjs/debounce.js | 42 + node_modules/underscore/cjs/defaults.js | 7 + node_modules/underscore/cjs/defer.js | 9 + node_modules/underscore/cjs/delay.js | 11 + node_modules/underscore/cjs/difference.js | 15 + node_modules/underscore/cjs/each.js | 25 + node_modules/underscore/cjs/escape.js | 7 + node_modules/underscore/cjs/every.js | 17 + node_modules/underscore/cjs/extend.js | 7 + node_modules/underscore/cjs/extendOwn.js | 9 + node_modules/underscore/cjs/filter.js | 14 + node_modules/underscore/cjs/find.js | 12 + node_modules/underscore/cjs/findIndex.js | 6 + node_modules/underscore/cjs/findKey.js | 14 + node_modules/underscore/cjs/findLastIndex.js | 6 + node_modules/underscore/cjs/findWhere.js | 10 + node_modules/underscore/cjs/first.js | 11 + node_modules/underscore/cjs/flatten.js | 9 + node_modules/underscore/cjs/functions.js | 12 + node_modules/underscore/cjs/get.js | 14 + node_modules/underscore/cjs/groupBy.js | 10 + node_modules/underscore/cjs/has.js | 18 + node_modules/underscore/cjs/identity.js | 6 + node_modules/underscore/cjs/index-default.js | 11 + node_modules/underscore/cjs/index.js | 278 + node_modules/underscore/cjs/indexBy.js | 9 + node_modules/underscore/cjs/indexOf.js | 11 + node_modules/underscore/cjs/initial.js | 10 + node_modules/underscore/cjs/intersection.js | 21 + node_modules/underscore/cjs/invert.js | 13 + node_modules/underscore/cjs/invoke.js | 30 + node_modules/underscore/cjs/isArguments.js | 18 + node_modules/underscore/cjs/isArray.js | 8 + node_modules/underscore/cjs/isArrayBuffer.js | 5 + node_modules/underscore/cjs/isBoolean.js | 8 + node_modules/underscore/cjs/isDataView.js | 16 + node_modules/underscore/cjs/isDate.js | 5 + node_modules/underscore/cjs/isElement.js | 6 + node_modules/underscore/cjs/isEmpty.js | 20 + node_modules/underscore/cjs/isEqual.js | 140 + node_modules/underscore/cjs/isError.js | 5 + node_modules/underscore/cjs/isFinite.js | 9 + node_modules/underscore/cjs/isFunction.js | 17 + node_modules/underscore/cjs/isMap.js | 7 + node_modules/underscore/cjs/isMatch.js | 15 + node_modules/underscore/cjs/isNaN.js | 9 + node_modules/underscore/cjs/isNull.js | 6 + node_modules/underscore/cjs/isNumber.js | 5 + node_modules/underscore/cjs/isObject.js | 7 + node_modules/underscore/cjs/isRegExp.js | 5 + node_modules/underscore/cjs/isSet.js | 7 + node_modules/underscore/cjs/isString.js | 5 + node_modules/underscore/cjs/isSymbol.js | 5 + node_modules/underscore/cjs/isTypedArray.js | 17 + node_modules/underscore/cjs/isUndefined.js | 6 + node_modules/underscore/cjs/isWeakMap.js | 7 + node_modules/underscore/cjs/isWeakSet.js | 5 + node_modules/underscore/cjs/iteratee.js | 12 + node_modules/underscore/cjs/keys.js | 18 + node_modules/underscore/cjs/last.js | 11 + node_modules/underscore/cjs/lastIndexOf.js | 8 + node_modules/underscore/cjs/map.js | 18 + node_modules/underscore/cjs/mapObject.js | 18 + node_modules/underscore/cjs/matcher.js | 13 + node_modules/underscore/cjs/max.js | 31 + node_modules/underscore/cjs/memoize.js | 15 + node_modules/underscore/cjs/min.js | 31 + node_modules/underscore/cjs/mixin.js | 20 + node_modules/underscore/cjs/negate.js | 8 + node_modules/underscore/cjs/noop.js | 4 + node_modules/underscore/cjs/now.js | 6 + node_modules/underscore/cjs/object.js | 18 + node_modules/underscore/cjs/omit.js | 24 + node_modules/underscore/cjs/once.js | 8 + node_modules/underscore/cjs/pairs.js | 15 + node_modules/underscore/cjs/partial.js | 25 + node_modules/underscore/cjs/partition.js | 9 + node_modules/underscore/cjs/pick.js | 28 + node_modules/underscore/cjs/pluck.js | 9 + node_modules/underscore/cjs/property.js | 13 + node_modules/underscore/cjs/propertyOf.js | 12 + node_modules/underscore/cjs/random.js | 10 + node_modules/underscore/cjs/range.js | 23 + node_modules/underscore/cjs/reduce.js | 7 + node_modules/underscore/cjs/reduceRight.js | 6 + node_modules/underscore/cjs/reject.js | 10 + node_modules/underscore/cjs/rest.js | 10 + node_modules/underscore/cjs/restArguments.js | 29 + node_modules/underscore/cjs/result.js | 24 + node_modules/underscore/cjs/sample.js | 29 + node_modules/underscore/cjs/shuffle.js | 8 + node_modules/underscore/cjs/size.js | 10 + node_modules/underscore/cjs/some.js | 17 + node_modules/underscore/cjs/sortBy.js | 26 + node_modules/underscore/cjs/sortedIndex.js | 17 + node_modules/underscore/cjs/tap.js | 9 + node_modules/underscore/cjs/template.js | 103 + .../underscore/cjs/templateSettings.js | 11 + node_modules/underscore/cjs/throttle.js | 49 + node_modules/underscore/cjs/times.js | 11 + node_modules/underscore/cjs/toArray.js | 22 + node_modules/underscore/cjs/toPath.js | 11 + .../cjs/underscore-array-methods.js | 31 + node_modules/underscore/cjs/underscore.js | 27 + node_modules/underscore/cjs/unescape.js | 7 + node_modules/underscore/cjs/union.js | 11 + node_modules/underscore/cjs/uniq.js | 38 + node_modules/underscore/cjs/uniqueId.js | 9 + node_modules/underscore/cjs/unzip.js | 17 + node_modules/underscore/cjs/values.js | 14 + node_modules/underscore/cjs/where.js | 10 + node_modules/underscore/cjs/without.js | 9 + node_modules/underscore/cjs/wrap.js | 10 + node_modules/underscore/cjs/zip.js | 8 + node_modules/underscore/modules/.eslintrc | 21 + .../underscore/modules/_baseCreate.js | 18 + .../underscore/modules/_baseIteratee.js | 17 + node_modules/underscore/modules/_cb.js | 10 + .../underscore/modules/_chainResult.js | 6 + .../modules/_collectNonEnumProps.js | 40 + .../underscore/modules/_createAssigner.js | 18 + .../underscore/modules/_createEscaper.js | 17 + .../underscore/modules/_createIndexFinder.js | 28 + .../modules/_createPredicateIndexFinder.js | 15 + .../underscore/modules/_createReduce.js | 28 + .../modules/_createSizePropertyCheck.js | 9 + node_modules/underscore/modules/_deepGet.js | 9 + node_modules/underscore/modules/_escapeMap.js | 9 + .../underscore/modules/_executeBound.js | 13 + node_modules/underscore/modules/_flatten.js | 31 + .../underscore/modules/_getByteLength.js | 4 + node_modules/underscore/modules/_getLength.js | 4 + node_modules/underscore/modules/_group.js | 15 + node_modules/underscore/modules/_has.js | 6 + .../underscore/modules/_hasObjectTag.js | 3 + .../underscore/modules/_isArrayLike.js | 8 + .../underscore/modules/_isBufferLike.js | 6 + node_modules/underscore/modules/_keyInObj.js | 5 + .../underscore/modules/_methodFingerprint.js | 37 + .../underscore/modules/_optimizeCb.js | 21 + node_modules/underscore/modules/_setup.js | 43 + .../underscore/modules/_shallowProperty.js | 6 + .../underscore/modules/_stringTagBug.js | 10 + node_modules/underscore/modules/_tagTester.js | 9 + .../underscore/modules/_toBufferView.js | 11 + node_modules/underscore/modules/_toPath.js | 8 + .../underscore/modules/_unescapeMap.js | 5 + node_modules/underscore/modules/after.js | 8 + node_modules/underscore/modules/allKeys.js | 13 + node_modules/underscore/modules/before.js | 12 + node_modules/underscore/modules/bind.js | 13 + node_modules/underscore/modules/bindAll.js | 17 + node_modules/underscore/modules/chain.js | 8 + node_modules/underscore/modules/chunk.js | 13 + node_modules/underscore/modules/clone.js | 9 + node_modules/underscore/modules/compact.js | 6 + node_modules/underscore/modules/compose.js | 12 + node_modules/underscore/modules/constant.js | 6 + node_modules/underscore/modules/contains.js | 10 + node_modules/underscore/modules/countBy.js | 9 + node_modules/underscore/modules/create.js | 11 + node_modules/underscore/modules/debounce.js | 40 + node_modules/underscore/modules/defaults.js | 5 + node_modules/underscore/modules/defer.js | 7 + node_modules/underscore/modules/delay.js | 9 + node_modules/underscore/modules/difference.js | 13 + node_modules/underscore/modules/each.js | 23 + node_modules/underscore/modules/escape.js | 5 + node_modules/underscore/modules/every.js | 15 + node_modules/underscore/modules/extend.js | 5 + node_modules/underscore/modules/extendOwn.js | 7 + node_modules/underscore/modules/filter.js | 12 + node_modules/underscore/modules/find.js | 10 + node_modules/underscore/modules/findIndex.js | 4 + node_modules/underscore/modules/findKey.js | 12 + .../underscore/modules/findLastIndex.js | 4 + node_modules/underscore/modules/findWhere.js | 8 + node_modules/underscore/modules/first.js | 9 + node_modules/underscore/modules/flatten.js | 7 + node_modules/underscore/modules/functions.js | 10 + node_modules/underscore/modules/get.js | 12 + node_modules/underscore/modules/groupBy.js | 8 + node_modules/underscore/modules/has.js | 16 + node_modules/underscore/modules/identity.js | 4 + node_modules/underscore/modules/index-all.js | 18 + .../underscore/modules/index-default.js | 27 + node_modules/underscore/modules/index.js | 200 + node_modules/underscore/modules/indexBy.js | 7 + node_modules/underscore/modules/indexOf.js | 9 + node_modules/underscore/modules/initial.js | 8 + .../underscore/modules/intersection.js | 19 + node_modules/underscore/modules/invert.js | 11 + node_modules/underscore/modules/invoke.js | 28 + .../underscore/modules/isArguments.js | 16 + node_modules/underscore/modules/isArray.js | 6 + .../underscore/modules/isArrayBuffer.js | 3 + node_modules/underscore/modules/isBoolean.js | 6 + node_modules/underscore/modules/isDataView.js | 14 + node_modules/underscore/modules/isDate.js | 3 + node_modules/underscore/modules/isElement.js | 4 + node_modules/underscore/modules/isEmpty.js | 18 + node_modules/underscore/modules/isEqual.js | 138 + node_modules/underscore/modules/isError.js | 3 + node_modules/underscore/modules/isFinite.js | 7 + node_modules/underscore/modules/isFunction.js | 15 + node_modules/underscore/modules/isMap.js | 5 + node_modules/underscore/modules/isMatch.js | 13 + node_modules/underscore/modules/isNaN.js | 7 + node_modules/underscore/modules/isNull.js | 4 + node_modules/underscore/modules/isNumber.js | 3 + node_modules/underscore/modules/isObject.js | 5 + node_modules/underscore/modules/isRegExp.js | 3 + node_modules/underscore/modules/isSet.js | 5 + node_modules/underscore/modules/isString.js | 3 + node_modules/underscore/modules/isSymbol.js | 3 + .../underscore/modules/isTypedArray.js | 15 + .../underscore/modules/isUndefined.js | 4 + node_modules/underscore/modules/isWeakMap.js | 5 + node_modules/underscore/modules/isWeakSet.js | 3 + node_modules/underscore/modules/iteratee.js | 10 + node_modules/underscore/modules/keys.js | 16 + node_modules/underscore/modules/last.js | 9 + .../underscore/modules/lastIndexOf.js | 6 + node_modules/underscore/modules/map.js | 16 + node_modules/underscore/modules/mapObject.js | 16 + node_modules/underscore/modules/matcher.js | 11 + node_modules/underscore/modules/max.js | 29 + node_modules/underscore/modules/memoize.js | 13 + node_modules/underscore/modules/min.js | 29 + node_modules/underscore/modules/mixin.js | 18 + node_modules/underscore/modules/negate.js | 6 + node_modules/underscore/modules/noop.js | 2 + node_modules/underscore/modules/now.js | 4 + node_modules/underscore/modules/object.js | 16 + node_modules/underscore/modules/omit.js | 22 + node_modules/underscore/modules/once.js | 6 + node_modules/underscore/modules/package.json | 1 + node_modules/underscore/modules/pairs.js | 13 + node_modules/underscore/modules/partial.js | 24 + node_modules/underscore/modules/partition.js | 7 + node_modules/underscore/modules/pick.js | 26 + node_modules/underscore/modules/pluck.js | 7 + node_modules/underscore/modules/property.js | 11 + node_modules/underscore/modules/propertyOf.js | 10 + node_modules/underscore/modules/random.js | 8 + node_modules/underscore/modules/range.js | 21 + node_modules/underscore/modules/reduce.js | 5 + .../underscore/modules/reduceRight.js | 4 + node_modules/underscore/modules/reject.js | 8 + node_modules/underscore/modules/rest.js | 8 + .../underscore/modules/restArguments.js | 27 + node_modules/underscore/modules/result.js | 22 + node_modules/underscore/modules/sample.js | 27 + node_modules/underscore/modules/shuffle.js | 6 + node_modules/underscore/modules/size.js | 8 + node_modules/underscore/modules/some.js | 15 + node_modules/underscore/modules/sortBy.js | 24 + .../underscore/modules/sortedIndex.js | 15 + node_modules/underscore/modules/tap.js | 7 + node_modules/underscore/modules/template.js | 101 + .../underscore/modules/templateSettings.js | 9 + node_modules/underscore/modules/throttle.js | 47 + node_modules/underscore/modules/times.js | 9 + node_modules/underscore/modules/toArray.js | 20 + node_modules/underscore/modules/toPath.js | 9 + .../modules/underscore-array-methods.js | 31 + node_modules/underscore/modules/underscore.js | 25 + node_modules/underscore/modules/unescape.js | 5 + node_modules/underscore/modules/union.js | 9 + node_modules/underscore/modules/uniq.js | 36 + node_modules/underscore/modules/uniqueId.js | 7 + node_modules/underscore/modules/unzip.js | 15 + node_modules/underscore/modules/values.js | 12 + node_modules/underscore/modules/where.js | 8 + node_modules/underscore/modules/without.js | 7 + node_modules/underscore/modules/wrap.js | 8 + node_modules/underscore/modules/zip.js | 6 + node_modules/underscore/package.json | 122 + node_modules/underscore/underscore-esm-min.js | 5 + .../underscore/underscore-esm-min.js.map | 1 + node_modules/underscore/underscore-esm.js | 2034 + node_modules/underscore/underscore-esm.js.map | 1 + node_modules/underscore/underscore-min.js | 6 + node_modules/underscore/underscore-min.js.map | 1 + node_modules/underscore/underscore-node-f.cjs | 2158 + .../underscore/underscore-node-f.cjs.map | 1 + node_modules/underscore/underscore-node.cjs | 11 + .../underscore/underscore-node.cjs.map | 1 + node_modules/underscore/underscore-node.mjs | 7 + .../underscore/underscore-node.mjs.map | 1 + node_modules/underscore/underscore-umd-min.js | 6 + .../underscore/underscore-umd-min.js.map | 1 + node_modules/underscore/underscore-umd.js | 2042 + node_modules/underscore/underscore-umd.js.map | 1 + node_modules/underscore/underscore.js | 2042 + node_modules/universal-user-agent/LICENSE.md | 7 + node_modules/universal-user-agent/README.md | 25 + .../universal-user-agent/dist-node/index.js | 18 + .../dist-node/index.js.map | 1 + .../universal-user-agent/dist-src/index.js | 9 + .../dist-types/index.d.ts | 1 + .../universal-user-agent/dist-web/index.js | 12 + .../dist-web/index.js.map | 1 + .../universal-user-agent/package.json | 31 + node_modules/uuid/CHANGELOG.md | 229 + node_modules/uuid/CONTRIBUTING.md | 18 + node_modules/uuid/LICENSE.md | 9 + node_modules/uuid/README.md | 505 + node_modules/uuid/dist/bin/uuid | 2 + node_modules/uuid/dist/esm-browser/index.js | 9 + node_modules/uuid/dist/esm-browser/md5.js | 215 + node_modules/uuid/dist/esm-browser/nil.js | 1 + node_modules/uuid/dist/esm-browser/parse.js | 35 + node_modules/uuid/dist/esm-browser/regex.js | 1 + node_modules/uuid/dist/esm-browser/rng.js | 19 + node_modules/uuid/dist/esm-browser/sha1.js | 96 + .../uuid/dist/esm-browser/stringify.js | 30 + node_modules/uuid/dist/esm-browser/v1.js | 95 + node_modules/uuid/dist/esm-browser/v3.js | 4 + node_modules/uuid/dist/esm-browser/v35.js | 64 + node_modules/uuid/dist/esm-browser/v4.js | 24 + node_modules/uuid/dist/esm-browser/v5.js | 4 + .../uuid/dist/esm-browser/validate.js | 7 + node_modules/uuid/dist/esm-browser/version.js | 11 + node_modules/uuid/dist/esm-node/index.js | 9 + node_modules/uuid/dist/esm-node/md5.js | 13 + node_modules/uuid/dist/esm-node/nil.js | 1 + node_modules/uuid/dist/esm-node/parse.js | 35 + node_modules/uuid/dist/esm-node/regex.js | 1 + node_modules/uuid/dist/esm-node/rng.js | 12 + node_modules/uuid/dist/esm-node/sha1.js | 13 + node_modules/uuid/dist/esm-node/stringify.js | 29 + node_modules/uuid/dist/esm-node/v1.js | 95 + node_modules/uuid/dist/esm-node/v3.js | 4 + node_modules/uuid/dist/esm-node/v35.js | 64 + node_modules/uuid/dist/esm-node/v4.js | 24 + node_modules/uuid/dist/esm-node/v5.js | 4 + node_modules/uuid/dist/esm-node/validate.js | 7 + node_modules/uuid/dist/esm-node/version.js | 11 + node_modules/uuid/dist/index.js | 79 + node_modules/uuid/dist/md5-browser.js | 223 + node_modules/uuid/dist/md5.js | 23 + node_modules/uuid/dist/nil.js | 8 + node_modules/uuid/dist/parse.js | 45 + node_modules/uuid/dist/regex.js | 8 + node_modules/uuid/dist/rng-browser.js | 26 + node_modules/uuid/dist/rng.js | 24 + node_modules/uuid/dist/sha1-browser.js | 104 + node_modules/uuid/dist/sha1.js | 23 + node_modules/uuid/dist/stringify.js | 39 + node_modules/uuid/dist/umd/uuid.min.js | 1 + node_modules/uuid/dist/umd/uuidNIL.min.js | 1 + node_modules/uuid/dist/umd/uuidParse.min.js | 1 + .../uuid/dist/umd/uuidStringify.min.js | 1 + .../uuid/dist/umd/uuidValidate.min.js | 1 + node_modules/uuid/dist/umd/uuidVersion.min.js | 1 + node_modules/uuid/dist/umd/uuidv1.min.js | 1 + node_modules/uuid/dist/umd/uuidv3.min.js | 1 + node_modules/uuid/dist/umd/uuidv4.min.js | 1 + node_modules/uuid/dist/umd/uuidv5.min.js | 1 + node_modules/uuid/dist/uuid-bin.js | 85 + node_modules/uuid/dist/v1.js | 107 + node_modules/uuid/dist/v3.js | 16 + node_modules/uuid/dist/v35.js | 78 + node_modules/uuid/dist/v4.js | 37 + node_modules/uuid/dist/v5.js | 16 + node_modules/uuid/dist/validate.js | 17 + node_modules/uuid/dist/version.js | 21 + node_modules/uuid/package.json | 135 + node_modules/uuid/wrapper.mjs | 10 + node_modules/webidl-conversions/LICENSE.md | 12 + node_modules/webidl-conversions/README.md | 53 + node_modules/webidl-conversions/lib/index.js | 189 + node_modules/webidl-conversions/package.json | 23 + node_modules/whatwg-url/LICENSE.txt | 21 + node_modules/whatwg-url/README.md | 67 + node_modules/whatwg-url/lib/URL-impl.js | 200 + node_modules/whatwg-url/lib/URL.js | 196 + node_modules/whatwg-url/lib/public-api.js | 11 + .../whatwg-url/lib/url-state-machine.js | 1297 + node_modules/whatwg-url/lib/utils.js | 20 + node_modules/whatwg-url/package.json | 32 + node_modules/wrappy/LICENSE | 15 + node_modules/wrappy/README.md | 36 + node_modules/wrappy/package.json | 29 + node_modules/wrappy/wrappy.js | 33 + 1200 files changed, 230989 insertions(+), 151 deletions(-) delete mode 100644 .github/dependabot.yml delete mode 100644 .github/workflows/codeql-analysis.yml delete mode 100644 .github/workflows/publish.yml delete mode 100644 .github/workflows/validator.yml create mode 120000 node_modules/.bin/uuid create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@actions/core/LICENSE.md create mode 100644 node_modules/@actions/core/README.md create mode 100644 node_modules/@actions/core/lib/command.d.ts create mode 100644 node_modules/@actions/core/lib/command.js create mode 100644 node_modules/@actions/core/lib/command.js.map create mode 100644 node_modules/@actions/core/lib/core.d.ts create mode 100644 node_modules/@actions/core/lib/core.js create mode 100644 node_modules/@actions/core/lib/core.js.map create mode 100644 node_modules/@actions/core/lib/file-command.d.ts create mode 100644 node_modules/@actions/core/lib/file-command.js create mode 100644 node_modules/@actions/core/lib/file-command.js.map create mode 100644 node_modules/@actions/core/lib/oidc-utils.d.ts create mode 100644 node_modules/@actions/core/lib/oidc-utils.js create mode 100644 node_modules/@actions/core/lib/oidc-utils.js.map create mode 100644 node_modules/@actions/core/lib/path-utils.d.ts create mode 100644 node_modules/@actions/core/lib/path-utils.js create mode 100644 node_modules/@actions/core/lib/path-utils.js.map create mode 100644 node_modules/@actions/core/lib/summary.d.ts create mode 100644 node_modules/@actions/core/lib/summary.js create mode 100644 node_modules/@actions/core/lib/summary.js.map create mode 100644 node_modules/@actions/core/lib/utils.d.ts create mode 100644 node_modules/@actions/core/lib/utils.js create mode 100644 node_modules/@actions/core/lib/utils.js.map create mode 100644 node_modules/@actions/core/package.json create mode 100644 node_modules/@actions/github/LICENSE.md create mode 100644 node_modules/@actions/github/README.md create mode 100644 node_modules/@actions/github/lib/context.d.ts create mode 100644 node_modules/@actions/github/lib/context.js create mode 100644 node_modules/@actions/github/lib/context.js.map create mode 100644 node_modules/@actions/github/lib/github.d.ts create mode 100644 node_modules/@actions/github/lib/github.js create mode 100644 node_modules/@actions/github/lib/github.js.map create mode 100644 node_modules/@actions/github/lib/interfaces.d.ts create mode 100644 node_modules/@actions/github/lib/interfaces.js create mode 100644 node_modules/@actions/github/lib/interfaces.js.map create mode 100644 node_modules/@actions/github/lib/internal/utils.d.ts create mode 100644 node_modules/@actions/github/lib/internal/utils.js create mode 100644 node_modules/@actions/github/lib/internal/utils.js.map create mode 100644 node_modules/@actions/github/lib/utils.d.ts create mode 100644 node_modules/@actions/github/lib/utils.js create mode 100644 node_modules/@actions/github/lib/utils.js.map create mode 100644 node_modules/@actions/github/package.json create mode 100644 node_modules/@actions/http-client/LICENSE create mode 100644 node_modules/@actions/http-client/README.md create mode 100644 node_modules/@actions/http-client/lib/auth.d.ts create mode 100644 node_modules/@actions/http-client/lib/auth.js create mode 100644 node_modules/@actions/http-client/lib/auth.js.map create mode 100644 node_modules/@actions/http-client/lib/index.d.ts create mode 100644 node_modules/@actions/http-client/lib/index.js create mode 100644 node_modules/@actions/http-client/lib/index.js.map create mode 100644 node_modules/@actions/http-client/lib/interfaces.d.ts create mode 100644 node_modules/@actions/http-client/lib/interfaces.js create mode 100644 node_modules/@actions/http-client/lib/interfaces.js.map create mode 100644 node_modules/@actions/http-client/lib/proxy.d.ts create mode 100644 node_modules/@actions/http-client/lib/proxy.js create mode 100644 node_modules/@actions/http-client/lib/proxy.js.map create mode 100644 node_modules/@actions/http-client/package.json create mode 100644 node_modules/@octokit/auth-token/LICENSE create mode 100644 node_modules/@octokit/auth-token/README.md create mode 100644 node_modules/@octokit/auth-token/dist-node/index.js create mode 100644 node_modules/@octokit/auth-token/dist-node/index.js.map create mode 100644 node_modules/@octokit/auth-token/dist-src/auth.js create mode 100644 node_modules/@octokit/auth-token/dist-src/hook.js create mode 100644 node_modules/@octokit/auth-token/dist-src/index.js create mode 100644 node_modules/@octokit/auth-token/dist-src/types.js create mode 100644 node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js create mode 100644 node_modules/@octokit/auth-token/dist-types/auth.d.ts create mode 100644 node_modules/@octokit/auth-token/dist-types/hook.d.ts create mode 100644 node_modules/@octokit/auth-token/dist-types/index.d.ts create mode 100644 node_modules/@octokit/auth-token/dist-types/types.d.ts create mode 100644 node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts create mode 100644 node_modules/@octokit/auth-token/dist-web/index.js create mode 100644 node_modules/@octokit/auth-token/dist-web/index.js.map create mode 100644 node_modules/@octokit/auth-token/package.json create mode 100644 node_modules/@octokit/core/LICENSE create mode 100644 node_modules/@octokit/core/README.md create mode 100644 node_modules/@octokit/core/dist-node/index.js create mode 100644 node_modules/@octokit/core/dist-node/index.js.map create mode 100644 node_modules/@octokit/core/dist-src/index.js create mode 100644 node_modules/@octokit/core/dist-src/types.js create mode 100644 node_modules/@octokit/core/dist-src/version.js create mode 100644 node_modules/@octokit/core/dist-types/index.d.ts create mode 100644 node_modules/@octokit/core/dist-types/types.d.ts create mode 100644 node_modules/@octokit/core/dist-types/version.d.ts create mode 100644 node_modules/@octokit/core/dist-web/index.js create mode 100644 node_modules/@octokit/core/dist-web/index.js.map create mode 100644 node_modules/@octokit/core/package.json create mode 100644 node_modules/@octokit/endpoint/LICENSE create mode 100644 node_modules/@octokit/endpoint/README.md create mode 100644 node_modules/@octokit/endpoint/dist-node/index.js create mode 100644 node_modules/@octokit/endpoint/dist-node/index.js.map create mode 100644 node_modules/@octokit/endpoint/dist-src/defaults.js create mode 100644 node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js create mode 100644 node_modules/@octokit/endpoint/dist-src/index.js create mode 100644 node_modules/@octokit/endpoint/dist-src/merge.js create mode 100644 node_modules/@octokit/endpoint/dist-src/parse.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/merge-deep.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/omit.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js create mode 100644 node_modules/@octokit/endpoint/dist-src/util/url-template.js create mode 100644 node_modules/@octokit/endpoint/dist-src/version.js create mode 100644 node_modules/@octokit/endpoint/dist-src/with-defaults.js create mode 100644 node_modules/@octokit/endpoint/dist-types/defaults.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/index.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/merge.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/parse.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/omit.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/version.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts create mode 100644 node_modules/@octokit/endpoint/dist-web/index.js create mode 100644 node_modules/@octokit/endpoint/dist-web/index.js.map create mode 100644 node_modules/@octokit/endpoint/package.json create mode 100644 node_modules/@octokit/graphql/LICENSE create mode 100644 node_modules/@octokit/graphql/README.md create mode 100644 node_modules/@octokit/graphql/dist-node/index.js create mode 100644 node_modules/@octokit/graphql/dist-node/index.js.map create mode 100644 node_modules/@octokit/graphql/dist-src/error.js create mode 100644 node_modules/@octokit/graphql/dist-src/graphql.js create mode 100644 node_modules/@octokit/graphql/dist-src/index.js create mode 100644 node_modules/@octokit/graphql/dist-src/types.js create mode 100644 node_modules/@octokit/graphql/dist-src/version.js create mode 100644 node_modules/@octokit/graphql/dist-src/with-defaults.js create mode 100644 node_modules/@octokit/graphql/dist-types/error.d.ts create mode 100644 node_modules/@octokit/graphql/dist-types/graphql.d.ts create mode 100644 node_modules/@octokit/graphql/dist-types/index.d.ts create mode 100644 node_modules/@octokit/graphql/dist-types/types.d.ts create mode 100644 node_modules/@octokit/graphql/dist-types/version.d.ts create mode 100644 node_modules/@octokit/graphql/dist-types/with-defaults.d.ts create mode 100644 node_modules/@octokit/graphql/dist-web/index.js create mode 100644 node_modules/@octokit/graphql/dist-web/index.js.map create mode 100644 node_modules/@octokit/graphql/package.json create mode 100644 node_modules/@octokit/openapi-types/LICENSE create mode 100644 node_modules/@octokit/openapi-types/README.md create mode 100644 node_modules/@octokit/openapi-types/package.json create mode 100644 node_modules/@octokit/openapi-types/types.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/LICENSE create mode 100644 node_modules/@octokit/plugin-paginate-rest/README.md create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-node/index.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/index.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/types.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-src/version.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-web/index.js create mode 100644 node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map create mode 100644 node_modules/@octokit/plugin-paginate-rest/package.json create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/README.md create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/types.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map create mode 100644 node_modules/@octokit/plugin-rest-endpoint-methods/package.json create mode 100644 node_modules/@octokit/request-error/LICENSE create mode 100644 node_modules/@octokit/request-error/README.md create mode 100644 node_modules/@octokit/request-error/dist-node/index.js create mode 100644 node_modules/@octokit/request-error/dist-node/index.js.map create mode 100644 node_modules/@octokit/request-error/dist-src/index.js create mode 100644 node_modules/@octokit/request-error/dist-src/types.js create mode 100644 node_modules/@octokit/request-error/dist-types/index.d.ts create mode 100644 node_modules/@octokit/request-error/dist-types/types.d.ts create mode 100644 node_modules/@octokit/request-error/dist-web/index.js create mode 100644 node_modules/@octokit/request-error/dist-web/index.js.map create mode 100644 node_modules/@octokit/request-error/package.json create mode 100644 node_modules/@octokit/request/LICENSE create mode 100644 node_modules/@octokit/request/README.md create mode 100644 node_modules/@octokit/request/dist-node/index.js create mode 100644 node_modules/@octokit/request/dist-node/index.js.map create mode 100644 node_modules/@octokit/request/dist-src/fetch-wrapper.js create mode 100644 node_modules/@octokit/request/dist-src/get-buffer-response.js create mode 100644 node_modules/@octokit/request/dist-src/index.js create mode 100644 node_modules/@octokit/request/dist-src/version.js create mode 100644 node_modules/@octokit/request/dist-src/with-defaults.js create mode 100644 node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts create mode 100644 node_modules/@octokit/request/dist-types/get-buffer-response.d.ts create mode 100644 node_modules/@octokit/request/dist-types/index.d.ts create mode 100644 node_modules/@octokit/request/dist-types/version.d.ts create mode 100644 node_modules/@octokit/request/dist-types/with-defaults.d.ts create mode 100644 node_modules/@octokit/request/dist-web/index.js create mode 100644 node_modules/@octokit/request/dist-web/index.js.map create mode 100644 node_modules/@octokit/request/package.json create mode 100644 node_modules/@octokit/types/LICENSE create mode 100644 node_modules/@octokit/types/README.md create mode 100644 node_modules/@octokit/types/dist-node/index.js create mode 100644 node_modules/@octokit/types/dist-node/index.js.map create mode 100644 node_modules/@octokit/types/dist-src/AuthInterface.js create mode 100644 node_modules/@octokit/types/dist-src/EndpointDefaults.js create mode 100644 node_modules/@octokit/types/dist-src/EndpointInterface.js create mode 100644 node_modules/@octokit/types/dist-src/EndpointOptions.js create mode 100644 node_modules/@octokit/types/dist-src/Fetch.js create mode 100644 node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js create mode 100644 node_modules/@octokit/types/dist-src/OctokitResponse.js create mode 100644 node_modules/@octokit/types/dist-src/RequestError.js create mode 100644 node_modules/@octokit/types/dist-src/RequestHeaders.js create mode 100644 node_modules/@octokit/types/dist-src/RequestInterface.js create mode 100644 node_modules/@octokit/types/dist-src/RequestMethod.js create mode 100644 node_modules/@octokit/types/dist-src/RequestOptions.js create mode 100644 node_modules/@octokit/types/dist-src/RequestParameters.js create mode 100644 node_modules/@octokit/types/dist-src/RequestRequestOptions.js create mode 100644 node_modules/@octokit/types/dist-src/ResponseHeaders.js create mode 100644 node_modules/@octokit/types/dist-src/Route.js create mode 100644 node_modules/@octokit/types/dist-src/Signal.js create mode 100644 node_modules/@octokit/types/dist-src/StrategyInterface.js create mode 100644 node_modules/@octokit/types/dist-src/Url.js create mode 100644 node_modules/@octokit/types/dist-src/VERSION.js create mode 100644 node_modules/@octokit/types/dist-src/generated/Endpoints.js create mode 100644 node_modules/@octokit/types/dist-src/index.js create mode 100644 node_modules/@octokit/types/dist-types/AuthInterface.d.ts create mode 100644 node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts create mode 100644 node_modules/@octokit/types/dist-types/EndpointInterface.d.ts create mode 100644 node_modules/@octokit/types/dist-types/EndpointOptions.d.ts create mode 100644 node_modules/@octokit/types/dist-types/Fetch.d.ts create mode 100644 node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts create mode 100644 node_modules/@octokit/types/dist-types/OctokitResponse.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestError.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestHeaders.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestInterface.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestMethod.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestOptions.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestParameters.d.ts create mode 100644 node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts create mode 100644 node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts create mode 100644 node_modules/@octokit/types/dist-types/Route.d.ts create mode 100644 node_modules/@octokit/types/dist-types/Signal.d.ts create mode 100644 node_modules/@octokit/types/dist-types/StrategyInterface.d.ts create mode 100644 node_modules/@octokit/types/dist-types/Url.d.ts create mode 100644 node_modules/@octokit/types/dist-types/VERSION.d.ts create mode 100644 node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts create mode 100644 node_modules/@octokit/types/dist-types/index.d.ts create mode 100644 node_modules/@octokit/types/dist-web/index.js create mode 100644 node_modules/@octokit/types/dist-web/index.js.map create mode 100644 node_modules/@octokit/types/package.json create mode 100644 node_modules/azure-devops-node-api/BuildApi.d.ts create mode 100644 node_modules/azure-devops-node-api/BuildApi.js create mode 100644 node_modules/azure-devops-node-api/ClientApiBases.d.ts create mode 100644 node_modules/azure-devops-node-api/ClientApiBases.js create mode 100644 node_modules/azure-devops-node-api/CoreApi.d.ts create mode 100644 node_modules/azure-devops-node-api/CoreApi.js create mode 100644 node_modules/azure-devops-node-api/DashboardApi.d.ts create mode 100644 node_modules/azure-devops-node-api/DashboardApi.js create mode 100644 node_modules/azure-devops-node-api/ExtensionManagementApi.d.ts create mode 100644 node_modules/azure-devops-node-api/ExtensionManagementApi.js create mode 100644 node_modules/azure-devops-node-api/FeatureManagementApi.d.ts create mode 100644 node_modules/azure-devops-node-api/FeatureManagementApi.js create mode 100644 node_modules/azure-devops-node-api/FileContainerApi.d.ts create mode 100644 node_modules/azure-devops-node-api/FileContainerApi.js create mode 100644 node_modules/azure-devops-node-api/FileContainerApiBase.d.ts create mode 100644 node_modules/azure-devops-node-api/FileContainerApiBase.js create mode 100644 node_modules/azure-devops-node-api/GalleryApi.d.ts create mode 100644 node_modules/azure-devops-node-api/GalleryApi.js create mode 100644 node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.d.ts create mode 100644 node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.js create mode 100644 node_modules/azure-devops-node-api/GitApi.d.ts create mode 100644 node_modules/azure-devops-node-api/GitApi.js create mode 100644 node_modules/azure-devops-node-api/LICENSE create mode 100644 node_modules/azure-devops-node-api/LocationsApi.d.ts create mode 100644 node_modules/azure-devops-node-api/LocationsApi.js create mode 100644 node_modules/azure-devops-node-api/NotificationApi.d.ts create mode 100644 node_modules/azure-devops-node-api/NotificationApi.js create mode 100644 node_modules/azure-devops-node-api/PolicyApi.d.ts create mode 100644 node_modules/azure-devops-node-api/PolicyApi.js create mode 100644 node_modules/azure-devops-node-api/ProfileApi.d.ts create mode 100644 node_modules/azure-devops-node-api/ProfileApi.js create mode 100644 node_modules/azure-devops-node-api/ProjectAnalysisApi.d.ts create mode 100644 node_modules/azure-devops-node-api/ProjectAnalysisApi.js create mode 100644 node_modules/azure-devops-node-api/README.md create mode 100644 node_modules/azure-devops-node-api/ReleaseApi.d.ts create mode 100644 node_modules/azure-devops-node-api/ReleaseApi.js create mode 100644 node_modules/azure-devops-node-api/SecurityRolesApi.d.ts create mode 100644 node_modules/azure-devops-node-api/SecurityRolesApi.js create mode 100644 node_modules/azure-devops-node-api/Serialization.d.ts create mode 100644 node_modules/azure-devops-node-api/Serialization.js create mode 100644 node_modules/azure-devops-node-api/TaskAgentApi.d.ts create mode 100644 node_modules/azure-devops-node-api/TaskAgentApi.js create mode 100644 node_modules/azure-devops-node-api/TaskAgentApiBase.d.ts create mode 100644 node_modules/azure-devops-node-api/TaskAgentApiBase.js create mode 100644 node_modules/azure-devops-node-api/TaskApi.d.ts create mode 100644 node_modules/azure-devops-node-api/TaskApi.js create mode 100644 node_modules/azure-devops-node-api/TestApi.d.ts create mode 100644 node_modules/azure-devops-node-api/TestApi.js create mode 100644 node_modules/azure-devops-node-api/TfvcApi.d.ts create mode 100644 node_modules/azure-devops-node-api/TfvcApi.js create mode 100644 node_modules/azure-devops-node-api/ThirdPartyNotice.txt create mode 100644 node_modules/azure-devops-node-api/VsoClient.d.ts create mode 100644 node_modules/azure-devops-node-api/VsoClient.js create mode 100644 node_modules/azure-devops-node-api/WebApi.d.ts create mode 100644 node_modules/azure-devops-node-api/WebApi.js create mode 100644 node_modules/azure-devops-node-api/WikiApi.d.ts create mode 100644 node_modules/azure-devops-node-api/WikiApi.js create mode 100644 node_modules/azure-devops-node-api/WorkApi.d.ts create mode 100644 node_modules/azure-devops-node-api/WorkApi.js create mode 100644 node_modules/azure-devops-node-api/WorkItemTrackingApi.d.ts create mode 100644 node_modules/azure-devops-node-api/WorkItemTrackingApi.js create mode 100644 node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.d.ts create mode 100644 node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.js create mode 100644 node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.d.ts create mode 100644 node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.js create mode 100644 node_modules/azure-devops-node-api/handlers/basiccreds.d.ts create mode 100644 node_modules/azure-devops-node-api/handlers/basiccreds.js create mode 100644 node_modules/azure-devops-node-api/handlers/bearertoken.d.ts create mode 100644 node_modules/azure-devops-node-api/handlers/bearertoken.js create mode 100644 node_modules/azure-devops-node-api/handlers/ntlm.d.ts create mode 100644 node_modules/azure-devops-node-api/handlers/ntlm.js create mode 100644 node_modules/azure-devops-node-api/handlers/personalaccesstoken.d.ts create mode 100644 node_modules/azure-devops-node-api/handlers/personalaccesstoken.js create mode 100644 node_modules/azure-devops-node-api/interfaces/BuildInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/BuildInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/CoreInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/CoreInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/GitInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/GraphInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/GraphInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/TestInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/TestInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/WikiInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/WikiInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/common/System.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/common/System.js create mode 100644 node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.js create mode 100644 node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.d.ts create mode 100644 node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js create mode 100644 node_modules/azure-devops-node-api/opensource/node-http-ntlm/ntlm.js create mode 100644 node_modules/azure-devops-node-api/opensource/node-http-ntlm/readme.txt create mode 100644 node_modules/azure-devops-node-api/package.json create mode 100644 node_modules/before-after-hook/LICENSE create mode 100644 node_modules/before-after-hook/README.md create mode 100644 node_modules/before-after-hook/index.d.ts create mode 100644 node_modules/before-after-hook/index.js create mode 100644 node_modules/before-after-hook/lib/add.js create mode 100644 node_modules/before-after-hook/lib/register.js create mode 100644 node_modules/before-after-hook/lib/remove.js create mode 100644 node_modules/before-after-hook/package.json create mode 100644 node_modules/call-bind/.eslintignore create mode 100644 node_modules/call-bind/.eslintrc create mode 100644 node_modules/call-bind/.github/FUNDING.yml create mode 100644 node_modules/call-bind/.nycrc create mode 100644 node_modules/call-bind/CHANGELOG.md create mode 100644 node_modules/call-bind/LICENSE create mode 100644 node_modules/call-bind/README.md create mode 100644 node_modules/call-bind/callBound.js create mode 100644 node_modules/call-bind/index.js create mode 100644 node_modules/call-bind/package.json create mode 100644 node_modules/call-bind/test/callBound.js create mode 100644 node_modules/call-bind/test/index.js create mode 100644 node_modules/deprecation/LICENSE create mode 100644 node_modules/deprecation/README.md create mode 100644 node_modules/deprecation/dist-node/index.js create mode 100644 node_modules/deprecation/dist-src/index.js create mode 100644 node_modules/deprecation/dist-types/index.d.ts create mode 100644 node_modules/deprecation/dist-web/index.js create mode 100644 node_modules/deprecation/package.json create mode 100644 node_modules/function-bind/.editorconfig create mode 100644 node_modules/function-bind/.eslintrc create mode 100644 node_modules/function-bind/.jscs.json create mode 100644 node_modules/function-bind/.npmignore create mode 100644 node_modules/function-bind/.travis.yml create mode 100644 node_modules/function-bind/LICENSE create mode 100644 node_modules/function-bind/README.md create mode 100644 node_modules/function-bind/implementation.js create mode 100644 node_modules/function-bind/index.js create mode 100644 node_modules/function-bind/package.json create mode 100644 node_modules/function-bind/test/.eslintrc create mode 100644 node_modules/function-bind/test/index.js create mode 100644 node_modules/get-intrinsic/.eslintrc create mode 100644 node_modules/get-intrinsic/.github/FUNDING.yml create mode 100644 node_modules/get-intrinsic/.nycrc create mode 100644 node_modules/get-intrinsic/CHANGELOG.md create mode 100644 node_modules/get-intrinsic/LICENSE create mode 100644 node_modules/get-intrinsic/README.md create mode 100644 node_modules/get-intrinsic/index.js create mode 100644 node_modules/get-intrinsic/package.json create mode 100644 node_modules/get-intrinsic/test/GetIntrinsic.js create mode 100644 node_modules/has-symbols/.eslintrc create mode 100644 node_modules/has-symbols/.github/FUNDING.yml create mode 100644 node_modules/has-symbols/.nycrc create mode 100644 node_modules/has-symbols/CHANGELOG.md create mode 100644 node_modules/has-symbols/LICENSE create mode 100644 node_modules/has-symbols/README.md create mode 100644 node_modules/has-symbols/index.js create mode 100644 node_modules/has-symbols/package.json create mode 100644 node_modules/has-symbols/shams.js create mode 100644 node_modules/has-symbols/test/index.js create mode 100644 node_modules/has-symbols/test/shams/core-js.js create mode 100644 node_modules/has-symbols/test/shams/get-own-property-symbols.js create mode 100644 node_modules/has-symbols/test/tests.js create mode 100644 node_modules/has/LICENSE-MIT create mode 100644 node_modules/has/README.md create mode 100644 node_modules/has/package.json create mode 100644 node_modules/has/src/index.js create mode 100644 node_modules/has/test/index.js create mode 100644 node_modules/is-plain-object/LICENSE create mode 100644 node_modules/is-plain-object/README.md create mode 100644 node_modules/is-plain-object/dist/is-plain-object.js create mode 100644 node_modules/is-plain-object/dist/is-plain-object.mjs create mode 100644 node_modules/is-plain-object/is-plain-object.d.ts create mode 100644 node_modules/is-plain-object/package.json create mode 100644 node_modules/node-fetch/LICENSE.md create mode 100644 node_modules/node-fetch/README.md create mode 100644 node_modules/node-fetch/browser.js create mode 100644 node_modules/node-fetch/lib/index.es.js create mode 100644 node_modules/node-fetch/lib/index.js create mode 100644 node_modules/node-fetch/lib/index.mjs create mode 100644 node_modules/node-fetch/package.json create mode 100644 node_modules/object-inspect/.eslintrc create mode 100644 node_modules/object-inspect/.github/FUNDING.yml create mode 100644 node_modules/object-inspect/.nycrc create mode 100644 node_modules/object-inspect/CHANGELOG.md create mode 100644 node_modules/object-inspect/LICENSE create mode 100644 node_modules/object-inspect/example/all.js create mode 100644 node_modules/object-inspect/example/circular.js create mode 100644 node_modules/object-inspect/example/fn.js create mode 100644 node_modules/object-inspect/example/inspect.js create mode 100644 node_modules/object-inspect/index.js create mode 100644 node_modules/object-inspect/package-support.json create mode 100644 node_modules/object-inspect/package.json create mode 100644 node_modules/object-inspect/readme.markdown create mode 100644 node_modules/object-inspect/test-core-js.js create mode 100644 node_modules/object-inspect/test/bigint.js create mode 100644 node_modules/object-inspect/test/browser/dom.js create mode 100644 node_modules/object-inspect/test/circular.js create mode 100644 node_modules/object-inspect/test/deep.js create mode 100644 node_modules/object-inspect/test/element.js create mode 100644 node_modules/object-inspect/test/err.js create mode 100644 node_modules/object-inspect/test/fakes.js create mode 100644 node_modules/object-inspect/test/fn.js create mode 100644 node_modules/object-inspect/test/has.js create mode 100644 node_modules/object-inspect/test/holes.js create mode 100644 node_modules/object-inspect/test/indent-option.js create mode 100644 node_modules/object-inspect/test/inspect.js create mode 100644 node_modules/object-inspect/test/lowbyte.js create mode 100644 node_modules/object-inspect/test/number.js create mode 100644 node_modules/object-inspect/test/quoteStyle.js create mode 100644 node_modules/object-inspect/test/toStringTag.js create mode 100644 node_modules/object-inspect/test/undef.js create mode 100644 node_modules/object-inspect/test/values.js create mode 100644 node_modules/object-inspect/util.inspect.js create mode 100644 node_modules/once/LICENSE create mode 100644 node_modules/once/README.md create mode 100644 node_modules/once/once.js create mode 100644 node_modules/once/package.json create mode 100644 node_modules/qs/.editorconfig create mode 100644 node_modules/qs/.eslintrc create mode 100644 node_modules/qs/.github/FUNDING.yml create mode 100644 node_modules/qs/.nycrc create mode 100644 node_modules/qs/CHANGELOG.md create mode 100644 node_modules/qs/LICENSE.md create mode 100644 node_modules/qs/README.md create mode 100644 node_modules/qs/dist/qs.js create mode 100644 node_modules/qs/lib/formats.js create mode 100644 node_modules/qs/lib/index.js create mode 100644 node_modules/qs/lib/parse.js create mode 100644 node_modules/qs/lib/stringify.js create mode 100644 node_modules/qs/lib/utils.js create mode 100644 node_modules/qs/package.json create mode 100644 node_modules/qs/test/parse.js create mode 100644 node_modules/qs/test/stringify.js create mode 100644 node_modules/qs/test/utils.js create mode 100644 node_modules/side-channel/.eslintignore create mode 100644 node_modules/side-channel/.eslintrc create mode 100644 node_modules/side-channel/.github/FUNDING.yml create mode 100644 node_modules/side-channel/.nycrc create mode 100644 node_modules/side-channel/CHANGELOG.md create mode 100644 node_modules/side-channel/LICENSE create mode 100644 node_modules/side-channel/README.md create mode 100644 node_modules/side-channel/index.js create mode 100644 node_modules/side-channel/package.json create mode 100644 node_modules/side-channel/test/index.js create mode 100644 node_modules/tr46/.npmignore create mode 100644 node_modules/tr46/index.js create mode 100644 node_modules/tr46/lib/.gitkeep create mode 100644 node_modules/tr46/lib/mappingTable.json create mode 100644 node_modules/tr46/package.json create mode 100644 node_modules/tunnel/.idea/encodings.xml create mode 100644 node_modules/tunnel/.idea/modules.xml create mode 100644 node_modules/tunnel/.idea/node-tunnel.iml create mode 100644 node_modules/tunnel/.idea/vcs.xml create mode 100644 node_modules/tunnel/.idea/workspace.xml create mode 100644 node_modules/tunnel/.travis.yml create mode 100644 node_modules/tunnel/CHANGELOG.md create mode 100644 node_modules/tunnel/LICENSE create mode 100644 node_modules/tunnel/README.md create mode 100644 node_modules/tunnel/index.js create mode 100644 node_modules/tunnel/lib/tunnel.js create mode 100644 node_modules/tunnel/package.json create mode 100644 node_modules/typed-rest-client/Handlers.d.ts create mode 100644 node_modules/typed-rest-client/Handlers.js create mode 100644 node_modules/typed-rest-client/HttpClient.d.ts create mode 100644 node_modules/typed-rest-client/HttpClient.js create mode 100644 node_modules/typed-rest-client/Index.d.ts create mode 100644 node_modules/typed-rest-client/Index.js create mode 100644 node_modules/typed-rest-client/Interfaces.d.ts create mode 100644 node_modules/typed-rest-client/Interfaces.js create mode 100644 node_modules/typed-rest-client/LICENSE create mode 100644 node_modules/typed-rest-client/README.md create mode 100644 node_modules/typed-rest-client/RestClient.d.ts create mode 100644 node_modules/typed-rest-client/RestClient.js create mode 100644 node_modules/typed-rest-client/ThirdPartyNotice.txt create mode 100644 node_modules/typed-rest-client/Util.d.ts create mode 100644 node_modules/typed-rest-client/Util.js create mode 100644 node_modules/typed-rest-client/handlers/basiccreds.d.ts create mode 100644 node_modules/typed-rest-client/handlers/basiccreds.js create mode 100644 node_modules/typed-rest-client/handlers/bearertoken.d.ts create mode 100644 node_modules/typed-rest-client/handlers/bearertoken.js create mode 100644 node_modules/typed-rest-client/handlers/ntlm.d.ts create mode 100644 node_modules/typed-rest-client/handlers/ntlm.js create mode 100644 node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts create mode 100644 node_modules/typed-rest-client/handlers/personalaccesstoken.js create mode 100644 node_modules/typed-rest-client/opensource/Node-SMB/README.md create mode 100644 node_modules/typed-rest-client/opensource/Node-SMB/lib/common.js create mode 100644 node_modules/typed-rest-client/opensource/Node-SMB/lib/ntlm.js create mode 100644 node_modules/typed-rest-client/opensource/Node-SMB/lib/smbhash.js create mode 100644 node_modules/typed-rest-client/package.json create mode 100644 node_modules/underscore/LICENSE create mode 100644 node_modules/underscore/README.md create mode 100644 node_modules/underscore/amd/_baseCreate.js create mode 100644 node_modules/underscore/amd/_baseIteratee.js create mode 100644 node_modules/underscore/amd/_cb.js create mode 100644 node_modules/underscore/amd/_chainResult.js create mode 100644 node_modules/underscore/amd/_collectNonEnumProps.js create mode 100644 node_modules/underscore/amd/_createAssigner.js create mode 100644 node_modules/underscore/amd/_createEscaper.js create mode 100644 node_modules/underscore/amd/_createIndexFinder.js create mode 100644 node_modules/underscore/amd/_createPredicateIndexFinder.js create mode 100644 node_modules/underscore/amd/_createReduce.js create mode 100644 node_modules/underscore/amd/_createSizePropertyCheck.js create mode 100644 node_modules/underscore/amd/_deepGet.js create mode 100644 node_modules/underscore/amd/_escapeMap.js create mode 100644 node_modules/underscore/amd/_executeBound.js create mode 100644 node_modules/underscore/amd/_flatten.js create mode 100644 node_modules/underscore/amd/_getByteLength.js create mode 100644 node_modules/underscore/amd/_getLength.js create mode 100644 node_modules/underscore/amd/_group.js create mode 100644 node_modules/underscore/amd/_has.js create mode 100644 node_modules/underscore/amd/_hasObjectTag.js create mode 100644 node_modules/underscore/amd/_isArrayLike.js create mode 100644 node_modules/underscore/amd/_isBufferLike.js create mode 100644 node_modules/underscore/amd/_keyInObj.js create mode 100644 node_modules/underscore/amd/_methodFingerprint.js create mode 100644 node_modules/underscore/amd/_optimizeCb.js create mode 100644 node_modules/underscore/amd/_setup.js create mode 100644 node_modules/underscore/amd/_shallowProperty.js create mode 100644 node_modules/underscore/amd/_stringTagBug.js create mode 100644 node_modules/underscore/amd/_tagTester.js create mode 100644 node_modules/underscore/amd/_toBufferView.js create mode 100644 node_modules/underscore/amd/_toPath.js create mode 100644 node_modules/underscore/amd/_unescapeMap.js create mode 100644 node_modules/underscore/amd/after.js create mode 100644 node_modules/underscore/amd/allKeys.js create mode 100644 node_modules/underscore/amd/before.js create mode 100644 node_modules/underscore/amd/bind.js create mode 100644 node_modules/underscore/amd/bindAll.js create mode 100644 node_modules/underscore/amd/chain.js create mode 100644 node_modules/underscore/amd/chunk.js create mode 100644 node_modules/underscore/amd/clone.js create mode 100644 node_modules/underscore/amd/compact.js create mode 100644 node_modules/underscore/amd/compose.js create mode 100644 node_modules/underscore/amd/constant.js create mode 100644 node_modules/underscore/amd/contains.js create mode 100644 node_modules/underscore/amd/countBy.js create mode 100644 node_modules/underscore/amd/create.js create mode 100644 node_modules/underscore/amd/debounce.js create mode 100644 node_modules/underscore/amd/defaults.js create mode 100644 node_modules/underscore/amd/defer.js create mode 100644 node_modules/underscore/amd/delay.js create mode 100644 node_modules/underscore/amd/difference.js create mode 100644 node_modules/underscore/amd/each.js create mode 100644 node_modules/underscore/amd/escape.js create mode 100644 node_modules/underscore/amd/every.js create mode 100644 node_modules/underscore/amd/extend.js create mode 100644 node_modules/underscore/amd/extendOwn.js create mode 100644 node_modules/underscore/amd/filter.js create mode 100644 node_modules/underscore/amd/find.js create mode 100644 node_modules/underscore/amd/findIndex.js create mode 100644 node_modules/underscore/amd/findKey.js create mode 100644 node_modules/underscore/amd/findLastIndex.js create mode 100644 node_modules/underscore/amd/findWhere.js create mode 100644 node_modules/underscore/amd/first.js create mode 100644 node_modules/underscore/amd/flatten.js create mode 100644 node_modules/underscore/amd/functions.js create mode 100644 node_modules/underscore/amd/get.js create mode 100644 node_modules/underscore/amd/groupBy.js create mode 100644 node_modules/underscore/amd/has.js create mode 100644 node_modules/underscore/amd/identity.js create mode 100644 node_modules/underscore/amd/index-default.js create mode 100644 node_modules/underscore/amd/index.js create mode 100644 node_modules/underscore/amd/indexBy.js create mode 100644 node_modules/underscore/amd/indexOf.js create mode 100644 node_modules/underscore/amd/initial.js create mode 100644 node_modules/underscore/amd/intersection.js create mode 100644 node_modules/underscore/amd/invert.js create mode 100644 node_modules/underscore/amd/invoke.js create mode 100644 node_modules/underscore/amd/isArguments.js create mode 100644 node_modules/underscore/amd/isArray.js create mode 100644 node_modules/underscore/amd/isArrayBuffer.js create mode 100644 node_modules/underscore/amd/isBoolean.js create mode 100644 node_modules/underscore/amd/isDataView.js create mode 100644 node_modules/underscore/amd/isDate.js create mode 100644 node_modules/underscore/amd/isElement.js create mode 100644 node_modules/underscore/amd/isEmpty.js create mode 100644 node_modules/underscore/amd/isEqual.js create mode 100644 node_modules/underscore/amd/isError.js create mode 100644 node_modules/underscore/amd/isFinite.js create mode 100644 node_modules/underscore/amd/isFunction.js create mode 100644 node_modules/underscore/amd/isMap.js create mode 100644 node_modules/underscore/amd/isMatch.js create mode 100644 node_modules/underscore/amd/isNaN.js create mode 100644 node_modules/underscore/amd/isNull.js create mode 100644 node_modules/underscore/amd/isNumber.js create mode 100644 node_modules/underscore/amd/isObject.js create mode 100644 node_modules/underscore/amd/isRegExp.js create mode 100644 node_modules/underscore/amd/isSet.js create mode 100644 node_modules/underscore/amd/isString.js create mode 100644 node_modules/underscore/amd/isSymbol.js create mode 100644 node_modules/underscore/amd/isTypedArray.js create mode 100644 node_modules/underscore/amd/isUndefined.js create mode 100644 node_modules/underscore/amd/isWeakMap.js create mode 100644 node_modules/underscore/amd/isWeakSet.js create mode 100644 node_modules/underscore/amd/iteratee.js create mode 100644 node_modules/underscore/amd/keys.js create mode 100644 node_modules/underscore/amd/last.js create mode 100644 node_modules/underscore/amd/lastIndexOf.js create mode 100644 node_modules/underscore/amd/map.js create mode 100644 node_modules/underscore/amd/mapObject.js create mode 100644 node_modules/underscore/amd/matcher.js create mode 100644 node_modules/underscore/amd/max.js create mode 100644 node_modules/underscore/amd/memoize.js create mode 100644 node_modules/underscore/amd/min.js create mode 100644 node_modules/underscore/amd/mixin.js create mode 100644 node_modules/underscore/amd/negate.js create mode 100644 node_modules/underscore/amd/noop.js create mode 100644 node_modules/underscore/amd/now.js create mode 100644 node_modules/underscore/amd/object.js create mode 100644 node_modules/underscore/amd/omit.js create mode 100644 node_modules/underscore/amd/once.js create mode 100644 node_modules/underscore/amd/pairs.js create mode 100644 node_modules/underscore/amd/partial.js create mode 100644 node_modules/underscore/amd/partition.js create mode 100644 node_modules/underscore/amd/pick.js create mode 100644 node_modules/underscore/amd/pluck.js create mode 100644 node_modules/underscore/amd/property.js create mode 100644 node_modules/underscore/amd/propertyOf.js create mode 100644 node_modules/underscore/amd/random.js create mode 100644 node_modules/underscore/amd/range.js create mode 100644 node_modules/underscore/amd/reduce.js create mode 100644 node_modules/underscore/amd/reduceRight.js create mode 100644 node_modules/underscore/amd/reject.js create mode 100644 node_modules/underscore/amd/rest.js create mode 100644 node_modules/underscore/amd/restArguments.js create mode 100644 node_modules/underscore/amd/result.js create mode 100644 node_modules/underscore/amd/sample.js create mode 100644 node_modules/underscore/amd/shuffle.js create mode 100644 node_modules/underscore/amd/size.js create mode 100644 node_modules/underscore/amd/some.js create mode 100644 node_modules/underscore/amd/sortBy.js create mode 100644 node_modules/underscore/amd/sortedIndex.js create mode 100644 node_modules/underscore/amd/tap.js create mode 100644 node_modules/underscore/amd/template.js create mode 100644 node_modules/underscore/amd/templateSettings.js create mode 100644 node_modules/underscore/amd/throttle.js create mode 100644 node_modules/underscore/amd/times.js create mode 100644 node_modules/underscore/amd/toArray.js create mode 100644 node_modules/underscore/amd/toPath.js create mode 100644 node_modules/underscore/amd/underscore-array-methods.js create mode 100644 node_modules/underscore/amd/underscore.js create mode 100644 node_modules/underscore/amd/unescape.js create mode 100644 node_modules/underscore/amd/union.js create mode 100644 node_modules/underscore/amd/uniq.js create mode 100644 node_modules/underscore/amd/uniqueId.js create mode 100644 node_modules/underscore/amd/unzip.js create mode 100644 node_modules/underscore/amd/values.js create mode 100644 node_modules/underscore/amd/where.js create mode 100644 node_modules/underscore/amd/without.js create mode 100644 node_modules/underscore/amd/wrap.js create mode 100644 node_modules/underscore/amd/zip.js create mode 100644 node_modules/underscore/cjs/_baseCreate.js create mode 100644 node_modules/underscore/cjs/_baseIteratee.js create mode 100644 node_modules/underscore/cjs/_cb.js create mode 100644 node_modules/underscore/cjs/_chainResult.js create mode 100644 node_modules/underscore/cjs/_collectNonEnumProps.js create mode 100644 node_modules/underscore/cjs/_createAssigner.js create mode 100644 node_modules/underscore/cjs/_createEscaper.js create mode 100644 node_modules/underscore/cjs/_createIndexFinder.js create mode 100644 node_modules/underscore/cjs/_createPredicateIndexFinder.js create mode 100644 node_modules/underscore/cjs/_createReduce.js create mode 100644 node_modules/underscore/cjs/_createSizePropertyCheck.js create mode 100644 node_modules/underscore/cjs/_deepGet.js create mode 100644 node_modules/underscore/cjs/_escapeMap.js create mode 100644 node_modules/underscore/cjs/_executeBound.js create mode 100644 node_modules/underscore/cjs/_flatten.js create mode 100644 node_modules/underscore/cjs/_getByteLength.js create mode 100644 node_modules/underscore/cjs/_getLength.js create mode 100644 node_modules/underscore/cjs/_group.js create mode 100644 node_modules/underscore/cjs/_has.js create mode 100644 node_modules/underscore/cjs/_hasObjectTag.js create mode 100644 node_modules/underscore/cjs/_isArrayLike.js create mode 100644 node_modules/underscore/cjs/_isBufferLike.js create mode 100644 node_modules/underscore/cjs/_keyInObj.js create mode 100644 node_modules/underscore/cjs/_methodFingerprint.js create mode 100644 node_modules/underscore/cjs/_optimizeCb.js create mode 100644 node_modules/underscore/cjs/_setup.js create mode 100644 node_modules/underscore/cjs/_shallowProperty.js create mode 100644 node_modules/underscore/cjs/_stringTagBug.js create mode 100644 node_modules/underscore/cjs/_tagTester.js create mode 100644 node_modules/underscore/cjs/_toBufferView.js create mode 100644 node_modules/underscore/cjs/_toPath.js create mode 100644 node_modules/underscore/cjs/_unescapeMap.js create mode 100644 node_modules/underscore/cjs/after.js create mode 100644 node_modules/underscore/cjs/allKeys.js create mode 100644 node_modules/underscore/cjs/before.js create mode 100644 node_modules/underscore/cjs/bind.js create mode 100644 node_modules/underscore/cjs/bindAll.js create mode 100644 node_modules/underscore/cjs/chain.js create mode 100644 node_modules/underscore/cjs/chunk.js create mode 100644 node_modules/underscore/cjs/clone.js create mode 100644 node_modules/underscore/cjs/compact.js create mode 100644 node_modules/underscore/cjs/compose.js create mode 100644 node_modules/underscore/cjs/constant.js create mode 100644 node_modules/underscore/cjs/contains.js create mode 100644 node_modules/underscore/cjs/countBy.js create mode 100644 node_modules/underscore/cjs/create.js create mode 100644 node_modules/underscore/cjs/debounce.js create mode 100644 node_modules/underscore/cjs/defaults.js create mode 100644 node_modules/underscore/cjs/defer.js create mode 100644 node_modules/underscore/cjs/delay.js create mode 100644 node_modules/underscore/cjs/difference.js create mode 100644 node_modules/underscore/cjs/each.js create mode 100644 node_modules/underscore/cjs/escape.js create mode 100644 node_modules/underscore/cjs/every.js create mode 100644 node_modules/underscore/cjs/extend.js create mode 100644 node_modules/underscore/cjs/extendOwn.js create mode 100644 node_modules/underscore/cjs/filter.js create mode 100644 node_modules/underscore/cjs/find.js create mode 100644 node_modules/underscore/cjs/findIndex.js create mode 100644 node_modules/underscore/cjs/findKey.js create mode 100644 node_modules/underscore/cjs/findLastIndex.js create mode 100644 node_modules/underscore/cjs/findWhere.js create mode 100644 node_modules/underscore/cjs/first.js create mode 100644 node_modules/underscore/cjs/flatten.js create mode 100644 node_modules/underscore/cjs/functions.js create mode 100644 node_modules/underscore/cjs/get.js create mode 100644 node_modules/underscore/cjs/groupBy.js create mode 100644 node_modules/underscore/cjs/has.js create mode 100644 node_modules/underscore/cjs/identity.js create mode 100644 node_modules/underscore/cjs/index-default.js create mode 100644 node_modules/underscore/cjs/index.js create mode 100644 node_modules/underscore/cjs/indexBy.js create mode 100644 node_modules/underscore/cjs/indexOf.js create mode 100644 node_modules/underscore/cjs/initial.js create mode 100644 node_modules/underscore/cjs/intersection.js create mode 100644 node_modules/underscore/cjs/invert.js create mode 100644 node_modules/underscore/cjs/invoke.js create mode 100644 node_modules/underscore/cjs/isArguments.js create mode 100644 node_modules/underscore/cjs/isArray.js create mode 100644 node_modules/underscore/cjs/isArrayBuffer.js create mode 100644 node_modules/underscore/cjs/isBoolean.js create mode 100644 node_modules/underscore/cjs/isDataView.js create mode 100644 node_modules/underscore/cjs/isDate.js create mode 100644 node_modules/underscore/cjs/isElement.js create mode 100644 node_modules/underscore/cjs/isEmpty.js create mode 100644 node_modules/underscore/cjs/isEqual.js create mode 100644 node_modules/underscore/cjs/isError.js create mode 100644 node_modules/underscore/cjs/isFinite.js create mode 100644 node_modules/underscore/cjs/isFunction.js create mode 100644 node_modules/underscore/cjs/isMap.js create mode 100644 node_modules/underscore/cjs/isMatch.js create mode 100644 node_modules/underscore/cjs/isNaN.js create mode 100644 node_modules/underscore/cjs/isNull.js create mode 100644 node_modules/underscore/cjs/isNumber.js create mode 100644 node_modules/underscore/cjs/isObject.js create mode 100644 node_modules/underscore/cjs/isRegExp.js create mode 100644 node_modules/underscore/cjs/isSet.js create mode 100644 node_modules/underscore/cjs/isString.js create mode 100644 node_modules/underscore/cjs/isSymbol.js create mode 100644 node_modules/underscore/cjs/isTypedArray.js create mode 100644 node_modules/underscore/cjs/isUndefined.js create mode 100644 node_modules/underscore/cjs/isWeakMap.js create mode 100644 node_modules/underscore/cjs/isWeakSet.js create mode 100644 node_modules/underscore/cjs/iteratee.js create mode 100644 node_modules/underscore/cjs/keys.js create mode 100644 node_modules/underscore/cjs/last.js create mode 100644 node_modules/underscore/cjs/lastIndexOf.js create mode 100644 node_modules/underscore/cjs/map.js create mode 100644 node_modules/underscore/cjs/mapObject.js create mode 100644 node_modules/underscore/cjs/matcher.js create mode 100644 node_modules/underscore/cjs/max.js create mode 100644 node_modules/underscore/cjs/memoize.js create mode 100644 node_modules/underscore/cjs/min.js create mode 100644 node_modules/underscore/cjs/mixin.js create mode 100644 node_modules/underscore/cjs/negate.js create mode 100644 node_modules/underscore/cjs/noop.js create mode 100644 node_modules/underscore/cjs/now.js create mode 100644 node_modules/underscore/cjs/object.js create mode 100644 node_modules/underscore/cjs/omit.js create mode 100644 node_modules/underscore/cjs/once.js create mode 100644 node_modules/underscore/cjs/pairs.js create mode 100644 node_modules/underscore/cjs/partial.js create mode 100644 node_modules/underscore/cjs/partition.js create mode 100644 node_modules/underscore/cjs/pick.js create mode 100644 node_modules/underscore/cjs/pluck.js create mode 100644 node_modules/underscore/cjs/property.js create mode 100644 node_modules/underscore/cjs/propertyOf.js create mode 100644 node_modules/underscore/cjs/random.js create mode 100644 node_modules/underscore/cjs/range.js create mode 100644 node_modules/underscore/cjs/reduce.js create mode 100644 node_modules/underscore/cjs/reduceRight.js create mode 100644 node_modules/underscore/cjs/reject.js create mode 100644 node_modules/underscore/cjs/rest.js create mode 100644 node_modules/underscore/cjs/restArguments.js create mode 100644 node_modules/underscore/cjs/result.js create mode 100644 node_modules/underscore/cjs/sample.js create mode 100644 node_modules/underscore/cjs/shuffle.js create mode 100644 node_modules/underscore/cjs/size.js create mode 100644 node_modules/underscore/cjs/some.js create mode 100644 node_modules/underscore/cjs/sortBy.js create mode 100644 node_modules/underscore/cjs/sortedIndex.js create mode 100644 node_modules/underscore/cjs/tap.js create mode 100644 node_modules/underscore/cjs/template.js create mode 100644 node_modules/underscore/cjs/templateSettings.js create mode 100644 node_modules/underscore/cjs/throttle.js create mode 100644 node_modules/underscore/cjs/times.js create mode 100644 node_modules/underscore/cjs/toArray.js create mode 100644 node_modules/underscore/cjs/toPath.js create mode 100644 node_modules/underscore/cjs/underscore-array-methods.js create mode 100644 node_modules/underscore/cjs/underscore.js create mode 100644 node_modules/underscore/cjs/unescape.js create mode 100644 node_modules/underscore/cjs/union.js create mode 100644 node_modules/underscore/cjs/uniq.js create mode 100644 node_modules/underscore/cjs/uniqueId.js create mode 100644 node_modules/underscore/cjs/unzip.js create mode 100644 node_modules/underscore/cjs/values.js create mode 100644 node_modules/underscore/cjs/where.js create mode 100644 node_modules/underscore/cjs/without.js create mode 100644 node_modules/underscore/cjs/wrap.js create mode 100644 node_modules/underscore/cjs/zip.js create mode 100644 node_modules/underscore/modules/.eslintrc create mode 100644 node_modules/underscore/modules/_baseCreate.js create mode 100644 node_modules/underscore/modules/_baseIteratee.js create mode 100644 node_modules/underscore/modules/_cb.js create mode 100644 node_modules/underscore/modules/_chainResult.js create mode 100644 node_modules/underscore/modules/_collectNonEnumProps.js create mode 100644 node_modules/underscore/modules/_createAssigner.js create mode 100644 node_modules/underscore/modules/_createEscaper.js create mode 100644 node_modules/underscore/modules/_createIndexFinder.js create mode 100644 node_modules/underscore/modules/_createPredicateIndexFinder.js create mode 100644 node_modules/underscore/modules/_createReduce.js create mode 100644 node_modules/underscore/modules/_createSizePropertyCheck.js create mode 100644 node_modules/underscore/modules/_deepGet.js create mode 100644 node_modules/underscore/modules/_escapeMap.js create mode 100644 node_modules/underscore/modules/_executeBound.js create mode 100644 node_modules/underscore/modules/_flatten.js create mode 100644 node_modules/underscore/modules/_getByteLength.js create mode 100644 node_modules/underscore/modules/_getLength.js create mode 100644 node_modules/underscore/modules/_group.js create mode 100644 node_modules/underscore/modules/_has.js create mode 100644 node_modules/underscore/modules/_hasObjectTag.js create mode 100644 node_modules/underscore/modules/_isArrayLike.js create mode 100644 node_modules/underscore/modules/_isBufferLike.js create mode 100644 node_modules/underscore/modules/_keyInObj.js create mode 100644 node_modules/underscore/modules/_methodFingerprint.js create mode 100644 node_modules/underscore/modules/_optimizeCb.js create mode 100644 node_modules/underscore/modules/_setup.js create mode 100644 node_modules/underscore/modules/_shallowProperty.js create mode 100644 node_modules/underscore/modules/_stringTagBug.js create mode 100644 node_modules/underscore/modules/_tagTester.js create mode 100644 node_modules/underscore/modules/_toBufferView.js create mode 100644 node_modules/underscore/modules/_toPath.js create mode 100644 node_modules/underscore/modules/_unescapeMap.js create mode 100644 node_modules/underscore/modules/after.js create mode 100644 node_modules/underscore/modules/allKeys.js create mode 100644 node_modules/underscore/modules/before.js create mode 100644 node_modules/underscore/modules/bind.js create mode 100644 node_modules/underscore/modules/bindAll.js create mode 100644 node_modules/underscore/modules/chain.js create mode 100644 node_modules/underscore/modules/chunk.js create mode 100644 node_modules/underscore/modules/clone.js create mode 100644 node_modules/underscore/modules/compact.js create mode 100644 node_modules/underscore/modules/compose.js create mode 100644 node_modules/underscore/modules/constant.js create mode 100644 node_modules/underscore/modules/contains.js create mode 100644 node_modules/underscore/modules/countBy.js create mode 100644 node_modules/underscore/modules/create.js create mode 100644 node_modules/underscore/modules/debounce.js create mode 100644 node_modules/underscore/modules/defaults.js create mode 100644 node_modules/underscore/modules/defer.js create mode 100644 node_modules/underscore/modules/delay.js create mode 100644 node_modules/underscore/modules/difference.js create mode 100644 node_modules/underscore/modules/each.js create mode 100644 node_modules/underscore/modules/escape.js create mode 100644 node_modules/underscore/modules/every.js create mode 100644 node_modules/underscore/modules/extend.js create mode 100644 node_modules/underscore/modules/extendOwn.js create mode 100644 node_modules/underscore/modules/filter.js create mode 100644 node_modules/underscore/modules/find.js create mode 100644 node_modules/underscore/modules/findIndex.js create mode 100644 node_modules/underscore/modules/findKey.js create mode 100644 node_modules/underscore/modules/findLastIndex.js create mode 100644 node_modules/underscore/modules/findWhere.js create mode 100644 node_modules/underscore/modules/first.js create mode 100644 node_modules/underscore/modules/flatten.js create mode 100644 node_modules/underscore/modules/functions.js create mode 100644 node_modules/underscore/modules/get.js create mode 100644 node_modules/underscore/modules/groupBy.js create mode 100644 node_modules/underscore/modules/has.js create mode 100644 node_modules/underscore/modules/identity.js create mode 100644 node_modules/underscore/modules/index-all.js create mode 100644 node_modules/underscore/modules/index-default.js create mode 100644 node_modules/underscore/modules/index.js create mode 100644 node_modules/underscore/modules/indexBy.js create mode 100644 node_modules/underscore/modules/indexOf.js create mode 100644 node_modules/underscore/modules/initial.js create mode 100644 node_modules/underscore/modules/intersection.js create mode 100644 node_modules/underscore/modules/invert.js create mode 100644 node_modules/underscore/modules/invoke.js create mode 100644 node_modules/underscore/modules/isArguments.js create mode 100644 node_modules/underscore/modules/isArray.js create mode 100644 node_modules/underscore/modules/isArrayBuffer.js create mode 100644 node_modules/underscore/modules/isBoolean.js create mode 100644 node_modules/underscore/modules/isDataView.js create mode 100644 node_modules/underscore/modules/isDate.js create mode 100644 node_modules/underscore/modules/isElement.js create mode 100644 node_modules/underscore/modules/isEmpty.js create mode 100644 node_modules/underscore/modules/isEqual.js create mode 100644 node_modules/underscore/modules/isError.js create mode 100644 node_modules/underscore/modules/isFinite.js create mode 100644 node_modules/underscore/modules/isFunction.js create mode 100644 node_modules/underscore/modules/isMap.js create mode 100644 node_modules/underscore/modules/isMatch.js create mode 100644 node_modules/underscore/modules/isNaN.js create mode 100644 node_modules/underscore/modules/isNull.js create mode 100644 node_modules/underscore/modules/isNumber.js create mode 100644 node_modules/underscore/modules/isObject.js create mode 100644 node_modules/underscore/modules/isRegExp.js create mode 100644 node_modules/underscore/modules/isSet.js create mode 100644 node_modules/underscore/modules/isString.js create mode 100644 node_modules/underscore/modules/isSymbol.js create mode 100644 node_modules/underscore/modules/isTypedArray.js create mode 100644 node_modules/underscore/modules/isUndefined.js create mode 100644 node_modules/underscore/modules/isWeakMap.js create mode 100644 node_modules/underscore/modules/isWeakSet.js create mode 100644 node_modules/underscore/modules/iteratee.js create mode 100644 node_modules/underscore/modules/keys.js create mode 100644 node_modules/underscore/modules/last.js create mode 100644 node_modules/underscore/modules/lastIndexOf.js create mode 100644 node_modules/underscore/modules/map.js create mode 100644 node_modules/underscore/modules/mapObject.js create mode 100644 node_modules/underscore/modules/matcher.js create mode 100644 node_modules/underscore/modules/max.js create mode 100644 node_modules/underscore/modules/memoize.js create mode 100644 node_modules/underscore/modules/min.js create mode 100644 node_modules/underscore/modules/mixin.js create mode 100644 node_modules/underscore/modules/negate.js create mode 100644 node_modules/underscore/modules/noop.js create mode 100644 node_modules/underscore/modules/now.js create mode 100644 node_modules/underscore/modules/object.js create mode 100644 node_modules/underscore/modules/omit.js create mode 100644 node_modules/underscore/modules/once.js create mode 100644 node_modules/underscore/modules/package.json create mode 100644 node_modules/underscore/modules/pairs.js create mode 100644 node_modules/underscore/modules/partial.js create mode 100644 node_modules/underscore/modules/partition.js create mode 100644 node_modules/underscore/modules/pick.js create mode 100644 node_modules/underscore/modules/pluck.js create mode 100644 node_modules/underscore/modules/property.js create mode 100644 node_modules/underscore/modules/propertyOf.js create mode 100644 node_modules/underscore/modules/random.js create mode 100644 node_modules/underscore/modules/range.js create mode 100644 node_modules/underscore/modules/reduce.js create mode 100644 node_modules/underscore/modules/reduceRight.js create mode 100644 node_modules/underscore/modules/reject.js create mode 100644 node_modules/underscore/modules/rest.js create mode 100644 node_modules/underscore/modules/restArguments.js create mode 100644 node_modules/underscore/modules/result.js create mode 100644 node_modules/underscore/modules/sample.js create mode 100644 node_modules/underscore/modules/shuffle.js create mode 100644 node_modules/underscore/modules/size.js create mode 100644 node_modules/underscore/modules/some.js create mode 100644 node_modules/underscore/modules/sortBy.js create mode 100644 node_modules/underscore/modules/sortedIndex.js create mode 100644 node_modules/underscore/modules/tap.js create mode 100644 node_modules/underscore/modules/template.js create mode 100644 node_modules/underscore/modules/templateSettings.js create mode 100644 node_modules/underscore/modules/throttle.js create mode 100644 node_modules/underscore/modules/times.js create mode 100644 node_modules/underscore/modules/toArray.js create mode 100644 node_modules/underscore/modules/toPath.js create mode 100644 node_modules/underscore/modules/underscore-array-methods.js create mode 100644 node_modules/underscore/modules/underscore.js create mode 100644 node_modules/underscore/modules/unescape.js create mode 100644 node_modules/underscore/modules/union.js create mode 100644 node_modules/underscore/modules/uniq.js create mode 100644 node_modules/underscore/modules/uniqueId.js create mode 100644 node_modules/underscore/modules/unzip.js create mode 100644 node_modules/underscore/modules/values.js create mode 100644 node_modules/underscore/modules/where.js create mode 100644 node_modules/underscore/modules/without.js create mode 100644 node_modules/underscore/modules/wrap.js create mode 100644 node_modules/underscore/modules/zip.js create mode 100644 node_modules/underscore/package.json create mode 100644 node_modules/underscore/underscore-esm-min.js create mode 100644 node_modules/underscore/underscore-esm-min.js.map create mode 100644 node_modules/underscore/underscore-esm.js create mode 100644 node_modules/underscore/underscore-esm.js.map create mode 100644 node_modules/underscore/underscore-min.js create mode 100644 node_modules/underscore/underscore-min.js.map create mode 100644 node_modules/underscore/underscore-node-f.cjs create mode 100644 node_modules/underscore/underscore-node-f.cjs.map create mode 100644 node_modules/underscore/underscore-node.cjs create mode 100644 node_modules/underscore/underscore-node.cjs.map create mode 100644 node_modules/underscore/underscore-node.mjs create mode 100644 node_modules/underscore/underscore-node.mjs.map create mode 100644 node_modules/underscore/underscore-umd-min.js create mode 100644 node_modules/underscore/underscore-umd-min.js.map create mode 100644 node_modules/underscore/underscore-umd.js create mode 100644 node_modules/underscore/underscore-umd.js.map create mode 100644 node_modules/underscore/underscore.js create mode 100644 node_modules/universal-user-agent/LICENSE.md create mode 100644 node_modules/universal-user-agent/README.md create mode 100644 node_modules/universal-user-agent/dist-node/index.js create mode 100644 node_modules/universal-user-agent/dist-node/index.js.map create mode 100644 node_modules/universal-user-agent/dist-src/index.js create mode 100644 node_modules/universal-user-agent/dist-types/index.d.ts create mode 100644 node_modules/universal-user-agent/dist-web/index.js create mode 100644 node_modules/universal-user-agent/dist-web/index.js.map create mode 100644 node_modules/universal-user-agent/package.json create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/CONTRIBUTING.md create mode 100644 node_modules/uuid/LICENSE.md create mode 100644 node_modules/uuid/README.md create mode 100755 node_modules/uuid/dist/bin/uuid create mode 100644 node_modules/uuid/dist/esm-browser/index.js create mode 100644 node_modules/uuid/dist/esm-browser/md5.js create mode 100644 node_modules/uuid/dist/esm-browser/nil.js create mode 100644 node_modules/uuid/dist/esm-browser/parse.js create mode 100644 node_modules/uuid/dist/esm-browser/regex.js create mode 100644 node_modules/uuid/dist/esm-browser/rng.js create mode 100644 node_modules/uuid/dist/esm-browser/sha1.js create mode 100644 node_modules/uuid/dist/esm-browser/stringify.js create mode 100644 node_modules/uuid/dist/esm-browser/v1.js create mode 100644 node_modules/uuid/dist/esm-browser/v3.js create mode 100644 node_modules/uuid/dist/esm-browser/v35.js create mode 100644 node_modules/uuid/dist/esm-browser/v4.js create mode 100644 node_modules/uuid/dist/esm-browser/v5.js create mode 100644 node_modules/uuid/dist/esm-browser/validate.js create mode 100644 node_modules/uuid/dist/esm-browser/version.js create mode 100644 node_modules/uuid/dist/esm-node/index.js create mode 100644 node_modules/uuid/dist/esm-node/md5.js create mode 100644 node_modules/uuid/dist/esm-node/nil.js create mode 100644 node_modules/uuid/dist/esm-node/parse.js create mode 100644 node_modules/uuid/dist/esm-node/regex.js create mode 100644 node_modules/uuid/dist/esm-node/rng.js create mode 100644 node_modules/uuid/dist/esm-node/sha1.js create mode 100644 node_modules/uuid/dist/esm-node/stringify.js create mode 100644 node_modules/uuid/dist/esm-node/v1.js create mode 100644 node_modules/uuid/dist/esm-node/v3.js create mode 100644 node_modules/uuid/dist/esm-node/v35.js create mode 100644 node_modules/uuid/dist/esm-node/v4.js create mode 100644 node_modules/uuid/dist/esm-node/v5.js create mode 100644 node_modules/uuid/dist/esm-node/validate.js create mode 100644 node_modules/uuid/dist/esm-node/version.js create mode 100644 node_modules/uuid/dist/index.js create mode 100644 node_modules/uuid/dist/md5-browser.js create mode 100644 node_modules/uuid/dist/md5.js create mode 100644 node_modules/uuid/dist/nil.js create mode 100644 node_modules/uuid/dist/parse.js create mode 100644 node_modules/uuid/dist/regex.js create mode 100644 node_modules/uuid/dist/rng-browser.js create mode 100644 node_modules/uuid/dist/rng.js create mode 100644 node_modules/uuid/dist/sha1-browser.js create mode 100644 node_modules/uuid/dist/sha1.js create mode 100644 node_modules/uuid/dist/stringify.js create mode 100644 node_modules/uuid/dist/umd/uuid.min.js create mode 100644 node_modules/uuid/dist/umd/uuidNIL.min.js create mode 100644 node_modules/uuid/dist/umd/uuidParse.min.js create mode 100644 node_modules/uuid/dist/umd/uuidStringify.min.js create mode 100644 node_modules/uuid/dist/umd/uuidValidate.min.js create mode 100644 node_modules/uuid/dist/umd/uuidVersion.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv1.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv3.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv4.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv5.min.js create mode 100644 node_modules/uuid/dist/uuid-bin.js create mode 100644 node_modules/uuid/dist/v1.js create mode 100644 node_modules/uuid/dist/v3.js create mode 100644 node_modules/uuid/dist/v35.js create mode 100644 node_modules/uuid/dist/v4.js create mode 100644 node_modules/uuid/dist/v5.js create mode 100644 node_modules/uuid/dist/validate.js create mode 100644 node_modules/uuid/dist/version.js create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/wrapper.mjs create mode 100644 node_modules/webidl-conversions/LICENSE.md create mode 100644 node_modules/webidl-conversions/README.md create mode 100644 node_modules/webidl-conversions/lib/index.js create mode 100644 node_modules/webidl-conversions/package.json create mode 100644 node_modules/whatwg-url/LICENSE.txt create mode 100644 node_modules/whatwg-url/README.md create mode 100644 node_modules/whatwg-url/lib/URL-impl.js create mode 100644 node_modules/whatwg-url/lib/URL.js create mode 100644 node_modules/whatwg-url/lib/public-api.js create mode 100644 node_modules/whatwg-url/lib/url-state-machine.js create mode 100644 node_modules/whatwg-url/lib/utils.js create mode 100644 node_modules/whatwg-url/package.json create mode 100644 node_modules/wrappy/LICENSE create mode 100644 node_modules/wrappy/README.md create mode 100644 node_modules/wrappy/package.json create mode 100644 node_modules/wrappy/wrappy.js diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 0f82682..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "npm" - directory: "/" - schedule: - interval: "daily" - labels: - - "dependabot" - assignees: - - "joshjohanning" - reviewers: - - "joshjohanning" - - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - labels: - - "dependabot" - assignees: - - "joshjohanning" - reviewers: - - "joshjohanning" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index ebf200b..0000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,72 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "main" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "main" ] - schedule: - - cron: '36 15 * * 4' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 8af8e6f..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Publish GitHub Action" -on: - push: - branches: - - main - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: tgymnich/publish-github-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/validator.yml b/.github/workflows/validator.yml deleted file mode 100644 index 3b3de0f..0000000 --- a/.github/workflows/validator.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: pr_check -on: - pull_request: - branches: main - -env: - # update this - azure_devops_org: jjohanning0798 - -jobs: - pr-issues-validation: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: npm install - shell: bash - run: npm install - - name: pr-issues-validation - id: pr-issues-validation - shell: bash - run: | - PULL_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") - COMMITS=$(curl -s -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' -H "Accept: application/vnd.github.v3+json" "${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/pulls/${PULL_NUMBER}/commits") - echo $COMMITS | jq -c '.[]' | while read commit; do - COMMIT_SHA=$(echo $commit | jq '.sha') - COMMIT_MESSAGE=$(echo $commit | jq '.commit.message') - echo "Validating new commit: ${COMMIT_SHA} - ${COMMIT_MESSAGE}" - if [[ "$COMMIT_MESSAGE" != *"AB"\#""[0-9]""* ]] && [[ "$COMMIT_MESSAGE" != *"ab"\#""[0-9]""* ]]; then - echo "" - echo "" - echo "Pull request contains invalid commit: ${COMMIT_SHA}. This commit lacks an AB#xxx in the message, in the expected format: AB#xxx -- failing operation." - exit 1 - else - echo "valid commit" - # set WORKITEM equal to the number after the # in the commit message - WORKITEM=`echo $COMMIT_MESSAGE | cut -d'#' -f2 | cut -d' ' -f1 | tr -d '"'` - echo "Workitem = $WORKITEM" - - # make the call to main.js to do the linking - REPO_TOKEN=${{ github.token }} AZURE_DEVOPS_ORG=${{ env.azure_devops_org }} AZURE_DEVOPS_PAT=${{ secrets.AZURE_DEVOPS_PAT }} WORKITEMID=$WORKITEM PULLREQUESTID=${{ github.event.number }} REPO=${{ github.repository }} node main.js - fi - done diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 0000000..588f70e --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..77dbe17 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,338 @@ +{ + "name": "azure-devops-work-item-link-enforcer-and-linker", + "version": "1.0.2", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@actions/core": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz", + "integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/github": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.0.3.tgz", + "integrity": "sha512-myjA/pdLQfhUGLtRZC/J4L1RXOG4o6aYdiEq+zr5wVVKljzbFld+xv10k1FX6IkIJtNxbAq44BdwSNpQ015P0A==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@octokit/auth-token": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", + "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", + "dependencies": { + "@octokit/types": "^6.0.3" + } + }, + "node_modules/@octokit/core": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", + "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/endpoint": { + "version": "6.0.12", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", + "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/graphql": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", + "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "12.11.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz", + "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "2.21.3", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz", + "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==", + "dependencies": { + "@octokit/types": "^6.40.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "5.16.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz", + "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==", + "dependencies": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + } + }, + "node_modules/@octokit/request": { + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", + "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + } + }, + "node_modules/@octokit/request-error": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", + "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "node_modules/@octokit/types": { + "version": "6.41.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz", + "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + } + }, + "node_modules/azure-devops-node-api": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-11.2.0.tgz", + "integrity": "sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA==", + "dependencies": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "node_modules/before-after-hook": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", + "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==" + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", + "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/typed-rest-client": { + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", + "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", + "dependencies": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "node_modules/underscore": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.4.tgz", + "integrity": "sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ==" + }, + "node_modules/universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + } + } +} diff --git a/node_modules/@actions/core/LICENSE.md b/node_modules/@actions/core/LICENSE.md new file mode 100644 index 0000000..dbae2ed --- /dev/null +++ b/node_modules/@actions/core/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md new file mode 100644 index 0000000..3c20c8e --- /dev/null +++ b/node_modules/@actions/core/README.md @@ -0,0 +1,335 @@ +# `@actions/core` + +> Core functions for setting results, logging, registering secrets and exporting variables across actions + +## Usage + +### Import the package + +```js +// javascript +const core = require('@actions/core'); + +// typescript +import * as core from '@actions/core'; +``` + +#### Inputs/Outputs + +Action inputs can be read with `getInput` which returns a `string` or `getBooleanInput` which parses a boolean based on the [yaml 1.2 specification](https://yaml.org/spec/1.2/spec.html#id2804923). If `required` set to be false, the input should have a default value in `action.yml`. + +Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled. + +```js +const myInput = core.getInput('inputName', { required: true }); +const myBooleanInput = core.getBooleanInput('booleanInputName', { required: true }); +const myMultilineInput = core.getMultilineInput('multilineInputName', { required: true }); +core.setOutput('outputKey', 'outputVal'); +``` + +#### Exporting variables + +Since each step runs in a separate process, you can use `exportVariable` to add it to this step and future steps environment blocks. + +```js +core.exportVariable('envVar', 'Val'); +``` + +#### Setting a secret + +Setting a secret registers the secret with the runner to ensure it is masked in logs. + +```js +core.setSecret('myPassword'); +``` + +#### PATH Manipulation + +To make a tool's path available in the path for the remainder of the job (without altering the machine or containers state), use `addPath`. The runner will prepend the path given to the jobs PATH. + +```js +core.addPath('/path/to/mytool'); +``` + +#### Exit codes + +You should use this library to set the failing exit code for your action. If status is not set and the script runs to completion, that will lead to a success. + +```js +const core = require('@actions/core'); + +try { + // Do stuff +} +catch (err) { + // setFailed logs the message and sets a failing exit code + core.setFailed(`Action failed with error ${err}`); +} +``` + +Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned. + +#### Logging + +Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs). + +```js +const core = require('@actions/core'); + +const myInput = core.getInput('input'); +try { + core.debug('Inside try block'); + + if (!myInput) { + core.warning('myInput was not set'); + } + + if (core.isDebug()) { + // curl -v https://github.com + } else { + // curl https://github.com + } + + // Do stuff + core.info('Output to the actions build log') + + core.notice('This is a message that will also emit an annotation') +} +catch (err) { + core.error(`Error ${err}, action may still succeed though`); +} +``` + +This library can also wrap chunks of output in foldable groups. + +```js +const core = require('@actions/core') + +// Manually wrap output +core.startGroup('Do some function') +doSomeFunction() +core.endGroup() + +// Wrap an asynchronous function call +const result = await core.group('Do something async', async () => { + const response = await doSomeHTTPRequest() + return response +}) +``` + +#### Annotations + +This library has 3 methods that will produce [annotations](https://docs.github.com/en/rest/reference/checks#create-a-check-run). +```js +core.error('This is a bad error. This will also fail the build.') + +core.warning('Something went wrong, but it\'s not bad enough to fail the build.') + +core.notice('Something happened that you might want to know about.') +``` + +These will surface to the UI in the Actions page and on Pull Requests. They look something like this: + +![Annotations Image](../../docs/assets/annotations.png) + +These annotations can also be attached to particular lines and columns of your source files to show exactly where a problem is occuring. + +These options are: +```typescript +export interface AnnotationProperties { + /** + * A title for the annotation. + */ + title?: string + + /** + * The name of the file for which the annotation should be created. + */ + file?: string + + /** + * The start line for the annotation. + */ + startLine?: number + + /** + * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. + */ + endLine?: number + + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + */ + startColumn?: number + + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + * Defaults to `startColumn` when `startColumn` is provided. + */ + endColumn?: number +} +``` + +#### Styling output + +Colored output is supported in the Action logs via standard [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). 3/4 bit, 8 bit and 24 bit colors are all supported. + +Foreground colors: + +```js +// 3/4 bit +core.info('\u001b[35mThis foreground will be magenta') + +// 8 bit +core.info('\u001b[38;5;6mThis foreground will be cyan') + +// 24 bit +core.info('\u001b[38;2;255;0;0mThis foreground will be bright red') +``` + +Background colors: + +```js +// 3/4 bit +core.info('\u001b[43mThis background will be yellow'); + +// 8 bit +core.info('\u001b[48;5;6mThis background will be cyan') + +// 24 bit +core.info('\u001b[48;2;255;0;0mThis background will be bright red') +``` + +Special styles: + +```js +core.info('\u001b[1mBold text') +core.info('\u001b[3mItalic text') +core.info('\u001b[4mUnderlined text') +``` + +ANSI escape codes can be combined with one another: + +```js +core.info('\u001b[31;46mRed foreground with a cyan background and \u001b[1mbold text at the end'); +``` + +> Note: Escape codes reset at the start of each line + +```js +core.info('\u001b[35mThis foreground will be magenta') +core.info('This foreground will reset to the default') +``` + +Manually typing escape codes can be a little difficult, but you can use third party modules such as [ansi-styles](https://github.com/chalk/ansi-styles). + +```js +const style = require('ansi-styles'); +core.info(style.color.ansi16m.hex('#abcdef') + 'Hello world!') +``` + +#### Action state + +You can use this library to save state and get state for sharing information between a given wrapper action: + +**action.yml**: + +```yaml +name: 'Wrapper action sample' +inputs: + name: + default: 'GitHub' +runs: + using: 'node12' + main: 'main.js' + post: 'cleanup.js' +``` + +In action's `main.js`: + +```js +const core = require('@actions/core'); + +core.saveState("pidToKill", 12345); +``` + +In action's `cleanup.js`: + +```js +const core = require('@actions/core'); + +var pid = core.getState("pidToKill"); + +process.kill(pid); +``` + +#### OIDC Token + +You can use these methods to interact with the GitHub OIDC provider and get a JWT ID token which would help to get access token from third party cloud providers. + +**Method Name**: getIDToken() + +**Inputs** + +audience : optional + +**Outputs** + +A [JWT](https://jwt.io/) ID Token + +In action's `main.ts`: +```js +const core = require('@actions/core'); +async function getIDTokenAction(): Promise { + + const audience = core.getInput('audience', {required: false}) + + const id_token1 = await core.getIDToken() // ID Token with default audience + const id_token2 = await core.getIDToken(audience) // ID token with custom audience + + // this id_token can be used to get access token from third party cloud providers +} +getIDTokenAction() +``` + +In action's `actions.yml`: + +```yaml +name: 'GetIDToken' +description: 'Get ID token from Github OIDC provider' +inputs: + audience: + description: 'Audience for which the ID token is intended for' + required: false +outputs: + id_token1: + description: 'ID token obtained from OIDC provider' + id_token2: + description: 'ID token obtained from OIDC provider' +runs: + using: 'node12' + main: 'dist/index.js' +``` + +#### Filesystem path helpers + +You can use these methods to manipulate file paths across operating systems. + +The `toPosixPath` function converts input paths to Posix-style (Linux) paths. +The `toWin32Path` function converts input paths to Windows-style paths. These +functions work independently of the underlying runner operating system. + +```js +toPosixPath('\\foo\\bar') // => /foo/bar +toWin32Path('/foo/bar') // => \foo\bar +``` + +The `toPlatformPath` function converts input paths to the expected value on the runner's operating system. + +```js +// On a Windows runner. +toPlatformPath('/foo/bar') // => \foo\bar + +// On a Linux runner. +toPlatformPath('\\foo\\bar') // => /foo/bar +``` diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts new file mode 100644 index 0000000..53f8f4b --- /dev/null +++ b/node_modules/@actions/core/lib/command.d.ts @@ -0,0 +1,15 @@ +export interface CommandProperties { + [key: string]: any; +} +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; +export declare function issue(name: string, message?: string): void; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js new file mode 100644 index 0000000..0b28c66 --- /dev/null +++ b/node_modules/@actions/core/lib/command.js @@ -0,0 +1,92 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.issue = exports.issueCommand = void 0; +const os = __importStar(require("os")); +const utils_1 = require("./utils"); +/** + * Commands + * + * Command Format: + * ::name key=value,key=value::message + * + * Examples: + * ::warning::This is the message + * ::set-env name=MY_VAR::some value + */ +function issueCommand(command, properties, message) { + const cmd = new Command(command, properties, message); + process.stdout.write(cmd.toString() + os.EOL); +} +exports.issueCommand = issueCommand; +function issue(name, message = '') { + issueCommand(name, {}, message); +} +exports.issue = issue; +const CMD_STRING = '::'; +class Command { + constructor(command, properties, message) { + if (!command) { + command = 'missing.command'; + } + this.command = command; + this.properties = properties; + this.message = message; + } + toString() { + let cmdStr = CMD_STRING + this.command; + if (this.properties && Object.keys(this.properties).length > 0) { + cmdStr += ' '; + let first = true; + for (const key in this.properties) { + if (this.properties.hasOwnProperty(key)) { + const val = this.properties[key]; + if (val) { + if (first) { + first = false; + } + else { + cmdStr += ','; + } + cmdStr += `${key}=${escapeProperty(val)}`; + } + } + } + } + cmdStr += `${CMD_STRING}${escapeData(this.message)}`; + return cmdStr; + } +} +function escapeData(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A'); +} +function escapeProperty(s) { + return utils_1.toCommandValue(s) + .replace(/%/g, '%25') + .replace(/\r/g, '%0D') + .replace(/\n/g, '%0A') + .replace(/:/g, '%3A') + .replace(/,/g, '%2C'); +} +//# sourceMappingURL=command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map new file mode 100644 index 0000000..51c7c63 --- /dev/null +++ b/node_modules/@actions/core/lib/command.js.map @@ -0,0 +1 @@ +{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,mCAAsC;AAWtC;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,EAAE,OAAO,GAAG,EAAE;IAC9C,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACjC,CAAC;AAFD,sBAEC;AAED,MAAM,UAAU,GAAG,IAAI,CAAA;AAEvB,MAAM,OAAO;IAKX,YAAY,OAAe,EAAE,UAA6B,EAAE,OAAe;QACzE,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,iBAAiB,CAAA;SAC5B;QAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,QAAQ;QACN,IAAI,MAAM,GAAG,UAAU,GAAG,IAAI,CAAC,OAAO,CAAA;QAEtC,IAAI,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9D,MAAM,IAAI,GAAG,CAAA;YACb,IAAI,KAAK,GAAG,IAAI,CAAA;YAChB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;oBACvC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;oBAChC,IAAI,GAAG,EAAE;wBACP,IAAI,KAAK,EAAE;4BACT,KAAK,GAAG,KAAK,CAAA;yBACd;6BAAM;4BACL,MAAM,IAAI,GAAG,CAAA;yBACd;wBAED,MAAM,IAAI,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;qBAC1C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAM;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts new file mode 100644 index 0000000..1defb57 --- /dev/null +++ b/node_modules/@actions/core/lib/core.d.ts @@ -0,0 +1,198 @@ +/** + * Interface for getInput options + */ +export interface InputOptions { + /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ + required?: boolean; + /** Optional. Whether leading/trailing whitespace will be trimmed for the input. Defaults to true */ + trimWhitespace?: boolean; +} +/** + * The code to exit an action + */ +export declare enum ExitCode { + /** + * A code indicating that the action was successful + */ + Success = 0, + /** + * A code indicating that the action was a failure + */ + Failure = 1 +} +/** + * Optional properties that can be sent with annotatation commands (notice, error, and warning) + * See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations. + */ +export interface AnnotationProperties { + /** + * A title for the annotation. + */ + title?: string; + /** + * The path of the file for which the annotation should be created. + */ + file?: string; + /** + * The start line for the annotation. + */ + startLine?: number; + /** + * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. + */ + endLine?: number; + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + */ + startColumn?: number; + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + * Defaults to `startColumn` when `startColumn` is provided. + */ + endColumn?: number; +} +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +export declare function exportVariable(name: string, val: any): void; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +export declare function setSecret(secret: string): void; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +export declare function addPath(inputPath: string): void; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +export declare function getInput(name: string, options?: InputOptions): string; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +export declare function getMultilineInput(name: string, options?: InputOptions): string[]; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +export declare function getBooleanInput(name: string, options?: InputOptions): boolean; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +export declare function setOutput(name: string, value: any): void; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +export declare function setCommandEcho(enabled: boolean): void; +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +export declare function setFailed(message: string | Error): void; +/** + * Gets whether Actions Step Debug is on or not + */ +export declare function isDebug(): boolean; +/** + * Writes debug message to user log + * @param message debug message + */ +export declare function debug(message: string): void; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +export declare function error(message: string | Error, properties?: AnnotationProperties): void; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +export declare function warning(message: string | Error, properties?: AnnotationProperties): void; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +export declare function notice(message: string | Error, properties?: AnnotationProperties): void; +/** + * Writes info to log with console.log. + * @param message info message + */ +export declare function info(message: string): void; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +export declare function startGroup(name: string): void; +/** + * End an output group. + */ +export declare function endGroup(): void; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +export declare function group(name: string, fn: () => Promise): Promise; +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +export declare function saveState(name: string, value: any): void; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +export declare function getState(name: string): string; +export declare function getIDToken(aud?: string): Promise; +/** + * Summary exports + */ +export { summary } from './summary'; +/** + * @deprecated use core.summary + */ +export { markdownSummary } from './summary'; +/** + * Path exports + */ +export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils'; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js new file mode 100644 index 0000000..1566289 --- /dev/null +++ b/node_modules/@actions/core/lib/core.js @@ -0,0 +1,337 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; +const command_1 = require("./command"); +const file_command_1 = require("./file-command"); +const utils_1 = require("./utils"); +const os = __importStar(require("os")); +const path = __importStar(require("path")); +const uuid_1 = require("uuid"); +const oidc_utils_1 = require("./oidc-utils"); +/** + * The code to exit an action + */ +var ExitCode; +(function (ExitCode) { + /** + * A code indicating that the action was successful + */ + ExitCode[ExitCode["Success"] = 0] = "Success"; + /** + * A code indicating that the action was a failure + */ + ExitCode[ExitCode["Failure"] = 1] = "Failure"; +})(ExitCode = exports.ExitCode || (exports.ExitCode = {})); +//----------------------------------------------------------------------- +// Variables +//----------------------------------------------------------------------- +/** + * Sets env variable for this action and future actions in the job + * @param name the name of the variable to set + * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function exportVariable(name, val) { + const convertedVal = utils_1.toCommandValue(val); + process.env[name] = convertedVal; + const filePath = process.env['GITHUB_ENV'] || ''; + if (filePath) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + // These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter. + if (name.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedVal.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; + file_command_1.issueCommand('ENV', commandValue); + } + else { + command_1.issueCommand('set-env', { name }, convertedVal); + } +} +exports.exportVariable = exportVariable; +/** + * Registers a secret which will get masked from logs + * @param secret value of the secret + */ +function setSecret(secret) { + command_1.issueCommand('add-mask', {}, secret); +} +exports.setSecret = setSecret; +/** + * Prepends inputPath to the PATH (for this action and future actions) + * @param inputPath + */ +function addPath(inputPath) { + const filePath = process.env['GITHUB_PATH'] || ''; + if (filePath) { + file_command_1.issueCommand('PATH', inputPath); + } + else { + command_1.issueCommand('add-path', {}, inputPath); + } + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`; +} +exports.addPath = addPath; +/** + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string + */ +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || ''; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + return inputs; +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; +/** + * Sets the value of an output. + * + * @param name name of the output to set + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function setOutput(name, value) { + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, value); +} +exports.setOutput = setOutput; +/** + * Enables or disables the echoing of commands into stdout for the rest of the step. + * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. + * + */ +function setCommandEcho(enabled) { + command_1.issue('echo', enabled ? 'on' : 'off'); +} +exports.setCommandEcho = setCommandEcho; +//----------------------------------------------------------------------- +// Results +//----------------------------------------------------------------------- +/** + * Sets the action status to failed. + * When the action exits it will be with an exit code of 1 + * @param message add error issue message + */ +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +exports.setFailed = setFailed; +//----------------------------------------------------------------------- +// Logging Commands +//----------------------------------------------------------------------- +/** + * Gets whether Actions Step Debug is on or not + */ +function isDebug() { + return process.env['RUNNER_DEBUG'] === '1'; +} +exports.isDebug = isDebug; +/** + * Writes debug message to user log + * @param message debug message + */ +function debug(message) { + command_1.issueCommand('debug', {}, message); +} +exports.debug = debug; +/** + * Adds an error issue + * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.error = error; +/** + * Adds a warning issue + * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; +/** + * Writes info to log with console.log. + * @param message info message + */ +function info(message) { + process.stdout.write(message + os.EOL); +} +exports.info = info; +/** + * Begin an output group. + * + * Output until the next `groupEnd` will be foldable in this group + * + * @param name The name of the output group + */ +function startGroup(name) { + command_1.issue('group', name); +} +exports.startGroup = startGroup; +/** + * End an output group. + */ +function endGroup() { + command_1.issue('endgroup'); +} +exports.endGroup = endGroup; +/** + * Wrap an asynchronous function call in a group. + * + * Returns the same type as the function itself. + * + * @param name The name of the group + * @param fn The function to wrap in the group + */ +function group(name, fn) { + return __awaiter(this, void 0, void 0, function* () { + startGroup(name); + let result; + try { + result = yield fn(); + } + finally { + endGroup(); + } + return result; + }); +} +exports.group = group; +//----------------------------------------------------------------------- +// Wrapper action state +//----------------------------------------------------------------------- +/** + * Saves state for current action, the state can only be retrieved by this action's post job execution. + * + * @param name name of the state to store + * @param value value to store. Non-string values will be converted to a string via JSON.stringify + */ +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function saveState(name, value) { + command_1.issueCommand('save-state', { name }, value); +} +exports.saveState = saveState; +/** + * Gets the value of an state set by this action's main execution. + * + * @param name name of the state to get + * @returns string + */ +function getState(name) { + return process.env[`STATE_${name}`] || ''; +} +exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = require("./summary"); +Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } }); +/** + * @deprecated use core.summary + */ +var summary_2 = require("./summary"); +Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); +/** + * Path exports + */ +var path_utils_1 = require("./path-utils"); +Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); +Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); +Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); +//# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map new file mode 100644 index 0000000..9abe68f --- /dev/null +++ b/node_modules/@actions/core/lib/core.js.map @@ -0,0 +1 @@ +{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAA+D;AAC/D,mCAA2D;AAE3D,uCAAwB;AACxB,2CAA4B;AAC5B,+BAAiC;AAEjC,6CAAuC;AAavC;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6CAAW,CAAA;AACb,CAAC,EAVW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAUnB;AAuCD,yEAAyE;AACzE,YAAY;AACZ,yEAAyE;AAEzE;;;;GAIG;AACH,8DAA8D;AAC9D,SAAgB,cAAc,CAAC,IAAY,EAAE,GAAQ;IACnD,MAAM,YAAY,GAAG,sBAAc,CAAC,GAAG,CAAC,CAAA;IACxC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,YAAY,CAAA;IAEhC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAA;IAChD,IAAI,QAAQ,EAAE;QACZ,MAAM,SAAS,GAAG,gBAAgB,SAAM,EAAE,EAAE,CAAA;QAE5C,sKAAsK;QACtK,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CACb,4DAA4D,SAAS,GAAG,CACzE,CAAA;SACF;QAED,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;YACpC,MAAM,IAAI,KAAK,CACb,6DAA6D,SAAS,GAAG,CAC1E,CAAA;SACF;QAED,MAAM,YAAY,GAAG,GAAG,IAAI,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,YAAY,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;QACzF,2BAAgB,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA;KACtC;SAAM;QACL,sBAAY,CAAC,SAAS,EAAE,EAAC,IAAI,EAAC,EAAE,YAAY,CAAC,CAAA;KAC9C;AACH,CAAC;AA1BD,wCA0BC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAC,MAAc;IACtC,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,MAAM,CAAC,CAAA;AACtC,CAAC;AAFD,8BAEC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,SAAiB;IACvC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,CAAA;IACjD,IAAI,QAAQ,EAAE;QACZ,2BAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;KACpC;SAAM;QACL,sBAAY,CAAC,UAAU,EAAE,EAAE,EAAE,SAAS,CAAC,CAAA;KACxC;IACD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,GAAG,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAA;AAC7E,CAAC;AARD,0BAQC;AAED;;;;;;;;GAQG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,OAAsB;IAC3D,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,IAAI,EAAE,CAAA;IACrE,IAAI,OAAO,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAA;KAC5D;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,cAAc,KAAK,KAAK,EAAE;QAC/C,OAAO,GAAG,CAAA;KACX;IAED,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC;AAZD,4BAYC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC/B,IAAY,EACZ,OAAsB;IAEtB,MAAM,MAAM,GAAa,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;SAC7C,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAA;IAExB,OAAO,MAAM,CAAA;AACf,CAAC;AATD,8CASC;AAED;;;;;;;;;GASG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,OAAsB;IAClE,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;IAC9C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACnC,IAAI,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IACxC,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAA;IAC1C,MAAM,IAAI,SAAS,CACjB,6DAA6D,IAAI,IAAI;QACnE,4EAA4E,CAC/E,CAAA;AACH,CAAC;AAVD,0CAUC;AAED;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAA;IAC5B,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAHD,8BAGC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAAgB;IAC7C,eAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AACvC,CAAC;AAFD,wCAEC;AAED,yEAAyE;AACzE,UAAU;AACV,yEAAyE;AAEzE;;;;GAIG;AACH,SAAgB,SAAS,CAAC,OAAuB;IAC/C,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;IAEnC,KAAK,CAAC,OAAO,CAAC,CAAA;AAChB,CAAC;AAJD,8BAIC;AAED,yEAAyE;AACzE,mBAAmB;AACnB,yEAAyE;AAEzE;;GAEG;AACH,SAAgB,OAAO;IACrB,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,GAAG,CAAA;AAC5C,CAAC;AAFD,0BAEC;AAED;;;GAGG;AACH,SAAgB,KAAK,CAAC,OAAe;IACnC,sBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;AACpC,CAAC;AAFD,sBAEC;AAED;;;;GAIG;AACH,SAAgB,KAAK,CACnB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,OAAO,EACP,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,sBASC;AAED;;;;GAIG;AACH,SAAgB,OAAO,CACrB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,SAAS,EACT,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,0BASC;AAED;;;;GAIG;AACH,SAAgB,MAAM,CACpB,OAAuB,EACvB,aAAmC,EAAE;IAErC,sBAAY,CACV,QAAQ,EACR,2BAAmB,CAAC,UAAU,CAAC,EAC/B,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,OAAO,CACxD,CAAA;AACH,CAAC;AATD,wBASC;AAED;;;GAGG;AACH,SAAgB,IAAI,CAAC,OAAe;IAClC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,oBAEC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,eAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;AACtB,CAAC;AAFD,gCAEC;AAED;;GAEG;AACH,SAAgB,QAAQ;IACtB,eAAK,CAAC,UAAU,CAAC,CAAA;AACnB,CAAC;AAFD,4BAEC;AAED;;;;;;;GAOG;AACH,SAAsB,KAAK,CAAI,IAAY,EAAE,EAAoB;;QAC/D,UAAU,CAAC,IAAI,CAAC,CAAA;QAEhB,IAAI,MAAS,CAAA;QAEb,IAAI;YACF,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;SACpB;gBAAS;YACR,QAAQ,EAAE,CAAA;SACX;QAED,OAAO,MAAM,CAAA;IACf,CAAC;CAAA;AAZD,sBAYC;AAED,yEAAyE;AACzE,uBAAuB;AACvB,yEAAyE;AAEzE;;;;;GAKG;AACH,8DAA8D;AAC9D,SAAgB,SAAS,CAAC,IAAY,EAAE,KAAU;IAChD,sBAAY,CAAC,YAAY,EAAE,EAAC,IAAI,EAAC,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAFD,8BAEC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC;AAED,SAAsB,UAAU,CAAC,GAAY;;QAC3C,OAAO,MAAM,uBAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACzC,CAAC;CAAA;AAFD,gCAEC;AAED;;GAEG;AACH,qCAAiC;AAAzB,kGAAA,OAAO,OAAA;AAEf;;GAEG;AACH,qCAAyC;AAAjC,0GAAA,eAAe,OAAA;AAEvB;;GAEG;AACH,2CAAqE;AAA7D,yGAAA,WAAW,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,4GAAA,cAAc,OAAA"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/file-command.d.ts b/node_modules/@actions/core/lib/file-command.d.ts new file mode 100644 index 0000000..ed408eb --- /dev/null +++ b/node_modules/@actions/core/lib/file-command.d.ts @@ -0,0 +1 @@ +export declare function issueCommand(command: string, message: any): void; diff --git a/node_modules/@actions/core/lib/file-command.js b/node_modules/@actions/core/lib/file-command.js new file mode 100644 index 0000000..55e3e9f --- /dev/null +++ b/node_modules/@actions/core/lib/file-command.js @@ -0,0 +1,42 @@ +"use strict"; +// For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.issueCommand = void 0; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +const fs = __importStar(require("fs")); +const os = __importStar(require("os")); +const utils_1 = require("./utils"); +function issueCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8' + }); +} +exports.issueCommand = issueCommand; +//# sourceMappingURL=file-command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/file-command.js.map b/node_modules/@actions/core/lib/file-command.js.map new file mode 100644 index 0000000..ee35699 --- /dev/null +++ b/node_modules/@actions/core/lib/file-command.js.map @@ -0,0 +1 @@ +{"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;;;;;;;;;;;;;;AAEvC,mCAAmC;AACnC,uDAAuD;AAEvD,uCAAwB;AACxB,uCAAwB;AACxB,mCAAsC;AAEtC,SAAgB,YAAY,CAAC,OAAe,EAAE,OAAY;IACxD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,OAAO,EAAE,CAAC,CAAA;IACjD,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,EAAE,CAClE,CAAA;KACF;IACD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,QAAQ,EAAE,CAAC,CAAA;KACrD;IAED,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,sBAAc,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,oCAcC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/oidc-utils.d.ts b/node_modules/@actions/core/lib/oidc-utils.d.ts new file mode 100644 index 0000000..657c7f4 --- /dev/null +++ b/node_modules/@actions/core/lib/oidc-utils.d.ts @@ -0,0 +1,7 @@ +export declare class OidcClient { + private static createHttpClient; + private static getRequestToken; + private static getIDTokenUrl; + private static getCall; + static getIDToken(audience?: string): Promise; +} diff --git a/node_modules/@actions/core/lib/oidc-utils.js b/node_modules/@actions/core/lib/oidc-utils.js new file mode 100644 index 0000000..f701277 --- /dev/null +++ b/node_modules/@actions/core/lib/oidc-utils.js @@ -0,0 +1,77 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OidcClient = void 0; +const http_client_1 = require("@actions/http-client"); +const auth_1 = require("@actions/http-client/lib/auth"); +const core_1 = require("./core"); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/oidc-utils.js.map b/node_modules/@actions/core/lib/oidc-utils.js.map new file mode 100644 index 0000000..284fa1d --- /dev/null +++ b/node_modules/@actions/core/lib/oidc-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"oidc-utils.js","sourceRoot":"","sources":["../src/oidc-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,sDAA+C;AAC/C,wDAAqE;AACrE,iCAAuC;AAKvC,MAAa,UAAU;IACb,MAAM,CAAC,gBAAgB,CAC7B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,EAAE;QAEb,MAAM,cAAc,GAAmB;YACrC,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,QAAQ;SACrB,CAAA;QAED,OAAO,IAAI,wBAAU,CACnB,qBAAqB,EACrB,CAAC,IAAI,8BAAuB,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,EAC3D,cAAc,CACf,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,eAAe;QAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;QAC3D,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAA;SACF;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAEO,MAAM,CAAC,aAAa;QAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;SAC3E;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;IAEO,MAAM,CAAO,OAAO,CAAC,YAAoB;;;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAA;YAEhD,MAAM,GAAG,GAAG,MAAM,UAAU;iBACzB,OAAO,CAAgB,YAAY,CAAC;iBACpC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,IAAI,KAAK,CACb;uBACa,KAAK,CAAC,UAAU;yBACd,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CACtC,CAAA;YACH,CAAC,CAAC,CAAA;YAEJ,MAAM,QAAQ,SAAG,GAAG,CAAC,MAAM,0CAAE,KAAK,CAAA;YAClC,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;aACjE;YACD,OAAO,QAAQ,CAAA;;KAChB;IAED,MAAM,CAAO,UAAU,CAAC,QAAiB;;YACvC,IAAI;gBACF,gDAAgD;gBAChD,IAAI,YAAY,GAAW,UAAU,CAAC,aAAa,EAAE,CAAA;gBACrD,IAAI,QAAQ,EAAE;oBACZ,MAAM,eAAe,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;oBACpD,YAAY,GAAG,GAAG,YAAY,aAAa,eAAe,EAAE,CAAA;iBAC7D;gBAED,YAAK,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAA;gBAExC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBACvD,gBAAS,CAAC,QAAQ,CAAC,CAAA;gBACnB,OAAO,QAAQ,CAAA;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;aACnD;QACH,CAAC;KAAA;CACF;AAzED,gCAyEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/path-utils.d.ts b/node_modules/@actions/core/lib/path-utils.d.ts new file mode 100644 index 0000000..1fee9f3 --- /dev/null +++ b/node_modules/@actions/core/lib/path-utils.d.ts @@ -0,0 +1,25 @@ +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +export declare function toPosixPath(pth: string): string; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +export declare function toWin32Path(pth: string): string; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +export declare function toPlatformPath(pth: string): string; diff --git a/node_modules/@actions/core/lib/path-utils.js b/node_modules/@actions/core/lib/path-utils.js new file mode 100644 index 0000000..7251c82 --- /dev/null +++ b/node_modules/@actions/core/lib/path-utils.js @@ -0,0 +1,58 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(require("path")); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/path-utils.js.map b/node_modules/@actions/core/lib/path-utils.js.map new file mode 100644 index 0000000..7ab1cac --- /dev/null +++ b/node_modules/@actions/core/lib/path-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../src/path-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AAClC,CAAC;AAFD,kCAEC;AAED;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAClC,CAAC;AAFD,kCAEC;AAED;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,wCAEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/summary.d.ts b/node_modules/@actions/core/lib/summary.d.ts new file mode 100644 index 0000000..bb79255 --- /dev/null +++ b/node_modules/@actions/core/lib/summary.d.ts @@ -0,0 +1,202 @@ +export declare const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +export declare const SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; +export declare type SummaryTableRow = (SummaryTableCell | string)[]; +export interface SummaryTableCell { + /** + * Cell content + */ + data: string; + /** + * Render cell as header + * (optional) default: false + */ + header?: boolean; + /** + * Number of columns the cell extends + * (optional) default: '1' + */ + colspan?: string; + /** + * Number of rows the cell extends + * (optional) default: '1' + */ + rowspan?: string; +} +export interface SummaryImageOptions { + /** + * The width of the image in pixels. Must be an integer without a unit. + * (optional) + */ + width?: string; + /** + * The height of the image in pixels. Must be an integer without a unit. + * (optional) + */ + height?: string; +} +export interface SummaryWriteOptions { + /** + * Replace all existing content in summary file with buffer contents + * (optional) default: false + */ + overwrite?: boolean; +} +declare class Summary { + private _buffer; + private _filePath?; + constructor(); + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + private filePath; + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + private wrap; + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options?: SummaryWriteOptions): Promise; + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear(): Promise; + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify(): string; + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer(): boolean; + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer(): Summary; + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text: string, addEOL?: boolean): Summary; + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL(): Summary; + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code: string, lang?: string): Summary; + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items: string[], ordered?: boolean): Summary; + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows: SummaryTableRow[]): Summary; + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label: string, content: string): Summary; + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src: string, alt: string, options?: SummaryImageOptions): Summary; + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text: string, level?: number | string): Summary; + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator(): Summary; + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak(): Summary; + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text: string, cite?: string): Summary; + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text: string, href: string): Summary; +} +/** + * @deprecated use `core.summary` + */ +export declare const markdownSummary: Summary; +export declare const summary: Summary; +export {}; diff --git a/node_modules/@actions/core/lib/summary.js b/node_modules/@actions/core/lib/summary.js new file mode 100644 index 0000000..04a335b --- /dev/null +++ b/node_modules/@actions/core/lib/summary.js @@ -0,0 +1,283 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = require("os"); +const fs_1 = require("fs"); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/summary.js.map b/node_modules/@actions/core/lib/summary.js.map new file mode 100644 index 0000000..d598f26 --- /dev/null +++ b/node_modules/@actions/core/lib/summary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAsB;AACtB,2BAAsC;AACtC,MAAM,EAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAC,GAAG,aAAQ,CAAA;AAEnC,QAAA,eAAe,GAAG,qBAAqB,CAAA;AACvC,QAAA,gBAAgB,GAC3B,2GAA2G,CAAA;AA+C7G,MAAM,OAAO;IAIX;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;IACnB,CAAC;IAED;;;;;OAKG;IACW,QAAQ;;YACpB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,OAAO,IAAI,CAAC,SAAS,CAAA;aACtB;YAED,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAe,CAAC,CAAA;YAChD,IAAI,CAAC,WAAW,EAAE;gBAChB,MAAM,IAAI,KAAK,CACb,4CAA4C,uBAAe,6DAA6D,CACzH,CAAA;aACF;YAED,IAAI;gBACF,MAAM,MAAM,CAAC,WAAW,EAAE,cAAS,CAAC,IAAI,GAAG,cAAS,CAAC,IAAI,CAAC,CAAA;aAC3D;YAAC,WAAM;gBACN,MAAM,IAAI,KAAK,CACb,mCAAmC,WAAW,0DAA0D,CACzG,CAAA;aACF;YAED,IAAI,CAAC,SAAS,GAAG,WAAW,CAAA;YAC5B,OAAO,IAAI,CAAC,SAAS,CAAA;QACvB,CAAC;KAAA;IAED;;;;;;;;OAQG;IACK,IAAI,CACV,GAAW,EACX,OAAsB,EACtB,QAAuC,EAAE;QAEzC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;aACpC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,GAAG,KAAK,KAAK,GAAG,CAAC;aAC3C,IAAI,CAAC,EAAE,CAAC,CAAA;QAEX,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,IAAI,GAAG,GAAG,SAAS,GAAG,CAAA;SAC9B;QAED,OAAO,IAAI,GAAG,GAAG,SAAS,IAAI,OAAO,KAAK,GAAG,GAAG,CAAA;IAClD,CAAC;IAED;;;;;;OAMG;IACG,KAAK,CAAC,OAA6B;;YACvC,MAAM,SAAS,GAAG,CAAC,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA,CAAA;YACtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAA;YACtC,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAA;YACpD,MAAM,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAAA;YAC3D,OAAO,IAAI,CAAC,WAAW,EAAE,CAAA;QAC3B,CAAC;KAAA;IAED;;;;OAIG;IACG,KAAK;;YACT,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAA;QACpD,CAAC;KAAA;IAED;;;;OAIG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED;;;;OAIG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAA;IAClC,CAAC;IAED;;;;OAIG;IACH,WAAW;QACT,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,OAAO,IAAI,CAAA;IACb,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAY,EAAE,MAAM,GAAG,KAAK;QACjC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAA;QACpB,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACH,MAAM;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,QAAG,CAAC,CAAA;IACzB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,CAAC,IAAY,EAAE,IAAa;QACtC,MAAM,KAAK,qBACN,CAAC,IAAI,IAAI,EAAC,IAAI,EAAC,CAAC,CACpB,CAAA;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAA;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,KAAe,EAAE,OAAO,GAAG,KAAK;QACtC,MAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;QACjC,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACnE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,IAAuB;QAC9B,MAAM,SAAS,GAAG,IAAI;aACnB,GAAG,CAAC,GAAG,CAAC,EAAE;YACT,MAAM,KAAK,GAAG,GAAG;iBACd,GAAG,CAAC,IAAI,CAAC,EAAE;gBACV,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;oBAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;iBAC7B;gBAED,MAAM,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAC,GAAG,IAAI,CAAA;gBAC7C,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;gBAChC,MAAM,KAAK,mCACN,CAAC,OAAO,IAAI,EAAC,OAAO,EAAC,CAAC,GACtB,CAAC,OAAO,IAAI,EAAC,OAAO,EAAC,CAAC,CAC1B,CAAA;gBAED,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;YACpC,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAA;YAEX,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QAC/B,CAAC,CAAC;aACD,IAAI,CAAC,EAAE,CAAC,CAAA;QAEX,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,KAAa,EAAE,OAAe;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,CAAA;QAC3E,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,GAAW,EAAE,GAAW,EAAE,OAA6B;QAC9D,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,OAAO,IAAI,EAAE,CAAA;QACrC,MAAM,KAAK,mCACN,CAAC,KAAK,IAAI,EAAC,KAAK,EAAC,CAAC,GAClB,CAAC,MAAM,IAAI,EAAC,MAAM,EAAC,CAAC,CACxB,CAAA;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,kBAAG,GAAG,EAAE,GAAG,IAAK,KAAK,EAAE,CAAA;QAC5D,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;;OAOG;IACH,UAAU,CAAC,IAAY,EAAE,KAAuB;QAC9C,MAAM,GAAG,GAAG,IAAI,KAAK,EAAE,CAAA;QACvB,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC;YACnE,CAAC,CAAC,GAAG;YACL,CAAC,CAAC,IAAI,CAAA;QACR,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;QAC3C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACH,YAAY;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACH,QAAQ;QACN,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAY,EAAE,IAAa;QAClC,MAAM,KAAK,qBACN,CAAC,IAAI,IAAI,EAAC,IAAI,EAAC,CAAC,CACpB,CAAA;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QACpD,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;IAED;;;;;;;OAOG;IACH,OAAO,CAAC,IAAY,EAAE,IAAY;QAChC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,EAAC,IAAI,EAAC,CAAC,CAAA;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,CAAA;IACtC,CAAC;CACF;AAED,MAAM,QAAQ,GAAG,IAAI,OAAO,EAAE,CAAA;AAE9B;;GAEG;AACU,QAAA,eAAe,GAAG,QAAQ,CAAA;AAC1B,QAAA,OAAO,GAAG,QAAQ,CAAA"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/utils.d.ts b/node_modules/@actions/core/lib/utils.d.ts new file mode 100644 index 0000000..3b9e28d --- /dev/null +++ b/node_modules/@actions/core/lib/utils.d.ts @@ -0,0 +1,14 @@ +import { AnnotationProperties } from './core'; +import { CommandProperties } from './command'; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +export declare function toCommandValue(input: any): string; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +export declare function toCommandProperties(annotationProperties: AnnotationProperties): CommandProperties; diff --git a/node_modules/@actions/core/lib/utils.js b/node_modules/@actions/core/lib/utils.js new file mode 100644 index 0000000..9b5ca44 --- /dev/null +++ b/node_modules/@actions/core/lib/utils.js @@ -0,0 +1,40 @@ +"use strict"; +// We use any as a valid input type +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toCommandProperties = exports.toCommandValue = void 0; +/** + * Sanitizes an input into a string so it can be passed into issueCommand safely + * @param input input to sanitize into a string + */ +function toCommandValue(input) { + if (input === null || input === undefined) { + return ''; + } + else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); +} +exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/utils.js.map b/node_modules/@actions/core/lib/utils.js.map new file mode 100644 index 0000000..8211bb7 --- /dev/null +++ b/node_modules/@actions/core/lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;;AAKvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,oBAA0C;IAE1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE;QAC7C,OAAO,EAAE,CAAA;KACV;IAED,OAAO;QACL,KAAK,EAAE,oBAAoB,CAAC,KAAK;QACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI;QAC/B,IAAI,EAAE,oBAAoB,CAAC,SAAS;QACpC,OAAO,EAAE,oBAAoB,CAAC,OAAO;QACrC,GAAG,EAAE,oBAAoB,CAAC,WAAW;QACrC,SAAS,EAAE,oBAAoB,CAAC,SAAS;KAC1C,CAAA;AACH,CAAC;AAfD,kDAeC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json new file mode 100644 index 0000000..45341c3 --- /dev/null +++ b/node_modules/@actions/core/package.json @@ -0,0 +1,46 @@ +{ + "name": "@actions/core", + "version": "1.9.1", + "description": "Actions core lib", + "keywords": [ + "github", + "actions", + "core" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", + "license": "MIT", + "main": "lib/core.js", + "types": "lib/core.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/core" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "tsc": "tsc" + }, + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@types/node": "^12.0.2", + "@types/uuid": "^8.3.4" + } +} diff --git a/node_modules/@actions/github/LICENSE.md b/node_modules/@actions/github/LICENSE.md new file mode 100644 index 0000000..dbae2ed --- /dev/null +++ b/node_modules/@actions/github/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright 2019 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/github/README.md b/node_modules/@actions/github/README.md new file mode 100644 index 0000000..30e6a68 --- /dev/null +++ b/node_modules/@actions/github/README.md @@ -0,0 +1,98 @@ +# `@actions/github` + +> A hydrated Octokit client. + +## Usage + +Returns an authenticated Octokit client that follows the machine [proxy settings](https://help.github.com/en/actions/hosting-your-own-runners/using-a-proxy-server-with-self-hosted-runners) and correctly sets GHES base urls. See https://octokit.github.io/rest.js for the API. + +```js +const github = require('@actions/github'); +const core = require('@actions/core'); + +async function run() { + // This should be a token with access to your repository scoped in as a secret. + // The YML workflow will need to set myToken with the GitHub Secret Token + // myToken: ${{ secrets.GITHUB_TOKEN }} + // https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token#about-the-github_token-secret + const myToken = core.getInput('myToken'); + + const octokit = github.getOctokit(myToken) + + // You can also pass in additional options as a second parameter to getOctokit + // const octokit = github.getOctokit(myToken, {userAgent: "MyActionVersion1"}); + + const { data: pullRequest } = await octokit.rest.pulls.get({ + owner: 'octokit', + repo: 'rest.js', + pull_number: 123, + mediaType: { + format: 'diff' + } + }); + + console.log(pullRequest); +} + +run(); +``` + +You can also make GraphQL requests. See https://github.com/octokit/graphql.js for the API. + +```js +const result = await octokit.graphql(query, variables); +``` + +Finally, you can get the context of the current action: + +```js +const github = require('@actions/github'); + +const context = github.context; + +const newIssue = await octokit.rest.issues.create({ + ...context.repo, + title: 'New issue!', + body: 'Hello Universe!' +}); +``` + +## Webhook payload typescript definitions + +The npm module `@octokit/webhooks-definitions` provides type definitions for the response payloads. You can cast the payload to these types for better type information. + +First, install the npm module `npm install @octokit/webhooks-definitions` + +Then, assert the type based on the eventName +```ts +import * as core from '@actions/core' +import * as github from '@actions/github' +import {PushEvent} from '@octokit/webhooks-definitions/schema' + +if (github.context.eventName === 'push') { + const pushPayload = github.context.payload as PushEvent + core.info(`The head commit is: ${pushPayload.head_commit}`) +} +``` + +## Extending the Octokit instance +`@octokit/core` now supports the [plugin architecture](https://github.com/octokit/core.js#plugins). You can extend the GitHub instance using plugins. + +For example, using the `@octokit/plugin-enterprise-server` you can now access enterprise admin apis on GHES instances. + +```ts +import { GitHub, getOctokitOptions } from '@actions/github/lib/utils' +import { enterpriseServer220Admin } from '@octokit/plugin-enterprise-server' + +const octokit = GitHub.plugin(enterpriseServer220Admin) +// or override some of the default values as well +// const octokit = GitHub.plugin(enterpriseServer220Admin).defaults({userAgent: "MyNewUserAgent"}) + +const myToken = core.getInput('myToken'); +const myOctokit = new octokit(getOctokitOptions(token)) +// Create a new user +myOctokit.rest.enterpriseAdmin.createUser({ + login: "testuser", + email: "testuser@test.com", +}); +``` diff --git a/node_modules/@actions/github/lib/context.d.ts b/node_modules/@actions/github/lib/context.d.ts new file mode 100644 index 0000000..7d3a7de --- /dev/null +++ b/node_modules/@actions/github/lib/context.d.ts @@ -0,0 +1,32 @@ +import { WebhookPayload } from './interfaces'; +export declare class Context { + /** + * Webhook payload object that triggered the workflow + */ + payload: WebhookPayload; + eventName: string; + sha: string; + ref: string; + workflow: string; + action: string; + actor: string; + job: string; + runNumber: number; + runId: number; + apiUrl: string; + serverUrl: string; + graphqlUrl: string; + /** + * Hydrate the context from the environment + */ + constructor(); + get issue(): { + owner: string; + repo: string; + number: number; + }; + get repo(): { + owner: string; + repo: string; + }; +} diff --git a/node_modules/@actions/github/lib/context.js b/node_modules/@actions/github/lib/context.js new file mode 100644 index 0000000..767933c --- /dev/null +++ b/node_modules/@actions/github/lib/context.js @@ -0,0 +1,54 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Context = void 0; +const fs_1 = require("fs"); +const os_1 = require("os"); +class Context { + /** + * Hydrate the context from the environment + */ + constructor() { + var _a, _b, _c; + this.payload = {}; + if (process.env.GITHUB_EVENT_PATH) { + if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + } + else { + const path = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`); + } + } + this.eventName = process.env.GITHUB_EVENT_NAME; + this.sha = process.env.GITHUB_SHA; + this.ref = process.env.GITHUB_REF; + this.workflow = process.env.GITHUB_WORKFLOW; + this.action = process.env.GITHUB_ACTION; + this.actor = process.env.GITHUB_ACTOR; + this.job = process.env.GITHUB_JOB; + this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10); + this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); + this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; + this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; + this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; + } + get issue() { + const payload = this.payload; + return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number }); + } + get repo() { + if (process.env.GITHUB_REPOSITORY) { + const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/'); + return { owner, repo }; + } + if (this.payload.repository) { + return { + owner: this.payload.repository.owner.login, + repo: this.payload.repository.name + }; + } + throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'"); + } +} +exports.Context = Context; +//# sourceMappingURL=context.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/context.js.map b/node_modules/@actions/github/lib/context.js.map new file mode 100644 index 0000000..91fb9a9 --- /dev/null +++ b/node_modules/@actions/github/lib/context.js.map @@ -0,0 +1 @@ +{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":";;;AAEA,2BAA2C;AAC3C,2BAAsB;AAEtB,MAAa,OAAO;IAmBlB;;OAEG;IACH;;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;QACjB,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,IAAI,eAAU,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;gBAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CACvB,iBAAY,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAChE,CAAA;aACF;iBAAM;gBACL,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAA;gBAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,IAAI,kBAAkB,QAAG,EAAE,CAAC,CAAA;aACvE;SACF;QACD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,iBAA2B,CAAA;QACxD,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,eAAyB,CAAA;QACrD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,aAAuB,CAAA;QACjD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,YAAsB,CAAA;QAC/C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,UAAoB,CAAA;QAC3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAA2B,EAAE,EAAE,CAAC,CAAA;QACtE,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,aAAuB,EAAE,EAAE,CAAC,CAAA;QAC9D,IAAI,CAAC,MAAM,SAAG,OAAO,CAAC,GAAG,CAAC,cAAc,mCAAI,wBAAwB,CAAA;QACpE,IAAI,CAAC,SAAS,SAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,mCAAI,oBAAoB,CAAA;QACtE,IAAI,CAAC,UAAU,SACb,OAAO,CAAC,GAAG,CAAC,kBAAkB,mCAAI,gCAAgC,CAAA;IACtE,CAAC;IAED,IAAI,KAAK;QACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;QAE5B,uCACK,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,CAAC,MAAM,IAClE;IACH,CAAC;IAED,IAAI,IAAI;QACN,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC9D,OAAO,EAAC,KAAK,EAAE,IAAI,EAAC,CAAA;SACrB;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;gBAC1C,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;aACnC,CAAA;SACF;QAED,MAAM,IAAI,KAAK,CACb,kFAAkF,CACnF,CAAA;IACH,CAAC;CACF;AA3ED,0BA2EC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.d.ts b/node_modules/@actions/github/lib/github.d.ts new file mode 100644 index 0000000..90c3b98 --- /dev/null +++ b/node_modules/@actions/github/lib/github.d.ts @@ -0,0 +1,11 @@ +import * as Context from './context'; +import { GitHub } from './utils'; +import { OctokitOptions } from '@octokit/core/dist-types/types'; +export declare const context: Context.Context; +/** + * Returns a hydrated octokit ready to use for GitHub Actions + * + * @param token the repo PAT or GITHUB_TOKEN + * @param options other options to set + */ +export declare function getOctokit(token: string, options?: OctokitOptions): InstanceType; diff --git a/node_modules/@actions/github/lib/github.js b/node_modules/@actions/github/lib/github.js new file mode 100644 index 0000000..f02c9fb --- /dev/null +++ b/node_modules/@actions/github/lib/github.js @@ -0,0 +1,36 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getOctokit = exports.context = void 0; +const Context = __importStar(require("./context")); +const utils_1 = require("./utils"); +exports.context = new Context.Context(); +/** + * Returns a hydrated octokit ready to use for GitHub Actions + * + * @param token the repo PAT or GITHUB_TOKEN + * @param options other options to set + */ +function getOctokit(token, options) { + return new utils_1.GitHub(utils_1.getOctokitOptions(token, options)); +} +exports.getOctokit = getOctokit; +//# sourceMappingURL=github.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/github.js.map b/node_modules/@actions/github/lib/github.js.map new file mode 100644 index 0000000..717d03e --- /dev/null +++ b/node_modules/@actions/github/lib/github.js.map @@ -0,0 +1 @@ +{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/github.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoC;AACpC,mCAAiD;AAKpC,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,KAAa,EACb,OAAwB;IAExB,OAAO,IAAI,cAAM,CAAC,yBAAiB,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;AACtD,CAAC;AALD,gCAKC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.d.ts b/node_modules/@actions/github/lib/interfaces.d.ts new file mode 100644 index 0000000..f810333 --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.d.ts @@ -0,0 +1,40 @@ +export interface PayloadRepository { + [key: string]: any; + full_name?: string; + name: string; + owner: { + [key: string]: any; + login: string; + name?: string; + }; + html_url?: string; +} +export interface WebhookPayload { + [key: string]: any; + repository?: PayloadRepository; + issue?: { + [key: string]: any; + number: number; + html_url?: string; + body?: string; + }; + pull_request?: { + [key: string]: any; + number: number; + html_url?: string; + body?: string; + }; + sender?: { + [key: string]: any; + type: string; + }; + action?: string; + installation?: { + id: number; + [key: string]: any; + }; + comment?: { + id: number; + [key: string]: any; + }; +} diff --git a/node_modules/@actions/github/lib/interfaces.js b/node_modules/@actions/github/lib/interfaces.js new file mode 100644 index 0000000..a660b5e --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.js @@ -0,0 +1,4 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/interfaces.js.map b/node_modules/@actions/github/lib/interfaces.js.map new file mode 100644 index 0000000..dc2c960 --- /dev/null +++ b/node_modules/@actions/github/lib/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";AAAA,uDAAuD"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/internal/utils.d.ts b/node_modules/@actions/github/lib/internal/utils.d.ts new file mode 100644 index 0000000..5790d91 --- /dev/null +++ b/node_modules/@actions/github/lib/internal/utils.d.ts @@ -0,0 +1,6 @@ +/// +import * as http from 'http'; +import { OctokitOptions } from '@octokit/core/dist-types/types'; +export declare function getAuthString(token: string, options: OctokitOptions): string | undefined; +export declare function getProxyAgent(destinationUrl: string): http.Agent; +export declare function getApiBaseUrl(): string; diff --git a/node_modules/@actions/github/lib/internal/utils.js b/node_modules/@actions/github/lib/internal/utils.js new file mode 100644 index 0000000..175a4da --- /dev/null +++ b/node_modules/@actions/github/lib/internal/utils.js @@ -0,0 +1,43 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; +const httpClient = __importStar(require("@actions/http-client")); +function getAuthString(token, options) { + if (!token && !options.auth) { + throw new Error('Parameter token or opts.auth is required'); + } + else if (token && options.auth) { + throw new Error('Parameters token and opts.auth may not both be specified'); + } + return typeof options.auth === 'string' ? options.auth : `token ${token}`; +} +exports.getAuthString = getAuthString; +function getProxyAgent(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgent(destinationUrl); +} +exports.getProxyAgent = getProxyAgent; +function getApiBaseUrl() { + return process.env['GITHUB_API_URL'] || 'https://api.github.com'; +} +exports.getApiBaseUrl = getApiBaseUrl; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/internal/utils.js.map b/node_modules/@actions/github/lib/internal/utils.js.map new file mode 100644 index 0000000..f1f519d --- /dev/null +++ b/node_modules/@actions/github/lib/internal/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,iEAAkD;AAGlD,SAAgB,aAAa,CAC3B,KAAa,EACb,OAAuB;IAEvB,IAAI,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QAC3B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;KAC5D;SAAM,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI,EAAE;QAChC,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;KAC5E;IAED,OAAO,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,KAAK,EAAE,CAAA;AAC3E,CAAC;AAXD,sCAWC;AAED,SAAgB,aAAa,CAAC,cAAsB;IAClD,MAAM,EAAE,GAAG,IAAI,UAAU,CAAC,UAAU,EAAE,CAAA;IACtC,OAAO,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAA;AACpC,CAAC;AAHD,sCAGC;AAED,SAAgB,aAAa;IAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,wBAAwB,CAAA;AAClE,CAAC;AAFD,sCAEC"} \ No newline at end of file diff --git a/node_modules/@actions/github/lib/utils.d.ts b/node_modules/@actions/github/lib/utils.d.ts new file mode 100644 index 0000000..fe28cbd --- /dev/null +++ b/node_modules/@actions/github/lib/utils.d.ts @@ -0,0 +1,14 @@ +import * as Context from './context'; +import { Octokit } from '@octokit/core'; +import { OctokitOptions } from '@octokit/core/dist-types/types'; +export declare const context: Context.Context; +export declare const GitHub: typeof Octokit & import("@octokit/core/dist-types/types").Constructor; +/** + * Convience function to correctly format Octokit Options to pass into the constructor. + * + * @param token the repo PAT or GITHUB_TOKEN + * @param options other options to set + */ +export declare function getOctokitOptions(token: string, options?: OctokitOptions): OctokitOptions; diff --git a/node_modules/@actions/github/lib/utils.js b/node_modules/@actions/github/lib/utils.js new file mode 100644 index 0000000..afb40e9 --- /dev/null +++ b/node_modules/@actions/github/lib/utils.js @@ -0,0 +1,54 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getOctokitOptions = exports.GitHub = exports.context = void 0; +const Context = __importStar(require("./context")); +const Utils = __importStar(require("./internal/utils")); +// octokit + plugins +const core_1 = require("@octokit/core"); +const plugin_rest_endpoint_methods_1 = require("@octokit/plugin-rest-endpoint-methods"); +const plugin_paginate_rest_1 = require("@octokit/plugin-paginate-rest"); +exports.context = new Context.Context(); +const baseUrl = Utils.getApiBaseUrl(); +const defaults = { + baseUrl, + request: { + agent: Utils.getProxyAgent(baseUrl) + } +}; +exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults); +/** + * Convience function to correctly format Octokit Options to pass into the constructor. + * + * @param token the repo PAT or GITHUB_TOKEN + * @param options other options to set + */ +function getOctokitOptions(token, options) { + const opts = Object.assign({}, options || {}); // Shallow clone - don't mutate the object provided by the caller + // Auth + const auth = Utils.getAuthString(token, opts); + if (auth) { + opts.auth = auth; + } + return opts; +} +exports.getOctokitOptions = getOctokitOptions; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/github/lib/utils.js.map b/node_modules/@actions/github/lib/utils.js.map new file mode 100644 index 0000000..3a6f6b4 --- /dev/null +++ b/node_modules/@actions/github/lib/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAoC;AACpC,wDAAyC;AAEzC,oBAAoB;AACpB,wCAAqC;AAErC,wFAAyE;AACzE,wEAA0D;AAE7C,QAAA,OAAO,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,CAAA;AAE5C,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,EAAE,CAAA;AACrC,MAAM,QAAQ,GAAG;IACf,OAAO;IACP,OAAO,EAAE;QACP,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC;KACpC;CACF,CAAA;AAEY,QAAA,MAAM,GAAG,cAAO,CAAC,MAAM,CAClC,kDAAmB,EACnB,mCAAY,CACb,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAEpB;;;;;GAKG;AACH,SAAgB,iBAAiB,CAC/B,KAAa,EACb,OAAwB;IAExB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,IAAI,EAAE,CAAC,CAAA,CAAC,iEAAiE;IAE/G,OAAO;IACP,MAAM,IAAI,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;IAC7C,IAAI,IAAI,EAAE;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;KACjB;IAED,OAAO,IAAI,CAAA;AACb,CAAC;AAbD,8CAaC"} \ No newline at end of file diff --git a/node_modules/@actions/github/package.json b/node_modules/@actions/github/package.json new file mode 100644 index 0000000..30da327 --- /dev/null +++ b/node_modules/@actions/github/package.json @@ -0,0 +1,49 @@ +{ + "name": "@actions/github", + "version": "5.0.3", + "description": "Actions github lib", + "keywords": [ + "github", + "actions" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/github", + "license": "MIT", + "main": "lib/github.js", + "types": "lib/github.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/github" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "jest", + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "tsc": "tsc" + }, + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^2.0.1", + "@octokit/core": "^3.6.0", + "@octokit/plugin-paginate-rest": "^2.17.0", + "@octokit/plugin-rest-endpoint-methods": "^5.13.0" + }, + "devDependencies": { + "proxy": "^1.0.2" + } +} diff --git a/node_modules/@actions/http-client/LICENSE b/node_modules/@actions/http-client/LICENSE new file mode 100644 index 0000000..5823a51 --- /dev/null +++ b/node_modules/@actions/http-client/LICENSE @@ -0,0 +1,21 @@ +Actions Http Client for Node.js + +Copyright (c) GitHub, Inc. + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@actions/http-client/README.md b/node_modules/@actions/http-client/README.md new file mode 100644 index 0000000..7e06ade --- /dev/null +++ b/node_modules/@actions/http-client/README.md @@ -0,0 +1,73 @@ +# `@actions/http-client` + +A lightweight HTTP client optimized for building actions. + +## Features + + - HTTP client with TypeScript generics and async/await/Promises + - Typings included! + - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner + - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. + - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. + - Redirects supported + +Features and releases [here](./RELEASES.md) + +## Install + +``` +npm install @actions/http-client --save +``` + +## Samples + +See the [tests](./__tests__) for detailed examples. + +## Errors + +### HTTP + +The HTTP client does not throw unless truly exceptional. + +* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. +* Redirects (3xx) will be followed by default. + +See the [tests](./__tests__) for detailed examples. + +## Debugging + +To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: + +```shell +export NODE_DEBUG=http +``` + +## Node support + +The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. + +## Support and Versioning + +We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). + +## Contributing + +We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. + +once: + +``` +npm install +``` + +To build: + +``` +npm run build +``` + +To run all tests: + +``` +npm test +``` diff --git a/node_modules/@actions/http-client/lib/auth.d.ts b/node_modules/@actions/http-client/lib/auth.d.ts new file mode 100644 index 0000000..8cc9fc3 --- /dev/null +++ b/node_modules/@actions/http-client/lib/auth.d.ts @@ -0,0 +1,26 @@ +/// +import * as http from 'http'; +import * as ifm from './interfaces'; +import { HttpClientResponse } from './index'; +export declare class BasicCredentialHandler implements ifm.RequestHandler { + username: string; + password: string; + constructor(username: string, password: string); + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(): boolean; + handleAuthentication(): Promise; +} +export declare class BearerCredentialHandler implements ifm.RequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(): boolean; + handleAuthentication(): Promise; +} +export declare class PersonalAccessTokenCredentialHandler implements ifm.RequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(): boolean; + handleAuthentication(): Promise; +} diff --git a/node_modules/@actions/http-client/lib/auth.js b/node_modules/@actions/http-client/lib/auth.js new file mode 100644 index 0000000..2c150a3 --- /dev/null +++ b/node_modules/@actions/http-client/lib/auth.js @@ -0,0 +1,81 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/auth.js.map b/node_modules/@actions/http-client/lib/auth.js.map new file mode 100644 index 0000000..7d3a18a --- /dev/null +++ b/node_modules/@actions/http-client/lib/auth.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAa,sBAAsB;IAIjC,YAAY,QAAgB,EAAE,QAAgB;QAC5C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC1C;QACD,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,MAAM,CAAC,IAAI,CACrD,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,EAAE,CACpC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;IACxB,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AA1BD,wDA0BC;AAED,MAAa,uBAAuB;IAGlC,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,yCAAyC;IACzC,sDAAsD;IACtD,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC1C;QACD,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,IAAI,CAAC,KAAK,EAAE,CAAA;IAC3D,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AAxBD,0DAwBC;AAED,MAAa,oCAAoC;IAI/C,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;IACpB,CAAC;IAED,yCAAyC;IACzC,sDAAsD;IACtD,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,CAAC,CAAA;SAC1C;QACD,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,SAAS,MAAM,CAAC,IAAI,CACrD,OAAO,IAAI,CAAC,KAAK,EAAE,CACpB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;IACxB,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AA3BD,oFA2BC"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/index.d.ts b/node_modules/@actions/http-client/lib/index.d.ts new file mode 100644 index 0000000..fe733d1 --- /dev/null +++ b/node_modules/@actions/http-client/lib/index.d.ts @@ -0,0 +1,123 @@ +/// +import * as http from 'http'; +import * as ifm from './interfaces'; +export declare enum HttpCodes { + OK = 200, + MultipleChoices = 300, + MovedPermanently = 301, + ResourceMoved = 302, + SeeOther = 303, + NotModified = 304, + UseProxy = 305, + SwitchProxy = 306, + TemporaryRedirect = 307, + PermanentRedirect = 308, + BadRequest = 400, + Unauthorized = 401, + PaymentRequired = 402, + Forbidden = 403, + NotFound = 404, + MethodNotAllowed = 405, + NotAcceptable = 406, + ProxyAuthenticationRequired = 407, + RequestTimeout = 408, + Conflict = 409, + Gone = 410, + TooManyRequests = 429, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504 +} +export declare enum Headers { + Accept = "accept", + ContentType = "content-type" +} +export declare enum MediaTypes { + ApplicationJson = "application/json" +} +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +export declare function getProxyUrl(serverUrl: string): string; +export declare class HttpClientError extends Error { + constructor(message: string, statusCode: number); + statusCode: number; + result?: any; +} +export declare class HttpClientResponse { + constructor(message: http.IncomingMessage); + message: http.IncomingMessage; + readBody(): Promise; +} +export declare function isHttps(requestUrl: string): boolean; +export declare class HttpClient { + userAgent: string | undefined; + handlers: ifm.RequestHandler[]; + requestOptions: ifm.RequestOptions | undefined; + private _ignoreSslError; + private _socketTimeout; + private _allowRedirects; + private _allowRedirectDowngrade; + private _maxRedirects; + private _allowRetries; + private _maxRetries; + private _agent; + private _proxyAgent; + private _keepAlive; + private _disposed; + constructor(userAgent?: string, handlers?: ifm.RequestHandler[], requestOptions?: ifm.RequestOptions); + options(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + get(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + del(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + head(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + postJson(requestUrl: string, obj: any, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + putJson(requestUrl: string, obj: any, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + patchJson(requestUrl: string, obj: any, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream | null, headers?: http.OutgoingHttpHeaders): Promise; + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose(): void; + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info: ifm.RequestInfo, data: string | NodeJS.ReadableStream | null): Promise; + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info: ifm.RequestInfo, data: string | NodeJS.ReadableStream | null, onResult: (err?: Error, res?: HttpClientResponse) => void): void; + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl: string): http.Agent; + private _prepareRequest; + private _mergeHeaders; + private _getExistingOrDefaultHeader; + private _getAgent; + private _performExponentialBackoff; + private _processResponse; +} diff --git a/node_modules/@actions/http-client/lib/index.js b/node_modules/@actions/http-client/lib/index.js new file mode 100644 index 0000000..a1b7d03 --- /dev/null +++ b/node_modules/@actions/http-client/lib/index.js @@ -0,0 +1,605 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(require("http")); +const https = __importStar(require("https")); +const pm = __importStar(require("./proxy")); +const tunnel = __importStar(require("tunnel")); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/index.js.map b/node_modules/@actions/http-client/lib/index.js.map new file mode 100644 index 0000000..ca8ea41 --- /dev/null +++ b/node_modules/@actions/http-client/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,2CAA4B;AAC5B,6CAA8B;AAG9B,4CAA6B;AAC7B,+CAAgC;AAEhC,IAAY,SA4BX;AA5BD,WAAY,SAAS;IACnB,uCAAQ,CAAA;IACR,iEAAqB,CAAA;IACrB,mEAAsB,CAAA;IACtB,6DAAmB,CAAA;IACnB,mDAAc,CAAA;IACd,yDAAiB,CAAA;IACjB,mDAAc,CAAA;IACd,yDAAiB,CAAA;IACjB,qEAAuB,CAAA;IACvB,qEAAuB,CAAA;IACvB,uDAAgB,CAAA;IAChB,2DAAkB,CAAA;IAClB,iEAAqB,CAAA;IACrB,qDAAe,CAAA;IACf,mDAAc,CAAA;IACd,mEAAsB,CAAA;IACtB,6DAAmB,CAAA;IACnB,yFAAiC,CAAA;IACjC,+DAAoB,CAAA;IACpB,mDAAc,CAAA;IACd,2CAAU,CAAA;IACV,iEAAqB,CAAA;IACrB,yEAAyB,CAAA;IACzB,+DAAoB,CAAA;IACpB,uDAAgB,CAAA;IAChB,uEAAwB,CAAA;IACxB,+DAAoB,CAAA;AACtB,CAAC,EA5BW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QA4BpB;AAED,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,4BAAiB,CAAA;IACjB,uCAA4B,CAAA;AAC9B,CAAC,EAHW,OAAO,GAAP,eAAO,KAAP,eAAO,QAGlB;AAED,IAAY,UAEX;AAFD,WAAY,UAAU;IACpB,kDAAoC,CAAA;AACtC,CAAC,EAFW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAErB;AAED;;;GAGG;AACH,SAAgB,WAAW,CAAC,SAAiB;IAC3C,MAAM,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAA;IACnD,OAAO,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;AACtC,CAAC;AAHD,kCAGC;AAED,MAAM,iBAAiB,GAAa;IAClC,SAAS,CAAC,gBAAgB;IAC1B,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,QAAQ;IAClB,SAAS,CAAC,iBAAiB;IAC3B,SAAS,CAAC,iBAAiB;CAC5B,CAAA;AACD,MAAM,sBAAsB,GAAa;IACvC,SAAS,CAAC,UAAU;IACpB,SAAS,CAAC,kBAAkB;IAC5B,SAAS,CAAC,cAAc;CACzB,CAAA;AACD,MAAM,kBAAkB,GAAa,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAA;AACzE,MAAM,yBAAyB,GAAG,EAAE,CAAA;AACpC,MAAM,2BAA2B,GAAG,CAAC,CAAA;AAErC,MAAa,eAAgB,SAAQ,KAAK;IACxC,YAAY,OAAe,EAAE,UAAkB;QAC7C,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IACxD,CAAC;CAIF;AAVD,0CAUC;AAED,MAAa,kBAAkB;IAC7B,YAAY,OAA6B;QACvC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAGK,QAAQ;;YACZ,OAAO,IAAI,OAAO,CAAS,CAAM,OAAO,EAAC,EAAE;gBACzC,IAAI,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAE5B,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;oBACxC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;gBACzC,CAAC,CAAC,CAAA;gBAEF,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;oBAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;gBAC5B,CAAC,CAAC,CAAA;YACJ,CAAC,CAAA,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAnBD,gDAmBC;AAED,SAAgB,OAAO,CAAC,UAAkB;IACxC,MAAM,SAAS,GAAQ,IAAI,GAAG,CAAC,UAAU,CAAC,CAAA;IAC1C,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAA;AACxC,CAAC;AAHD,0BAGC;AAED,MAAa,UAAU;IAiBrB,YACE,SAAkB,EAClB,QAA+B,EAC/B,cAAmC;QAf7B,oBAAe,GAAG,KAAK,CAAA;QAEvB,oBAAe,GAAG,IAAI,CAAA;QACtB,4BAAuB,GAAG,KAAK,CAAA;QAC/B,kBAAa,GAAG,EAAE,CAAA;QAClB,kBAAa,GAAG,KAAK,CAAA;QACrB,gBAAW,GAAG,CAAC,CAAA;QAGf,eAAU,GAAG,KAAK,CAAA;QAClB,cAAS,GAAG,KAAK,CAAA;QAOvB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAA;QAC9B,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,cAAc,EAAE;YAClB,IAAI,cAAc,CAAC,cAAc,IAAI,IAAI,EAAE;gBACzC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,cAAc,CAAA;aACrD;YAED,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC,aAAa,CAAA;YAElD,IAAI,cAAc,CAAC,cAAc,IAAI,IAAI,EAAE;gBACzC,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC,cAAc,CAAA;aACrD;YAED,IAAI,cAAc,CAAC,sBAAsB,IAAI,IAAI,EAAE;gBACjD,IAAI,CAAC,uBAAuB,GAAG,cAAc,CAAC,sBAAsB,CAAA;aACrE;YAED,IAAI,cAAc,CAAC,YAAY,IAAI,IAAI,EAAE;gBACvC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC,CAAC,CAAA;aAC9D;YAED,IAAI,cAAc,CAAC,SAAS,IAAI,IAAI,EAAE;gBACpC,IAAI,CAAC,UAAU,GAAG,cAAc,CAAC,SAAS,CAAA;aAC3C;YAED,IAAI,cAAc,CAAC,YAAY,IAAI,IAAI,EAAE;gBACvC,IAAI,CAAC,aAAa,GAAG,cAAc,CAAC,YAAY,CAAA;aACjD;YAED,IAAI,cAAc,CAAC,UAAU,IAAI,IAAI,EAAE;gBACrC,IAAI,CAAC,WAAW,GAAG,cAAc,CAAC,UAAU,CAAA;aAC7C;SACF;IACH,CAAC;IAEK,OAAO,CACX,UAAkB,EAClB,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QAC3E,CAAC;KAAA;IAEK,GAAG,CACP,UAAkB,EAClB,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QACvE,CAAC;KAAA;IAEK,GAAG,CACP,UAAkB,EAClB,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QAC1E,CAAC;KAAA;IAEK,IAAI,CACR,UAAkB,EAClB,IAAY,EACZ,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QACxE,CAAC;KAAA;IAEK,KAAK,CACT,UAAkB,EAClB,IAAY,EACZ,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QACzE,CAAC;KAAA;IAEK,GAAG,CACP,UAAkB,EAClB,IAAY,EACZ,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QACvE,CAAC;KAAA;IAEK,IAAI,CACR,UAAkB,EAClB,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,iBAAiB,IAAI,EAAE,CAAC,CAAA;QACxE,CAAC;KAAA;IAEK,UAAU,CACd,IAAY,EACZ,UAAkB,EAClB,MAA6B,EAC7B,iBAA4C;;YAE5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAA;QAClE,CAAC;KAAA;IAED;;;OAGG;IACG,OAAO,CACX,UAAkB,EAClB,oBAA8C,EAAE;;YAEhD,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,2BAA2B,CAClE,iBAAiB,EACjB,OAAO,CAAC,MAAM,EACd,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,MAAM,GAAG,GAAuB,MAAM,IAAI,CAAC,GAAG,CAC5C,UAAU,EACV,iBAAiB,CAClB,CAAA;YACD,OAAO,IAAI,CAAC,gBAAgB,CAAI,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;QAC3D,CAAC;KAAA;IAEK,QAAQ,CACZ,UAAkB,EAClB,GAAQ,EACR,oBAA8C,EAAE;;YAEhD,MAAM,IAAI,GAAW,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;YACjD,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,2BAA2B,CAClE,iBAAiB,EACjB,OAAO,CAAC,MAAM,EACd,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,2BAA2B,CACvE,iBAAiB,EACjB,OAAO,CAAC,WAAW,EACnB,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,MAAM,GAAG,GAAuB,MAAM,IAAI,CAAC,IAAI,CAC7C,UAAU,EACV,IAAI,EACJ,iBAAiB,CAClB,CAAA;YACD,OAAO,IAAI,CAAC,gBAAgB,CAAI,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;QAC3D,CAAC;KAAA;IAEK,OAAO,CACX,UAAkB,EAClB,GAAQ,EACR,oBAA8C,EAAE;;YAEhD,MAAM,IAAI,GAAW,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;YACjD,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,2BAA2B,CAClE,iBAAiB,EACjB,OAAO,CAAC,MAAM,EACd,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,2BAA2B,CACvE,iBAAiB,EACjB,OAAO,CAAC,WAAW,EACnB,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,MAAM,GAAG,GAAuB,MAAM,IAAI,CAAC,GAAG,CAC5C,UAAU,EACV,IAAI,EACJ,iBAAiB,CAClB,CAAA;YACD,OAAO,IAAI,CAAC,gBAAgB,CAAI,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;QAC3D,CAAC;KAAA;IAEK,SAAS,CACb,UAAkB,EAClB,GAAQ,EACR,oBAA8C,EAAE;;YAEhD,MAAM,IAAI,GAAW,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;YACjD,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,2BAA2B,CAClE,iBAAiB,EACjB,OAAO,CAAC,MAAM,EACd,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,2BAA2B,CACvE,iBAAiB,EACjB,OAAO,CAAC,WAAW,EACnB,UAAU,CAAC,eAAe,CAC3B,CAAA;YACD,MAAM,GAAG,GAAuB,MAAM,IAAI,CAAC,KAAK,CAC9C,UAAU,EACV,IAAI,EACJ,iBAAiB,CAClB,CAAA;YACD,OAAO,IAAI,CAAC,gBAAgB,CAAI,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAA;QAC3D,CAAC;KAAA;IAED;;;;OAIG;IACG,OAAO,CACX,IAAY,EACZ,UAAkB,EAClB,IAA2C,EAC3C,OAAkC;;YAElC,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAA;aACrD;YAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAA;YACrC,IAAI,IAAI,GAAoB,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;YAE1E,oEAAoE;YACpE,MAAM,QAAQ,GACZ,IAAI,CAAC,aAAa,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACrD,CAAC,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC;gBACtB,CAAC,CAAC,CAAC,CAAA;YACP,IAAI,QAAQ,GAAG,CAAC,CAAA;YAEhB,IAAI,QAAwC,CAAA;YAC5C,GAAG;gBACD,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;gBAE5C,4CAA4C;gBAC5C,IACE,QAAQ;oBACR,QAAQ,CAAC,OAAO;oBAChB,QAAQ,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,YAAY,EACtD;oBACA,IAAI,qBAAqD,CAAA;oBAEzD,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;wBACnC,IAAI,OAAO,CAAC,uBAAuB,CAAC,QAAQ,CAAC,EAAE;4BAC7C,qBAAqB,GAAG,OAAO,CAAA;4BAC/B,MAAK;yBACN;qBACF;oBAED,IAAI,qBAAqB,EAAE;wBACzB,OAAO,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;qBACpE;yBAAM;wBACL,+EAA+E;wBAC/E,yCAAyC;wBACzC,OAAO,QAAQ,CAAA;qBAChB;iBACF;gBAED,IAAI,kBAAkB,GAAW,IAAI,CAAC,aAAa,CAAA;gBACnD,OACE,QAAQ,CAAC,OAAO,CAAC,UAAU;oBAC3B,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;oBACvD,IAAI,CAAC,eAAe;oBACpB,kBAAkB,GAAG,CAAC,EACtB;oBACA,MAAM,WAAW,GACf,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;oBACtC,IAAI,CAAC,WAAW,EAAE;wBAChB,kDAAkD;wBAClD,MAAK;qBACN;oBACD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,WAAW,CAAC,CAAA;oBAC9C,IACE,SAAS,CAAC,QAAQ,KAAK,QAAQ;wBAC/B,SAAS,CAAC,QAAQ,KAAK,iBAAiB,CAAC,QAAQ;wBACjD,CAAC,IAAI,CAAC,uBAAuB,EAC7B;wBACA,MAAM,IAAI,KAAK,CACb,8KAA8K,CAC/K,CAAA;qBACF;oBAED,qEAAqE;oBACrE,mCAAmC;oBACnC,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAA;oBAEzB,mEAAmE;oBACnE,IAAI,iBAAiB,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ,EAAE;wBACrD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;4BAC5B,oCAAoC;4BACpC,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,eAAe,EAAE;gCAC5C,OAAO,OAAO,CAAC,MAAM,CAAC,CAAA;6BACvB;yBACF;qBACF;oBAED,kDAAkD;oBAClD,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAA;oBAC7D,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;oBAC5C,kBAAkB,EAAE,CAAA;iBACrB;gBAED,IACE,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU;oBAC5B,CAAC,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,EAC7D;oBACA,8DAA8D;oBAC9D,OAAO,QAAQ,CAAA;iBAChB;gBAED,QAAQ,IAAI,CAAC,CAAA;gBAEb,IAAI,QAAQ,GAAG,QAAQ,EAAE;oBACvB,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAA;oBACzB,MAAM,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAA;iBAChD;aACF,QAAQ,QAAQ,GAAG,QAAQ,EAAC;YAE7B,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;IAED;;OAEG;IACH,OAAO;QACL,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAA;SACtB;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAA;IACvB,CAAC;IAED;;;;OAIG;IACG,UAAU,CACd,IAAqB,EACrB,IAA2C;;YAE3C,OAAO,IAAI,OAAO,CAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACzD,SAAS,iBAAiB,CAAC,GAAW,EAAE,GAAwB;oBAC9D,IAAI,GAAG,EAAE;wBACP,MAAM,CAAC,GAAG,CAAC,CAAA;qBACZ;yBAAM,IAAI,CAAC,GAAG,EAAE;wBACf,qDAAqD;wBACrD,MAAM,CAAC,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC,CAAA;qBACnC;yBAAM;wBACL,OAAO,CAAC,GAAG,CAAC,CAAA;qBACb;gBACH,CAAC;gBAED,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAA;YAC5D,CAAC,CAAC,CAAA;QACJ,CAAC;KAAA;IAED;;;;;OAKG;IACH,sBAAsB,CACpB,IAAqB,EACrB,IAA2C,EAC3C,QAAyD;QAEzD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;gBACzB,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAA;aAC1B;YACD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;SACzE;QAED,IAAI,cAAc,GAAG,KAAK,CAAA;QAC1B,SAAS,YAAY,CAAC,GAAW,EAAE,GAAwB;YACzD,IAAI,CAAC,cAAc,EAAE;gBACnB,cAAc,GAAG,IAAI,CAAA;gBACrB,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;aACnB;QACH,CAAC;QAED,MAAM,GAAG,GAAuB,IAAI,CAAC,UAAU,CAAC,OAAO,CACrD,IAAI,CAAC,OAAO,EACZ,CAAC,GAAyB,EAAE,EAAE;YAC5B,MAAM,GAAG,GAAuB,IAAI,kBAAkB,CAAC,GAAG,CAAC,CAAA;YAC3D,YAAY,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;QAC9B,CAAC,CACF,CAAA;QAED,IAAI,MAAkB,CAAA;QACtB,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE;YACtB,MAAM,GAAG,IAAI,CAAA;QACf,CAAC,CAAC,CAAA;QAEF,wEAAwE;QACxE,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,GAAG,KAAK,EAAE,GAAG,EAAE;YACpD,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,GAAG,EAAE,CAAA;aACb;YACD,YAAY,CAAC,IAAI,KAAK,CAAC,oBAAoB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;QAClE,CAAC,CAAC,CAAA;QAEF,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,UAAS,GAAG;YAC1B,8BAA8B;YAC9B,0BAA0B;YAC1B,YAAY,CAAC,GAAG,CAAC,CAAA;QACnB,CAAC,CAAC,CAAA;QAEF,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YACpC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;SACxB;QAED,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YACpC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE;gBACf,GAAG,CAAC,GAAG,EAAE,CAAA;YACX,CAAC,CAAC,CAAA;YAEF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;SACf;aAAM;YACL,GAAG,CAAC,GAAG,EAAE,CAAA;SACV;IACH,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,SAAiB;QACxB,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAA;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;IAClC,CAAC;IAEO,eAAe,CACrB,MAAc,EACd,UAAe,EACf,OAAkC;QAElC,MAAM,IAAI,GAAqC,EAAE,CAAA;QAEjD,IAAI,CAAC,SAAS,GAAG,UAAU,CAAA;QAC3B,MAAM,QAAQ,GAAY,IAAI,CAAC,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAA;QAC9D,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;QACzC,MAAM,WAAW,GAAW,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;QAE/C,IAAI,CAAC,OAAO,GAAwB,EAAE,CAAA;QACtC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAA;QAC3C,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI;YACrC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;YAC/B,CAAC,CAAC,WAAW,CAAA;QACf,IAAI,CAAC,OAAO,CAAC,IAAI;YACf,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,EAAE,CAAC,CAAA;QACjE,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAA;QAC5B,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAClD,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YAC1B,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,SAAS,CAAA;SACpD;QAED,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAEnD,+CAA+C;QAC/C,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;gBACnC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;aACrC;SACF;QAED,OAAO,IAAI,CAAA;IACb,CAAC;IAEO,aAAa,CACnB,OAAkC;QAElC,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACtD,OAAO,MAAM,CAAC,MAAM,CAClB,EAAE,EACF,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAC1C,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,CAC7B,CAAA;SACF;QAED,OAAO,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,CAAA;IACrC,CAAC;IAEO,2BAA2B,CACjC,iBAA2C,EAC3C,MAAc,EACd,QAAgB;QAEhB,IAAI,YAAgC,CAAA;QACpC,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE;YACtD,YAAY,GAAG,aAAa,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;SAClE;QACD,OAAO,iBAAiB,CAAC,MAAM,CAAC,IAAI,YAAY,IAAI,QAAQ,CAAA;IAC9D,CAAC;IAEO,SAAS,CAAC,SAAc;QAC9B,IAAI,KAAK,CAAA;QACT,MAAM,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;QAC1C,MAAM,QAAQ,GAAG,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAA;QAE9C,IAAI,IAAI,CAAC,UAAU,IAAI,QAAQ,EAAE;YAC/B,KAAK,GAAG,IAAI,CAAC,WAAW,CAAA;SACzB;QAED,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,QAAQ,EAAE;YAChC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAA;SACpB;QAED,+CAA+C;QAC/C,IAAI,KAAK,EAAE;YACT,OAAO,KAAK,CAAA;SACb;QAED,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAA;QAChD,IAAI,UAAU,GAAG,GAAG,CAAA;QACpB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,IAAI,IAAI,CAAC,WAAW,CAAC,UAAU,CAAA;SAC3E;QAED,sGAAsG;QACtG,IAAI,QAAQ,IAAI,QAAQ,CAAC,QAAQ,EAAE;YACjC,MAAM,YAAY,GAAG;gBACnB,UAAU;gBACV,SAAS,EAAE,IAAI,CAAC,UAAU;gBAC1B,KAAK,kCACA,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI;oBAC9C,SAAS,EAAE,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,EAAE;iBACvD,CAAC,KACF,IAAI,EAAE,QAAQ,CAAC,QAAQ,EACvB,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;aACF,CAAA;YAED,IAAI,WAAqB,CAAA;YACzB,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,KAAK,QAAQ,CAAA;YAChD,IAAI,QAAQ,EAAE;gBACZ,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAA;aACvE;iBAAM;gBACL,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAA;aACrE;YAED,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,CAAA;YACjC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAA;SACzB;QAED,wFAAwF;QACxF,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE;YAC7B,MAAM,OAAO,GAAG,EAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,EAAC,CAAA;YACxD,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;YACrE,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;SACpB;QAED,gFAAgF;QAChF,IAAI,CAAC,KAAK,EAAE;YACV,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAA;SACxD;QAED,IAAI,QAAQ,IAAI,IAAI,CAAC,eAAe,EAAE;YACpC,wGAAwG;YACxG,kFAAkF;YAClF,mDAAmD;YACnD,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE;gBACjD,kBAAkB,EAAE,KAAK;aAC1B,CAAC,CAAA;SACH;QAED,OAAO,KAAK,CAAA;IACd,CAAC;IAEa,0BAA0B,CAAC,WAAmB;;YAC1D,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,yBAAyB,EAAE,WAAW,CAAC,CAAA;YAC9D,MAAM,EAAE,GAAW,2BAA2B,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAA;YACzE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;QAChE,CAAC;KAAA;IAEa,gBAAgB,CAC5B,GAAuB,EACvB,OAA4B;;YAE5B,OAAO,IAAI,OAAO,CAAuB,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;gBACjE,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,CAAA;gBAE9C,MAAM,QAAQ,GAAyB;oBACrC,UAAU;oBACV,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,EAAE;iBACZ,CAAA;gBAED,uCAAuC;gBACvC,IAAI,UAAU,KAAK,SAAS,CAAC,QAAQ,EAAE;oBACrC,OAAO,CAAC,QAAQ,CAAC,CAAA;iBAClB;gBAED,+BAA+B;gBAE/B,SAAS,oBAAoB,CAAC,GAAQ,EAAE,KAAU;oBAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;wBAC7B,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAA;wBACzB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE;4BACvB,OAAO,CAAC,CAAA;yBACT;qBACF;oBAED,OAAO,KAAK,CAAA;gBACd,CAAC;gBAED,IAAI,GAAQ,CAAA;gBACZ,IAAI,QAA4B,CAAA;gBAEhC,IAAI;oBACF,QAAQ,GAAG,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAA;oBAC/B,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;wBACnC,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;4BACvC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAA;yBACjD;6BAAM;4BACL,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;yBAC3B;wBAED,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAA;qBACtB;oBAED,QAAQ,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,OAAO,CAAA;iBACvC;gBAAC,OAAO,GAAG,EAAE;oBACZ,iEAAiE;iBAClE;gBAED,yDAAyD;gBACzD,IAAI,UAAU,GAAG,GAAG,EAAE;oBACpB,IAAI,GAAW,CAAA;oBAEf,0DAA0D;oBAC1D,IAAI,GAAG,IAAI,GAAG,CAAC,OAAO,EAAE;wBACtB,GAAG,GAAG,GAAG,CAAC,OAAO,CAAA;qBAClB;yBAAM,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;wBAC1C,yEAAyE;wBACzE,GAAG,GAAG,QAAQ,CAAA;qBACf;yBAAM;wBACL,GAAG,GAAG,oBAAoB,UAAU,GAAG,CAAA;qBACxC;oBAED,MAAM,GAAG,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;oBAChD,GAAG,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAA;oBAE5B,MAAM,CAAC,GAAG,CAAC,CAAA;iBACZ;qBAAM;oBACL,OAAO,CAAC,QAAQ,CAAC,CAAA;iBAClB;YACH,CAAC,CAAA,CAAC,CAAA;QACJ,CAAC;KAAA;CACF;AAlpBD,gCAkpBC;AAED,MAAM,aAAa,GAAG,CAAC,GAA2B,EAAO,EAAE,CACzD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/interfaces.d.ts b/node_modules/@actions/http-client/lib/interfaces.d.ts new file mode 100644 index 0000000..54fd4a8 --- /dev/null +++ b/node_modules/@actions/http-client/lib/interfaces.d.ts @@ -0,0 +1,44 @@ +/// +import * as http from 'http'; +import * as https from 'https'; +import { HttpClientResponse } from './index'; +export interface HttpClient { + options(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + get(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + del(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: http.OutgoingHttpHeaders): Promise; + requestRaw(info: RequestInfo, data: string | NodeJS.ReadableStream): Promise; + requestRawWithCallback(info: RequestInfo, data: string | NodeJS.ReadableStream, onResult: (err?: Error, res?: HttpClientResponse) => void): void; +} +export interface RequestHandler { + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(response: HttpClientResponse): boolean; + handleAuthentication(httpClient: HttpClient, requestInfo: RequestInfo, data: string | NodeJS.ReadableStream | null): Promise; +} +export interface RequestInfo { + options: http.RequestOptions; + parsedUrl: URL; + httpModule: typeof http | typeof https; +} +export interface RequestOptions { + headers?: http.OutgoingHttpHeaders; + socketTimeout?: number; + ignoreSslError?: boolean; + allowRedirects?: boolean; + allowRedirectDowngrade?: boolean; + maxRedirects?: number; + maxSockets?: number; + keepAlive?: boolean; + deserializeDates?: boolean; + allowRetries?: boolean; + maxRetries?: number; +} +export interface TypedResponse { + statusCode: number; + result: T | null; + headers: http.IncomingHttpHeaders; +} diff --git a/node_modules/@actions/http-client/lib/interfaces.js b/node_modules/@actions/http-client/lib/interfaces.js new file mode 100644 index 0000000..db91911 --- /dev/null +++ b/node_modules/@actions/http-client/lib/interfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/interfaces.js.map b/node_modules/@actions/http-client/lib/interfaces.js.map new file mode 100644 index 0000000..8fb5f7d --- /dev/null +++ b/node_modules/@actions/http-client/lib/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.d.ts b/node_modules/@actions/http-client/lib/proxy.d.ts new file mode 100644 index 0000000..4599865 --- /dev/null +++ b/node_modules/@actions/http-client/lib/proxy.d.ts @@ -0,0 +1,2 @@ +export declare function getProxyUrl(reqUrl: URL): URL | undefined; +export declare function checkBypass(reqUrl: URL): boolean; diff --git a/node_modules/@actions/http-client/lib/proxy.js b/node_modules/@actions/http-client/lib/proxy.js new file mode 100644 index 0000000..528ffe4 --- /dev/null +++ b/node_modules/@actions/http-client/lib/proxy.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.js.map b/node_modules/@actions/http-client/lib/proxy.js.map new file mode 100644 index 0000000..4440de9 --- /dev/null +++ b/node_modules/@actions/http-client/lib/proxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,MAAW;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAA;IAE7C,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;QACvB,OAAO,SAAS,CAAA;KACjB;IAED,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE;QACrB,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;SAChE;aAAM;YACL,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;SAC9D;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAA;KACzB;SAAM;QACL,OAAO,SAAS,CAAA;KACjB;AACH,CAAC;AApBD,kCAoBC;AAED,SAAgB,WAAW,CAAC,MAAW;IACrC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,OAAO,KAAK,CAAA;KACb;IAED,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAA;IACxE,IAAI,CAAC,OAAO,EAAE;QACZ,OAAO,KAAK,CAAA;KACb;IAED,6BAA6B;IAC7B,IAAI,OAA2B,CAAA;IAC/B,IAAI,MAAM,CAAC,IAAI,EAAE;QACf,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;KAC9B;SAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO,EAAE;QACtC,OAAO,GAAG,EAAE,CAAA;KACb;SAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE;QACvC,OAAO,GAAG,GAAG,CAAA;KACd;IAED,qDAAqD;IACrD,MAAM,aAAa,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAA;IACrD,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC,CAAA;KACrD;IAED,uCAAuC;IACvC,KAAK,MAAM,gBAAgB,IAAI,OAAO;SACnC,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;SAChC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;QACjB,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,gBAAgB,CAAC,EAAE;YACnD,OAAO,IAAI,CAAA;SACZ;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AArCD,kCAqCC"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json new file mode 100644 index 0000000..c1de221 --- /dev/null +++ b/node_modules/@actions/http-client/package.json @@ -0,0 +1,48 @@ +{ + "name": "@actions/http-client", + "version": "2.0.1", + "description": "Actions Http Client", + "keywords": [ + "github", + "actions", + "http" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client", + "license": "MIT", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/http-client" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "tsc": "tsc" + }, + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "devDependencies": { + "@types/tunnel": "0.0.3", + "proxy": "^1.0.1" + }, + "dependencies": { + "tunnel": "^0.0.6" + } +} diff --git a/node_modules/@octokit/auth-token/LICENSE b/node_modules/@octokit/auth-token/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/auth-token/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/auth-token/README.md b/node_modules/@octokit/auth-token/README.md new file mode 100644 index 0000000..a1f6d35 --- /dev/null +++ b/node_modules/@octokit/auth-token/README.md @@ -0,0 +1,290 @@ +# auth-token.js + +> GitHub API token authentication for browsers and Node.js + +[![@latest](https://img.shields.io/npm/v/@octokit/auth-token.svg)](https://www.npmjs.com/package/@octokit/auth-token) +[![Build Status](https://github.com/octokit/auth-token.js/workflows/Test/badge.svg)](https://github.com/octokit/auth-token.js/actions?query=workflow%3ATest) + +`@octokit/auth-token` is the simplest of [GitHub’s authentication strategies](https://github.com/octokit/auth.js). + +It is useful if you want to support multiple authentication strategies, as it’s API is compatible with its sibling packages for [basic](https://github.com/octokit/auth-basic.js), [GitHub App](https://github.com/octokit/auth-app.js) and [OAuth app](https://github.com/octokit/auth.js) authentication. + + + +- [Usage](#usage) +- [`createTokenAuth(token) options`](#createtokenauthtoken-options) +- [`auth()`](#auth) +- [Authentication object](#authentication-object) +- [`auth.hook(request, route, options)` or `auth.hook(request, options)`](#authhookrequest-route-options-or-authhookrequest-options) +- [Find more information](#find-more-information) + - [Find out what scopes are enabled for oauth tokens](#find-out-what-scopes-are-enabled-for-oauth-tokens) + - [Find out if token is a personal access token or if it belongs to an OAuth app](#find-out-if-token-is-a-personal-access-token-or-if-it-belongs-to-an-oauth-app) + - [Find out what permissions are enabled for a repository](#find-out-what-permissions-are-enabled-for-a-repository) + - [Use token for git operations](#use-token-for-git-operations) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/auth-token` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with npm install @octokit/auth-token + +```js +const { createTokenAuth } = require("@octokit/auth-token"); +// or: import { createTokenAuth } from "@octokit/auth-token"; +``` + +
+ +```js +const auth = createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +const authentication = await auth(); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } +``` + +## `createTokenAuth(token) options` + +The `createTokenAuth` method accepts a single argument of type string, which is the token. The passed token can be one of the following: + +- [Personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) +- [OAuth access token](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/) +- [GITHUB_TOKEN provided to GitHub Actions](https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#environment-variables) +- Installation access token ([server-to-server](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)) +- User authentication for installation ([user-to-server](https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)) + +Examples + +```js +// Personal access token or OAuth access token +createTokenAuth("ghp_PersonalAccessToken01245678900000000"); +// { +// type: 'token', +// token: 'ghp_PersonalAccessToken01245678900000000', +// tokenType: 'oauth' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghs_InstallallationOrActionToken00000000"); +// { +// type: 'token', +// token: 'ghs_InstallallationOrActionToken00000000', +// tokenType: 'installation' +// } + +// Installation access token or GitHub Action token +createTokenAuth("ghu_InstallationUserToServer000000000000"); +// { +// type: 'token', +// token: 'ghu_InstallationUserToServer000000000000', +// tokenType: 'user-to-server' +// } +``` + +## `auth()` + +The `auth()` method has no options. It returns a promise which resolves with the the authentication object. + +## Authentication object + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ type + + string + + "token" +
+ token + + string + + The provided token. +
+ tokenType + + string + + Can be either "oauth" for personal access tokens and OAuth tokens, "installation" for installation access tokens (includes GITHUB_TOKEN provided to GitHub Actions), "app" for a GitHub App JSON Web Token, or "user-to-server" for a user authentication token through an app installation. +
+ +## `auth.hook(request, route, options)` or `auth.hook(request, options)` + +`auth.hook()` hooks directly into the request life cycle. It authenticates the request using the provided token. + +The `request` option is an instance of [`@octokit/request`](https://github.com/octokit/request.js#readme). The `route`/`options` parameters are the same as for the [`request()` method](https://github.com/octokit/request.js#request). + +`auth.hook()` can be called directly to send an authenticated request + +```js +const { data: authorizations } = await auth.hook( + request, + "GET /authorizations" +); +``` + +Or it can be passed as option to [`request()`](https://github.com/octokit/request.js#request). + +```js +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { data: authorizations } = await requestWithAuth("GET /authorizations"); +``` + +## Find more information + +`auth()` does not send any requests, it only transforms the provided token string into an authentication object. + +Here is a list of things you can do to retrieve further information + +### Find out what scopes are enabled for oauth tokens + +Note that this does not work for installations. There is no way to retrieve permissions based on an installation access tokens. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /", { + headers: authentication.headers, +}); +const scopes = response.headers["x-oauth-scopes"].split(/,\s+/); + +if (scopes.length) { + console.log( + `"${TOKEN}" has ${scopes.length} scopes enabled: ${scopes.join(", ")}` + ); +} else { + console.log(`"${TOKEN}" has no scopes enabled`); +} +``` + +### Find out if token is a personal access token or if it belongs to an OAuth app + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("HEAD /", { + headers: authentication.headers, +}); +const clientId = response.headers["x-oauth-client-id"]; + +if (clientId) { + console.log( + `"${token}" is an OAuth token, its app’s client_id is ${clientId}.` + ); +} else { + console.log(`"${token}" is a personal access token`); +} +``` + +### Find out what permissions are enabled for a repository + +Note that the `permissions` key is not set when authenticated using an installation access token. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const authentication = await auth(); + +const response = await request("GET /repos/{owner}/{repo}", { + owner: 'octocat', + repo: 'hello-world' + headers: authentication.headers +}); + +console.log(response.data.permissions) +// { +// admin: true, +// push: true, +// pull: true +// } +``` + +### Use token for git operations + +Both OAuth and installation access tokens can be used for git operations. However, when using with an installation, [the token must be prefixed with `x-access-token`](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#http-based-git-access-by-an-installation). + +This example is using the [`execa`](https://github.com/sindresorhus/execa) package to run a `git push` command. + +```js +const TOKEN = "ghp_PersonalAccessToken01245678900000000"; + +const auth = createTokenAuth(TOKEN); +const { token, tokenType } = await auth(); +const tokenWithPrefix = + tokenType === "installation" ? `x-access-token:${token}` : token; + +const repositoryUrl = `https://${tokenWithPrefix}@github.com/octocat/hello-world.git`; + +const { stdout } = await execa("git", ["push", repositoryUrl]); +console.log(stdout); +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/auth-token/dist-node/index.js b/node_modules/@octokit/auth-token/dist-node/index.js new file mode 100644 index 0000000..af0f0a6 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-node/index.js @@ -0,0 +1,55 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token: token, + tokenType + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; + +exports.createTokenAuth = createTokenAuth; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-token/dist-node/index.js.map b/node_modules/@octokit/auth-token/dist-node/index.js.map new file mode 100644 index 0000000..af0c2e2 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":["REGEX_IS_INSTALLATION_LEGACY","REGEX_IS_INSTALLATION","REGEX_IS_USER_TO_SERVER","auth","token","isApp","split","length","isInstallation","test","isUserToServer","tokenType","type","withAuthorizationPrefix","hook","request","route","parameters","endpoint","merge","headers","authorization","createTokenAuth","Error","replace","Object","assign","bind"],"mappings":";;;;AAAA,MAAMA,4BAA4B,GAAG,OAArC;AACA,MAAMC,qBAAqB,GAAG,OAA9B;AACA,MAAMC,uBAAuB,GAAG,OAAhC;AACO,eAAeC,IAAf,CAAoBC,KAApB,EAA2B;AAC9B,QAAMC,KAAK,GAAGD,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAA3C;AACA,QAAMC,cAAc,GAAGR,4BAA4B,CAACS,IAA7B,CAAkCL,KAAlC,KACnBH,qBAAqB,CAACQ,IAAtB,CAA2BL,KAA3B,CADJ;AAEA,QAAMM,cAAc,GAAGR,uBAAuB,CAACO,IAAxB,CAA6BL,KAA7B,CAAvB;AACA,QAAMO,SAAS,GAAGN,KAAK,GACjB,KADiB,GAEjBG,cAAc,GACV,cADU,GAEVE,cAAc,GACV,gBADU,GAEV,OANd;AAOA,SAAO;AACHE,IAAAA,IAAI,EAAE,OADH;AAEHR,IAAAA,KAAK,EAAEA,KAFJ;AAGHO,IAAAA;AAHG,GAAP;AAKH;;ACpBD;AACA;AACA;AACA;AACA;AACA,AAAO,SAASE,uBAAT,CAAiCT,KAAjC,EAAwC;AAC3C,MAAIA,KAAK,CAACE,KAAN,CAAY,IAAZ,EAAkBC,MAAlB,KAA6B,CAAjC,EAAoC;AAChC,WAAQ,UAASH,KAAM,EAAvB;AACH;;AACD,SAAQ,SAAQA,KAAM,EAAtB;AACH;;ACTM,eAAeU,IAAf,CAAoBV,KAApB,EAA2BW,OAA3B,EAAoCC,KAApC,EAA2CC,UAA3C,EAAuD;AAC1D,QAAMC,QAAQ,GAAGH,OAAO,CAACG,QAAR,CAAiBC,KAAjB,CAAuBH,KAAvB,EAA8BC,UAA9B,CAAjB;AACAC,EAAAA,QAAQ,CAACE,OAAT,CAAiBC,aAAjB,GAAiCR,uBAAuB,CAACT,KAAD,CAAxD;AACA,SAAOW,OAAO,CAACG,QAAD,CAAd;AACH;;MCHYI,eAAe,GAAG,SAASA,eAAT,CAAyBlB,KAAzB,EAAgC;AAC3D,MAAI,CAACA,KAAL,EAAY;AACR,UAAM,IAAImB,KAAJ,CAAU,0DAAV,CAAN;AACH;;AACD,MAAI,OAAOnB,KAAP,KAAiB,QAArB,EAA+B;AAC3B,UAAM,IAAImB,KAAJ,CAAU,uEAAV,CAAN;AACH;;AACDnB,EAAAA,KAAK,GAAGA,KAAK,CAACoB,OAAN,CAAc,oBAAd,EAAoC,EAApC,CAAR;AACA,SAAOC,MAAM,CAACC,MAAP,CAAcvB,IAAI,CAACwB,IAAL,CAAU,IAAV,EAAgBvB,KAAhB,CAAd,EAAsC;AACzCU,IAAAA,IAAI,EAAEA,IAAI,CAACa,IAAL,CAAU,IAAV,EAAgBvB,KAAhB;AADmC,GAAtC,CAAP;AAGH,CAXM;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-token/dist-src/auth.js b/node_modules/@octokit/auth-token/dist-src/auth.js new file mode 100644 index 0000000..b22ce98 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-src/auth.js @@ -0,0 +1,21 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +export async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp + ? "app" + : isInstallation + ? "installation" + : isUserToServer + ? "user-to-server" + : "oauth"; + return { + type: "token", + token: token, + tokenType, + }; +} diff --git a/node_modules/@octokit/auth-token/dist-src/hook.js b/node_modules/@octokit/auth-token/dist-src/hook.js new file mode 100644 index 0000000..f8e47f0 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-src/hook.js @@ -0,0 +1,6 @@ +import { withAuthorizationPrefix } from "./with-authorization-prefix"; +export async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} diff --git a/node_modules/@octokit/auth-token/dist-src/index.js b/node_modules/@octokit/auth-token/dist-src/index.js new file mode 100644 index 0000000..f2ddd63 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-src/index.js @@ -0,0 +1,14 @@ +import { auth } from "./auth"; +import { hook } from "./hook"; +export const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token), + }); +}; diff --git a/node_modules/@octokit/auth-token/dist-src/types.js b/node_modules/@octokit/auth-token/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js b/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js new file mode 100644 index 0000000..9035813 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js @@ -0,0 +1,11 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} diff --git a/node_modules/@octokit/auth-token/dist-types/auth.d.ts b/node_modules/@octokit/auth-token/dist-types/auth.d.ts new file mode 100644 index 0000000..dc41835 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-types/auth.d.ts @@ -0,0 +1,2 @@ +import { Token, Authentication } from "./types"; +export declare function auth(token: Token): Promise; diff --git a/node_modules/@octokit/auth-token/dist-types/hook.d.ts b/node_modules/@octokit/auth-token/dist-types/hook.d.ts new file mode 100644 index 0000000..21e4b6f --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-types/hook.d.ts @@ -0,0 +1,2 @@ +import { AnyResponse, EndpointOptions, RequestInterface, RequestParameters, Route, Token } from "./types"; +export declare function hook(token: Token, request: RequestInterface, route: Route | EndpointOptions, parameters?: RequestParameters): Promise; diff --git a/node_modules/@octokit/auth-token/dist-types/index.d.ts b/node_modules/@octokit/auth-token/dist-types/index.d.ts new file mode 100644 index 0000000..5999429 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-types/index.d.ts @@ -0,0 +1,7 @@ +import { StrategyInterface, Token, Authentication } from "./types"; +export declare type Types = { + StrategyOptions: Token; + AuthOptions: never; + Authentication: Authentication; +}; +export declare const createTokenAuth: StrategyInterface; diff --git a/node_modules/@octokit/auth-token/dist-types/types.d.ts b/node_modules/@octokit/auth-token/dist-types/types.d.ts new file mode 100644 index 0000000..0ae24de --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-types/types.d.ts @@ -0,0 +1,33 @@ +import * as OctokitTypes from "@octokit/types"; +export declare type AnyResponse = OctokitTypes.OctokitResponse; +export declare type StrategyInterface = OctokitTypes.StrategyInterface<[ + Token +], [ +], Authentication>; +export declare type EndpointDefaults = OctokitTypes.EndpointDefaults; +export declare type EndpointOptions = OctokitTypes.EndpointOptions; +export declare type RequestParameters = OctokitTypes.RequestParameters; +export declare type RequestInterface = OctokitTypes.RequestInterface; +export declare type Route = OctokitTypes.Route; +export declare type Token = string; +export declare type OAuthTokenAuthentication = { + type: "token"; + tokenType: "oauth"; + token: Token; +}; +export declare type InstallationTokenAuthentication = { + type: "token"; + tokenType: "installation"; + token: Token; +}; +export declare type AppAuthentication = { + type: "token"; + tokenType: "app"; + token: Token; +}; +export declare type UserToServerAuthentication = { + type: "token"; + tokenType: "user-to-server"; + token: Token; +}; +export declare type Authentication = OAuthTokenAuthentication | InstallationTokenAuthentication | AppAuthentication | UserToServerAuthentication; diff --git a/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts b/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts new file mode 100644 index 0000000..2e52c31 --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-types/with-authorization-prefix.d.ts @@ -0,0 +1,6 @@ +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +export declare function withAuthorizationPrefix(token: string): string; diff --git a/node_modules/@octokit/auth-token/dist-web/index.js b/node_modules/@octokit/auth-token/dist-web/index.js new file mode 100644 index 0000000..8b1cd7d --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-web/index.js @@ -0,0 +1,55 @@ +const REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +const REGEX_IS_INSTALLATION = /^ghs_/; +const REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || + REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp + ? "app" + : isInstallation + ? "installation" + : isUserToServer + ? "user-to-server" + : "oauth"; + return { + type: "token", + token: token, + tokenType, + }; +} + +/** + * Prefix token for usage in the Authorization header + * + * @param token OAuth token or JSON Web Token + */ +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge(route, parameters); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +const createTokenAuth = function createTokenAuth(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string"); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token), + }); +}; + +export { createTokenAuth }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/auth-token/dist-web/index.js.map b/node_modules/@octokit/auth-token/dist-web/index.js.map new file mode 100644 index 0000000..1d6197b --- /dev/null +++ b/node_modules/@octokit/auth-token/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/auth.js","../dist-src/with-authorization-prefix.js","../dist-src/hook.js","../dist-src/index.js"],"sourcesContent":["const REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nexport async function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) ||\n REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp\n ? \"app\"\n : isInstallation\n ? \"installation\"\n : isUserToServer\n ? \"user-to-server\"\n : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType,\n };\n}\n","/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nexport function withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n","import { withAuthorizationPrefix } from \"./with-authorization-prefix\";\nexport async function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n","import { auth } from \"./auth\";\nimport { hook } from \"./hook\";\nexport const createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token),\n });\n};\n"],"names":[],"mappings":"AAAA,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAC7C,MAAM,qBAAqB,GAAG,OAAO,CAAC;AACtC,MAAM,uBAAuB,GAAG,OAAO,CAAC;AACjC,eAAe,IAAI,CAAC,KAAK,EAAE;AAClC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACjD,IAAI,MAAM,cAAc,GAAG,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACnE,QAAQ,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1C,IAAI,MAAM,cAAc,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC/D,IAAI,MAAM,SAAS,GAAG,KAAK;AAC3B,UAAU,KAAK;AACf,UAAU,cAAc;AACxB,cAAc,cAAc;AAC5B,cAAc,cAAc;AAC5B,kBAAkB,gBAAgB;AAClC,kBAAkB,OAAO,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,OAAO;AACrB,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,SAAS;AACjB,KAAK,CAAC;AACN;;ACpBA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,uBAAuB,CAAC,KAAK,EAAE;AAC/C,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;AACxC,QAAQ,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AACjC,KAAK;AACL,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAC5B,CAAC;;ACTM,eAAe,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9D,IAAI,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAC/D,IAAI,QAAQ,CAAC,OAAO,CAAC,aAAa,GAAG,uBAAuB,CAAC,KAAK,CAAC,CAAC;AACpE,IAAI,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC7B,CAAC;;ACHW,MAAC,eAAe,GAAG,SAAS,eAAe,CAAC,KAAK,EAAE;AAC/D,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AACpF,KAAK;AACL,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;AACjG,KAAK;AACL,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AACpD,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;AACjD,QAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC;AACpC,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/auth-token/package.json b/node_modules/@octokit/auth-token/package.json new file mode 100644 index 0000000..1b0df71 --- /dev/null +++ b/node_modules/@octokit/auth-token/package.json @@ -0,0 +1,45 @@ +{ + "name": "@octokit/auth-token", + "description": "GitHub API token authentication for browsers and Node.js", + "version": "2.5.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "octokit", + "authentication", + "api" + ], + "repository": "github:octokit/auth-token.js", + "dependencies": { + "@octokit/types": "^6.0.3" + }, + "devDependencies": { + "@octokit/core": "^3.0.0", + "@octokit/request": "^5.3.0", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^27.0.0", + "fetch-mock": "^9.0.0", + "jest": "^27.0.0", + "prettier": "2.4.1", + "semantic-release": "^17.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.0" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/core/LICENSE b/node_modules/@octokit/core/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/core/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/core/README.md b/node_modules/@octokit/core/README.md new file mode 100644 index 0000000..b540cb9 --- /dev/null +++ b/node_modules/@octokit/core/README.md @@ -0,0 +1,448 @@ +# core.js + +> Extendable client for GitHub's REST & GraphQL APIs + +[![@latest](https://img.shields.io/npm/v/@octokit/core.svg)](https://www.npmjs.com/package/@octokit/core) +[![Build Status](https://github.com/octokit/core.js/workflows/Test/badge.svg)](https://github.com/octokit/core.js/actions?query=workflow%3ATest+branch%3Amaster) + + + +- [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) +- [Options](#options) +- [Defaults](#defaults) +- [Authentication](#authentication) +- [Logging](#logging) +- [Hooks](#hooks) +- [Plugins](#plugins) +- [Build your own Octokit with Plugins and Defaults](#build-your-own-octokit-with-plugins-and-defaults) +- [LICENSE](#license) + + + +If you need a minimalistic library to utilize GitHub's [REST API](https://developer.github.com/v3/) and [GraphQL API](https://developer.github.com/v4/) which you can extend with plugins as needed, then `@octokit/core` is a great starting point. + +If you don't need the Plugin API then using [`@octokit/request`](https://github.com/octokit/request.js/) or [`@octokit/graphql`](https://github.com/octokit/graphql.js/) directly is a good alternative. + +## Usage + + + + + + +
+Browsers + +Load @octokit/core directly from cdn.skypack.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/core + +```js +const { Octokit } = require("@octokit/core"); +// or: import { Octokit } from "@octokit/core"; +``` + +
+ +### REST API example + +```js +// Create a personal access token at https://github.com/settings/tokens/new?scopes=repo +const octokit = new Octokit({ auth: `personal-access-token123` }); + +const response = await octokit.request("GET /orgs/{org}/repos", { + org: "octokit", + type: "private", +}); +``` + +See [`@octokit/request`](https://github.com/octokit/request.js) for full documentation of the `.request` method. + +### GraphQL example + +```js +const octokit = new Octokit({ auth: `secret123` }); + +const response = await octokit.graphql( + `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + { login: "octokit" } +); +``` + +See [`@octokit/graphql`](https://github.com/octokit/graphql.js) for full documentation of the `.graphql` method. + +## Options + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ options.authStrategy + + Function + + Defaults to @octokit/auth-token. See Authentication below for examples. +
+ options.auth + + String or Object + + See Authentication below for examples. +
+ options.baseUrl + + String + + +When using with GitHub Enterprise Server, set `options.baseUrl` to the root URL of the API. For example, if your GitHub Enterprise Server's hostname is `github.acme-inc.com`, then set `options.baseUrl` to `https://github.acme-inc.com/api/v3`. Example + +```js +const octokit = new Octokit({ + baseUrl: "https://github.acme-inc.com/api/v3", +}); +``` + +
+ options.previews + + Array of Strings + + +Some REST API endpoints require preview headers to be set, or enable +additional features. Preview headers can be set on a per-request basis, e.g. + +```js +octokit.request("POST /repos/{owner}/{repo}/pulls", { + mediaType: { + previews: ["shadow-cat"], + }, + owner, + repo, + title: "My pull request", + base: "master", + head: "my-feature", + draft: true, +}); +``` + +You can also set previews globally, by setting the `options.previews` option on the constructor. Example: + +```js +const octokit = new Octokit({ + previews: ["shadow-cat"], +}); +``` + +
+ options.request + + Object + + +Set a default request timeout (`options.request.timeout`) or an [`http(s).Agent`](https://nodejs.org/api/http.html#http_class_http_agent) e.g. for proxy usage (Node only, `options.request.agent`). + +There are more `options.request.*` options, see [`@octokit/request` options](https://github.com/octokit/request.js#request). `options.request` can also be set on a per-request basis. + +
+ options.timeZone + + String + + +Sets the `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + +```js +const octokit = new Octokit({ + timeZone: "America/Los_Angeles", +}); +``` + +The time zone header will determine the timezone used for generating the timestamp when creating commits. See [GitHub's Timezones documentation](https://developer.github.com/v3/#timezones). + +
+ options.userAgent + + String + + +A custom user agent string for your app or library. Example + +```js +const octokit = new Octokit({ + userAgent: "my-app/v1.2.3", +}); +``` + +
+ +## Defaults + +You can create a new Octokit class with customized default options. + +```js +const MyOctokit = Octokit.defaults({ + auth: "personal-access-token123", + baseUrl: "https://github.acme-inc.com/api/v3", + userAgent: "my-app/v1.2.3", +}); +const octokit1 = new MyOctokit(); +const octokit2 = new MyOctokit(); +``` + +If you pass additional options to your new constructor, the options will be merged shallowly. + +```js +const MyOctokit = Octokit.defaults({ + foo: { + opt1: 1, + }, +}); +const octokit = new MyOctokit({ + foo: { + opt2: 1, + }, +}); +// options will be { foo: { opt2: 1 }} +``` + +If you need a deep or conditional merge, you can pass a function instead. + +```js +const MyOctokit = Octokit.defaults((options) => { + return { + foo: Object.assign({}, options.foo, { opt2: 1 }), + }; +}); +const octokit = new MyOctokit({ + foo: { opt2: 1 }, +}); +// options will be { foo: { opt1: 1, opt2: 1 }} +``` + +Be careful about mutating the `options` object in the `Octokit.defaults` callback, as it can have unforeseen consequences. + +## Authentication + +Authentication is optional for some REST API endpoints accessing public data, but is required for GraphQL queries. Using authentication also increases your [API rate limit](https://developer.github.com/v3/#rate-limiting). + +By default, Octokit authenticates using the [token authentication strategy](https://github.com/octokit/auth-token.js). Pass in a token using `options.auth`. It can be a personal access token, an OAuth token, an installation access token or a JSON Web Token for GitHub App authentication. The `Authorization` header will be set according to the type of token. + +```js +import { Octokit } from "@octokit/core"; + +const octokit = new Octokit({ + auth: "mypersonalaccesstoken123", +}); + +const { data } = await octokit.request("/user"); +``` + +To use a different authentication strategy, set `options.authStrategy`. A list of authentication strategies is available at [octokit/authentication-strategies.js](https://github.com/octokit/authentication-strategies.js/#readme). + +Example + +```js +import { Octokit } from "@octokit/core"; +import { createAppAuth } from "@octokit/auth-app"; + +const appOctokit = new Octokit({ + authStrategy: createAppAuth, + auth: { + appId: 123, + privateKey: process.env.PRIVATE_KEY, + }, +}); + +const { data } = await appOctokit.request("/app"); +``` + +The `.auth()` method returned by the current authentication strategy can be accessed at `octokit.auth()`. Example + +```js +const { token } = await appOctokit.auth({ + type: "installation", + installationId: 123, +}); +``` + +## Logging + +There are four built-in log methods + +1. `octokit.log.debug(message[, additionalInfo])` +1. `octokit.log.info(message[, additionalInfo])` +1. `octokit.log.warn(message[, additionalInfo])` +1. `octokit.log.error(message[, additionalInfo])` + +They can be configured using the [`log` client option](client-options). By default, `octokit.log.debug()` and `octokit.log.info()` are no-ops, while the other two call `console.warn()` and `console.error()` respectively. + +This is useful if you build reusable [plugins](#plugins). + +If you would like to make the log level configurable using an environment variable or external option, we recommend the [console-log-level](https://github.com/watson/console-log-level) package. Example + +```js +const octokit = new Octokit({ + log: require("console-log-level")({ level: "info" }), +}); +``` + +## Hooks + +You can customize Octokit's request lifecycle with hooks. + +```js +octokit.hook.before("request", async (options) => { + validate(options); +}); +octokit.hook.after("request", async (response, options) => { + console.log(`${options.method} ${options.url}: ${response.status}`); +}); +octokit.hook.error("request", async (error, options) => { + if (error.status === 304) { + return findInCache(error.response.headers.etag); + } + + throw error; +}); +octokit.hook.wrap("request", async (request, options) => { + // add logic before, after, catch errors or replace the request altogether + return request(options); +}); +``` + +See [before-after-hook](https://github.com/gr2m/before-after-hook#readme) for more documentation on hooks. + +## Plugins + +Octokit’s functionality can be extended using plugins. The `Octokit.plugin()` method accepts a plugin (or many) and returns a new constructor. + +A plugin is a function which gets two arguments: + +1. the current instance +2. the options passed to the constructor. + +In order to extend `octokit`'s API, the plugin must return an object with the new methods. + +```js +// index.js +const { Octokit } = require("@octokit/core") +const MyOctokit = Octokit.plugin( + require("./lib/my-plugin"), + require("octokit-plugin-example") +); + +const octokit = new MyOctokit({ greeting: "Moin moin" }); +octokit.helloWorld(); // logs "Moin moin, world!" +octokit.request("GET /"); // logs "GET / - 200 in 123ms" + +// lib/my-plugin.js +module.exports = (octokit, options = { greeting: "Hello" }) => { + // hook into the request lifecycle + octokit.hook.wrap("request", async (request, options) => { + const time = Date.now(); + const response = await request(options); + console.log( + `${options.method} ${options.url} – ${response.status} in ${Date.now() - + time}ms` + ); + return response; + }); + + // add a custom method + return { + helloWorld: () => console.log(`${options.greeting}, world!`); + } +}; +``` + +## Build your own Octokit with Plugins and Defaults + +You can build your own Octokit class with preset default options and plugins. In fact, this is mostly how the `@octokit/` modules work, such as [`@octokit/action`](https://github.com/octokit/action.js): + +```js +const { Octokit } = require("@octokit/core"); +const MyActionOctokit = Octokit.plugin( + require("@octokit/plugin-paginate-rest").paginateRest, + require("@octokit/plugin-throttling").throttling, + require("@octokit/plugin-retry").retry +).defaults({ + throttle: { + onAbuseLimit: (retryAfter, options) => { + /* ... */ + }, + onRateLimit: (retryAfter, options) => { + /* ... */ + }, + }, + authStrategy: require("@octokit/auth-action").createActionAuth, + userAgent: `my-octokit-action/v1.2.3`, +}); + +const octokit = new MyActionOctokit(); +const installations = await octokit.paginate("GET /app/installations"); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/core/dist-node/index.js b/node_modules/@octokit/core/dist-node/index.js new file mode 100644 index 0000000..0f46e61 --- /dev/null +++ b/node_modules/@octokit/core/dist-node/index.js @@ -0,0 +1,176 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var universalUserAgent = require('universal-user-agent'); +var beforeAfterHook = require('before-after-hook'); +var request = require('@octokit/request'); +var graphql = require('@octokit/graphql'); +var authToken = require('@octokit/auth-token'); + +function _objectWithoutPropertiesLoose(source, excluded) { + if (source == null) return {}; + var target = {}; + var sourceKeys = Object.keys(source); + var key, i; + + for (i = 0; i < sourceKeys.length; i++) { + key = sourceKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + target[key] = source[key]; + } + + return target; +} + +function _objectWithoutProperties(source, excluded) { + if (source == null) return {}; + + var target = _objectWithoutPropertiesLoose(source, excluded); + + var key, i; + + if (Object.getOwnPropertySymbols) { + var sourceSymbolKeys = Object.getOwnPropertySymbols(source); + + for (i = 0; i < sourceSymbolKeys.length; i++) { + key = sourceSymbolKeys[i]; + if (excluded.indexOf(key) >= 0) continue; + if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; + target[key] = source[key]; + } + } + + return target; +} + +const VERSION = "3.6.0"; + +const _excluded = ["authStrategy"]; +class Octokit { + constructor(options = {}) { + const hook = new beforeAfterHook.Collection(); + const requestDefaults = { + baseUrl: request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; // prepend default user agent with `options.userAgent` if set + + requestDefaults.headers["user-agent"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(" "); + + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + + this.request = request.request.defaults(requestDefaults); + this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign({ + debug: () => {}, + info: () => {}, + warn: console.warn.bind(console), + error: console.error.bind(console) + }, options.log); + this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. + // (2) If only `options.auth` is set, use the default token authentication strategy. + // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. + // TODO: type `options.auth` based on `options.authStrategy`. + + if (!options.authStrategy) { + if (!options.auth) { + // (1) + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + // (2) + const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\_(ツ)_/¯ + + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { + authStrategy + } = options, + otherOptions = _objectWithoutProperties(options, _excluded); + + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, options.auth)); // @ts-ignore ¯\_(ツ)_/¯ + + hook.wrap("request", auth.hook); + this.auth = auth; + } // apply plugins + // https://stackoverflow.com/a/16345172 + + + const classConstructor = this.constructor; + classConstructor.plugins.forEach(plugin => { + Object.assign(this, plugin(this, options)); + }); + } + + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null)); + } + + }; + return OctokitWithDefaults; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + + + static plugin(...newPlugins) { + var _a; + + const currentPlugins = this.plugins; + const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a); + return NewOctokit; + } + +} +Octokit.VERSION = VERSION; +Octokit.plugins = []; + +exports.Octokit = Octokit; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/dist-node/index.js.map b/node_modules/@octokit/core/dist-node/index.js.map new file mode 100644 index 0000000..3467e52 --- /dev/null +++ b/node_modules/@octokit/core/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"3.6.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":["VERSION","Octokit","constructor","options","hook","Collection","requestDefaults","baseUrl","request","endpoint","DEFAULTS","headers","Object","assign","bind","mediaType","previews","format","userAgent","getUserAgent","filter","Boolean","join","timeZone","defaults","graphql","withCustomRequest","log","debug","info","warn","console","error","authStrategy","auth","type","createTokenAuth","wrap","otherOptions","octokit","octokitOptions","classConstructor","plugins","forEach","plugin","OctokitWithDefaults","args","newPlugins","_a","currentPlugins","NewOctokit","concat","includes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;;ACAP,AAMO,MAAMC,OAAN,CAAc;AACjBC,EAAAA,WAAW,CAACC,OAAO,GAAG,EAAX,EAAe;AACtB,UAAMC,IAAI,GAAG,IAAIC,0BAAJ,EAAb;AACA,UAAMC,eAAe,GAAG;AACpBC,MAAAA,OAAO,EAAEC,eAAO,CAACC,QAAR,CAAiBC,QAAjB,CAA0BH,OADf;AAEpBI,MAAAA,OAAO,EAAE,EAFW;AAGpBH,MAAAA,OAAO,EAAEI,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBV,OAAO,CAACK,OAA1B,EAAmC;AACxC;AACAJ,QAAAA,IAAI,EAAEA,IAAI,CAACU,IAAL,CAAU,IAAV,EAAgB,SAAhB;AAFkC,OAAnC,CAHW;AAOpBC,MAAAA,SAAS,EAAE;AACPC,QAAAA,QAAQ,EAAE,EADH;AAEPC,QAAAA,MAAM,EAAE;AAFD;AAPS,KAAxB,CAFsB;;AAetBX,IAAAA,eAAe,CAACK,OAAhB,CAAwB,YAAxB,IAAwC,CACpCR,OAAO,CAACe,SAD4B,EAEnC,mBAAkBlB,OAAQ,IAAGmB,+BAAY,EAAG,EAFT,EAInCC,MAJmC,CAI5BC,OAJ4B,EAKnCC,IALmC,CAK9B,GAL8B,CAAxC;;AAMA,QAAInB,OAAO,CAACI,OAAZ,EAAqB;AACjBD,MAAAA,eAAe,CAACC,OAAhB,GAA0BJ,OAAO,CAACI,OAAlC;AACH;;AACD,QAAIJ,OAAO,CAACa,QAAZ,EAAsB;AAClBV,MAAAA,eAAe,CAACS,SAAhB,CAA0BC,QAA1B,GAAqCb,OAAO,CAACa,QAA7C;AACH;;AACD,QAAIb,OAAO,CAACoB,QAAZ,EAAsB;AAClBjB,MAAAA,eAAe,CAACK,OAAhB,CAAwB,WAAxB,IAAuCR,OAAO,CAACoB,QAA/C;AACH;;AACD,SAAKf,OAAL,GAAeA,eAAO,CAACgB,QAAR,CAAiBlB,eAAjB,CAAf;AACA,SAAKmB,OAAL,GAAeC,yBAAiB,CAAC,KAAKlB,OAAN,CAAjB,CAAgCgB,QAAhC,CAAyClB,eAAzC,CAAf;AACA,SAAKqB,GAAL,GAAWf,MAAM,CAACC,MAAP,CAAc;AACrBe,MAAAA,KAAK,EAAE,MAAM,EADQ;AAErBC,MAAAA,IAAI,EAAE,MAAM,EAFS;AAGrBC,MAAAA,IAAI,EAAEC,OAAO,CAACD,IAAR,CAAahB,IAAb,CAAkBiB,OAAlB,CAHe;AAIrBC,MAAAA,KAAK,EAAED,OAAO,CAACC,KAAR,CAAclB,IAAd,CAAmBiB,OAAnB;AAJc,KAAd,EAKR5B,OAAO,CAACwB,GALA,CAAX;AAMA,SAAKvB,IAAL,GAAYA,IAAZ,CAtCsB;AAwCtB;AACA;AACA;AACA;;AACA,QAAI,CAACD,OAAO,CAAC8B,YAAb,EAA2B;AACvB,UAAI,CAAC9B,OAAO,CAAC+B,IAAb,EAAmB;AACf;AACA,aAAKA,IAAL,GAAY,aAAa;AACrBC,UAAAA,IAAI,EAAE;AADe,SAAb,CAAZ;AAGH,OALD,MAMK;AACD;AACA,cAAMD,IAAI,GAAGE,yBAAe,CAACjC,OAAO,CAAC+B,IAAT,CAA5B,CAFC;;AAID9B,QAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,aAAK8B,IAAL,GAAYA,IAAZ;AACH;AACJ,KAdD,MAeK;AACD,YAAM;AAAED,QAAAA;AAAF,UAAoC9B,OAA1C;AAAA,YAAyBmC,YAAzB,4BAA0CnC,OAA1C;;AACA,YAAM+B,IAAI,GAAGD,YAAY,CAACrB,MAAM,CAACC,MAAP,CAAc;AACpCL,QAAAA,OAAO,EAAE,KAAKA,OADsB;AAEpCmB,QAAAA,GAAG,EAAE,KAAKA,GAF0B;AAGpC;AACA;AACA;AACA;AACA;AACAY,QAAAA,OAAO,EAAE,IAR2B;AASpCC,QAAAA,cAAc,EAAEF;AAToB,OAAd,EAUvBnC,OAAO,CAAC+B,IAVe,CAAD,CAAzB,CAFC;;AAcD9B,MAAAA,IAAI,CAACiC,IAAL,CAAU,SAAV,EAAqBH,IAAI,CAAC9B,IAA1B;AACA,WAAK8B,IAAL,GAAYA,IAAZ;AACH,KA3EqB;AA6EtB;;;AACA,UAAMO,gBAAgB,GAAG,KAAKvC,WAA9B;AACAuC,IAAAA,gBAAgB,CAACC,OAAjB,CAAyBC,OAAzB,CAAkCC,MAAD,IAAY;AACzChC,MAAAA,MAAM,CAACC,MAAP,CAAc,IAAd,EAAoB+B,MAAM,CAAC,IAAD,EAAOzC,OAAP,CAA1B;AACH,KAFD;AAGH;;AACc,SAARqB,QAAQ,CAACA,QAAD,EAAW;AACtB,UAAMqB,mBAAmB,GAAG,cAAc,IAAd,CAAmB;AAC3C3C,MAAAA,WAAW,CAAC,GAAG4C,IAAJ,EAAU;AACjB,cAAM3C,OAAO,GAAG2C,IAAI,CAAC,CAAD,CAAJ,IAAW,EAA3B;;AACA,YAAI,OAAOtB,QAAP,KAAoB,UAAxB,EAAoC;AAChC,gBAAMA,QAAQ,CAACrB,OAAD,CAAd;AACA;AACH;;AACD,cAAMS,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBW,QAAlB,EAA4BrB,OAA5B,EAAqCA,OAAO,CAACe,SAAR,IAAqBM,QAAQ,CAACN,SAA9B,GACrC;AACEA,UAAAA,SAAS,EAAG,GAAEf,OAAO,CAACe,SAAU,IAAGM,QAAQ,CAACN,SAAU;AADxD,SADqC,GAIrC,IAJA,CAAN;AAKH;;AAZ0C,KAA/C;AAcA,WAAO2B,mBAAP;AACH;AACD;AACJ;AACA;AACA;AACA;AACA;;;AACiB,SAAND,MAAM,CAAC,GAAGG,UAAJ,EAAgB;AACzB,QAAIC,EAAJ;;AACA,UAAMC,cAAc,GAAG,KAAKP,OAA5B;AACA,UAAMQ,UAAU,IAAIF,EAAE,GAAG,cAAc,IAAd,CAAmB,EAAxB,EAEhBA,EAAE,CAACN,OAAH,GAAaO,cAAc,CAACE,MAAf,CAAsBJ,UAAU,CAAC3B,MAAX,CAAmBwB,MAAD,IAAY,CAACK,cAAc,CAACG,QAAf,CAAwBR,MAAxB,CAA/B,CAAtB,CAFG,EAGhBI,EAHY,CAAhB;AAIA,WAAOE,UAAP;AACH;;AAnHgB;AAqHrBjD,OAAO,CAACD,OAAR,GAAkBA,OAAlB;AACAC,OAAO,CAACyC,OAAR,GAAkB,EAAlB;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/dist-src/index.js b/node_modules/@octokit/core/dist-src/index.js new file mode 100644 index 0000000..bdbc335 --- /dev/null +++ b/node_modules/@octokit/core/dist-src/index.js @@ -0,0 +1,125 @@ +import { getUserAgent } from "universal-user-agent"; +import { Collection } from "before-after-hook"; +import { request } from "@octokit/request"; +import { withCustomRequest } from "@octokit/graphql"; +import { createTokenAuth } from "@octokit/auth-token"; +import { VERSION } from "./version"; +export class Octokit { + constructor(options = {}) { + const hook = new Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request"), + }), + mediaType: { + previews: [], + format: "", + }, + }; + // prepend default user agent with `options.userAgent` if set + requestDefaults.headers["user-agent"] = [ + options.userAgent, + `octokit-core.js/${VERSION} ${getUserAgent()}`, + ] + .filter(Boolean) + .join(" "); + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign({ + debug: () => { }, + info: () => { }, + warn: console.warn.bind(console), + error: console.error.bind(console), + }, options.log); + this.hook = hook; + // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. + // (2) If only `options.auth` is set, use the default token authentication strategy. + // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. + // TODO: type `options.auth` based on `options.authStrategy`. + if (!options.authStrategy) { + if (!options.auth) { + // (1) + this.auth = async () => ({ + type: "unauthenticated", + }); + } + else { + // (2) + const auth = createTokenAuth(options.auth); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + } + else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions, + }, options.auth)); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + // apply plugins + // https://stackoverflow.com/a/16345172 + const classConstructor = this.constructor; + classConstructor.plugins.forEach((plugin) => { + Object.assign(this, plugin(this, options)); + }); + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent + ? { + userAgent: `${options.userAgent} ${defaults.userAgent}`, + } + : null)); + } + }; + return OctokitWithDefaults; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + var _a; + const currentPlugins = this.plugins; + const NewOctokit = (_a = class extends this { + }, + _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))), + _a); + return NewOctokit; + } +} +Octokit.VERSION = VERSION; +Octokit.plugins = []; diff --git a/node_modules/@octokit/core/dist-src/types.js b/node_modules/@octokit/core/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/core/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/core/dist-src/version.js b/node_modules/@octokit/core/dist-src/version.js new file mode 100644 index 0000000..bace1a9 --- /dev/null +++ b/node_modules/@octokit/core/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "3.6.0"; diff --git a/node_modules/@octokit/core/dist-types/index.d.ts b/node_modules/@octokit/core/dist-types/index.d.ts new file mode 100644 index 0000000..b757c5b --- /dev/null +++ b/node_modules/@octokit/core/dist-types/index.d.ts @@ -0,0 +1,30 @@ +import { HookCollection } from "before-after-hook"; +import { request } from "@octokit/request"; +import { graphql } from "@octokit/graphql"; +import { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types"; +export declare class Octokit { + static VERSION: string; + static defaults>(this: S, defaults: OctokitOptions | Function): S; + static plugins: OctokitPlugin[]; + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin & { + plugins: any[]; + }, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor>>; + constructor(options?: OctokitOptions); + request: typeof request; + graphql: typeof graphql; + log: { + debug: (message: string, additionalInfo?: object) => any; + info: (message: string, additionalInfo?: object) => any; + warn: (message: string, additionalInfo?: object) => any; + error: (message: string, additionalInfo?: object) => any; + [key: string]: any; + }; + hook: HookCollection; + auth: (...args: unknown[]) => Promise; +} diff --git a/node_modules/@octokit/core/dist-types/types.d.ts b/node_modules/@octokit/core/dist-types/types.d.ts new file mode 100644 index 0000000..3970d0d --- /dev/null +++ b/node_modules/@octokit/core/dist-types/types.d.ts @@ -0,0 +1,44 @@ +import * as OctokitTypes from "@octokit/types"; +import { RequestError } from "@octokit/request-error"; +import { Octokit } from "."; +export declare type RequestParameters = OctokitTypes.RequestParameters; +export interface OctokitOptions { + authStrategy?: any; + auth?: any; + userAgent?: string; + previews?: string[]; + baseUrl?: string; + log?: { + debug: (message: string) => unknown; + info: (message: string) => unknown; + warn: (message: string) => unknown; + error: (message: string) => unknown; + }; + request?: OctokitTypes.RequestRequestOptions; + timeZone?: string; + [option: string]: any; +} +export declare type Constructor = new (...args: any[]) => T; +export declare type ReturnTypeOf = T extends AnyFunction ? ReturnType : T extends AnyFunction[] ? UnionToIntersection, void>> : never; +/** + * @author https://stackoverflow.com/users/2887218/jcalz + * @see https://stackoverflow.com/a/50375286/10325032 + */ +export declare type UnionToIntersection = (Union extends any ? (argument: Union) => void : never) extends (argument: infer Intersection) => void ? Intersection : never; +declare type AnyFunction = (...args: any) => any; +export declare type OctokitPlugin = (octokit: Octokit, options: OctokitOptions) => { + [key: string]: any; +} | void; +export declare type Hooks = { + request: { + Options: Required; + Result: OctokitTypes.OctokitResponse; + Error: RequestError | Error; + }; + [key: string]: { + Options: unknown; + Result: unknown; + Error: unknown; + }; +}; +export {}; diff --git a/node_modules/@octokit/core/dist-types/version.d.ts b/node_modules/@octokit/core/dist-types/version.d.ts new file mode 100644 index 0000000..f1a3d02 --- /dev/null +++ b/node_modules/@octokit/core/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "3.6.0"; diff --git a/node_modules/@octokit/core/dist-web/index.js b/node_modules/@octokit/core/dist-web/index.js new file mode 100644 index 0000000..741d231 --- /dev/null +++ b/node_modules/@octokit/core/dist-web/index.js @@ -0,0 +1,130 @@ +import { getUserAgent } from 'universal-user-agent'; +import { Collection } from 'before-after-hook'; +import { request } from '@octokit/request'; +import { withCustomRequest } from '@octokit/graphql'; +import { createTokenAuth } from '@octokit/auth-token'; + +const VERSION = "3.6.0"; + +class Octokit { + constructor(options = {}) { + const hook = new Collection(); + const requestDefaults = { + baseUrl: request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request"), + }), + mediaType: { + previews: [], + format: "", + }, + }; + // prepend default user agent with `options.userAgent` if set + requestDefaults.headers["user-agent"] = [ + options.userAgent, + `octokit-core.js/${VERSION} ${getUserAgent()}`, + ] + .filter(Boolean) + .join(" "); + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; + } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = request.defaults(requestDefaults); + this.graphql = withCustomRequest(this.request).defaults(requestDefaults); + this.log = Object.assign({ + debug: () => { }, + info: () => { }, + warn: console.warn.bind(console), + error: console.error.bind(console), + }, options.log); + this.hook = hook; + // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance + // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered. + // (2) If only `options.auth` is set, use the default token authentication strategy. + // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance. + // TODO: type `options.auth` based on `options.authStrategy`. + if (!options.authStrategy) { + if (!options.auth) { + // (1) + this.auth = async () => ({ + type: "unauthenticated", + }); + } + else { + // (2) + const auth = createTokenAuth(options.auth); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + } + else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy(Object.assign({ + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions, + }, options.auth)); + // @ts-ignore ¯\_(ツ)_/¯ + hook.wrap("request", auth.hook); + this.auth = auth; + } + // apply plugins + // https://stackoverflow.com/a/16345172 + const classConstructor = this.constructor; + classConstructor.plugins.forEach((plugin) => { + Object.assign(this, plugin(this, options)); + }); + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent + ? { + userAgent: `${options.userAgent} ${defaults.userAgent}`, + } + : null)); + } + }; + return OctokitWithDefaults; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + var _a; + const currentPlugins = this.plugins; + const NewOctokit = (_a = class extends this { + }, + _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))), + _a); + return NewOctokit; + } +} +Octokit.VERSION = VERSION; +Octokit.plugins = []; + +export { Octokit }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/core/dist-web/index.js.map b/node_modules/@octokit/core/dist-web/index.js.map new file mode 100644 index 0000000..238c82e --- /dev/null +++ b/node_modules/@octokit/core/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"3.6.0\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { Collection } from \"before-after-hook\";\nimport { request } from \"@octokit/request\";\nimport { withCustomRequest } from \"@octokit/graphql\";\nimport { createTokenAuth } from \"@octokit/auth-token\";\nimport { VERSION } from \"./version\";\nexport class Octokit {\n constructor(options = {}) {\n const hook = new Collection();\n const requestDefaults = {\n baseUrl: request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\"),\n }),\n mediaType: {\n previews: [],\n format: \"\",\n },\n };\n // prepend default user agent with `options.userAgent` if set\n requestDefaults.headers[\"user-agent\"] = [\n options.userAgent,\n `octokit-core.js/${VERSION} ${getUserAgent()}`,\n ]\n .filter(Boolean)\n .join(\" \");\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = request.defaults(requestDefaults);\n this.graphql = withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => { },\n info: () => { },\n warn: console.warn.bind(console),\n error: console.error.bind(console),\n }, options.log);\n this.hook = hook;\n // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\",\n });\n }\n else {\n // (2)\n const auth = createTokenAuth(options.auth);\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n }\n else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions,\n }, options.auth));\n // @ts-ignore ¯\\_(ツ)_/¯\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n // apply plugins\n // https://stackoverflow.com/a/16345172\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach((plugin) => {\n Object.assign(this, plugin(this, options));\n });\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent\n ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`,\n }\n : null));\n }\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n var _a;\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {\n },\n _a.plugins = currentPlugins.concat(newPlugins.filter((plugin) => !currentPlugins.includes(plugin))),\n _a);\n return NewOctokit;\n }\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACMnC,MAAM,OAAO,CAAC;AACrB,IAAI,WAAW,CAAC,OAAO,GAAG,EAAE,EAAE;AAC9B,QAAQ,MAAM,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;AACtC,QAAQ,MAAM,eAAe,GAAG;AAChC,YAAY,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO;AACtD,YAAY,OAAO,EAAE,EAAE;AACvB,YAAY,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,EAAE;AACxD;AACA,gBAAgB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC;AAChD,aAAa,CAAC;AACd,YAAY,SAAS,EAAE;AACvB,gBAAgB,QAAQ,EAAE,EAAE;AAC5B,gBAAgB,MAAM,EAAE,EAAE;AAC1B,aAAa;AACb,SAAS,CAAC;AACV;AACA,QAAQ,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG;AAChD,YAAY,OAAO,CAAC,SAAS;AAC7B,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1D,SAAS;AACT,aAAa,MAAM,CAAC,OAAO,CAAC;AAC5B,aAAa,IAAI,CAAC,GAAG,CAAC,CAAC;AACvB,QAAQ,IAAI,OAAO,CAAC,OAAO,EAAE;AAC7B,YAAY,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtD,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,SAAS,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAClE,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,QAAQ,EAAE;AAC9B,YAAY,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;AACpE,SAAS;AACT,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACzD,QAAQ,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;AACjF,QAAQ,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;AACjC,YAAY,KAAK,EAAE,MAAM,GAAG;AAC5B,YAAY,IAAI,EAAE,MAAM,GAAG;AAC3B,YAAY,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AAC5C,YAAY,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;AAC9C,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;AACxB,QAAQ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB;AACA;AACA;AACA;AACA;AACA,QAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AACnC,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;AAC/B;AACA,gBAAgB,IAAI,CAAC,IAAI,GAAG,aAAa;AACzC,oBAAoB,IAAI,EAAE,iBAAiB;AAC3C,iBAAiB,CAAC,CAAC;AACnB,aAAa;AACb,iBAAiB;AACjB;AACA,gBAAgB,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC3D;AACA,gBAAgB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAChD,gBAAgB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACjC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;AAC9D,YAAY,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;AACpD,gBAAgB,OAAO,EAAE,IAAI,CAAC,OAAO;AACrC,gBAAgB,GAAG,EAAE,IAAI,CAAC,GAAG;AAC7B;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO,EAAE,IAAI;AAC7B,gBAAgB,cAAc,EAAE,YAAY;AAC5C,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B;AACA,YAAY,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5C,YAAY,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT;AACA;AACA,QAAQ,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC;AAClD,QAAQ,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK;AACrD,YAAY,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,OAAO,QAAQ,CAAC,QAAQ,EAAE;AAC9B,QAAQ,MAAM,mBAAmB,GAAG,cAAc,IAAI,CAAC;AACvD,YAAY,WAAW,CAAC,GAAG,IAAI,EAAE;AACjC,gBAAgB,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,gBAAgB,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE;AACpD,oBAAoB,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7C,oBAAoB,OAAO;AAC3B,iBAAiB;AACjB,gBAAgB,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS;AAClG,sBAAsB;AACtB,wBAAwB,SAAS,EAAE,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;AAC/E,qBAAqB;AACrB,sBAAsB,IAAI,CAAC,CAAC,CAAC;AAC7B,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,OAAO,mBAAmB,CAAC;AACnC,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,OAAO,MAAM,CAAC,GAAG,UAAU,EAAE;AACjC,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC;AAC5C,QAAQ,MAAM,UAAU,IAAI,EAAE,GAAG,cAAc,IAAI,CAAC;AACpD,aAAa;AACb,YAAY,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/G,YAAY,EAAE,CAAC,CAAC;AAChB,QAAQ,OAAO,UAAU,CAAC;AAC1B,KAAK;AACL,CAAC;AACD,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC;AAC1B,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/core/package.json b/node_modules/@octokit/core/package.json new file mode 100644 index 0000000..548e76c --- /dev/null +++ b/node_modules/@octokit/core/package.json @@ -0,0 +1,57 @@ +{ + "name": "@octokit/core", + "description": "Extendable client for GitHub's REST & GraphQL APIs", + "version": "3.6.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/core.js", + "dependencies": { + "@octokit/auth-token": "^2.4.4", + "@octokit/graphql": "^4.5.8", + "@octokit/request": "^5.6.3", + "@octokit/request-error": "^2.0.5", + "@octokit/types": "^6.0.3", + "before-after-hook": "^2.2.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth": "^3.0.1", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^27.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^14.0.4", + "fetch-mock": "^9.0.0", + "http-proxy-agent": "^5.0.0", + "jest": "^27.0.0", + "lolex": "^6.0.0", + "prettier": "2.4.1", + "proxy": "^1.0.1", + "semantic-release": "^18.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^27.0.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/endpoint/LICENSE b/node_modules/@octokit/endpoint/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/endpoint/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/endpoint/README.md b/node_modules/@octokit/endpoint/README.md new file mode 100644 index 0000000..1e5153f --- /dev/null +++ b/node_modules/@octokit/endpoint/README.md @@ -0,0 +1,421 @@ +# endpoint.js + +> Turns GitHub REST API endpoints into generic request options + +[![@latest](https://img.shields.io/npm/v/@octokit/endpoint.svg)](https://www.npmjs.com/package/@octokit/endpoint) +![Build Status](https://github.com/octokit/endpoint.js/workflows/Test/badge.svg) + +`@octokit/endpoint` combines [GitHub REST API routes](https://developer.github.com/v3/) with your parameters and turns them into generic request options that can be used in any request library. + + + + + +- [Usage](#usage) +- [API](#api) + - [`endpoint(route, options)` or `endpoint(options)`](#endpointroute-options-or-endpointoptions) + - [`endpoint.defaults()`](#endpointdefaults) + - [`endpoint.DEFAULTS`](#endpointdefaults) + - [`endpoint.merge(route, options)` or `endpoint.merge(options)`](#endpointmergeroute-options-or-endpointmergeoptions) + - [`endpoint.parse()`](#endpointparse) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Usage + + + + + + +
+Browsers + +Load @octokit/endpoint directly from cdn.skypack.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/endpoint + +```js +const { endpoint } = require("@octokit/endpoint"); +// or: import { endpoint } from "@octokit/endpoint"; +``` + +
+ +Example for [List organization repositories](https://developer.github.com/v3/repos/#list-organization-repositories) + +```js +const requestOptions = endpoint("GET /orgs/{org}/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + org: "octokit", + type: "private", +}); +``` + +The resulting `requestOptions` looks as follows + +```json +{ + "method": "GET", + "url": "https://api.github.com/orgs/octokit/repos?type=private", + "headers": { + "accept": "application/vnd.github.v3+json", + "authorization": "token 0000000000000000000000000000000000000001", + "user-agent": "octokit/endpoint.js v1.2.3" + } +} +``` + +You can pass `requestOptions` to common request libraries + +```js +const { url, ...options } = requestOptions; +// using with fetch (https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +fetch(url, options); +// using with request (https://github.com/request/request) +request(requestOptions); +// using with got (https://github.com/sindresorhus/got) +got[options.method](url, options); +// using with axios +axios(requestOptions); +``` + +## API + +### `endpoint(route, options)` or `endpoint(options)` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + If set, it has to be a string consisting of URL and the request method, e.g., GET /orgs/{org}. If it’s set to a URL, only the method defaults to GET. +
+ options.method + + String + + Required unless route is set. Any supported http verb. Defaults to GET. +
+ options.url + + String + + Required unless route is set. A path or full URL which may contain :variable or {variable} placeholders, + e.g., /orgs/{org}/repos. The url is parsed using url-template. +
+ options.baseUrl + + String + + Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-endpoint.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
+
+ options.mediaType.format + + String + + Media type param, such as raw, diff, or text+json. See Media Types. Setting options.mediaType.format will amend the headers.accept value. +
+ options.mediaType.previews + + Array of Strings + + Name of previews, such as mercy, symmetra, or scarlet-witch. See API Previews. If options.mediaType.previews was set as default, the new previews will be merged into the default ones. Setting options.mediaType.previews will amend the headers.accept value. options.mediaType.previews will be merged with an existing array set using .defaults(). +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The data parameter" below. +
+ options.request + + Object + + Pass custom meta information for the request. The request object will be returned as is. +
+ +All other options will be passed depending on the `method` and `url` options. + +1. If the option key has a placeholder in the `url`, it will be used as the replacement. For example, if the passed options are `{url: '/orgs/{org}/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos`. +2. If the `method` is `GET` or `HEAD`, the option is passed as a query parameter. +3. Otherwise, the parameter is passed in the request body as a JSON key. + +**Result** + +`endpoint()` is a synchronous method and returns an object with the following keys: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
methodStringThe http method. Always lowercase.
urlStringThe url with placeholders replaced with passed parameters.
headersObjectAll header names are lowercased.
bodyAnyThe request body if one is present. Only for PATCH, POST, PUT, DELETE requests.
requestObjectRequest meta option, it will be returned as it was passed into endpoint()
+ +### `endpoint.defaults()` + +Override or set default options. Example: + +```js +const request = require("request"); +const myEndpoint = require("@octokit/endpoint").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001`, + }, + org: "my-project", + per_page: 100, +}); + +request(myEndpoint(`GET /orgs/{org}/repos`)); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + }, + org: "my-project", +}); +const myProjectEndpointWithAuth = myProjectEndpoint.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001`, + }, +}); +``` + +`myProjectEndpointWithAuth` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +### `endpoint.DEFAULTS` + +The current default options. + +```js +endpoint.DEFAULTS.baseUrl; // https://api.github.com +const myEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", +}); +myEndpoint.DEFAULTS.baseUrl; // https://github-enterprise.acme-inc.com/api/v3 +``` + +### `endpoint.merge(route, options)` or `endpoint.merge(options)` + +Get the defaulted endpoint options, but without parsing them into request options: + +```js +const myProjectEndpoint = endpoint.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + }, + org: "my-project", +}); +myProjectEndpoint.merge("GET /orgs/{org}/repos", { + headers: { + authorization: `token 0000000000000000000000000000000000000001`, + }, + org: "my-secret-project", + type: "private", +}); + +// { +// baseUrl: 'https://github-enterprise.acme-inc.com/api/v3', +// method: 'GET', +// url: '/orgs/{org}/repos', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: `token 0000000000000000000000000000000000000001`, +// 'user-agent': 'myApp/1.2.3' +// }, +// org: 'my-secret-project', +// type: 'private' +// } +``` + +### `endpoint.parse()` + +Stateless method to turn endpoint options into request options. Calling +`endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead, the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const options = endpoint("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain", + }, +}); + +// options is +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case, you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +endpoint( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001`, + }, + data: "Hello, world!", + } +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/endpoint/dist-node/index.js b/node_modules/@octokit/endpoint/dist-node/index.js new file mode 100644 index 0000000..70f24ff --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-node/index.js @@ -0,0 +1,390 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var isPlainObject = require('is-plain-object'); +var universalUserAgent = require('universal-user-agent'); + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach(key => { + if (isPlainObject.isPlainObject(options[key])) { + if (!(key in defaults)) Object.assign(result, { + [key]: options[key] + });else result[key] = mergeDeep(defaults[key], options[key]); + } else { + Object.assign(result, { + [key]: options[key] + }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { + method, + url + } : { + url: method + }, options); + } else { + options = Object.assign({}, route); + } // lowercase header names before merging with defaults to avoid duplicates + + + options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging + + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten + + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + } + + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + + if (names.length === 0) { + return url; + } + + return url + separator + names.map(name => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +const urlVariableRegex = /\{[^}]+\}/g; + +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} + +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + + if (!matches) { + return []; + } + + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* istanbul ignore file */ +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + + return part; + }).join(""); +} + +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} + +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + + if (key) { + return encodeUnreserved(key) + "=" + value; + } else { + return value; + } +} + +function isDefined(value) { + return value !== undefined && value !== null; +} + +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} + +function getValues(context, operator, key, modifier) { + var value = context[key], + result = []; + + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + + return result; +} + +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} + +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + + if (operator && operator !== "+") { + var separator = ","; + + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible + + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later + + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + + const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + + if (!isBinaryRequest) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); + } + + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + + + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } else { + headers["content-length"] = 0; + } + } + } // default content-type for JSON if body is set + + + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + + + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } // Only return body/request keys if present + + + return Object.assign({ + method, + url, + headers + }, typeof body !== "undefined" ? { + body + } : null, options.request ? { + request: options.request + } : null); +} + +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse + }); +} + +const VERSION = "6.0.12"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. + +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "", + previews: [] + } +}; + +const endpoint = withDefaults(null, DEFAULTS); + +exports.endpoint = endpoint; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/dist-node/index.js.map b/node_modules/@octokit/endpoint/dist-node/index.js.map new file mode 100644 index 0000000..003e4f2 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"6.0.12\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":["lowercaseKeys","object","Object","keys","reduce","newObj","key","toLowerCase","mergeDeep","defaults","options","result","assign","forEach","isPlainObject","removeUndefinedProperties","obj","undefined","merge","route","method","url","split","headers","mergedOptions","mediaType","previews","length","filter","preview","includes","concat","map","replace","addQueryParameters","parameters","separator","test","names","name","q","encodeURIComponent","join","urlVariableRegex","removeNonChars","variableName","extractUrlVariableNames","matches","match","a","b","omit","keysToOmit","option","encodeReserved","str","part","encodeURI","encodeUnreserved","c","charCodeAt","toString","toUpperCase","encodeValue","operator","value","isDefined","isKeyOperator","getValues","context","modifier","substring","parseInt","push","Array","isArray","k","tmp","parseUrl","template","expand","bind","operators","_","expression","literal","values","indexOf","charAt","substr","variable","exec","parse","body","urlVariableNames","baseUrl","omittedParameters","remainingParameters","isBinaryRequest","accept","format","previewsFromAcceptHeader","data","request","endpointWithDefaults","withDefaults","oldDefaults","newDefaults","DEFAULTS","endpoint","VERSION","userAgent","getUserAgent"],"mappings":";;;;;;;AAAO,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;AAClC,MAAI,CAACA,MAAL,EAAa;AACT,WAAO,EAAP;AACH;;AACD,SAAOC,MAAM,CAACC,IAAP,CAAYF,MAAZ,EAAoBG,MAApB,CAA2B,CAACC,MAAD,EAASC,GAAT,KAAiB;AAC/CD,IAAAA,MAAM,CAACC,GAAG,CAACC,WAAJ,EAAD,CAAN,GAA4BN,MAAM,CAACK,GAAD,CAAlC;AACA,WAAOD,MAAP;AACH,GAHM,EAGJ,EAHI,CAAP;AAIH;;ACPM,SAASG,SAAT,CAAmBC,QAAnB,EAA6BC,OAA7B,EAAsC;AACzC,QAAMC,MAAM,GAAGT,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBH,QAAlB,CAAf;AACAP,EAAAA,MAAM,CAACC,IAAP,CAAYO,OAAZ,EAAqBG,OAArB,CAA8BP,GAAD,IAAS;AAClC,QAAIQ,2BAAa,CAACJ,OAAO,CAACJ,GAAD,CAAR,CAAjB,EAAiC;AAC7B,UAAI,EAAEA,GAAG,IAAIG,QAAT,CAAJ,EACIP,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;AAAE,SAACL,GAAD,GAAOI,OAAO,CAACJ,GAAD;AAAhB,OAAtB,EADJ,KAGIK,MAAM,CAACL,GAAD,CAAN,GAAcE,SAAS,CAACC,QAAQ,CAACH,GAAD,CAAT,EAAgBI,OAAO,CAACJ,GAAD,CAAvB,CAAvB;AACP,KALD,MAMK;AACDJ,MAAAA,MAAM,CAACU,MAAP,CAAcD,MAAd,EAAsB;AAAE,SAACL,GAAD,GAAOI,OAAO,CAACJ,GAAD;AAAhB,OAAtB;AACH;AACJ,GAVD;AAWA,SAAOK,MAAP;AACH;;ACfM,SAASI,yBAAT,CAAmCC,GAAnC,EAAwC;AAC3C,OAAK,MAAMV,GAAX,IAAkBU,GAAlB,EAAuB;AACnB,QAAIA,GAAG,CAACV,GAAD,CAAH,KAAaW,SAAjB,EAA4B;AACxB,aAAOD,GAAG,CAACV,GAAD,CAAV;AACH;AACJ;;AACD,SAAOU,GAAP;AACH;;ACJM,SAASE,KAAT,CAAeT,QAAf,EAAyBU,KAAzB,EAAgCT,OAAhC,EAAyC;AAC5C,MAAI,OAAOS,KAAP,KAAiB,QAArB,EAA+B;AAC3B,QAAI,CAACC,MAAD,EAASC,GAAT,IAAgBF,KAAK,CAACG,KAAN,CAAY,GAAZ,CAApB;AACAZ,IAAAA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAcS,GAAG,GAAG;AAAED,MAAAA,MAAF;AAAUC,MAAAA;AAAV,KAAH,GAAqB;AAAEA,MAAAA,GAAG,EAAED;AAAP,KAAtC,EAAuDV,OAAvD,CAAV;AACH,GAHD,MAIK;AACDA,IAAAA,OAAO,GAAGR,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBO,KAAlB,CAAV;AACH,GAP2C;;;AAS5CT,EAAAA,OAAO,CAACa,OAAR,GAAkBvB,aAAa,CAACU,OAAO,CAACa,OAAT,CAA/B,CAT4C;;AAW5CR,EAAAA,yBAAyB,CAACL,OAAD,CAAzB;AACAK,EAAAA,yBAAyB,CAACL,OAAO,CAACa,OAAT,CAAzB;AACA,QAAMC,aAAa,GAAGhB,SAAS,CAACC,QAAQ,IAAI,EAAb,EAAiBC,OAAjB,CAA/B,CAb4C;;AAe5C,MAAID,QAAQ,IAAIA,QAAQ,CAACgB,SAAT,CAAmBC,QAAnB,CAA4BC,MAA5C,EAAoD;AAChDH,IAAAA,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCjB,QAAQ,CAACgB,SAAT,CAAmBC,QAAnB,CAC9BE,MAD8B,CACtBC,OAAD,IAAa,CAACL,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCI,QAAjC,CAA0CD,OAA1C,CADS,EAE9BE,MAF8B,CAEvBP,aAAa,CAACC,SAAd,CAAwBC,QAFD,CAAnC;AAGH;;AACDF,EAAAA,aAAa,CAACC,SAAd,CAAwBC,QAAxB,GAAmCF,aAAa,CAACC,SAAd,CAAwBC,QAAxB,CAAiCM,GAAjC,CAAsCH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,UAAhB,EAA4B,EAA5B,CAAlD,CAAnC;AACA,SAAOT,aAAP;AACH;;ACzBM,SAASU,kBAAT,CAA4Bb,GAA5B,EAAiCc,UAAjC,EAA6C;AAChD,QAAMC,SAAS,GAAG,KAAKC,IAAL,CAAUhB,GAAV,IAAiB,GAAjB,GAAuB,GAAzC;AACA,QAAMiB,KAAK,GAAGpC,MAAM,CAACC,IAAP,CAAYgC,UAAZ,CAAd;;AACA,MAAIG,KAAK,CAACX,MAAN,KAAiB,CAArB,EAAwB;AACpB,WAAON,GAAP;AACH;;AACD,SAAQA,GAAG,GACPe,SADI,GAEJE,KAAK,CACAN,GADL,CACUO,IAAD,IAAU;AACf,QAAIA,IAAI,KAAK,GAAb,EAAkB;AACd,aAAQ,OAAOJ,UAAU,CAACK,CAAX,CAAalB,KAAb,CAAmB,GAAnB,EAAwBU,GAAxB,CAA4BS,kBAA5B,EAAgDC,IAAhD,CAAqD,GAArD,CAAf;AACH;;AACD,WAAQ,GAAEH,IAAK,IAAGE,kBAAkB,CAACN,UAAU,CAACI,IAAD,CAAX,CAAmB,EAAvD;AACH,GAND,EAOKG,IAPL,CAOU,GAPV,CAFJ;AAUH;;AChBD,MAAMC,gBAAgB,GAAG,YAAzB;;AACA,SAASC,cAAT,CAAwBC,YAAxB,EAAsC;AAClC,SAAOA,YAAY,CAACZ,OAAb,CAAqB,YAArB,EAAmC,EAAnC,EAAuCX,KAAvC,CAA6C,GAA7C,CAAP;AACH;;AACD,AAAO,SAASwB,uBAAT,CAAiCzB,GAAjC,EAAsC;AACzC,QAAM0B,OAAO,GAAG1B,GAAG,CAAC2B,KAAJ,CAAUL,gBAAV,CAAhB;;AACA,MAAI,CAACI,OAAL,EAAc;AACV,WAAO,EAAP;AACH;;AACD,SAAOA,OAAO,CAACf,GAAR,CAAYY,cAAZ,EAA4BxC,MAA5B,CAAmC,CAAC6C,CAAD,EAAIC,CAAJ,KAAUD,CAAC,CAAClB,MAAF,CAASmB,CAAT,CAA7C,EAA0D,EAA1D,CAAP;AACH;;ACVM,SAASC,IAAT,CAAclD,MAAd,EAAsBmD,UAAtB,EAAkC;AACrC,SAAOlD,MAAM,CAACC,IAAP,CAAYF,MAAZ,EACF2B,MADE,CACMyB,MAAD,IAAY,CAACD,UAAU,CAACtB,QAAX,CAAoBuB,MAApB,CADlB,EAEFjD,MAFE,CAEK,CAACY,GAAD,EAAMV,GAAN,KAAc;AACtBU,IAAAA,GAAG,CAACV,GAAD,CAAH,GAAWL,MAAM,CAACK,GAAD,CAAjB;AACA,WAAOU,GAAP;AACH,GALM,EAKJ,EALI,CAAP;AAMH;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA,SAASsC,cAAT,CAAwBC,GAAxB,EAA6B;AACzB,SAAOA,GAAG,CACLjC,KADE,CACI,oBADJ,EAEFU,GAFE,CAEE,UAAUwB,IAAV,EAAgB;AACrB,QAAI,CAAC,eAAenB,IAAf,CAAoBmB,IAApB,CAAL,EAAgC;AAC5BA,MAAAA,IAAI,GAAGC,SAAS,CAACD,IAAD,CAAT,CAAgBvB,OAAhB,CAAwB,MAAxB,EAAgC,GAAhC,EAAqCA,OAArC,CAA6C,MAA7C,EAAqD,GAArD,CAAP;AACH;;AACD,WAAOuB,IAAP;AACH,GAPM,EAQFd,IARE,CAQG,EARH,CAAP;AASH;;AACD,SAASgB,gBAAT,CAA0BH,GAA1B,EAA+B;AAC3B,SAAOd,kBAAkB,CAACc,GAAD,CAAlB,CAAwBtB,OAAxB,CAAgC,UAAhC,EAA4C,UAAU0B,CAAV,EAAa;AAC5D,WAAO,MAAMA,CAAC,CAACC,UAAF,CAAa,CAAb,EAAgBC,QAAhB,CAAyB,EAAzB,EAA6BC,WAA7B,EAAb;AACH,GAFM,CAAP;AAGH;;AACD,SAASC,WAAT,CAAqBC,QAArB,EAA+BC,KAA/B,EAAsC3D,GAAtC,EAA2C;AACvC2D,EAAAA,KAAK,GACDD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,GACMV,cAAc,CAACW,KAAD,CADpB,GAEMP,gBAAgB,CAACO,KAAD,CAH1B;;AAIA,MAAI3D,GAAJ,EAAS;AACL,WAAOoD,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAAxB,GAA8B2D,KAArC;AACH,GAFD,MAGK;AACD,WAAOA,KAAP;AACH;AACJ;;AACD,SAASC,SAAT,CAAmBD,KAAnB,EAA0B;AACtB,SAAOA,KAAK,KAAKhD,SAAV,IAAuBgD,KAAK,KAAK,IAAxC;AACH;;AACD,SAASE,aAAT,CAAuBH,QAAvB,EAAiC;AAC7B,SAAOA,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAjC,IAAwCA,QAAQ,KAAK,GAA5D;AACH;;AACD,SAASI,SAAT,CAAmBC,OAAnB,EAA4BL,QAA5B,EAAsC1D,GAAtC,EAA2CgE,QAA3C,EAAqD;AACjD,MAAIL,KAAK,GAAGI,OAAO,CAAC/D,GAAD,CAAnB;AAAA,MAA0BK,MAAM,GAAG,EAAnC;;AACA,MAAIuD,SAAS,CAACD,KAAD,CAAT,IAAoBA,KAAK,KAAK,EAAlC,EAAsC;AAClC,QAAI,OAAOA,KAAP,KAAiB,QAAjB,IACA,OAAOA,KAAP,KAAiB,QADjB,IAEA,OAAOA,KAAP,KAAiB,SAFrB,EAEgC;AAC5BA,MAAAA,KAAK,GAAGA,KAAK,CAACJ,QAAN,EAAR;;AACA,UAAIS,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;AAC9BL,QAAAA,KAAK,GAAGA,KAAK,CAACM,SAAN,CAAgB,CAAhB,EAAmBC,QAAQ,CAACF,QAAD,EAAW,EAAX,CAA3B,CAAR;AACH;;AACD3D,MAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBE,aAAa,CAACH,QAAD,CAAb,GAA0B1D,GAA1B,GAAgC,EAAlD,CAAvB;AACH,KARD,MASK;AACD,UAAIgE,QAAQ,KAAK,GAAjB,EAAsB;AAClB,YAAII,KAAK,CAACC,OAAN,CAAcV,KAAd,CAAJ,EAA0B;AACtBA,UAAAA,KAAK,CAACrC,MAAN,CAAasC,SAAb,EAAwBrD,OAAxB,CAAgC,UAAUoD,KAAV,EAAiB;AAC7CtD,YAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAX,EAAkBE,aAAa,CAACH,QAAD,CAAb,GAA0B1D,GAA1B,GAAgC,EAAlD,CAAvB;AACH,WAFD;AAGH,SAJD,MAKK;AACDJ,UAAAA,MAAM,CAACC,IAAP,CAAY8D,KAAZ,EAAmBpD,OAAnB,CAA2B,UAAU+D,CAAV,EAAa;AACpC,gBAAIV,SAAS,CAACD,KAAK,CAACW,CAAD,CAAN,CAAb,EAAyB;AACrBjE,cAAAA,MAAM,CAAC8D,IAAP,CAAYV,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACW,CAAD,CAAhB,EAAqBA,CAArB,CAAvB;AACH;AACJ,WAJD;AAKH;AACJ,OAbD,MAcK;AACD,cAAMC,GAAG,GAAG,EAAZ;;AACA,YAAIH,KAAK,CAACC,OAAN,CAAcV,KAAd,CAAJ,EAA0B;AACtBA,UAAAA,KAAK,CAACrC,MAAN,CAAasC,SAAb,EAAwBrD,OAAxB,CAAgC,UAAUoD,KAAV,EAAiB;AAC7CY,YAAAA,GAAG,CAACJ,IAAJ,CAASV,WAAW,CAACC,QAAD,EAAWC,KAAX,CAApB;AACH,WAFD;AAGH,SAJD,MAKK;AACD/D,UAAAA,MAAM,CAACC,IAAP,CAAY8D,KAAZ,EAAmBpD,OAAnB,CAA2B,UAAU+D,CAAV,EAAa;AACpC,gBAAIV,SAAS,CAACD,KAAK,CAACW,CAAD,CAAN,CAAb,EAAyB;AACrBC,cAAAA,GAAG,CAACJ,IAAJ,CAASf,gBAAgB,CAACkB,CAAD,CAAzB;AACAC,cAAAA,GAAG,CAACJ,IAAJ,CAASV,WAAW,CAACC,QAAD,EAAWC,KAAK,CAACW,CAAD,CAAL,CAASf,QAAT,EAAX,CAApB;AACH;AACJ,WALD;AAMH;;AACD,YAAIM,aAAa,CAACH,QAAD,CAAjB,EAA6B;AACzBrD,UAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAAxB,GAA8BuE,GAAG,CAACnC,IAAJ,CAAS,GAAT,CAA1C;AACH,SAFD,MAGK,IAAImC,GAAG,CAAClD,MAAJ,KAAe,CAAnB,EAAsB;AACvBhB,UAAAA,MAAM,CAAC8D,IAAP,CAAYI,GAAG,CAACnC,IAAJ,CAAS,GAAT,CAAZ;AACH;AACJ;AACJ;AACJ,GAhDD,MAiDK;AACD,QAAIsB,QAAQ,KAAK,GAAjB,EAAsB;AAClB,UAAIE,SAAS,CAACD,KAAD,CAAb,EAAsB;AAClBtD,QAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAA5B;AACH;AACJ,KAJD,MAKK,IAAI2D,KAAK,KAAK,EAAV,KAAiBD,QAAQ,KAAK,GAAb,IAAoBA,QAAQ,KAAK,GAAlD,CAAJ,EAA4D;AAC7DrD,MAAAA,MAAM,CAAC8D,IAAP,CAAYf,gBAAgB,CAACpD,GAAD,CAAhB,GAAwB,GAApC;AACH,KAFI,MAGA,IAAI2D,KAAK,KAAK,EAAd,EAAkB;AACnBtD,MAAAA,MAAM,CAAC8D,IAAP,CAAY,EAAZ;AACH;AACJ;;AACD,SAAO9D,MAAP;AACH;;AACD,AAAO,SAASmE,QAAT,CAAkBC,QAAlB,EAA4B;AAC/B,SAAO;AACHC,IAAAA,MAAM,EAAEA,MAAM,CAACC,IAAP,CAAY,IAAZ,EAAkBF,QAAlB;AADL,GAAP;AAGH;;AACD,SAASC,MAAT,CAAgBD,QAAhB,EAA0BV,OAA1B,EAAmC;AAC/B,MAAIa,SAAS,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,EAAgB,GAAhB,EAAqB,GAArB,EAA0B,GAA1B,EAA+B,GAA/B,CAAhB;AACA,SAAOH,QAAQ,CAAC9C,OAAT,CAAiB,4BAAjB,EAA+C,UAAUkD,CAAV,EAAaC,UAAb,EAAyBC,OAAzB,EAAkC;AACpF,QAAID,UAAJ,EAAgB;AACZ,UAAIpB,QAAQ,GAAG,EAAf;AACA,YAAMsB,MAAM,GAAG,EAAf;;AACA,UAAIJ,SAAS,CAACK,OAAV,CAAkBH,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAlB,MAA4C,CAAC,CAAjD,EAAoD;AAChDxB,QAAAA,QAAQ,GAAGoB,UAAU,CAACI,MAAX,CAAkB,CAAlB,CAAX;AACAJ,QAAAA,UAAU,GAAGA,UAAU,CAACK,MAAX,CAAkB,CAAlB,CAAb;AACH;;AACDL,MAAAA,UAAU,CAAC9D,KAAX,CAAiB,IAAjB,EAAuBT,OAAvB,CAA+B,UAAU6E,QAAV,EAAoB;AAC/C,YAAIb,GAAG,GAAG,4BAA4Bc,IAA5B,CAAiCD,QAAjC,CAAV;AACAJ,QAAAA,MAAM,CAACb,IAAP,CAAYL,SAAS,CAACC,OAAD,EAAUL,QAAV,EAAoBa,GAAG,CAAC,CAAD,CAAvB,EAA4BA,GAAG,CAAC,CAAD,CAAH,IAAUA,GAAG,CAAC,CAAD,CAAzC,CAArB;AACH,OAHD;;AAIA,UAAIb,QAAQ,IAAIA,QAAQ,KAAK,GAA7B,EAAkC;AAC9B,YAAI5B,SAAS,GAAG,GAAhB;;AACA,YAAI4B,QAAQ,KAAK,GAAjB,EAAsB;AAClB5B,UAAAA,SAAS,GAAG,GAAZ;AACH,SAFD,MAGK,IAAI4B,QAAQ,KAAK,GAAjB,EAAsB;AACvB5B,UAAAA,SAAS,GAAG4B,QAAZ;AACH;;AACD,eAAO,CAACsB,MAAM,CAAC3D,MAAP,KAAkB,CAAlB,GAAsBqC,QAAtB,GAAiC,EAAlC,IAAwCsB,MAAM,CAAC5C,IAAP,CAAYN,SAAZ,CAA/C;AACH,OATD,MAUK;AACD,eAAOkD,MAAM,CAAC5C,IAAP,CAAY,GAAZ,CAAP;AACH;AACJ,KAxBD,MAyBK;AACD,aAAOY,cAAc,CAAC+B,OAAD,CAArB;AACH;AACJ,GA7BM,CAAP;AA8BH;;AC/JM,SAASO,KAAT,CAAelF,OAAf,EAAwB;AAC3B;AACA,MAAIU,MAAM,GAAGV,OAAO,CAACU,MAAR,CAAe0C,WAAf,EAAb,CAF2B;;AAI3B,MAAIzC,GAAG,GAAG,CAACX,OAAO,CAACW,GAAR,IAAe,GAAhB,EAAqBY,OAArB,CAA6B,cAA7B,EAA6C,MAA7C,CAAV;AACA,MAAIV,OAAO,GAAGrB,MAAM,CAACU,MAAP,CAAc,EAAd,EAAkBF,OAAO,CAACa,OAA1B,CAAd;AACA,MAAIsE,IAAJ;AACA,MAAI1D,UAAU,GAAGgB,IAAI,CAACzC,OAAD,EAAU,CAC3B,QAD2B,EAE3B,SAF2B,EAG3B,KAH2B,EAI3B,SAJ2B,EAK3B,SAL2B,EAM3B,WAN2B,CAAV,CAArB,CAP2B;;AAgB3B,QAAMoF,gBAAgB,GAAGhD,uBAAuB,CAACzB,GAAD,CAAhD;AACAA,EAAAA,GAAG,GAAGyD,QAAQ,CAACzD,GAAD,CAAR,CAAc2D,MAAd,CAAqB7C,UAArB,CAAN;;AACA,MAAI,CAAC,QAAQE,IAAR,CAAahB,GAAb,CAAL,EAAwB;AACpBA,IAAAA,GAAG,GAAGX,OAAO,CAACqF,OAAR,GAAkB1E,GAAxB;AACH;;AACD,QAAM2E,iBAAiB,GAAG9F,MAAM,CAACC,IAAP,CAAYO,OAAZ,EACrBkB,MADqB,CACbyB,MAAD,IAAYyC,gBAAgB,CAAChE,QAAjB,CAA0BuB,MAA1B,CADE,EAErBtB,MAFqB,CAEd,SAFc,CAA1B;AAGA,QAAMkE,mBAAmB,GAAG9C,IAAI,CAAChB,UAAD,EAAa6D,iBAAb,CAAhC;AACA,QAAME,eAAe,GAAG,6BAA6B7D,IAA7B,CAAkCd,OAAO,CAAC4E,MAA1C,CAAxB;;AACA,MAAI,CAACD,eAAL,EAAsB;AAClB,QAAIxF,OAAO,CAACe,SAAR,CAAkB2E,MAAtB,EAA8B;AAC1B;AACA7E,MAAAA,OAAO,CAAC4E,MAAR,GAAiB5E,OAAO,CAAC4E,MAAR,CACZ7E,KADY,CACN,GADM,EAEZU,GAFY,CAEPH,OAAD,IAAaA,OAAO,CAACI,OAAR,CAAgB,kDAAhB,EAAqE,uBAAsBvB,OAAO,CAACe,SAAR,CAAkB2E,MAAO,EAApH,CAFL,EAGZ1D,IAHY,CAGP,GAHO,CAAjB;AAIH;;AACD,QAAIhC,OAAO,CAACe,SAAR,CAAkBC,QAAlB,CAA2BC,MAA/B,EAAuC;AACnC,YAAM0E,wBAAwB,GAAG9E,OAAO,CAAC4E,MAAR,CAAenD,KAAf,CAAqB,qBAArB,KAA+C,EAAhF;AACAzB,MAAAA,OAAO,CAAC4E,MAAR,GAAiBE,wBAAwB,CACpCtE,MADY,CACLrB,OAAO,CAACe,SAAR,CAAkBC,QADb,EAEZM,GAFY,CAEPH,OAAD,IAAa;AAClB,cAAMuE,MAAM,GAAG1F,OAAO,CAACe,SAAR,CAAkB2E,MAAlB,GACR,IAAG1F,OAAO,CAACe,SAAR,CAAkB2E,MAAO,EADpB,GAET,OAFN;AAGA,eAAQ,0BAAyBvE,OAAQ,WAAUuE,MAAO,EAA1D;AACH,OAPgB,EAQZ1D,IARY,CAQP,GARO,CAAjB;AASH;AACJ,GA9C0B;AAgD3B;;;AACA,MAAI,CAAC,KAAD,EAAQ,MAAR,EAAgBZ,QAAhB,CAAyBV,MAAzB,CAAJ,EAAsC;AAClCC,IAAAA,GAAG,GAAGa,kBAAkB,CAACb,GAAD,EAAM4E,mBAAN,CAAxB;AACH,GAFD,MAGK;AACD,QAAI,UAAUA,mBAAd,EAAmC;AAC/BJ,MAAAA,IAAI,GAAGI,mBAAmB,CAACK,IAA3B;AACH,KAFD,MAGK;AACD,UAAIpG,MAAM,CAACC,IAAP,CAAY8F,mBAAZ,EAAiCtE,MAArC,EAA6C;AACzCkE,QAAAA,IAAI,GAAGI,mBAAP;AACH,OAFD,MAGK;AACD1E,QAAAA,OAAO,CAAC,gBAAD,CAAP,GAA4B,CAA5B;AACH;AACJ;AACJ,GAhE0B;;;AAkE3B,MAAI,CAACA,OAAO,CAAC,cAAD,CAAR,IAA4B,OAAOsE,IAAP,KAAgB,WAAhD,EAA6D;AACzDtE,IAAAA,OAAO,CAAC,cAAD,CAAP,GAA0B,iCAA1B;AACH,GApE0B;AAsE3B;;;AACA,MAAI,CAAC,OAAD,EAAU,KAAV,EAAiBO,QAAjB,CAA0BV,MAA1B,KAAqC,OAAOyE,IAAP,KAAgB,WAAzD,EAAsE;AAClEA,IAAAA,IAAI,GAAG,EAAP;AACH,GAzE0B;;;AA2E3B,SAAO3F,MAAM,CAACU,MAAP,CAAc;AAAEQ,IAAAA,MAAF;AAAUC,IAAAA,GAAV;AAAeE,IAAAA;AAAf,GAAd,EAAwC,OAAOsE,IAAP,KAAgB,WAAhB,GAA8B;AAAEA,IAAAA;AAAF,GAA9B,GAAyC,IAAjF,EAAuFnF,OAAO,CAAC6F,OAAR,GAAkB;AAAEA,IAAAA,OAAO,EAAE7F,OAAO,CAAC6F;AAAnB,GAAlB,GAAiD,IAAxI,CAAP;AACH;;AC9EM,SAASC,oBAAT,CAA8B/F,QAA9B,EAAwCU,KAAxC,EAA+CT,OAA/C,EAAwD;AAC3D,SAAOkF,KAAK,CAAC1E,KAAK,CAACT,QAAD,EAAWU,KAAX,EAAkBT,OAAlB,CAAN,CAAZ;AACH;;ACDM,SAAS+F,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;AACnD,QAAMC,QAAQ,GAAG1F,KAAK,CAACwF,WAAD,EAAcC,WAAd,CAAtB;AACA,QAAME,QAAQ,GAAGL,oBAAoB,CAACvB,IAArB,CAA0B,IAA1B,EAAgC2B,QAAhC,CAAjB;AACA,SAAO1G,MAAM,CAACU,MAAP,CAAciG,QAAd,EAAwB;AAC3BD,IAAAA,QAD2B;AAE3BnG,IAAAA,QAAQ,EAAEgG,YAAY,CAACxB,IAAb,CAAkB,IAAlB,EAAwB2B,QAAxB,CAFiB;AAG3B1F,IAAAA,KAAK,EAAEA,KAAK,CAAC+D,IAAN,CAAW,IAAX,EAAiB2B,QAAjB,CAHoB;AAI3BhB,IAAAA;AAJ2B,GAAxB,CAAP;AAMH;;ACZM,MAAMkB,OAAO,GAAG,mBAAhB;;ACEP,MAAMC,SAAS,GAAI,uBAAsBD,OAAQ,IAAGE,+BAAY,EAAG,EAAnE;AAEA;;AACA,AAAO,MAAMJ,QAAQ,GAAG;AACpBxF,EAAAA,MAAM,EAAE,KADY;AAEpB2E,EAAAA,OAAO,EAAE,wBAFW;AAGpBxE,EAAAA,OAAO,EAAE;AACL4E,IAAAA,MAAM,EAAE,gCADH;AAEL,kBAAcY;AAFT,GAHW;AAOpBtF,EAAAA,SAAS,EAAE;AACP2E,IAAAA,MAAM,EAAE,EADD;AAEP1E,IAAAA,QAAQ,EAAE;AAFH;AAPS,CAAjB;;MCHMmF,QAAQ,GAAGJ,YAAY,CAAC,IAAD,EAAOG,QAAP,CAA7B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/dist-src/defaults.js b/node_modules/@octokit/endpoint/dist-src/defaults.js new file mode 100644 index 0000000..456e586 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/defaults.js @@ -0,0 +1,17 @@ +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +export const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent, + }, + mediaType: { + format: "", + previews: [], + }, +}; diff --git a/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js new file mode 100644 index 0000000..5763758 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/endpoint-with-defaults.js @@ -0,0 +1,5 @@ +import { merge } from "./merge"; +import { parse } from "./parse"; +export function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} diff --git a/node_modules/@octokit/endpoint/dist-src/index.js b/node_modules/@octokit/endpoint/dist-src/index.js new file mode 100644 index 0000000..599917f --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/index.js @@ -0,0 +1,3 @@ +import { withDefaults } from "./with-defaults"; +import { DEFAULTS } from "./defaults"; +export const endpoint = withDefaults(null, DEFAULTS); diff --git a/node_modules/@octokit/endpoint/dist-src/merge.js b/node_modules/@octokit/endpoint/dist-src/merge.js new file mode 100644 index 0000000..1abcecf --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/merge.js @@ -0,0 +1,26 @@ +import { lowercaseKeys } from "./util/lowercase-keys"; +import { mergeDeep } from "./util/merge-deep"; +import { removeUndefinedProperties } from "./util/remove-undefined-properties"; +export function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} diff --git a/node_modules/@octokit/endpoint/dist-src/parse.js b/node_modules/@octokit/endpoint/dist-src/parse.js new file mode 100644 index 0000000..6bdd1bf --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/parse.js @@ -0,0 +1,81 @@ +import { addQueryParameters } from "./util/add-query-parameters"; +import { extractUrlVariableNames } from "./util/extract-url-variable-names"; +import { omit } from "./util/omit"; +import { parseUrl } from "./util/url-template"; +export function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType", + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept + .split(/,/) + .map((preview) => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)) + .join(","); + } + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader + .concat(options.mediaType.previews) + .map((preview) => { + const format = options.mediaType.format + ? `.${options.mediaType.format}` + : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }) + .join(","); + } + } + // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } + else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } + else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + else { + headers["content-length"] = 0; + } + } + } + // default content-type for JSON if body is set + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + // Only return body/request keys if present + return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js new file mode 100644 index 0000000..d26be31 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/add-query-parameters.js @@ -0,0 +1,17 @@ +export function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map((name) => { + if (name === "q") { + return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js new file mode 100644 index 0000000..3e75db2 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/extract-url-variable-names.js @@ -0,0 +1,11 @@ +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +export function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js new file mode 100644 index 0000000..0780642 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/lowercase-keys.js @@ -0,0 +1,9 @@ +export function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js b/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js new file mode 100644 index 0000000..d92aca3 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/merge-deep.js @@ -0,0 +1,16 @@ +import { isPlainObject } from "is-plain-object"; +export function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/omit.js b/node_modules/@octokit/endpoint/dist-src/util/omit.js new file mode 100644 index 0000000..6245031 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/omit.js @@ -0,0 +1,8 @@ +export function omit(object, keysToOmit) { + return Object.keys(object) + .filter((option) => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js b/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js new file mode 100644 index 0000000..6b5ee5f --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/remove-undefined-properties.js @@ -0,0 +1,8 @@ +export function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} diff --git a/node_modules/@octokit/endpoint/dist-src/util/url-template.js b/node_modules/@octokit/endpoint/dist-src/util/url-template.js new file mode 100644 index 0000000..439b3fe --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/util/url-template.js @@ -0,0 +1,164 @@ +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +export function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} diff --git a/node_modules/@octokit/endpoint/dist-src/version.js b/node_modules/@octokit/endpoint/dist-src/version.js new file mode 100644 index 0000000..930e255 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "6.0.12"; diff --git a/node_modules/@octokit/endpoint/dist-src/with-defaults.js b/node_modules/@octokit/endpoint/dist-src/with-defaults.js new file mode 100644 index 0000000..81baf6c --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-src/with-defaults.js @@ -0,0 +1,13 @@ +import { endpointWithDefaults } from "./endpoint-with-defaults"; +import { merge } from "./merge"; +import { parse } from "./parse"; +export function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse, + }); +} diff --git a/node_modules/@octokit/endpoint/dist-types/defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts new file mode 100644 index 0000000..30fcd20 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults } from "@octokit/types"; +export declare const DEFAULTS: EndpointDefaults; diff --git a/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts new file mode 100644 index 0000000..ff39e5e --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/endpoint-with-defaults.d.ts @@ -0,0 +1,3 @@ +import { EndpointOptions, RequestParameters, Route } from "@octokit/types"; +import { DEFAULTS } from "./defaults"; +export declare function endpointWithDefaults(defaults: typeof DEFAULTS, route: Route | EndpointOptions, options?: RequestParameters): import("@octokit/types").RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/index.d.ts b/node_modules/@octokit/endpoint/dist-types/index.d.ts new file mode 100644 index 0000000..1ede136 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const endpoint: import("@octokit/types").EndpointInterface; diff --git a/node_modules/@octokit/endpoint/dist-types/merge.d.ts b/node_modules/@octokit/endpoint/dist-types/merge.d.ts new file mode 100644 index 0000000..b75a15e --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/merge.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestParameters, Route } from "@octokit/types"; +export declare function merge(defaults: EndpointDefaults | null, route?: Route | RequestParameters, options?: RequestParameters): EndpointDefaults; diff --git a/node_modules/@octokit/endpoint/dist-types/parse.d.ts b/node_modules/@octokit/endpoint/dist-types/parse.d.ts new file mode 100644 index 0000000..fbe2144 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/parse.d.ts @@ -0,0 +1,2 @@ +import { EndpointDefaults, RequestOptions } from "@octokit/types"; +export declare function parse(options: EndpointDefaults): RequestOptions; diff --git a/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts new file mode 100644 index 0000000..4b192ac --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/add-query-parameters.d.ts @@ -0,0 +1,4 @@ +export declare function addQueryParameters(url: string, parameters: { + [x: string]: string | undefined; + q?: string; +}): string; diff --git a/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts new file mode 100644 index 0000000..93586d4 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/extract-url-variable-names.d.ts @@ -0,0 +1 @@ +export declare function extractUrlVariableNames(url: string): string[]; diff --git a/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts new file mode 100644 index 0000000..1daf307 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/lowercase-keys.d.ts @@ -0,0 +1,5 @@ +export declare function lowercaseKeys(object?: { + [key: string]: any; +}): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts b/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts new file mode 100644 index 0000000..914411c --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/merge-deep.d.ts @@ -0,0 +1 @@ +export declare function mergeDeep(defaults: any, options: any): object; diff --git a/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts new file mode 100644 index 0000000..06927d6 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/omit.d.ts @@ -0,0 +1,5 @@ +export declare function omit(object: { + [key: string]: any; +}, keysToOmit: string[]): { + [key: string]: any; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts b/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts new file mode 100644 index 0000000..92d8d85 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/remove-undefined-properties.d.ts @@ -0,0 +1 @@ +export declare function removeUndefinedProperties(obj: any): any; diff --git a/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts b/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts new file mode 100644 index 0000000..5d967ca --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/util/url-template.d.ts @@ -0,0 +1,3 @@ +export declare function parseUrl(template: string): { + expand: (context: object) => string; +}; diff --git a/node_modules/@octokit/endpoint/dist-types/version.d.ts b/node_modules/@octokit/endpoint/dist-types/version.d.ts new file mode 100644 index 0000000..330d47a --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.0.12"; diff --git a/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..6f5afd1 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestParameters, EndpointDefaults } from "@octokit/types"; +export declare function withDefaults(oldDefaults: EndpointDefaults | null, newDefaults: RequestParameters): EndpointInterface; diff --git a/node_modules/@octokit/endpoint/dist-web/index.js b/node_modules/@octokit/endpoint/dist-web/index.js new file mode 100644 index 0000000..e152163 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-web/index.js @@ -0,0 +1,381 @@ +import { isPlainObject } from 'is-plain-object'; +import { getUserAgent } from 'universal-user-agent'; + +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); +} + +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); + } + else { + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === undefined) { + delete obj[key]; + } + } + return obj; +} + +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } + else { + options = Object.assign({}, route); + } + // lowercase header names before merging with defaults to avoid duplicates + options.headers = lowercaseKeys(options.headers); + // remove properties with undefined values before merging + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + // mediaType.previews arrays are merged, instead of overwritten + if (defaults && defaults.mediaType.previews.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews + .filter((preview) => !mergedOptions.mediaType.previews.includes(preview)) + .concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); + return mergedOptions; +} + +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return (url + + separator + + names + .map((name) => { + if (name === "q") { + return ("q=" + parameters.q.split("+").map(encodeURIComponent).join("+")); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }) + .join("&")); +} + +const urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +function omit(object, keysToOmit) { + return Object.keys(object) + .filter((option) => !keysToOmit.includes(option)) + .reduce((obj, key) => { + obj[key] = object[key]; + return obj; + }, {}); +} + +// Based on https://github.com/bramstein/url-template, licensed under BSD +// TODO: create separate package. +// +// Copyright (c) 2012-2014, Bram Stein +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// 3. The name of the author may not be used to endorse or promote products +// derived from this software without specific prior written permission. +// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +/* istanbul ignore file */ +function encodeReserved(str) { + return str + .split(/(%[0-9A-Fa-f]{2})/g) + .map(function (part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }) + .join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = + operator === "+" || operator === "#" + ? encodeReserved(value) + : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; + } + else { + return value; + } +} +function isDefined(value) { + return value !== undefined && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || + typeof value === "number" || + typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + } + else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } + else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function (value) { + tmp.push(encodeValue(operator, value)); + }); + } + else { + Object.keys(value).forEach(function (k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } + else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } + else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } + else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } + else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template), + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function (variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } + else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } + else { + return values.join(","); + } + } + else { + return encodeReserved(literal); + } + }); +} + +function parse(options) { + // https://fetch.spec.whatwg.org/#methods + let method = options.method.toUpperCase(); + // replace :varname with {varname} to make it RFC 6570 compatible + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType", + ]); + // extract variable names from URL to calculate remaining variables later + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options) + .filter((option) => urlVariableNames.includes(option)) + .concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw + headers.accept = headers.accept + .split(/,/) + .map((preview) => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)) + .join(","); + } + if (options.mediaType.previews.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader + .concat(options.mediaType.previews) + .map((preview) => { + const format = options.mediaType.format + ? `.${options.mediaType.format}` + : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }) + .join(","); + } + } + // for GET/HEAD requests, set URL query parameters from remaining parameters + // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } + else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } + else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + else { + headers["content-length"] = 0; + } + } + } + // default content-type for JSON if body is set + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. + // fetch does not allow to set `content-length` header, but we can set body to an empty string + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + // Only return body/request keys if present + return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null); +} + +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS = merge(oldDefaults, newDefaults); + const endpoint = endpointWithDefaults.bind(null, DEFAULTS); + return Object.assign(endpoint, { + DEFAULTS, + defaults: withDefaults.bind(null, DEFAULTS), + merge: merge.bind(null, DEFAULTS), + parse, + }); +} + +const VERSION = "6.0.12"; + +const userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`; +// DEFAULTS has all properties set that EndpointOptions has, except url. +// So we use RequestParameters and add method as additional required property. +const DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent, + }, + mediaType: { + format: "", + previews: [], + }, +}; + +const endpoint = withDefaults(null, DEFAULTS); + +export { endpoint }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/endpoint/dist-web/index.js.map b/node_modules/@octokit/endpoint/dist-web/index.js.map new file mode 100644 index 0000000..1d60d02 --- /dev/null +++ b/node_modules/@octokit/endpoint/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/util/lowercase-keys.js","../dist-src/util/merge-deep.js","../dist-src/util/remove-undefined-properties.js","../dist-src/merge.js","../dist-src/util/add-query-parameters.js","../dist-src/util/extract-url-variable-names.js","../dist-src/util/omit.js","../dist-src/util/url-template.js","../dist-src/parse.js","../dist-src/endpoint-with-defaults.js","../dist-src/with-defaults.js","../dist-src/version.js","../dist-src/defaults.js","../dist-src/index.js"],"sourcesContent":["export function lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n","import { isPlainObject } from \"is-plain-object\";\nexport function mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n }\n else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n","export function removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n return obj;\n}\n","import { lowercaseKeys } from \"./util/lowercase-keys\";\nimport { mergeDeep } from \"./util/merge-deep\";\nimport { removeUndefinedProperties } from \"./util/remove-undefined-properties\";\nexport function merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n }\n else {\n options = Object.assign({}, route);\n }\n // lowercase header names before merging with defaults to avoid duplicates\n options.headers = lowercaseKeys(options.headers);\n // remove properties with undefined values before merging\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n // mediaType.previews arrays are merged, instead of overwritten\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews\n .filter((preview) => !mergedOptions.mediaType.previews.includes(preview))\n .concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n","export function addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return (url +\n separator +\n names\n .map((name) => {\n if (name === \"q\") {\n return (\"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\"));\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n })\n .join(\"&\"));\n}\n","const urlVariableRegex = /\\{[^}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\nexport function extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n if (!matches) {\n return [];\n }\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n","export function omit(object, keysToOmit) {\n return Object.keys(object)\n .filter((option) => !keysToOmit.includes(option))\n .reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n","// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n })\n .join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value =\n operator === \"+\" || operator === \"#\"\n ? encodeReserved(value)\n : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n }\n else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" ||\n typeof value === \"number\" ||\n typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n }\n else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n }\n else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n }\n else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n }\n else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n }\n else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n }\n else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n }\n else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nexport function parseUrl(template) {\n return {\n expand: expand.bind(null, template),\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n }\n else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n }\n else {\n return values.join(\",\");\n }\n }\n else {\n return encodeReserved(literal);\n }\n });\n}\n","import { addQueryParameters } from \"./util/add-query-parameters\";\nimport { extractUrlVariableNames } from \"./util/extract-url-variable-names\";\nimport { omit } from \"./util/omit\";\nimport { parseUrl } from \"./util/url-template\";\nexport function parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase();\n // replace :varname with {varname} to make it RFC 6570 compatible\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\",\n ]);\n // extract variable names from URL to calculate remaining variables later\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options)\n .filter((option) => urlVariableNames.includes(option))\n .concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept\n .split(/,/)\n .map((preview) => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))\n .join(\",\");\n }\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader\n .concat(options.mediaType.previews)\n .map((preview) => {\n const format = options.mediaType.format\n ? `.${options.mediaType.format}`\n : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n })\n .join(\",\");\n }\n }\n // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n }\n else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n }\n else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n else {\n headers[\"content-length\"] = 0;\n }\n }\n }\n // default content-type for JSON if body is set\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n // Only return body/request keys if present\n return Object.assign({ method, url, headers }, typeof body !== \"undefined\" ? { body } : null, options.request ? { request: options.request } : null);\n}\n","import { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n","import { endpointWithDefaults } from \"./endpoint-with-defaults\";\nimport { merge } from \"./merge\";\nimport { parse } from \"./parse\";\nexport function withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse,\n });\n}\n","export const VERSION = \"6.0.12\";\n","import { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nconst userAgent = `octokit-endpoint.js/${VERSION} ${getUserAgent()}`;\n// DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\nexport const DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent,\n },\n mediaType: {\n format: \"\",\n previews: [],\n },\n};\n","import { withDefaults } from \"./with-defaults\";\nimport { DEFAULTS } from \"./defaults\";\nexport const endpoint = withDefaults(null, DEFAULTS);\n"],"names":[],"mappings":";;;AAAO,SAAS,aAAa,CAAC,MAAM,EAAE;AACtC,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AACvD,QAAQ,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAChD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;;ACPO,SAAS,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE;AAC7C,IAAI,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK;AAC1C,QAAQ,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;AACzC,YAAY,IAAI,EAAE,GAAG,IAAI,QAAQ,CAAC;AAClC,gBAAgB,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC/D;AACA,gBAAgB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,SAAS;AACT,aAAa;AACb,YAAY,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3D,SAAS;AACT,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;;ACfM,SAAS,yBAAyB,CAAC,GAAG,EAAE;AAC/C,IAAI,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE;AAC3B,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACpC,YAAY,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,GAAG,CAAC;AACf,CAAC;;ACJM,SAAS,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAChD,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACnC,QAAQ,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7C,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;AAClF,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3C,KAAK;AACL;AACA,IAAI,OAAO,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD;AACA,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;AACvC,IAAI,yBAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAI,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;AACA,IAAI,IAAI,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AACxD,QAAQ,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC,QAAQ;AACtE,aAAa,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACrF,aAAa,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtD,KAAK;AACL,IAAI,aAAa,CAAC,SAAS,CAAC,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC;AAC1H,IAAI,OAAO,aAAa,CAAC;AACzB,CAAC;;ACzBM,SAAS,kBAAkB,CAAC,GAAG,EAAE,UAAU,EAAE;AACpD,IAAI,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AACjD,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK;AACL,IAAI,QAAQ,GAAG;AACf,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,aAAa,GAAG,CAAC,CAAC,IAAI,KAAK;AAC3B,YAAY,IAAI,IAAI,KAAK,GAAG,EAAE;AAC9B,gBAAgB,QAAQ,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC1F,aAAa;AACb,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,SAAS,CAAC;AACV,aAAa,IAAI,CAAC,GAAG,CAAC,EAAE;AACxB,CAAC;;AChBD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AACtC,SAAS,cAAc,CAAC,YAAY,EAAE;AACtC,IAAI,OAAO,YAAY,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC7D,CAAC;AACD,AAAO,SAAS,uBAAuB,CAAC,GAAG,EAAE;AAC7C,IAAI,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAChD,IAAI,IAAI,CAAC,OAAO,EAAE;AAClB,QAAQ,OAAO,EAAE,CAAC;AAClB,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACzE,CAAC;;ACVM,SAAS,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE;AACzC,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACzD,SAAS,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAK;AAC9B,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,OAAO,GAAG,CAAC;AACnB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX,CAAC;;ACPD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAE;AAC7B,IAAI,OAAO,GAAG;AACd,SAAS,KAAK,CAAC,oBAAoB,CAAC;AACpC,SAAS,GAAG,CAAC,UAAU,IAAI,EAAE;AAC7B,QAAQ,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACxC,YAAY,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7E,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AACD,SAAS,gBAAgB,CAAC,GAAG,EAAE;AAC/B,IAAI,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE;AACpE,QAAQ,OAAO,GAAG,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAChE,KAAK,CAAC,CAAC;AACP,CAAC;AACD,SAAS,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;AAC3C,IAAI,KAAK;AACT,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG;AAC5C,cAAc,cAAc,CAAC,KAAK,CAAC;AACnC,cAAc,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACtC,IAAI,IAAI,GAAG,EAAE;AACb,QAAQ,OAAO,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AACnD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;AACD,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AACjD,CAAC;AACD,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,IAAI,OAAO,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC;AACpE,CAAC;AACD,SAAS,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AACrD,IAAI,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;AAC1C,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,EAAE;AAC1C,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,QAAQ;AACrC,YAAY,OAAO,KAAK,KAAK,SAAS,EAAE;AACxC,YAAY,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;AACrC,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,KAAK,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC;AACnE,aAAa;AACb,YAAY,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AAC1F,SAAS;AACT,aAAa;AACb,YAAY,IAAI,QAAQ,KAAK,GAAG,EAAE;AAClC,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;AACtG,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC5E,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,aAAa;AACb,iBAAiB;AACjB,gBAAgB,MAAM,GAAG,GAAG,EAAE,CAAC;AAC/B,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC1C,oBAAoB,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAU,KAAK,EAAE;AACrE,wBAAwB,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,qBAAqB;AACrB,oBAAoB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;AAC5D,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;AACjD,4BAA4B,GAAG,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,4BAA4B,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjF,yBAAyB;AACzB,qBAAqB,CAAC,CAAC;AACvB,iBAAiB;AACjB,gBAAgB,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE;AAC7C,oBAAoB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,iBAAiB;AACjB,qBAAqB,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3C,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/C,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9B,YAAY,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE;AAClC,gBAAgB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AACnD,aAAa;AACb,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,KAAK,QAAQ,KAAK,GAAG,IAAI,QAAQ,KAAK,GAAG,CAAC,EAAE;AACzE,YAAY,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACrD,SAAS;AACT,aAAa,IAAI,KAAK,KAAK,EAAE,EAAE;AAC/B,YAAY,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,MAAM,CAAC;AAClB,CAAC;AACD,AAAO,SAAS,QAAQ,CAAC,QAAQ,EAAE;AACnC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AAC3C,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE;AACnC,IAAI,IAAI,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,IAAI,OAAO,QAAQ,CAAC,OAAO,CAAC,4BAA4B,EAAE,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE;AAC5F,QAAQ,IAAI,UAAU,EAAE;AACxB,YAAY,IAAI,QAAQ,GAAG,EAAE,CAAC;AAC9B,YAAY,MAAM,MAAM,GAAG,EAAE,CAAC;AAC9B,YAAY,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE;AAChE,gBAAgB,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAChD,gBAAgB,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAClD,aAAa;AACb,YAAY,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,QAAQ,EAAE;AAC/D,gBAAgB,IAAI,GAAG,GAAG,2BAA2B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,gBAAgB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,aAAa,CAAC,CAAC;AACf,YAAY,IAAI,QAAQ,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC9C,gBAAgB,IAAI,SAAS,GAAG,GAAG,CAAC;AACpC,gBAAgB,IAAI,QAAQ,KAAK,GAAG,EAAE;AACtC,oBAAoB,SAAS,GAAG,GAAG,CAAC;AACpC,iBAAiB;AACjB,qBAAqB,IAAI,QAAQ,KAAK,GAAG,EAAE;AAC3C,oBAAoB,SAAS,GAAG,QAAQ,CAAC;AACzC,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,GAAG,QAAQ,GAAG,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACtF,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,aAAa;AACb,SAAS;AACT,aAAa;AACb,YAAY,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC;AAC3C,SAAS;AACT,KAAK,CAAC,CAAC;AACP,CAAC;;AC/JM,SAAS,KAAK,CAAC,OAAO,EAAE;AAC/B;AACA,IAAI,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AAC9C;AACA,IAAI,IAAI,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACnE,IAAI,IAAI,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AACrD,IAAI,IAAI,IAAI,CAAC;AACb,IAAI,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,SAAS;AACjB,QAAQ,KAAK;AACb,QAAQ,SAAS;AACjB,QAAQ,SAAS;AACjB,QAAQ,WAAW;AACnB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,MAAM,gBAAgB,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAC;AAC1D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AAC3C,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;AAC5B,QAAQ,GAAG,GAAG,OAAO,CAAC,OAAO,GAAG,GAAG,CAAC;AACpC,KAAK;AACL,IAAI,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;AAClD,SAAS,MAAM,CAAC,CAAC,MAAM,KAAK,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC9D,SAAS,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,IAAI,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACpE,IAAI,MAAM,eAAe,GAAG,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC9E,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE;AACtC;AACA,YAAY,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM;AAC3C,iBAAiB,KAAK,CAAC,GAAG,CAAC;AAC3B,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,kDAAkD,EAAE,CAAC,oBAAoB,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AACzJ,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC/C,YAAY,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/F,YAAY,OAAO,CAAC,MAAM,GAAG,wBAAwB;AACrD,iBAAiB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC;AACnD,iBAAiB,GAAG,CAAC,CAAC,OAAO,KAAK;AAClC,gBAAgB,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM;AACvD,sBAAsB,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;AACpD,sBAAsB,OAAO,CAAC;AAC9B,gBAAgB,OAAO,CAAC,uBAAuB,EAAE,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,aAAa,CAAC;AACd,iBAAiB,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3B,SAAS;AACT,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC1C,QAAQ,GAAG,GAAG,kBAAkB,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;AAC3D,KAAK;AACL,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,mBAAmB,EAAE;AAC3C,YAAY,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC;AAC5C,SAAS;AACT,aAAa;AACb,YAAY,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,EAAE;AACzD,gBAAgB,IAAI,GAAG,mBAAmB,CAAC;AAC3C,aAAa;AACb,iBAAiB;AACjB,gBAAgB,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;AAC9C,aAAa;AACb,SAAS;AACT,KAAK;AACL;AACA,IAAI,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AACjE,QAAQ,OAAO,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AACpE,KAAK;AACL;AACA;AACA,IAAI,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,OAAO,IAAI,KAAK,WAAW,EAAE;AAC1E,QAAQ,IAAI,GAAG,EAAE,CAAC;AAClB,KAAK;AACL;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,OAAO,IAAI,KAAK,WAAW,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,OAAO,CAAC,OAAO,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACzJ,CAAC;;AC9EM,SAAS,oBAAoB,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE;AAC/D,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAClD,CAAC;;ACDM,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AACvD,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC/D,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AACnC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,QAAQ,KAAK,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACzC,QAAQ,KAAK;AACb,KAAK,CAAC,CAAC;AACP,CAAC;;ACZM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACE3C,MAAM,SAAS,GAAG,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;AACrE;AACA;AACA,AAAO,MAAM,QAAQ,GAAG;AACxB,IAAI,MAAM,EAAE,KAAK;AACjB,IAAI,OAAO,EAAE,wBAAwB;AACrC,IAAI,OAAO,EAAE;AACb,QAAQ,MAAM,EAAE,gCAAgC;AAChD,QAAQ,YAAY,EAAE,SAAS;AAC/B,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,MAAM,EAAE,EAAE;AAClB,QAAQ,QAAQ,EAAE,EAAE;AACpB,KAAK;AACL,CAAC,CAAC;;ACdU,MAAC,QAAQ,GAAG,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/endpoint/package.json b/node_modules/@octokit/endpoint/package.json new file mode 100644 index 0000000..4e4d425 --- /dev/null +++ b/node_modules/@octokit/endpoint/package.json @@ -0,0 +1,44 @@ +{ + "name": "@octokit/endpoint", + "description": "Turns REST API endpoints into generic request options", + "version": "6.0.12", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "rest" + ], + "repository": "github:octokit/endpoint.js", + "dependencies": { + "@octokit/types": "^6.0.3", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^26.0.0", + "jest": "^27.0.0", + "prettier": "2.3.1", + "semantic-release": "^17.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/graphql/LICENSE b/node_modules/@octokit/graphql/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/graphql/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/graphql/README.md b/node_modules/@octokit/graphql/README.md new file mode 100644 index 0000000..fe7881c --- /dev/null +++ b/node_modules/@octokit/graphql/README.md @@ -0,0 +1,409 @@ +# graphql.js + +> GitHub GraphQL API client for browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/graphql.svg)](https://www.npmjs.com/package/@octokit/graphql) +[![Build Status](https://github.com/octokit/graphql.js/workflows/Test/badge.svg)](https://github.com/octokit/graphql.js/actions?query=workflow%3ATest+branch%3Amaster) + + + +- [Usage](#usage) + - [Send a simple query](#send-a-simple-query) + - [Authentication](#authentication) + - [Variables](#variables) + - [Pass query together with headers and variables](#pass-query-together-with-headers-and-variables) + - [Use with GitHub Enterprise](#use-with-github-enterprise) + - [Use custom `@octokit/request` instance](#use-custom-octokitrequest-instance) +- [TypeScript](#typescript) + - [Additional Types](#additional-types) +- [Errors](#errors) +- [Partial responses](#partial-responses) +- [Writing tests](#writing-tests) +- [License](#license) + + + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/graphql` directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with npm install @octokit/graphql + +```js +const { graphql } = require("@octokit/graphql"); +// or: import { graphql } from "@octokit/graphql"; +``` + +
+ +### Send a simple query + +```js +const { repository } = await graphql( + ` + { + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } + `, + { + headers: { + authorization: `token secret123`, + }, + } +); +``` + +### Authentication + +The simplest way to authenticate a request is to set the `Authorization` header, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const graphqlWithAuth = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const { repository } = await graphqlWithAuth(` + { + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + id: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const graphqlWithAuth = graphql.defaults({ + request: { + hook: auth.hook, + }, +}); + +const { repository } = await graphqlWithAuth( + `{ + repository(owner: "octokit", name: "graphql.js") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + }` +); +``` + +### Variables + +⚠️ Do not use [template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) in the query strings as they make your code vulnerable to query injection attacks (see [#2](https://github.com/octokit/graphql.js/issues/2)). Use variables instead: + +```js +const { lastIssues } = await graphql( + ` + query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner: $owner, name: $repo) { + issues(last: $num) { + edges { + node { + title + } + } + } + } + } + `, + { + owner: "octokit", + repo: "graphql.js", + headers: { + authorization: `token secret123`, + }, + } +); +``` + +### Pass query together with headers and variables + +```js +const { graphql } = require("@octokit/graphql"); +const { lastIssues } = await graphql({ + query: `query lastIssues($owner: String!, $repo: String!, $num: Int = 3) { + repository(owner:$owner, name:$repo) { + issues(last:$num) { + edges { + node { + title + } + } + } + } + }`, + owner: "octokit", + repo: "graphql.js", + headers: { + authorization: `token secret123`, + }, +}); +``` + +### Use with GitHub Enterprise + +```js +let { graphql } = require("@octokit/graphql"); +graphql = graphql.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api", + headers: { + authorization: `token secret123`, + }, +}); +const { repository } = await graphql(` + { + repository(owner: "acme-project", name: "acme-repo") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +``` + +### Use custom `@octokit/request` instance + +```js +const { request } = require("@octokit/request"); +const { withCustomRequest } = require("@octokit/graphql"); + +let requestCounter = 0; +const myRequest = request.defaults({ + headers: { + authentication: "token secret123", + }, + request: { + hook(request, options) { + requestCounter++; + return request(options); + }, + }, +}); +const myGraphql = withCustomRequest(myRequest); +await request("/"); +await myGraphql(` + { + repository(owner: "acme-project", name: "acme-repo") { + issues(last: 3) { + edges { + node { + title + } + } + } + } + } +`); +// requestCounter is now 2 +``` + +## TypeScript + +`@octokit/graphql` is exposing proper types for its usage with TypeScript projects. + +### Additional Types + +Additionally, `GraphQlQueryResponseData` has been exposed to users: + +```ts +import type { GraphQlQueryResponseData } from "@octokit/graphql"; +``` + +## Errors + +In case of a GraphQL error, `error.message` is set to a combined message describing all errors returned by the endpoint. +All errors can be accessed at `error.errors`. `error.request` has the request options such as query, variables and headers set for easier debugging. + +```js +let { graphql, GraphqlResponseError } = require("@octokit/graphql"); +graphqlt = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const query = `{ + viewer { + bioHtml + } +}`; + +try { + const result = await graphql(query); +} catch (error) { + if (error instanceof GraphqlResponseError) { + // do something with the error, allowing you to detect a graphql response error, + // compared to accidentally catching unrelated errors. + + // server responds with an object like the following (as an example) + // class GraphqlResponseError { + // "headers": { + // "status": "403", + // }, + // "data": null, + // "errors": [{ + // "message": "Field 'bioHtml' doesn't exist on type 'User'", + // "locations": [{ + // "line": 3, + // "column": 5 + // }] + // }] + // } + + console.log("Request failed:", error.request); // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message); // Field 'bioHtml' doesn't exist on type 'User' + } else { + // handle non-GraphQL error + } +} +``` + +## Partial responses + +A GraphQL query may respond with partial data accompanied by errors. In this case we will throw an error but the partial data will still be accessible through `error.data` + +```js +let { graphql } = require("@octokit/graphql"); +graphql = graphql.defaults({ + headers: { + authorization: `token secret123`, + }, +}); +const query = `{ + repository(name: "probot", owner: "probot") { + name + ref(qualifiedName: "master") { + target { + ... on Commit { + history(first: 25, after: "invalid cursor") { + nodes { + message + } + } + } + } + } + } +}`; + +try { + const result = await graphql(query); +} catch (error) { + // server responds with + // { + // "data": { + // "repository": { + // "name": "probot", + // "ref": null + // } + // }, + // "errors": [ + // { + // "type": "INVALID_CURSOR_ARGUMENTS", + // "path": [ + // "repository", + // "ref", + // "target", + // "history" + // ], + // "locations": [ + // { + // "line": 7, + // "column": 11 + // } + // ], + // "message": "`invalid cursor` does not appear to be a valid cursor." + // } + // ] + // } + + console.log("Request failed:", error.request); // { query, variables: {}, headers: { authorization: 'token secret123' } } + console.log(error.message); // `invalid cursor` does not appear to be a valid cursor. + console.log(error.data); // { repository: { name: 'probot', ref: null } } +} +``` + +## Writing tests + +You can pass a replacement for [the built-in fetch implementation](https://github.com/bitinn/node-fetch) as `request.fetch` option. For example, using [fetch-mock](http://www.wheresrhys.co.uk/fetch-mock/) works great to write tests + +```js +const assert = require("assert"); +const fetchMock = require("fetch-mock/es5/server"); + +const { graphql } = require("@octokit/graphql"); + +graphql("{ viewer { login } }", { + headers: { + authorization: "token secret123", + }, + request: { + fetch: fetchMock + .sandbox() + .post("https://api.github.com/graphql", (url, options) => { + assert.strictEqual(options.headers.authorization, "token secret123"); + assert.strictEqual( + options.body, + '{"query":"{ viewer { login } }"}', + "Sends correct query" + ); + return { data: {} }; + }), + }, +}); +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/graphql/dist-node/index.js b/node_modules/@octokit/graphql/dist-node/index.js new file mode 100644 index 0000000..6401417 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-node/index.js @@ -0,0 +1,118 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +var request = require('@octokit/request'); +var universalUserAgent = require('universal-user-agent'); + +const VERSION = "4.8.0"; + +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors:\n` + data.errors.map(e => ` - ${e.message}`).join("\n"); +} + +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; // Expose the errors and response data in their shorthand properties. + + this.errors = response.errors; + this.data = response.data; // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + +} + +const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + + const parsedOptions = typeof query === "string" ? Object.assign({ + query + }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + + if (!result.variables) { + result.variables = {}; + } + + result.variables[key] = parsedOptions[key]; + return result; + }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + + return request(requestOptions).then(response => { + if (response.data.errors) { + const headers = {}; + + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.request.endpoint + }); +} + +const graphql$1 = withDefaults(request.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} + +exports.GraphqlResponseError = GraphqlResponseError; +exports.graphql = graphql$1; +exports.withCustomRequest = withCustomRequest; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/dist-node/index.js.map b/node_modules/@octokit/graphql/dist-node/index.js.map new file mode 100644 index 0000000..873a8d4 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.8.0\";\n","function _buildMessageForResponseErrors(data) {\n return (`Request failed due to following response errors:\\n` +\n data.errors.map((e) => ` - ${e.message}`).join(\"\\n\"));\n}\nexport class GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n // Expose the errors and response data in their shorthand properties.\n this.errors = response.errors;\n this.data = response.data;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlResponseError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n return response.data.data;\n });\n}\n","import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: Request.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport { GraphqlResponseError } from \"./error\";\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["VERSION","_buildMessageForResponseErrors","data","errors","map","e","message","join","GraphqlResponseError","Error","constructor","request","headers","response","name","captureStackTrace","NON_VARIABLE_OPTIONS","FORBIDDEN_VARIABLE_OPTIONS","GHES_V3_SUFFIX_REGEX","graphql","query","options","Promise","reject","key","includes","parsedOptions","Object","assign","requestOptions","keys","reduce","result","variables","baseUrl","endpoint","DEFAULTS","test","url","replace","then","withDefaults","newDefaults","newRequest","defaults","newApi","bind","Request","getUserAgent","method","withCustomRequest","customRequest"],"mappings":";;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAP,SAASC,8BAAT,CAAwCC,IAAxC,EAA8C;AAC1C,SAAS,oDAAD,GACJA,IAAI,CAACC,MAAL,CAAYC,GAAZ,CAAiBC,CAAD,IAAQ,MAAKA,CAAC,CAACC,OAAQ,EAAvC,EAA0CC,IAA1C,CAA+C,IAA/C,CADJ;AAEH;;AACD,AAAO,MAAMC,oBAAN,SAAmCC,KAAnC,CAAyC;AAC5CC,EAAAA,WAAW,CAACC,OAAD,EAAUC,OAAV,EAAmBC,QAAnB,EAA6B;AACpC,UAAMZ,8BAA8B,CAACY,QAAD,CAApC;AACA,SAAKF,OAAL,GAAeA,OAAf;AACA,SAAKC,OAAL,GAAeA,OAAf;AACA,SAAKC,QAAL,GAAgBA,QAAhB;AACA,SAAKC,IAAL,GAAY,sBAAZ,CALoC;;AAOpC,SAAKX,MAAL,GAAcU,QAAQ,CAACV,MAAvB;AACA,SAAKD,IAAL,GAAYW,QAAQ,CAACX,IAArB,CARoC;;AAUpC;;AACA,QAAIO,KAAK,CAACM,iBAAV,EAA6B;AACzBN,MAAAA,KAAK,CAACM,iBAAN,CAAwB,IAAxB,EAA8B,KAAKL,WAAnC;AACH;AACJ;;AAf2C;;ACHhD,MAAMM,oBAAoB,GAAG,CACzB,QADyB,EAEzB,SAFyB,EAGzB,KAHyB,EAIzB,SAJyB,EAKzB,SALyB,EAMzB,OANyB,EAOzB,WAPyB,CAA7B;AASA,MAAMC,0BAA0B,GAAG,CAAC,OAAD,EAAU,QAAV,EAAoB,KAApB,CAAnC;AACA,MAAMC,oBAAoB,GAAG,eAA7B;AACA,AAAO,SAASC,OAAT,CAAiBR,OAAjB,EAA0BS,KAA1B,EAAiCC,OAAjC,EAA0C;AAC7C,MAAIA,OAAJ,EAAa;AACT,QAAI,OAAOD,KAAP,KAAiB,QAAjB,IAA6B,WAAWC,OAA5C,EAAqD;AACjD,aAAOC,OAAO,CAACC,MAAR,CAAe,IAAId,KAAJ,CAAW,4DAAX,CAAf,CAAP;AACH;;AACD,SAAK,MAAMe,GAAX,IAAkBH,OAAlB,EAA2B;AACvB,UAAI,CAACJ,0BAA0B,CAACQ,QAA3B,CAAoCD,GAApC,CAAL,EACI;AACJ,aAAOF,OAAO,CAACC,MAAR,CAAe,IAAId,KAAJ,CAAW,uBAAsBe,GAAI,mCAArC,CAAf,CAAP;AACH;AACJ;;AACD,QAAME,aAAa,GAAG,OAAON,KAAP,KAAiB,QAAjB,GAA4BO,MAAM,CAACC,MAAP,CAAc;AAAER,IAAAA;AAAF,GAAd,EAAyBC,OAAzB,CAA5B,GAAgED,KAAtF;AACA,QAAMS,cAAc,GAAGF,MAAM,CAACG,IAAP,CAAYJ,aAAZ,EAA2BK,MAA3B,CAAkC,CAACC,MAAD,EAASR,GAAT,KAAiB;AACtE,QAAIR,oBAAoB,CAACS,QAArB,CAA8BD,GAA9B,CAAJ,EAAwC;AACpCQ,MAAAA,MAAM,CAACR,GAAD,CAAN,GAAcE,aAAa,CAACF,GAAD,CAA3B;AACA,aAAOQ,MAAP;AACH;;AACD,QAAI,CAACA,MAAM,CAACC,SAAZ,EAAuB;AACnBD,MAAAA,MAAM,CAACC,SAAP,GAAmB,EAAnB;AACH;;AACDD,IAAAA,MAAM,CAACC,SAAP,CAAiBT,GAAjB,IAAwBE,aAAa,CAACF,GAAD,CAArC;AACA,WAAOQ,MAAP;AACH,GAVsB,EAUpB,EAVoB,CAAvB,CAZ6C;AAwB7C;;AACA,QAAME,OAAO,GAAGR,aAAa,CAACQ,OAAd,IAAyBvB,OAAO,CAACwB,QAAR,CAAiBC,QAAjB,CAA0BF,OAAnE;;AACA,MAAIhB,oBAAoB,CAACmB,IAArB,CAA0BH,OAA1B,CAAJ,EAAwC;AACpCL,IAAAA,cAAc,CAACS,GAAf,GAAqBJ,OAAO,CAACK,OAAR,CAAgBrB,oBAAhB,EAAsC,cAAtC,CAArB;AACH;;AACD,SAAOP,OAAO,CAACkB,cAAD,CAAP,CAAwBW,IAAxB,CAA8B3B,QAAD,IAAc;AAC9C,QAAIA,QAAQ,CAACX,IAAT,CAAcC,MAAlB,EAA0B;AACtB,YAAMS,OAAO,GAAG,EAAhB;;AACA,WAAK,MAAMY,GAAX,IAAkBG,MAAM,CAACG,IAAP,CAAYjB,QAAQ,CAACD,OAArB,CAAlB,EAAiD;AAC7CA,QAAAA,OAAO,CAACY,GAAD,CAAP,GAAeX,QAAQ,CAACD,OAAT,CAAiBY,GAAjB,CAAf;AACH;;AACD,YAAM,IAAIhB,oBAAJ,CAAyBqB,cAAzB,EAAyCjB,OAAzC,EAAkDC,QAAQ,CAACX,IAA3D,CAAN;AACH;;AACD,WAAOW,QAAQ,CAACX,IAAT,CAAcA,IAArB;AACH,GATM,CAAP;AAUH;;ACjDM,SAASuC,YAAT,CAAsB9B,SAAtB,EAA+B+B,WAA/B,EAA4C;AAC/C,QAAMC,UAAU,GAAGhC,SAAO,CAACiC,QAAR,CAAiBF,WAAjB,CAAnB;;AACA,QAAMG,MAAM,GAAG,CAACzB,KAAD,EAAQC,OAAR,KAAoB;AAC/B,WAAOF,OAAO,CAACwB,UAAD,EAAavB,KAAb,EAAoBC,OAApB,CAAd;AACH,GAFD;;AAGA,SAAOM,MAAM,CAACC,MAAP,CAAciB,MAAd,EAAsB;AACzBD,IAAAA,QAAQ,EAAEH,YAAY,CAACK,IAAb,CAAkB,IAAlB,EAAwBH,UAAxB,CADe;AAEzBR,IAAAA,QAAQ,EAAEY,eAAO,CAACZ;AAFO,GAAtB,CAAP;AAIH;;MCPYhB,SAAO,GAAGsB,YAAY,CAAC9B,eAAD,EAAU;AACzCC,EAAAA,OAAO,EAAE;AACL,kBAAe,sBAAqBZ,OAAQ,IAAGgD,+BAAY,EAAG;AADzD,GADgC;AAIzCC,EAAAA,MAAM,EAAE,MAJiC;AAKzCX,EAAAA,GAAG,EAAE;AALoC,CAAV,CAA5B;AAOP,AACO,SAASY,iBAAT,CAA2BC,aAA3B,EAA0C;AAC7C,SAAOV,YAAY,CAACU,aAAD,EAAgB;AAC/BF,IAAAA,MAAM,EAAE,MADuB;AAE/BX,IAAAA,GAAG,EAAE;AAF0B,GAAhB,CAAnB;AAIH;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/dist-src/error.js b/node_modules/@octokit/graphql/dist-src/error.js new file mode 100644 index 0000000..182f967 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/error.js @@ -0,0 +1,21 @@ +function _buildMessageForResponseErrors(data) { + return (`Request failed due to following response errors:\n` + + data.errors.map((e) => ` - ${e.message}`).join("\n")); +} +export class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +} diff --git a/node_modules/@octokit/graphql/dist-src/graphql.js b/node_modules/@octokit/graphql/dist-src/graphql.js new file mode 100644 index 0000000..8297f84 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/graphql.js @@ -0,0 +1,52 @@ +import { GraphqlResponseError } from "./error"; +const NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType", +]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +export function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + return response.data.data; + }); +} diff --git a/node_modules/@octokit/graphql/dist-src/index.js b/node_modules/@octokit/graphql/dist-src/index.js new file mode 100644 index 0000000..2a7d06b --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/index.js @@ -0,0 +1,18 @@ +import { request } from "@octokit/request"; +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +import { withDefaults } from "./with-defaults"; +export const graphql = withDefaults(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`, + }, + method: "POST", + url: "/graphql", +}); +export { GraphqlResponseError } from "./error"; +export function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql", + }); +} diff --git a/node_modules/@octokit/graphql/dist-src/types.js b/node_modules/@octokit/graphql/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/graphql/dist-src/version.js b/node_modules/@octokit/graphql/dist-src/version.js new file mode 100644 index 0000000..3a4f8ff --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "4.8.0"; diff --git a/node_modules/@octokit/graphql/dist-src/with-defaults.js b/node_modules/@octokit/graphql/dist-src/with-defaults.js new file mode 100644 index 0000000..6ea309e --- /dev/null +++ b/node_modules/@octokit/graphql/dist-src/with-defaults.js @@ -0,0 +1,12 @@ +import { request as Request } from "@octokit/request"; +import { graphql } from "./graphql"; +export function withDefaults(request, newDefaults) { + const newRequest = request.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: Request.endpoint, + }); +} diff --git a/node_modules/@octokit/graphql/dist-types/error.d.ts b/node_modules/@octokit/graphql/dist-types/error.d.ts new file mode 100644 index 0000000..3bd37ad --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/error.d.ts @@ -0,0 +1,13 @@ +import { ResponseHeaders } from "@octokit/types"; +import { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types"; +declare type ServerResponseData = Required>; +export declare class GraphqlResponseError extends Error { + readonly request: GraphQlEndpointOptions; + readonly headers: ResponseHeaders; + readonly response: ServerResponseData; + name: string; + readonly errors: GraphQlQueryResponse["errors"]; + readonly data: ResponseData; + constructor(request: GraphQlEndpointOptions, headers: ResponseHeaders, response: ServerResponseData); +} +export {}; diff --git a/node_modules/@octokit/graphql/dist-types/graphql.d.ts b/node_modules/@octokit/graphql/dist-types/graphql.d.ts new file mode 100644 index 0000000..2942b8b --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/graphql.d.ts @@ -0,0 +1,3 @@ +import { request as Request } from "@octokit/request"; +import { RequestParameters, GraphQlQueryResponseData } from "./types"; +export declare function graphql(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise; diff --git a/node_modules/@octokit/graphql/dist-types/index.d.ts b/node_modules/@octokit/graphql/dist-types/index.d.ts new file mode 100644 index 0000000..282f98a --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/index.d.ts @@ -0,0 +1,5 @@ +import { request } from "@octokit/request"; +export declare const graphql: import("./types").graphql; +export { GraphQlQueryResponseData } from "./types"; +export { GraphqlResponseError } from "./error"; +export declare function withCustomRequest(customRequest: typeof request): import("./types").graphql; diff --git a/node_modules/@octokit/graphql/dist-types/types.d.ts b/node_modules/@octokit/graphql/dist-types/types.d.ts new file mode 100644 index 0000000..b266bdb --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/types.d.ts @@ -0,0 +1,55 @@ +import { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types"; +export declare type GraphQlEndpointOptions = EndpointOptions & { + variables?: { + [key: string]: unknown; + }; +}; +export declare type RequestParameters = RequestParametersType; +export declare type Query = string; +export interface graphql { + /** + * Sends a GraphQL query request based on endpoint options + * The GraphQL query must be specified in `options`. + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: RequestParameters): GraphQlResponse; + /** + * Sends a GraphQL query request based on endpoint options + * + * @param {string} query GraphQL query. Example: `'query { viewer { login } }'`. + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (query: Query, parameters?: RequestParameters): GraphQlResponse; + /** + * Returns a new `endpoint` with updated route and parameters + */ + defaults: (newDefaults: RequestParameters) => graphql; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} +export declare type GraphQlResponse = Promise; +export declare type GraphQlQueryResponseData = { + [key: string]: any; +}; +export declare type GraphQlQueryResponse = { + data: ResponseData; + errors?: [ + { + type: string; + message: string; + path: [string]; + extensions: { + [key: string]: any; + }; + locations: [ + { + line: number; + column: number; + } + ]; + } + ]; +}; diff --git a/node_modules/@octokit/graphql/dist-types/version.d.ts b/node_modules/@octokit/graphql/dist-types/version.d.ts new file mode 100644 index 0000000..e80848e --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "4.8.0"; diff --git a/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts b/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..03edc32 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-types/with-defaults.d.ts @@ -0,0 +1,3 @@ +import { request as Request } from "@octokit/request"; +import { graphql as ApiInterface, RequestParameters } from "./types"; +export declare function withDefaults(request: typeof Request, newDefaults: RequestParameters): ApiInterface; diff --git a/node_modules/@octokit/graphql/dist-web/index.js b/node_modules/@octokit/graphql/dist-web/index.js new file mode 100644 index 0000000..5307e26 --- /dev/null +++ b/node_modules/@octokit/graphql/dist-web/index.js @@ -0,0 +1,106 @@ +import { request } from '@octokit/request'; +import { getUserAgent } from 'universal-user-agent'; + +const VERSION = "4.8.0"; + +function _buildMessageForResponseErrors(data) { + return (`Request failed due to following response errors:\n` + + data.errors.map((e) => ` - ${e.message}`).join("\n")); +} +class GraphqlResponseError extends Error { + constructor(request, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + // Expose the errors and response data in their shorthand properties. + this.errors = response.errors; + this.data = response.data; + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +} + +const NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType", +]; +const FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +const GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`)); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject(new Error(`[@octokit/graphql] "${key}" cannot be used as variable name`)); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys(parsedOptions).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix + // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451 + const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError(requestOptions, headers, response.data); + } + return response.data.data; + }); +} + +function withDefaults(request$1, newDefaults) { + const newRequest = request$1.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: request.endpoint, + }); +} + +const graphql$1 = withDefaults(request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`, + }, + method: "POST", + url: "/graphql", +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql", + }); +} + +export { GraphqlResponseError, graphql$1 as graphql, withCustomRequest }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/graphql/dist-web/index.js.map b/node_modules/@octokit/graphql/dist-web/index.js.map new file mode 100644 index 0000000..3c6a6ed --- /dev/null +++ b/node_modules/@octokit/graphql/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/error.js","../dist-src/graphql.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"4.8.0\";\n","function _buildMessageForResponseErrors(data) {\n return (`Request failed due to following response errors:\\n` +\n data.errors.map((e) => ` - ${e.message}`).join(\"\\n\"));\n}\nexport class GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n // Expose the errors and response data in their shorthand properties.\n this.errors = response.errors;\n this.data = response.data;\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { GraphqlResponseError } from \"./error\";\nconst NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\",\n];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nexport function graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))\n continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n return response.data.data;\n });\n}\n","import { request as Request } from \"@octokit/request\";\nimport { graphql } from \"./graphql\";\nexport function withDefaults(request, newDefaults) {\n const newRequest = request.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: Request.endpoint,\n });\n}\n","import { request } from \"@octokit/request\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport { withDefaults } from \"./with-defaults\";\nexport const graphql = withDefaults(request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${getUserAgent()}`,\n },\n method: \"POST\",\n url: \"/graphql\",\n});\nexport { GraphqlResponseError } from \"./error\";\nexport function withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\",\n });\n}\n"],"names":["request","Request","graphql"],"mappings":";;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C,SAAS,8BAA8B,CAAC,IAAI,EAAE;AAC9C,IAAI,QAAQ,CAAC,kDAAkD,CAAC;AAChE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AAC9D,CAAC;AACD,AAAO,MAAM,oBAAoB,SAAS,KAAK,CAAC;AAChD,IAAI,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC5C,QAAQ,KAAK,CAAC,8BAA8B,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxD,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAC/B,QAAQ,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACjC,QAAQ,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;AAC3C;AACA,QAAQ,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACtC,QAAQ,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;AAClC;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,KAAK;AACL,CAAC;;ACnBD,MAAM,oBAAoB,GAAG;AAC7B,IAAI,QAAQ;AACZ,IAAI,SAAS;AACb,IAAI,KAAK;AACT,IAAI,SAAS;AACb,IAAI,SAAS;AACb,IAAI,OAAO;AACX,IAAI,WAAW;AACf,CAAC,CAAC;AACF,MAAM,0BAA0B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9D,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,AAAO,SAAS,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;AACjD,IAAI,IAAI,OAAO,EAAE;AACjB,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,OAAO,EAAE;AAC7D,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,0DAA0D,CAAC,CAAC,CAAC,CAAC;AAC3G,SAAS;AACT,QAAQ,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,GAAG,CAAC;AACzD,gBAAgB,SAAS;AACzB,YAAY,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,oBAAoB,EAAE,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC;AAC5G,SAAS;AACT,KAAK;AACL,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;AAChG,IAAI,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,GAAG,KAAK;AAC9E,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AAChD,YAAY,MAAM,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AAC7C,YAAY,OAAO,MAAM,CAAC;AAC1B,SAAS;AACT,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE;AAC/B,YAAY,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;AAClC,SAAS;AACT,QAAQ,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;AACnD,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK,EAAE,EAAE,CAAC,CAAC;AACX;AACA;AACA,IAAI,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/E,IAAI,IAAI,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACnF,KAAK;AACL,IAAI,OAAO,OAAO,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK;AACtD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE;AAClC,YAAY,MAAM,OAAO,GAAG,EAAE,CAAC;AAC/B,YAAY,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;AAC7D,gBAAgB,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACrD,aAAa;AACb,YAAY,MAAM,IAAI,oBAAoB,CAAC,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnF,SAAS;AACT,QAAQ,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;ACjDM,SAAS,YAAY,CAACA,SAAO,EAAE,WAAW,EAAE;AACnD,IAAI,MAAM,UAAU,GAAGA,SAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACrD,IAAI,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK;AACvC,QAAQ,OAAO,OAAO,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AACnD,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC;AACrD,QAAQ,QAAQ,EAAEC,OAAO,CAAC,QAAQ;AAClC,KAAK,CAAC,CAAC;AACP,CAAC;;ACPW,MAACC,SAAO,GAAG,YAAY,CAAC,OAAO,EAAE;AAC7C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,IAAI,MAAM,EAAE,MAAM;AAClB,IAAI,GAAG,EAAE,UAAU;AACnB,CAAC,CAAC,CAAC;AACH,AACO,SAAS,iBAAiB,CAAC,aAAa,EAAE;AACjD,IAAI,OAAO,YAAY,CAAC,aAAa,EAAE;AACvC,QAAQ,MAAM,EAAE,MAAM;AACtB,QAAQ,GAAG,EAAE,UAAU;AACvB,KAAK,CAAC,CAAC;AACP,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/graphql/package.json b/node_modules/@octokit/graphql/package.json new file mode 100644 index 0000000..9ba3cb7 --- /dev/null +++ b/node_modules/@octokit/graphql/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/graphql", + "description": "GitHub GraphQL API client for browsers and Node", + "version": "4.8.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "graphql" + ], + "repository": "github:octokit/graphql.js", + "dependencies": { + "@octokit/request": "^5.6.0", + "@octokit/types": "^6.0.3", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.5", + "@types/jest": "^27.0.0", + "@types/node": "^14.0.4", + "fetch-mock": "^9.0.0", + "jest": "^27.0.0", + "prettier": "2.3.2", + "semantic-release": "^17.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.0" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/openapi-types/LICENSE b/node_modules/@octokit/openapi-types/LICENSE new file mode 100644 index 0000000..c61fbbe --- /dev/null +++ b/node_modules/@octokit/openapi-types/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Gregor Martynus + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@octokit/openapi-types/README.md b/node_modules/@octokit/openapi-types/README.md new file mode 100644 index 0000000..9da833c --- /dev/null +++ b/node_modules/@octokit/openapi-types/README.md @@ -0,0 +1,17 @@ +# @octokit/openapi-types + +> Generated TypeScript definitions based on GitHub's OpenAPI spec + +This package is continously updated based on [GitHub's OpenAPI specification](https://github.com/github/rest-api-description/) + +## Usage + +```ts +import { components } from "@octokit/openapi-types"; + +type Repository = components["schemas"]["full-repository"]; +``` + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/openapi-types/package.json b/node_modules/@octokit/openapi-types/package.json new file mode 100644 index 0000000..24484a5 --- /dev/null +++ b/node_modules/@octokit/openapi-types/package.json @@ -0,0 +1,20 @@ +{ + "name": "@octokit/openapi-types", + "description": "Generated TypeScript definitions based on GitHub's OpenAPI spec for api.github.com", + "repository": { + "type": "git", + "url": "https://github.com/octokit/openapi-types.ts.git", + "directory": "packages/openapi-types" + }, + "publishConfig": { + "access": "public" + }, + "version": "12.11.0", + "main": "", + "types": "types.d.ts", + "author": "Gregor Martynus (https://twitter.com/gr2m)", + "license": "MIT", + "octokit": { + "openapi-version": "6.8.0" + } +} diff --git a/node_modules/@octokit/openapi-types/types.d.ts b/node_modules/@octokit/openapi-types/types.d.ts new file mode 100644 index 0000000..88dc62d --- /dev/null +++ b/node_modules/@octokit/openapi-types/types.d.ts @@ -0,0 +1,47095 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/": { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + get: operations["meta/root"]; + }; + "/app": { + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-authenticated"]; + }; + "/app-manifests/{code}/conversions": { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */ + post: operations["apps/create-from-manifest"]; + }; + "/app/hook/config": { + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-webhook-config-for-app"]; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + patch: operations["apps/update-webhook-config-for-app"]; + }; + "/app/hook/deliveries": { + /** + * 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}": { + /** + * 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 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": { + /** + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + get: operations["apps/list-installations"]; + }; + "/app/installations/{installation_id}": { + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-installation"]; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/delete-installation"]; + }; + "/app/installations/{installation_id}/access_tokens": { + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + post: operations["apps/create-installation-access-token"]; + }; + "/app/installations/{installation_id}/suspended": { + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + put: operations["apps/suspend-installation"]; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + delete: operations["apps/unsuspend-installation"]; + }; + "/applications/grants": { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + */ + get: operations["oauth-authorizations/list-grants"]; + }; + "/applications/grants/{grant_id}": { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations["oauth-authorizations/get-grant"]; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations["oauth-authorizations/delete-grant"]; + }; + "/applications/{client_id}/grant": { + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + delete: operations["apps/delete-authorization"]; + }; + "/applications/{client_id}/token": { + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + post: operations["apps/check-token"]; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + delete: operations["apps/delete-token"]; + /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + patch: operations["apps/reset-token"]; + }; + "/applications/{client_id}/token/scoped": { + /** 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}": { + /** + * **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"]; + }; + "/authorizations": { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations["oauth-authorizations/list-authorizations"]; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + post: operations["oauth-authorizations/create-authorization"]; + }; + "/authorizations/clients/{client_id}": { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + */ + put: operations["oauth-authorizations/get-or-create-authorization-for-app"]; + }; + "/authorizations/clients/{client_id}/{fingerprint}": { + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + */ + put: operations["oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint"]; + }; + "/authorizations/{authorization_id}": { + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + get: operations["oauth-authorizations/get-authorization"]; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + delete: operations["oauth-authorizations/delete-authorization"]; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + patch: operations["oauth-authorizations/update-authorization"]; + }; + "/codes_of_conduct": { + get: operations["codes-of-conduct/get-all-codes-of-conduct"]; + }; + "/codes_of_conduct/{key}": { + get: operations["codes-of-conduct/get-conduct-code"]; + }; + "/emojis": { + /** Lists all the emojis available to use on GitHub. */ + get: operations["emojis/get"]; + }; + "/enterprise-installation/{enterprise_or_org}/server-statistics": { + /** + * 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": { + /** + * 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/oidc/customization/issuer": { + /** + * Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations["actions/set-actions-oidc-custom-issuer-policy-for-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions": { + /** + * 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"]; + /** + * 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": { + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations["enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise"]; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": { + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + put: operations["enterprise-admin/enable-selected-organization-github-actions-enterprise"]; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + delete: operations["enterprise-admin/disable-selected-organization-github-actions-enterprise"]; + }; + "/enterprises/{enterprise}/actions/permissions/selected-actions": { + /** + * Gets the selected actions 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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}": { + /** + * 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"]; + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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}": { + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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}": { + /** + * 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"]; + /** + * 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": { + /** + * 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": { + /** + * 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": { + /** + * 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": { + /** + * 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}": { + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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 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 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 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}/audit-log": { + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + get: operations["enterprise-admin/get-audit-log"]; + }; + "/enterprises/{enterprise}/code-scanning/alerts": { + /** + * 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}/secret-scanning/alerts": { + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + get: operations["secret-scanning/list-alerts-for-enterprise"]; + }; + "/enterprises/{enterprise}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * The authenticated user must be an enterprise admin. + */ + get: operations["billing/get-github-actions-billing-ghe"]; + }; + "/enterprises/{enterprise}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + get: operations["billing/get-github-advanced-security-billing-ghe"]; + }; + "/enterprises/{enterprise}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + get: operations["billing/get-github-packages-billing-ghe"]; + }; + "/enterprises/{enterprise}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + get: operations["billing/get-shared-storage-billing-ghe"]; + }; + "/events": { + /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */ + get: operations["activity/list-public-events"]; + }; + "/feeds": { + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + get: operations["activity/get-feeds"]; + }; + "/gists": { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + get: operations["gists/list"]; + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + post: operations["gists/create"]; + }; + "/gists/public": { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + get: operations["gists/list-public"]; + }; + "/gists/starred": { + /** List the authenticated user's starred gists: */ + get: operations["gists/list-starred"]; + }; + "/gists/{gist_id}": { + get: operations["gists/get"]; + delete: operations["gists/delete"]; + /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + patch: operations["gists/update"]; + }; + "/gists/{gist_id}/comments": { + get: operations["gists/list-comments"]; + post: operations["gists/create-comment"]; + }; + "/gists/{gist_id}/comments/{comment_id}": { + get: operations["gists/get-comment"]; + delete: operations["gists/delete-comment"]; + patch: operations["gists/update-comment"]; + }; + "/gists/{gist_id}/commits": { + get: operations["gists/list-commits"]; + }; + "/gists/{gist_id}/forks": { + get: operations["gists/list-forks"]; + /** **Note**: This was previously `/gists/:gist_id/fork`. */ + post: operations["gists/fork"]; + }; + "/gists/{gist_id}/star": { + get: operations["gists/check-is-starred"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["gists/star"]; + delete: operations["gists/unstar"]; + }; + "/gists/{gist_id}/{sha}": { + get: operations["gists/get-revision"]; + }; + "/gitignore/templates": { + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + get: operations["gitignore/get-all-templates"]; + }; + "/gitignore/templates/{name}": { + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + get: operations["gitignore/get-template"]; + }; + "/installation/repositories": { + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + get: operations["apps/list-repos-accessible-to-installation"]; + }; + "/installation/token": { + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + delete: operations["apps/revoke-installation-access-token"]; + }; + "/issues": { + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list"]; + }; + "/licenses": { + get: operations["licenses/get-all-commonly-used"]; + }; + "/licenses/{license}": { + get: operations["licenses/get"]; + }; + "/markdown": { + post: operations["markdown/render"]; + }; + "/markdown/raw": { + /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ + post: operations["markdown/render-raw"]; + }; + "/marketplace_listing/accounts/{account_id}": { + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account"]; + }; + "/marketplace_listing/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans"]; + }; + "/marketplace_listing/plans/{plan_id}/accounts": { + /** + * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan"]; + }; + "/marketplace_listing/stubbed/accounts/{account_id}": { + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/get-subscription-plan-for-account-stubbed"]; + }; + "/marketplace_listing/stubbed/plans": { + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-plans-stubbed"]; + }; + "/marketplace_listing/stubbed/plans/{plan_id}/accounts": { + /** + * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + get: operations["apps/list-accounts-for-plan-stubbed"]; + }; + "/meta": { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://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": { + get: operations["activity/list-public-events-for-repo-network"]; + }; + "/notifications": { + /** List all notifications for the current user, sorted by most recently updated. */ + get: operations["activity/list-notifications-for-authenticated-user"]; + /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-notifications-as-read"]; + }; + "/notifications/threads/{thread_id}": { + get: operations["activity/get-thread"]; + patch: operations["activity/mark-thread-as-read"]; + }; + "/notifications/threads/{thread_id}/subscription": { + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + get: operations["activity/get-thread-subscription-for-authenticated-user"]; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + put: operations["activity/set-thread-subscription"]; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + delete: operations["activity/delete-thread-subscription"]; + }; + "/octocat": { + /** Get the octocat as ASCII art */ + get: operations["meta/get-octocat"]; + }; + "/organizations": { + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + get: operations["orgs/list"]; + }; + "/organizations/{organization_id}/custom_roles": { + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + get: operations["orgs/list-custom-roles"]; + }; + "/orgs/{org}": { + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + get: operations["orgs/get"]; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + patch: operations["orgs/update"]; + }; + "/orgs/{org}/actions/cache/usage": { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-for-org"]; + }; + "/orgs/{org}/actions/cache/usage-by-repository": { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage-by-repo-for-org"]; + }; + "/orgs/{org}/actions/oidc/customization/sub": { + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + get: operations["oidc/get-oidc-custom-sub-template-for-org"]; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + put: operations["oidc/update-oidc-custom-sub-template-for-org"]; + }; + "/orgs/{org}/actions/permissions": { + /** + * 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"]; + /** + * 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": { + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + get: operations["actions/list-selected-repositories-enabled-github-actions-organization"]; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/set-selected-repositories-enabled-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/repositories/{repository_id}": { + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + put: operations["actions/enable-selected-repository-github-actions-organization"]; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + delete: operations["actions/disable-selected-repository-github-actions-organization"]; + }; + "/orgs/{org}/actions/permissions/selected-actions": { + /** + * Gets the selected actions 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runner-groups-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + post: operations["actions/create-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-group-from-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + patch: operations["actions/update-self-hosted-runner-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-repo-access-to-self-hosted-runner-group-in-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-repo-access-to-self-hosted-runner-group-in-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-in-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + put: operations["actions/set-self-hosted-runners-in-group-for-org"]; + }; + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": { + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + put: operations["actions/add-self-hosted-runner-to-group-for-org"]; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/remove-self-hosted-runner-from-group-for-org"]; + }; + "/orgs/{org}/actions/runners": { + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-self-hosted-runners-for-org"]; + }; + "/orgs/{org}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-org"]; + }; + "/orgs/{org}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-org"]; + }; + "/orgs/{org}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-org"]; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-org"]; + }; + "/orgs/{org}/actions/runners/{runner_id}/labels": { + /** + * 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"]; + /** + * 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 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 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 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": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-org-secrets"]; + }; + "/orgs/{org}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-public-key"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/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"]; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/delete-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + get: operations["actions/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + put: operations["actions/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + delete: operations["actions/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/audit-log": { + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * + * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination)." + */ + get: operations["orgs/get-audit-log"]; + }; + "/orgs/{org}/blocks": { + /** List the users blocked by an organization. */ + get: operations["orgs/list-blocked-users"]; + }; + "/orgs/{org}/blocks/{username}": { + get: operations["orgs/check-blocked-user"]; + put: operations["orgs/block-user"]; + delete: operations["orgs/unblock-user"]; + }; + "/orgs/{org}/code-scanning/alerts": { + /** + * Lists 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. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + get: operations["code-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/codespaces": { + /** + * 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}/credential-authorizations": { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + get: operations["orgs/list-saml-sso-authorizations"]; + }; + "/orgs/{org}/credential-authorizations/{credential_id}": { + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + */ + delete: operations["orgs/remove-saml-sso-authorization"]; + }; + "/orgs/{org}/dependabot/secrets": { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-org-secrets"]; + }; + "/orgs/{org}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-public-key"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}": { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/get-org-secret"]; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-org-secret"]; + /** 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": { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + get: operations["dependabot/list-selected-repos-for-org-secret"]; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/set-selected-repos-for-org-secret"]; + }; + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": { + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + put: operations["dependabot/add-selected-repo-to-org-secret"]; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + delete: operations["dependabot/remove-selected-repo-from-org-secret"]; + }; + "/orgs/{org}/events": { + get: operations["activity/list-public-org-events"]; + }; + "/orgs/{org}/external-group/{group_id}": { + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations["teams/external-idp-group-info-for-org"]; + }; + "/orgs/{org}/external-groups": { + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations["teams/list-external-idp-groups-for-org"]; + }; + "/orgs/{org}/failed_invitations": { + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + get: operations["orgs/list-failed-invitations"]; + }; + "/orgs/{org}/hooks": { + get: operations["orgs/list-webhooks"]; + /** Here's how you can create a hook that posts payloads in JSON format: */ + post: operations["orgs/create-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}": { + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + get: operations["orgs/get-webhook"]; + delete: operations["orgs/delete-webhook"]; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + patch: operations["orgs/update-webhook"]; + }; + "/orgs/{org}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + get: operations["orgs/get-webhook-config-for-org"]; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + patch: operations["orgs/update-webhook-config-for-org"]; + }; + "/orgs/{org}/hooks/{hook_id}/deliveries": { + /** 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}": { + /** 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 a webhook configured in an organization. */ + post: operations["orgs/redeliver-webhook-delivery"]; + }; + "/orgs/{org}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["orgs/ping-webhook"]; + }; + "/orgs/{org}/installation": { + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-org-installation"]; + }; + "/orgs/{org}/installations": { + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + get: operations["orgs/list-app-installations"]; + }; + "/orgs/{org}/interaction-limits": { + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-org"]; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + put: operations["interactions/set-restrictions-for-org"]; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + delete: operations["interactions/remove-restrictions-for-org"]; + }; + "/orgs/{org}/invitations": { + /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ + get: operations["orgs/list-pending-invitations"]; + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["orgs/create-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}": { + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + delete: operations["orgs/cancel-invitation"]; + }; + "/orgs/{org}/invitations/{invitation_id}/teams": { + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + get: operations["orgs/list-invitation-teams"]; + }; + "/orgs/{org}/issues": { + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-org"]; + }; + "/orgs/{org}/members": { + /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ + get: operations["orgs/list-members"]; + }; + "/orgs/{org}/members/{username}": { + /** Check if a user is, publicly or privately, a member of the organization. */ + get: operations["orgs/check-membership-for-user"]; + /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ + delete: operations["orgs/remove-member"]; + }; + "/orgs/{org}/members/{username}/codespaces/{codespace_name}": { + /** + * 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": { + /** + * 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}": { + /** 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"]; + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + put: operations["orgs/set-membership-for-user"]; + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + delete: operations["orgs/remove-membership-for-user"]; + }; + "/orgs/{org}/migrations": { + /** Lists the most recent migrations. */ + get: operations["migrations/list-for-org"]; + /** Initiates the generation of a migration archive. */ + post: operations["migrations/start-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}": { + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + get: operations["migrations/get-status-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/archive": { + /** Fetches the URL to a migration archive. */ + get: operations["migrations/download-archive-for-org"]; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + delete: operations["migrations/delete-archive-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + delete: operations["migrations/unlock-repo-for-org"]; + }; + "/orgs/{org}/migrations/{migration_id}/repositories": { + /** List all the repositories for this organization migration. */ + get: operations["migrations/list-repos-for-org"]; + }; + "/orgs/{org}/outside_collaborators": { + /** List all users who are outside collaborators of an organization. */ + get: operations["orgs/list-outside-collaborators"]; + }; + "/orgs/{org}/outside_collaborators/{username}": { + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://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"]; + /** Removing a user from this list will remove them from all the organization's repositories. */ + delete: operations["orgs/remove-outside-collaborator"]; + }; + "/orgs/{org}/packages": { + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-organization"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-organization"]; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-organization"]; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-org"]; + }; + "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-org"]; + }; + "/orgs/{org}/projects": { + /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + get: operations["projects/list-for-org"]; + /** Creates an organization project board. Returns a `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": { + /** Members of an organization can choose to have their membership publicized or not. */ + get: operations["orgs/list-public-members"]; + }; + "/orgs/{org}/public_members/{username}": { + get: operations["orgs/check-public-membership-for-user"]; + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["orgs/set-public-membership-for-authenticated-user"]; + delete: operations["orgs/remove-public-membership-for-authenticated-user"]; + }; + "/orgs/{org}/repos": { + /** Lists repositories for the specified organization. */ + get: operations["repos/list-for-org"]; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. 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": { + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/list-alerts-for-org"]; + }; + "/orgs/{org}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-actions-billing-org"]; + }; + "/orgs/{org}/settings/billing/advanced-security": { + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * 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": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-github-packages-billing-org"]; + }; + "/orgs/{org}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + get: operations["billing/get-shared-storage-billing-org"]; + }; + "/orgs/{org}/team-sync/groups": { + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + */ + get: operations["teams/list-idp-groups-for-org"]; + }; + "/orgs/{org}/teams": { + /** Lists all teams in an organization that are visible to the authenticated user. */ + get: operations["teams/list"]; + /** + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + post: operations["teams/create"]; + }; + "/orgs/{org}/teams/{team_slug}": { + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + get: operations["teams/get-by-name"]; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + delete: operations["teams/delete-in-org"]; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + patch: operations["teams/update-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions": { + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + get: operations["teams/list-discussions-in-org"]; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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 specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + get: operations["teams/get-discussion-in-org"]; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + delete: operations["teams/delete-discussion-in-org"]; + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + patch: operations["teams/update-discussion-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + get: operations["teams/list-discussion-comments-in-org"]; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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 specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + get: operations["teams/get-discussion-comment-in-org"]; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + delete: operations["teams/delete-discussion-comment-in-org"]; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + patch: operations["teams/update-discussion-comment-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-comment-in-org"]; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with 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}": { + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["reactions/delete-for-team-discussion-comment"]; + }; + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + get: operations["reactions/list-for-team-discussion-in-org"]; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with 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}": { + /** + * **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}/external-groups": { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations["teams/list-linked-external-idp-groups-to-team-for-org"]; + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + delete: operations["teams/unlink-external-idp-group-from-team-for-org"]; + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + patch: operations["teams/link-external-idp-group-to-team-for-org"]; + }; + "/orgs/{org}/teams/{team_slug}/invitations": { + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + get: operations["teams/list-pending-invitations-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/members": { + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/list-members-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/memberships/{username}": { + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The 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"]; + /** + * 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"]; + /** + * 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": { + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + get: operations["teams/list-projects-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": { + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + get: operations["teams/check-permissions-for-project-in-org"]; + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + put: operations["teams/add-or-update-project-permissions-in-org"]; + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + delete: operations["teams/remove-project-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos": { + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + get: operations["teams/list-repos-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": { + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + get: operations["teams/check-permissions-for-repo-in-org"]; + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + put: operations["teams/add-or-update-repo-permissions-in-org"]; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + delete: operations["teams/remove-repo-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": { + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + get: operations["teams/list-idp-groups-in-org"]; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + patch: operations["teams/create-or-update-idp-group-connections-in-org"]; + }; + "/orgs/{org}/teams/{team_slug}/teams": { + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + get: operations["teams/list-child-in-org"]; + }; + "/projects/columns/cards/{card_id}": { + get: operations["projects/get-card"]; + delete: operations["projects/delete-card"]; + patch: operations["projects/update-card"]; + }; + "/projects/columns/cards/{card_id}/moves": { + post: operations["projects/move-card"]; + }; + "/projects/columns/{column_id}": { + get: operations["projects/get-column"]; + delete: operations["projects/delete-column"]; + patch: operations["projects/update-column"]; + }; + "/projects/columns/{column_id}/cards": { + get: operations["projects/list-cards"]; + post: operations["projects/create-card"]; + }; + "/projects/columns/{column_id}/moves": { + post: operations["projects/move-column"]; + }; + "/projects/{project_id}": { + /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + get: operations["projects/get"]; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + delete: operations["projects/delete"]; + /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + patch: operations["projects/update"]; + }; + "/projects/{project_id}/collaborators": { + /** Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ + get: operations["projects/list-collaborators"]; + }; + "/projects/{project_id}/collaborators/{username}": { + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + put: operations["projects/add-collaborator"]; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + delete: operations["projects/remove-collaborator"]; + }; + "/projects/{project_id}/collaborators/{username}/permission": { + /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ + get: operations["projects/get-permission-for-user"]; + }; + "/projects/{project_id}/columns": { + get: operations["projects/list-columns"]; + post: operations["projects/create-column"]; + }; + "/rate_limit": { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: operations["rate-limit/get"]; + }; + "/repos/{owner}/{repo}": { + /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ + get: operations["repos/get"]; + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned + * repositories, you will get a `403 Forbidden` response. + */ + delete: operations["repos/delete"]; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + patch: operations["repos/update"]; + }; + "/repos/{owner}/{repo}/actions/artifacts": { + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-artifacts-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": { + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-artifact"]; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-artifact"]; + }; + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": { + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-artifact"]; + }; + "/repos/{owner}/{repo}/actions/cache/usage": { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-actions-cache-usage"]; + }; + "/repos/{owner}/{repo}/actions/caches": { + /** + * 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"]; + /** + * 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}": { + /** + * 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}": { + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": { + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-job-logs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": { + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/re-run-job-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/oidc/customization/sub": { + /** + * Gets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + get: operations["actions/get-custom-oidc-sub-claim-for-repo"]; + /** + * Sets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/set-custom-oidc-sub-claim-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/permissions": { + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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": { + /** + * 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"]; + /** + * 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": { + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + get: operations["actions/list-self-hosted-runners-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/downloads": { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + get: operations["actions/list-runner-applications-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/registration-token": { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + post: operations["actions/create-registration-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/remove-token": { + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + post: operations["actions/create-remove-token-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}": { + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + get: operations["actions/get-self-hosted-runner-for-repo"]; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + delete: operations["actions/delete-self-hosted-runner-from-repo"]; + }; + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": { + /** + * 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"]; + /** + * 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 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 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 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": { + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/list-workflow-runs-for-repo"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}": { + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow-run"]; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + delete: operations["actions/delete-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-reviews-for-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": { + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + post: operations["actions/approve-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-workflow-run-artifacts"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": { + /** + * 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": { + /** 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": { + /** + * 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": { + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + post: operations["actions/cancel-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + get: operations["actions/list-jobs-for-workflow-run"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": { + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + get: operations["actions/download-workflow-run-logs"]; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + delete: operations["actions/delete-workflow-run-logs"]; + }; + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": { + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-pending-deployments-for-run"]; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * 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-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 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": { + /** + * 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": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/actions/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/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"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/actions/workflows": { + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/list-repo-workflows"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": { + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["actions/get-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": { + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/disable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": { + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://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": { + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + put: operations["actions/enable-workflow"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + get: operations["actions/list-workflow-runs"]; + }; + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": { + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["actions/get-workflow-usage"]; + }; + "/repos/{owner}/{repo}/assignees": { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + get: operations["issues/list-assignees"]; + }; + "/repos/{owner}/{repo}/assignees/{assignee}": { + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + get: operations["issues/check-user-can-be-assigned"]; + }; + "/repos/{owner}/{repo}/autolinks": { + /** + * 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"]; + /** Users with admin access to the repository can create an autolink. */ + post: operations["repos/create-autolink"]; + }; + "/repos/{owner}/{repo}/autolinks/{autolink_id}": { + /** + * 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"]; + /** + * 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": { + /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + put: operations["repos/enable-automated-security-fixes"]; + /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + delete: operations["repos/disable-automated-security-fixes"]; + }; + "/repos/{owner}/{repo}/branches": { + get: operations["repos/list-branches"]; + }; + "/repos/{owner}/{repo}/branches/{branch}": { + get: operations["repos/get-branch"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + get: operations["repos/get-branch-protection"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://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"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + }; + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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"]; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise 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": { + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + post: operations["repos/rename-branch"]; + }; + "/repos/{owner}/{repo}/check-runs": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + post: operations["checks/create"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations["checks/get"]; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + patch: operations["checks/update"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */ + get: operations["checks/list-annotations"]; + }; + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * 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": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + post: operations["checks/create-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/preferences": { + /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + patch: operations["checks/set-suites-preferences"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + get: operations["checks/get-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations["checks/list-for-suite"]; + }; + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": { + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + post: operations["checks/rerequest-suite"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts": { + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + get: operations["code-scanning/list-alerts-for-repo"]; + }; + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": { + /** + * 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"]; + /** 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": { + /** + * 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": { + /** + * 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}": { + /** + * 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"]; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + delete: operations["code-scanning/delete-analysis"]; + }; + "/repos/{owner}/{repo}/code-scanning/sarifs": { + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint 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}": { + /** 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 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": { + /** + * 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"]; + /** + * 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": { + /** + * 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 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": { + /** + * 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": { + /** 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": { + /** 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}": { + /** 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"]; + /** + * 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 [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example 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"]; + /** 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": { + /** + * 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}": { + /** + * 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"]; + /** + * 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"]; + delete: operations["repos/remove-collaborator"]; + }; + "/repos/{owner}/{repo}/collaborators/{username}/permission": { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + get: operations["repos/get-collaborator-permission-level"]; + }; + "/repos/{owner}/{repo}/comments": { + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + get: operations["repos/list-commit-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}": { + get: operations["repos/get-commit-comment"]; + delete: operations["repos/delete-commit-comment"]; + patch: operations["repos/update-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": { + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + get: operations["reactions/list-for-commit-comment"]; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + post: operations["reactions/create-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + delete: operations["reactions/delete-for-commit-comment"]; + }; + "/repos/{owner}/{repo}/commits": { + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/list-commits"]; + }; + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://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": { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + get: operations["repos/list-comments-for-commit"]; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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": { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + get: operations["repos/list-pull-requests-associated-with-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}": { + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/get-commit"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-runs": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: operations["checks/list-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/check-suites": { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + get: operations["checks/list-suites-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/status": { + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + get: operations["repos/get-combined-status-for-ref"]; + }; + "/repos/{owner}/{repo}/commits/{ref}/statuses": { + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + get: operations["repos/list-commit-statuses-for-ref"]; + }; + "/repos/{owner}/{repo}/community/profile": { + /** + * This endpoint will return all community profile metrics, including an + * overall health score, repository description, the presence of documentation, detected + * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + get: operations["repos/get-community-profile-metrics"]; + }; + "/repos/{owner}/{repo}/compare/{basehead}": { + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The 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-with-basehead"]; + }; + "/repos/{owner}/{repo}/contents/{path}": { + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Note**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * + * #### 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"]; + /** Creates a new file or replaces an existing file in a repository. */ + put: operations["repos/create-or-update-file-contents"]; + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + delete: operations["repos/delete-file"]; + }; + "/repos/{owner}/{repo}/contributors": { + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + get: operations["repos/list-contributors"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets": { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/list-repo-secrets"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/public-key": { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-public-key"]; + }; + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + get: operations["dependabot/get-repo-secret"]; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["dependabot/create-or-update-repo-secret"]; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + delete: operations["dependabot/delete-repo-secret"]; + }; + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations["dependency-graph/diff-range"]; + }; + "/repos/{owner}/{repo}/dependency-graph/snapshots": { + /** 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": { + /** Simple filtering of deployments is available via query parameters: */ + get: operations["repos/list-deployments"]; + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/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: operations["repos/get-deployment"]; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. 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": { + /** Users with pull access can view deployment statuses for a deployment: */ + get: operations["repos/list-deployment-statuses"]; + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + post: operations["repos/create-deployment-status"]; + }; + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": { + /** Users with pull access can view a deployment status for a deployment: */ + get: operations["repos/get-deployment-status"]; + }; + "/repos/{owner}/{repo}/dispatches": { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://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": { + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations["repos/get-all-environments"]; + }; + "/repos/{owner}/{repo}/environments/{environment_name}": { + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + get: operations["repos/get-environment"]; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + put: operations["repos/create-or-update-environment"]; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + delete: operations["repos/delete-an-environment"]; + }; + "/repos/{owner}/{repo}/events": { + get: operations["activity/list-repo-events"]; + }; + "/repos/{owner}/{repo}/forks": { + get: operations["repos/list-forks"]; + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + post: operations["repos/create-fork"]; + }; + "/repos/{owner}/{repo}/git/blobs": { + post: operations["git/create-blob"]; + }; + "/repos/{owner}/{repo}/git/blobs/{file_sha}": { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + get: operations["git/get-blob"]; + }; + "/repos/{owner}/{repo}/git/commits": { + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in 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}": { + /** + * 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}": { + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + get: operations["git/list-matching-refs"]; + }; + "/repos/{owner}/{repo}/git/ref/{ref}": { + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + get: operations["git/get-ref"]; + }; + "/repos/{owner}/{repo}/git/refs": { + /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ + post: operations["git/create-ref"]; + }; + "/repos/{owner}/{repo}/git/refs/{ref}": { + delete: operations["git/delete-ref"]; + patch: operations["git/update-ref"]; + }; + "/repos/{owner}/{repo}/git/tags": { + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + post: operations["git/create-tag"]; + }; + "/repos/{owner}/{repo}/git/tags/{tag_sha}": { + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["git/get-tag"]; + }; + "/repos/{owner}/{repo}/git/trees": { + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + post: operations["git/create-tree"]; + }; + "/repos/{owner}/{repo}/git/trees/{tree_sha}": { + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + */ + get: operations["git/get-tree"]; + }; + "/repos/{owner}/{repo}/hooks": { + get: operations["repos/list-webhooks"]; + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + post: operations["repos/create-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}": { + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + get: operations["repos/get-webhook"]; + delete: operations["repos/delete-webhook"]; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + patch: operations["repos/update-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/config": { + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + get: operations["repos/get-webhook-config-for-repo"]; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + patch: operations["repos/update-webhook-config-for-repo"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + /** 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}": { + /** 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 webhook delivery for a webhook configured in a repository. */ + post: operations["repos/redeliver-webhook-delivery"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": { + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + post: operations["repos/ping-webhook"]; + }; + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": { + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + post: operations["repos/test-push-webhook"]; + }; + "/repos/{owner}/{repo}/import": { + /** + * View the progress of an import. + * + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + */ + get: operations["migrations/get-import-status"]; + /** Start a source import to a GitHub repository using GitHub Importer. */ + put: operations["migrations/start-import"]; + /** Stop an import for a repository. */ + delete: operations["migrations/cancel-import"]; + /** + * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API + * request. If no parameters are provided, the import will be restarted. + * + * 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": { + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + get: operations["migrations/get-commit-authors"]; + }; + "/repos/{owner}/{repo}/import/authors/{author_id}": { + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + patch: operations["migrations/map-commit-author"]; + }; + "/repos/{owner}/{repo}/import/large_files": { + /** List files larger than 100MB found during the import */ + get: operations["migrations/get-large-files"]; + }; + "/repos/{owner}/{repo}/import/lfs": { + /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ + patch: operations["migrations/set-lfs-preference"]; + }; + "/repos/{owner}/{repo}/installation": { + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-repo-installation"]; + }; + "/repos/{owner}/{repo}/interaction-limits": { + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + get: operations["interactions/get-restrictions-for-repo"]; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + put: operations["interactions/set-restrictions-for-repo"]; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + delete: operations["interactions/remove-restrictions-for-repo"]; + }; + "/repos/{owner}/{repo}/invitations": { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + get: operations["repos/list-invitations"]; + }; + "/repos/{owner}/{repo}/invitations/{invitation_id}": { + delete: operations["repos/delete-invitation"]; + patch: operations["repos/update-invitation"]; + }; + "/repos/{owner}/{repo}/issues": { + /** + * List issues in a repository. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-repo"]; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://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": { + /** By default, Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}": { + get: operations["issues/get-comment"]; + delete: operations["issues/delete-comment"]; + patch: operations["issues/update-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + get: operations["reactions/list-for-issue-comment"]; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + post: operations["reactions/create-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + delete: operations["reactions/delete-for-issue-comment"]; + }; + "/repos/{owner}/{repo}/issues/events": { + get: operations["issues/list-events-for-repo"]; + }; + "/repos/{owner}/{repo}/issues/events/{event_id}": { + get: operations["issues/get-event"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}": { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/get"]; + /** Issue owners and users with push access can edit an issue. */ + patch: operations["issues/update"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + post: operations["issues/add-assignees"]; + /** Removes one or more assignees from an issue. */ + delete: operations["issues/remove-assignees"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/comments": { + /** Issue Comments are ordered by ascending ID. */ + get: operations["issues/list-comments"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-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": { + get: operations["issues/list-events"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels": { + get: operations["issues/list-labels-on-issue"]; + /** Removes any previous labels and sets the new labels for an issue. */ + put: operations["issues/set-labels"]; + post: operations["issues/add-labels"]; + delete: operations["issues/remove-all-labels"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": { + /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ + delete: operations["issues/remove-label"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/lock": { + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["issues/lock"]; + /** Users with push access can unlock an issue's conversation. */ + delete: operations["issues/unlock"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": { + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + get: operations["reactions/list-for-issue"]; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + post: operations["reactions/create-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + delete: operations["reactions/delete-for-issue"]; + }; + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": { + get: operations["issues/list-events-for-timeline"]; + }; + "/repos/{owner}/{repo}/keys": { + get: operations["repos/list-deploy-keys"]; + /** You can create a read-only deploy key. */ + post: operations["repos/create-deploy-key"]; + }; + "/repos/{owner}/{repo}/keys/{key_id}": { + get: operations["repos/get-deploy-key"]; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + delete: operations["repos/delete-deploy-key"]; + }; + "/repos/{owner}/{repo}/labels": { + get: operations["issues/list-labels-for-repo"]; + post: operations["issues/create-label"]; + }; + "/repos/{owner}/{repo}/labels/{name}": { + get: operations["issues/get-label"]; + delete: operations["issues/delete-label"]; + patch: operations["issues/update-label"]; + }; + "/repos/{owner}/{repo}/languages": { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + get: operations["repos/list-languages"]; + }; + "/repos/{owner}/{repo}/lfs": { + put: operations["repos/enable-lfs-for-repo"]; + delete: operations["repos/disable-lfs-for-repo"]; + }; + "/repos/{owner}/{repo}/license": { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + get: operations["licenses/get-for-repo"]; + }; + "/repos/{owner}/{repo}/merge-upstream": { + /** 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": { + post: operations["repos/merge"]; + }; + "/repos/{owner}/{repo}/milestones": { + get: operations["issues/list-milestones"]; + post: operations["issues/create-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}": { + get: operations["issues/get-milestone"]; + delete: operations["issues/delete-milestone"]; + patch: operations["issues/update-milestone"]; + }; + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + get: operations["issues/list-labels-for-milestone"]; + }; + "/repos/{owner}/{repo}/notifications": { + /** List all notifications for the current user. */ + get: operations["activity/list-repo-notifications-for-authenticated-user"]; + /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + put: operations["activity/mark-repo-notifications-as-read"]; + }; + "/repos/{owner}/{repo}/pages": { + get: operations["repos/get-pages"]; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + put: operations["repos/update-information-about-pages-site"]; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + post: operations["repos/create-pages-site"]; + delete: operations["repos/delete-pages-site"]; + }; + "/repos/{owner}/{repo}/pages/builds": { + get: operations["repos/list-pages-builds"]; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + post: operations["repos/request-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/latest": { + get: operations["repos/get-latest-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/builds/{build_id}": { + get: operations["repos/get-pages-build"]; + }; + "/repos/{owner}/{repo}/pages/health": { + /** + * 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": { + /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + get: operations["projects/list-for-repo"]; + /** Creates a repository project board. Returns a `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": { + /** 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"]; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + post: operations["pulls/create"]; + }; + "/repos/{owner}/{repo}/pulls/comments": { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments-for-repo"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": { + /** Provides details for a review comment. */ + get: operations["pulls/get-review-comment"]; + /** Deletes a review comment. */ + delete: operations["pulls/delete-review-comment"]; + /** Enables you to edit a review comment. */ + patch: operations["pulls/update-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + get: operations["reactions/list-for-pull-request-review-comment"]; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + post: operations["reactions/create-for-pull-request-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + delete: operations["reactions/delete-for-pull-request-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}": { + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://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"]; + /** + * 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": { + /** + * 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": { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + get: operations["pulls/list-review-comments"]; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + post: operations["pulls/create-review-comment"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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": { + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + get: operations["pulls/list-commits"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/files": { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + get: operations["pulls/list-files"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": { + get: operations["pulls/check-if-merged"]; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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": { + /** Lists 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"]; + /** 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"]; + delete: operations["pulls/remove-requested-reviewers"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + /** The list of reviews returns in chronological order. */ + get: operations["pulls/list-reviews"]; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + post: operations["pulls/create-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": { + get: operations["pulls/get-review"]; + /** Update the review summary comment with new text. */ + put: operations["pulls/update-review"]; + delete: operations["pulls/delete-pending-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + /** List comments for a specific pull request review. */ + get: operations["pulls/list-comments-for-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + put: operations["pulls/dismiss-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": { + post: operations["pulls/submit-review"]; + }; + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + put: operations["pulls/update-branch"]; + }; + "/repos/{owner}/{repo}/readme": { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + get: operations["repos/get-readme"]; + }; + "/repos/{owner}/{repo}/readme/{dir}": { + /** + * 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": { + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + get: operations["repos/list-releases"]; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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}": { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ + get: operations["repos/get-release-asset"]; + delete: operations["repos/delete-release-asset"]; + /** Users with push access to the repository can edit a release asset. */ + patch: operations["repos/update-release-asset"]; + }; + "/repos/{owner}/{repo}/releases/generate-notes": { + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + post: operations["repos/generate-release-notes"]; + }; + "/repos/{owner}/{repo}/releases/latest": { + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + get: operations["repos/get-latest-release"]; + }; + "/repos/{owner}/{repo}/releases/tags/{tag}": { + /** Get a published release with the specified tag. */ + get: operations["repos/get-release-by-tag"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}": { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + get: operations["repos/get-release"]; + /** Users with push access to the repository can delete a release. */ + delete: operations["repos/delete-release"]; + /** Users with push access to the repository can edit a release. */ + patch: operations["repos/update-release"]; + }; + "/repos/{owner}/{repo}/releases/{release_id}/assets": { + get: operations["repos/list-release-assets"]; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?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 the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + get: operations["reactions/list-for-release"]; + /** 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}": { + /** + * **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": { + /** + * 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}": { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + get: operations["secret-scanning/get-alert"]; + /** + * Updates the status of a secret scanning alert in 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": { + /** + * 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": { + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["activity/list-stargazers-for-repo"]; + }; + "/repos/{owner}/{repo}/stats/code_frequency": { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + get: operations["repos/get-code-frequency-stats"]; + }; + "/repos/{owner}/{repo}/stats/commit_activity": { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + get: operations["repos/get-commit-activity-stats"]; + }; + "/repos/{owner}/{repo}/stats/contributors": { + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + get: operations["repos/get-contributors-stats"]; + }; + "/repos/{owner}/{repo}/stats/participation": { + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + get: operations["repos/get-participation-stats"]; + }; + "/repos/{owner}/{repo}/stats/punch_card": { + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + get: operations["repos/get-punch-card-stats"]; + }; + "/repos/{owner}/{repo}/statuses/{sha}": { + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + post: operations["repos/create-commit-status"]; + }; + "/repos/{owner}/{repo}/subscribers": { + /** Lists the people watching the specified repository. */ + get: operations["activity/list-watchers-for-repo"]; + }; + "/repos/{owner}/{repo}/subscription": { + get: operations["activity/get-repo-subscription"]; + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + put: operations["activity/set-repo-subscription"]; + /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + delete: operations["activity/delete-repo-subscription"]; + }; + "/repos/{owner}/{repo}/tags": { + get: operations["repos/list-tags"]; + }; + "/repos/{owner}/{repo}/tags/protection": { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations["repos/list-tag-protection"]; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations["repos/create-tag-protection"]; + }; + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations["repos/delete-tag-protection"]; + }; + "/repos/{owner}/{repo}/tarball/{ref}": { + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + get: operations["repos/download-tarball-archive"]; + }; + "/repos/{owner}/{repo}/teams": { + get: operations["repos/list-teams"]; + }; + "/repos/{owner}/{repo}/topics": { + get: operations["repos/get-all-topics"]; + put: operations["repos/replace-all-topics"]; + }; + "/repos/{owner}/{repo}/traffic/clones": { + /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + get: operations["repos/get-clones"]; + }; + "/repos/{owner}/{repo}/traffic/popular/paths": { + /** Get the top 10 popular contents over the last 14 days. */ + get: operations["repos/get-top-paths"]; + }; + "/repos/{owner}/{repo}/traffic/popular/referrers": { + /** Get the top 10 referrers over the last 14 days. */ + get: operations["repos/get-top-referrers"]; + }; + "/repos/{owner}/{repo}/traffic/views": { + /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + get: operations["repos/get-views"]; + }; + "/repos/{owner}/{repo}/transfer": { + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + post: operations["repos/transfer"]; + }; + "/repos/{owner}/{repo}/vulnerability-alerts": { + /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + get: operations["repos/check-vulnerability-alerts"]; + /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + put: operations["repos/enable-vulnerability-alerts"]; + /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + delete: operations["repos/disable-vulnerability-alerts"]; + }; + "/repos/{owner}/{repo}/zipball/{ref}": { + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + get: operations["repos/download-zipball-archive"]; + }; + "/repos/{template_owner}/{template_repo}/generate": { + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. 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": { + /** + * 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": { + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/list-environment-secrets"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": { + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-public-key"]; + }; + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": { + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + get: operations["actions/get-environment-secret"]; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/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"]; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + delete: operations["actions/delete-environment-secret"]; + }; + "/scim/v2/enterprises/{enterprise}/Groups": { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations["enterprise-admin/list-provisioned-groups-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. + */ + post: operations["enterprise-admin/provision-and-invite-enterprise-group"]; + }; + "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations["enterprise-admin/get-provisioning-information-for-enterprise-group"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + */ + put: operations["enterprise-admin/set-information-for-provisioned-enterprise-group"]; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + delete: operations["enterprise-admin/delete-scim-group-from-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + */ + patch: operations["enterprise-admin/update-attribute-for-enterprise-group"]; + }; + "/scim/v2/enterprises/{enterprise}/Users": { + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. + * + * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. + */ + get: operations["enterprise-admin/list-provisioned-identities-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * + * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. + */ + post: operations["enterprise-admin/provision-and-invite-enterprise-user"]; + }; + "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + get: operations["enterprise-admin/get-provisioning-information-for-enterprise-user"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + put: operations["enterprise-admin/set-information-for-provisioned-enterprise-user"]; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + delete: operations["enterprise-admin/delete-user-from-enterprise"]; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + patch: operations["enterprise-admin/update-attribute-for-enterprise-user"]; + }; + "/scim/v2/organizations/{org}/Users": { + /** + * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub organization. + * + * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. + */ + get: operations["scim/list-provisioned-identities"]; + /** Provision organization membership for a user, and send an activation email to the email address. */ + post: operations["scim/provision-and-invite-user"]; + }; + "/scim/v2/organizations/{org}/Users/{scim_user_id}": { + get: operations["scim/get-provisioning-information-for-user"]; + /** + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + put: operations["scim/set-information-for-provisioned-user"]; + delete: operations["scim/delete-user-from-org"]; + /** + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + patch: operations["scim/update-attribute-for-user"]; + }; + "/search/code": { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### Considerations for code search + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + */ + get: operations["search/code"]; + }; + "/search/commits": { + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match + * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + get: operations["search/commits"]; + }; + "/search/issues": { + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted + * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + get: operations["search/issues-and-pull-requests"]; + }; + "/search/labels": { + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + get: operations["search/labels"]; + }; + "/search/repositories": { + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * + * `q=tetris+language:assembly&sort=stars&order=desc` + * + * This query searches for repositories with the word `tetris` in the name, the description, or the README. The results are limited to repositories where the primary language is assembly. The results are sorted by stars in descending order, so that the most popular repositories appear first in the search results. + */ + get: operations["search/repos"]; + }; + "/search/topics": { + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://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": { + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + get: operations["search/users"]; + }; + "/teams/{team_id}": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + get: operations["teams/get-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + delete: operations["teams/delete-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + patch: operations["teams/update-legacy"]; + }; + "/teams/{team_id}/discussions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint. + * + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/list-discussion-comments-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["teams/get-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + delete: operations["teams/delete-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + patch: operations["teams/update-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-comment-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + */ + post: operations["reactions/create-for-team-discussion-comment-legacy"]; + }; + "/teams/{team_id}/discussions/{discussion_number}/reactions": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + get: operations["reactions/list-for-team-discussion-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + */ + post: operations["reactions/create-for-team-discussion-legacy"]; + }; + "/teams/{team_id}/invitations": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + get: operations["teams/list-pending-invitations-legacy"]; + }; + "/teams/{team_id}/members": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + get: operations["teams/list-members-legacy"]; + }; + "/teams/{team_id}/members/{username}": { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + get: operations["teams/get-member-legacy"]; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://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"]; + /** + * 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}": { + /** + * **Deprecation 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"]; + /** + * **Deprecation 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"]; + /** + * **Deprecation 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": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + get: operations["teams/list-projects-legacy"]; + }; + "/teams/{team_id}/projects/{project_id}": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + get: operations["teams/check-permissions-for-project-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + put: operations["teams/add-or-update-project-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + delete: operations["teams/remove-project-legacy"]; + }; + "/teams/{team_id}/repos": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + get: operations["teams/list-repos-legacy"]; + }; + "/teams/{team_id}/repos/{owner}/{repo}": { + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["teams/check-permissions-for-repo-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations["teams/add-or-update-repo-permissions-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + delete: operations["teams/remove-repo-legacy"]; + }; + "/teams/{team_id}/team-sync/group-mappings": { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + */ + get: operations["teams/list-idp-groups-for-legacy"]; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + */ + patch: operations["teams/create-or-update-idp-group-connections-legacy"]; + }; + "/teams/{team_id}/teams": { + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + get: operations["teams/list-child-legacy"]; + }; + "/user": { + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + get: operations["users/get-authenticated"]; + /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ + patch: operations["users/update-authenticated"]; + }; + "/user/blocks": { + /** List the users you've blocked on your personal account. */ + get: operations["users/list-blocked-by-authenticated-user"]; + }; + "/user/blocks/{username}": { + get: operations["users/check-blocked"]; + put: operations["users/block"]; + delete: operations["users/unblock"]; + }; + "/user/codespaces": { + /** + * Lists the authenticated user's codespaces. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have read access to the `codespaces` repository permission to use this endpoint. + */ + get: operations["codespaces/list-for-authenticated-user"]; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * 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": { + /** + * 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": { + /** + * 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}": { + /** + * 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"]; + /** + * 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 [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + put: operations["codespaces/create-or-update-secret-for-authenticated-user"]; + /** + * Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. + * + * You must authenticate using an access token with the `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 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"]; + /** + * 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}": { + /** + * 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"]; + /** + * 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}": { + /** + * 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"]; + /** + * 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"]; + /** + * 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": { + /** + * 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}": { + /** + * 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 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": { + /** + * 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": { + /** + * 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": { + /** Sets the visibility for your primary email addresses. */ + patch: operations["users/set-primary-email-visibility-for-authenticated-user"]; + }; + "/user/emails": { + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-emails-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + post: operations["users/add-email-for-authenticated-user"]; + /** This endpoint is accessible with the `user` scope. */ + delete: operations["users/delete-email-for-authenticated-user"]; + }; + "/user/followers": { + /** Lists the people following the authenticated user. */ + get: operations["users/list-followers-for-authenticated-user"]; + }; + "/user/following": { + /** Lists the people who the authenticated user follows. */ + get: operations["users/list-followed-by-authenticated-user"]; + }; + "/user/following/{username}": { + get: operations["users/check-person-is-followed-by-authenticated"]; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + put: operations["users/follow"]; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + delete: operations["users/unfollow"]; + }; + "/user/gpg_keys": { + /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-gpg-keys-for-authenticated-user"]; + /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-gpg-key-for-authenticated-user"]; + }; + "/user/gpg_keys/{gpg_key_id}": { + /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-gpg-key-for-authenticated-user"]; + /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-gpg-key-for-authenticated-user"]; + }; + "/user/installations": { + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + get: operations["apps/list-installations-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories": { + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + get: operations["apps/list-installation-repos-for-authenticated-user"]; + }; + "/user/installations/{installation_id}/repositories/{repository_id}": { + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + put: operations["apps/add-repo-to-installation-for-authenticated-user"]; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + delete: operations["apps/remove-repo-from-installation-for-authenticated-user"]; + }; + "/user/interaction-limits": { + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + get: operations["interactions/get-restrictions-for-authenticated-user"]; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + put: operations["interactions/set-restrictions-for-authenticated-user"]; + /** Removes any interaction restrictions from your public repositories. */ + delete: operations["interactions/remove-restrictions-for-authenticated-user"]; + }; + "/user/issues": { + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: operations["issues/list-for-authenticated-user"]; + }; + "/user/keys": { + /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/list-public-ssh-keys-for-authenticated-user"]; + /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + post: operations["users/create-public-ssh-key-for-authenticated-user"]; + }; + "/user/keys/{key_id}": { + /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + get: operations["users/get-public-ssh-key-for-authenticated-user"]; + /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + delete: operations["users/delete-public-ssh-key-for-authenticated-user"]; + }; + "/user/marketplace_purchases": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user"]; + }; + "/user/marketplace_purchases/stubbed": { + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + get: operations["apps/list-subscriptions-for-authenticated-user-stubbed"]; + }; + "/user/memberships/orgs": { + get: operations["orgs/list-memberships-for-authenticated-user"]; + }; + "/user/memberships/orgs/{org}": { + get: operations["orgs/get-membership-for-authenticated-user"]; + patch: operations["orgs/update-membership-for-authenticated-user"]; + }; + "/user/migrations": { + /** Lists all migrations a user has started. */ + get: operations["migrations/list-for-authenticated-user"]; + /** Initiates the generation of a user migration archive. */ + post: operations["migrations/start-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}": { + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + get: operations["migrations/get-status-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/archive": { + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + get: operations["migrations/get-archive-for-authenticated-user"]; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + delete: operations["migrations/delete-archive-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repos/{repo_name}/lock": { + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ + delete: operations["migrations/unlock-repo-for-authenticated-user"]; + }; + "/user/migrations/{migration_id}/repositories": { + /** Lists all the repositories for this user migration. */ + get: operations["migrations/list-repos-for-authenticated-user"]; + }; + "/user/orgs": { + /** + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + get: operations["orgs/list-for-authenticated-user"]; + }; + "/user/packages": { + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}": { + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-authenticated-user"]; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/restore": { + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-authenticated-user"]; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + delete: operations["packages/delete-package-version-for-authenticated-user"]; + }; + "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + post: operations["packages/restore-package-version-for-authenticated-user"]; + }; + "/user/projects": { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + post: operations["projects/create-for-authenticated-user"]; + }; + "/user/public_emails": { + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + get: operations["users/list-public-emails-for-authenticated-user"]; + }; + "/user/repos": { + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + get: operations["repos/list-for-authenticated-user"]; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. 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": { + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + get: operations["repos/list-invitations-for-authenticated-user"]; + }; + "/user/repository_invitations/{invitation_id}": { + delete: operations["repos/decline-invitation-for-authenticated-user"]; + patch: operations["repos/accept-invitation-for-authenticated-user"]; + }; + "/user/starred": { + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["activity/list-repos-starred-by-authenticated-user"]; + }; + "/user/starred/{owner}/{repo}": { + get: operations["activity/check-repo-is-starred-by-authenticated-user"]; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations["activity/star-repo-for-authenticated-user"]; + delete: operations["activity/unstar-repo-for-authenticated-user"]; + }; + "/user/subscriptions": { + /** Lists repositories the authenticated user is watching. */ + get: operations["activity/list-watched-repos-for-authenticated-user"]; + }; + "/user/teams": { + /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + get: operations["teams/list-for-authenticated-user"]; + }; + "/users": { + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + get: operations["users/list"]; + }; + "/users/{username}": { + /** + * Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". + */ + get: operations["users/get-by-username"]; + }; + "/users/{username}/events": { + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-events-for-authenticated-user"]; + }; + "/users/{username}/events/orgs/{org}": { + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + get: operations["activity/list-org-events-for-authenticated-user"]; + }; + "/users/{username}/events/public": { + get: operations["activity/list-public-events-for-user"]; + }; + "/users/{username}/followers": { + /** Lists the people following the specified user. */ + get: operations["users/list-followers-for-user"]; + }; + "/users/{username}/following": { + /** Lists the people who the specified user follows. */ + get: operations["users/list-following-for-user"]; + }; + "/users/{username}/following/{target_user}": { + get: operations["users/check-following-for-user"]; + }; + "/users/{username}/gists": { + /** Lists public gists for the specified user: */ + get: operations["gists/list-for-user"]; + }; + "/users/{username}/gpg_keys": { + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + get: operations["users/list-gpg-keys-for-user"]; + }; + "/users/{username}/hovercard": { + /** + * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + get: operations["users/get-context-for-user"]; + }; + "/users/{username}/installation": { + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + get: operations["apps/get-user-installation"]; + }; + "/users/{username}/keys": { + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + get: operations["users/list-public-keys-for-user"]; + }; + "/users/{username}/orgs": { + /** + * List [public organization memberships](https://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": { + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/list-packages-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}": { + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-for-user"]; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/restore": { + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions": { + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-all-package-versions-for-package-owned-by-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": { + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + get: operations["packages/get-package-version-for-user"]; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + delete: operations["packages/delete-package-version-for-user"]; + }; + "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": { + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + post: operations["packages/restore-package-version-for-user"]; + }; + "/users/{username}/projects": { + get: operations["projects/list-for-user"]; + }; + "/users/{username}/received_events": { + /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ + get: operations["activity/list-received-events-for-user"]; + }; + "/users/{username}/received_events/public": { + get: operations["activity/list-received-public-events-for-user"]; + }; + "/users/{username}/repos": { + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + get: operations["repos/list-for-user"]; + }; + "/users/{username}/settings/billing/actions": { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-actions-billing-user"]; + }; + "/users/{username}/settings/billing/packages": { + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-github-packages-billing-user"]; + }; + "/users/{username}/settings/billing/shared-storage": { + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + get: operations["billing/get-shared-storage-billing-user"]; + }; + "/users/{username}/starred": { + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + get: operations["activity/list-repos-starred-by-user"]; + }; + "/users/{username}/subscriptions": { + /** Lists repositories a user is watching. */ + get: operations["activity/list-repos-watched-by-user"]; + }; + "/zen": { + /** Get a random sentence from the Zen of GitHub */ + get: operations["meta/get-zen"]; + }; + "/repos/{owner}/{repo}/compare/{base}...{head}": { + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + get: operations["repos/compare-commits"]; + }; +} + +export 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 Simple User + */ + "nullable-simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + }; + /** + * Basic Error + * @description Basic Error + */ + "basic-error": { + message?: string; + documentation_url?: string; + url?: string; + status?: string; + }; + /** + * Validation Error Simple + * @description Validation Error Simple + */ + "validation-error-simple": { + message: string; + documentation_url: string; + errors?: string[]; + }; + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + "webhook-config-url": string; + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + "webhook-config-content-type": string; + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + "webhook-config-secret": string; + "webhook-config-insecure-ssl": string | number; + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + "webhook-config": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + "hook-delivery-item": { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + }; + /** + * Scim Error + * @description Scim Error + */ + "scim-error": { + message?: string | null; + documentation_url?: string | null; + detail?: string | null; + status?: number; + scimType?: string | null; + schemas?: string[]; + }; + /** + * Validation Error + * @description Validation Error + */ + "validation-error": { + message: string; + documentation_url: string; + errors?: { + resource?: string; + field?: string; + message?: string; + code: string; + index?: number; + value?: (string | null) | (number | null) | (string[] | null); + }[]; + }; + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + "hook-delivery": { + /** + * @description Unique identifier of the delivery. + * @example 42 + */ + id: number; + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string; + /** + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string; + /** + * @description Whether the delivery is a redelivery. + * @example false + */ + redelivery: boolean; + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number; + /** + * @description Description of the status of the attempted delivery + * @example failed to connect + */ + status: string; + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number; + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string; + /** + * @description The type of activity for the event that triggered the delivery. + * @example opened + */ + action: string | null; + /** + * @description The id of the GitHub App installation associated with this event. + * @example 123 + */ + installation_id: number | null; + /** + * @description The id of the repository associated with this event. + * @example 123 + */ + repository_id: number | null; + /** + * @description The URL target of the delivery. + * @example https://www.example.com + */ + url?: string; + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null; + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null; + }; + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null; + /** @description The response payload received. */ + payload: string | null; + }; + }; + /** + * Simple User + * @description Simple User + */ + "simple-user": { + name?: string | null; + email?: string | null; + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string; + }; + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null; + /** + * Format: uri + * @example https://github.com/enterprises/octo-business + */ + html_url: string; + /** + * Format: uri + * @description The enterprise's website URL. + */ + website_url?: string | null; + /** + * @description Unique identifier of the enterprise + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string; + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string; + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null; + /** Format: uri */ + avatar_url: string; + }; + /** + * 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 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 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. + * @example 1 + */ + id: number; + account: + | (Partial & + Partial) + | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** + * Format: uri + * @example https://api.github.com/installations/1/access_tokens + */ + access_tokens_url: string; + /** + * Format: uri + * @example https://api.github.com/installation/repositories + */ + repositories_url: string; + /** + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 + */ + html_url: string; + /** @example 1 */ + app_id: number; + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number; + /** @example Organization */ + target_type: string; + permissions: components["schemas"]["app-permissions"]; + events: string[]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** @example github-actions */ + app_slug: string; + suspended_by: components["schemas"]["nullable-simple-user"]; + /** Format: date-time */ + suspended_at: string | null; + /** @example "test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com" */ + contact_email?: string | null; + }; + /** + * License Simple + * @description License Simple + */ + "nullable-license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + } | null; + /** + * Repository + * @description A git repository + */ + repository: { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + }; + /** + * Installation Token + * @description Authentication token for a GitHub App installed on a user or org. + */ + "installation-token": { + token: string; + expires_at: string; + permissions?: components["schemas"]["app-permissions"]; + /** @enum {string} */ + repository_selection?: "all" | "selected"; + repositories?: components["schemas"]["repository"][]; + /** @example README.md */ + single_file?: string; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + }; + /** + * Application Grant + * @description The authorization associated with an OAuth Access. + */ + "application-grant": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/applications/grants/1 + */ + url: string; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * @example [ + * "public_repo" + * ] + */ + scopes: string[]; + user?: components["schemas"]["nullable-simple-user"]; + }; + /** Scoped Installation */ + "nullable-scoped-installation": { + permissions: components["schemas"]["app-permissions"]; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: "all" | "selected"; + /** @example config.yaml */ + single_file_name: string | null; + /** @example true */ + has_multiple_single_files?: boolean; + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[]; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string; + account: components["schemas"]["simple-user"]; + } | null; + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number; + /** Format: uri */ + url: string; + /** @description A list of scopes that this authorization is in. */ + scopes: string[] | null; + token: string; + token_last_eight: string | null; + hashed_token: string | null; + app: { + client_id: string; + name: string; + /** Format: uri */ + url: string; + }; + note: string | null; + /** Format: uri */ + note_url: string | null; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + created_at: string; + fingerprint: string | null; + user?: components["schemas"]["nullable-simple-user"]; + installation?: components["schemas"]["nullable-scoped-installation"]; + /** Format: date-time */ + expires_at: string | null; + }; + /** + * Code Of Conduct + * @description Code Of Conduct + */ + "code-of-conduct": { + /** @example contributor_covenant */ + key: string; + /** @example Contributor Covenant */ + name: string; + /** + * Format: uri + * @example https://api.github.com/codes_of_conduct/contributor_covenant + */ + url: string; + /** + * @example # Contributor Covenant Code of Conduct + * + * ## Our Pledge + * + * In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + * + * ## Our Standards + * + * Examples of behavior that contributes to creating a positive environment include: + * + * * Using welcoming and inclusive language + * * Being respectful of differing viewpoints and experiences + * * Gracefully accepting constructive criticism + * * Focusing on what is best for the community + * * Showing empathy towards other community members + * + * Examples of unacceptable behavior by participants include: + * + * * The use of sexualized language or imagery and unwelcome sexual attention or advances + * * Trolling, insulting/derogatory comments, and personal or political attacks + * * Public or private harassment + * * Publishing others' private information, such as a physical or electronic address, without explicit permission + * * Other conduct which could reasonably be considered inappropriate in a professional setting + * + * ## Our Responsibilities + * + * Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response + * to any instances of unacceptable behavior. + * + * Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + * + * ## Scope + * + * This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, + * posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + * + * ## Enforcement + * + * Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + * + * Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + * + * ## Attribution + * + * This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + * + * [homepage]: http://contributor-covenant.org + * [version]: http://contributor-covenant.org/version/1/4/ + */ + body?: string; + /** Format: uri */ + html_url: 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; + }; + "actions-oidc-custom-issuer-policy-for-enterprise": { + /** + * @description Whether the enterprise customer requested a custom issuer URL. + * @example true + */ + include_enterprise_slug?: boolean; + }; + /** + * @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 Organization Simple + */ + "organization-simple": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + }; + "selected-actions": { + /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ + github_owned_allowed?: boolean; + /** @description Whether actions 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. + * @example 5 + */ + id: number; + /** + * @description The name of the runner. + * @example iMac + */ + name: string; + /** + * @description The Operating System of the runner. + * @example macos + */ + os: string; + /** + * @description The status of the runner. + * @example online + */ + status: string; + busy: boolean; + labels: components["schemas"]["runner-label"][]; + }; + /** + * Runner Application + * @description Runner Application + */ + "runner-application": { + os: string; + architecture: string; + download_url: string; + filename: string; + /** @description A short lived bearer token used to download the runner, if needed. */ + temp_download_token?: string; + sha256_checksum?: string; + }; + /** + * Authentication Token + * @description Authentication Token + */ + "authentication-token": { + /** + * @description The token used for authentication + * @example v1.1f699f1069f60xxx + */ + token: string; + /** + * Format: date-time + * @description The time this token expires + * @example 2016-07-11T22:14:10Z + */ + expires_at: string; + /** + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions?: { [key: string]: unknown }; + /** @description The repositories this token has access to */ + repositories?: components["schemas"]["repository"][]; + /** @example config.yaml */ + single_file?: string | null; + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection?: "all" | "selected"; + }; + "audit-log-event": { + /** @description The time the audit log event occurred, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + "@timestamp"?: number; + /** @description The name of the action that was performed, for example `user.login` or `repo.create`. */ + action?: string; + active?: boolean; + active_was?: boolean; + /** @description The actor who performed the action. */ + actor?: string; + /** @description The id of the actor who performed the action. */ + actor_id?: number; + actor_location?: { + country_name?: string; + }; + data?: { [key: string]: unknown }; + org_id?: number; + /** @description The username of the account being blocked. */ + blocked_user?: string; + business?: string; + config?: { [key: string]: unknown }[]; + config_was?: { [key: string]: unknown }[]; + content_type?: string; + /** @description The time the audit log event was recorded, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). */ + created_at?: number; + deploy_key_fingerprint?: string; + /** @description A unique identifier for an audit event. */ + _document_id?: string; + emoji?: string; + events?: { [key: string]: unknown }[]; + events_were?: { [key: string]: unknown }[]; + explanation?: string; + fingerprint?: string; + hook_id?: number; + limited_availability?: boolean; + message?: string; + name?: string; + old_user?: string; + openssh_public_key?: string; + org?: string; + previous_visibility?: string; + read_only?: boolean; + /** @description The name of the repository. */ + repo?: string; + /** @description The name of the repository. */ + repository?: string; + repository_public?: boolean; + target_login?: string; + team?: string; + /** @description The type of protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol?: number; + /** @description A human readable name for the protocol (for example, HTTP or SSH) used to transfer Git data. */ + transport_protocol_name?: string; + /** @description The user that was affected by the action performed (if available). */ + user?: string; + /** @description The repository visibility, for example `public` or `private`. */ + visibility?: string; + }; + /** @description The name of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-name": string; + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + "code-scanning-analysis-tool-guid": string | null; + /** + * @description State of a code scanning alert. + * @enum {string} + */ + "code-scanning-alert-state": "open" | "closed" | "dismissed" | "fixed"; + /** @description The security alert number. */ + "alert-number": number; + /** + * Format: date-time + * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-created-at": string; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "alert-updated-at": string; + /** + * Format: uri + * @description The REST API URL of the alert resource. + */ + "alert-url": string; + /** + * Format: uri + * @description The GitHub URL of the alert resource. + */ + "alert-html-url": string; + /** + * Format: uri + * @description The REST API URL for fetching the list of instances for an alert. + */ + "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`. + */ + "code-scanning-alert-fixed-at": string | null; + /** + * Format: date-time + * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "code-scanning-alert-dismissed-at": string | null; + /** + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. + * @enum {string|null} + */ + "code-scanning-alert-dismissed-reason": + | (null | "false positive" | "won't fix" | "used in tests") + | null; + /** @description The dismissal comment associated with the dismissal of the alert. */ + "code-scanning-alert-dismissed-comment": string | null; + "code-scanning-alert-rule": { + /** @description A unique identifier for the rule used to detect the alert. */ + id?: string | null; + /** @description The name of the rule used to detect the alert. */ + name?: string; + /** + * @description The severity of the alert. + * @enum {string|null} + */ + severity?: ("none" | "note" | "warning" | "error") | null; + /** + * @description The security severity of the alert. + * @enum {string|null} + */ + security_severity_level?: ("low" | "medium" | "high" | "critical") | null; + /** @description A short description of the rule used to detect the alert. */ + description?: string; + /** @description description of the rule used to detect the alert. */ + full_description?: string; + /** @description A set of tags applicable for the rule. */ + tags?: string[] | null; + /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ + help?: string | null; + }; + /** @description The version of the tool used to generate the code scanning analysis. */ + "code-scanning-analysis-tool-version": string | null; + "code-scanning-analysis-tool": { + name?: components["schemas"]["code-scanning-analysis-tool-name"]; + version?: components["schemas"]["code-scanning-analysis-tool-version"]; + guid?: components["schemas"]["code-scanning-analysis-tool-guid"]; + }; + /** + * @description The 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 Simple Repository + */ + "simple-repository": { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ + id: number; + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ + node_id: string; + /** + * @description The name of the repository. + * @example Hello-World + */ + name: string; + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ + full_name: string; + owner: components["schemas"]["simple-user"]; + /** @description Whether the repository is private. */ + private: boolean; + /** + * Format: uri + * @description The URL to view the repository on GitHub.com. + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** + * @description The repository description. + * @example This your first repo! + */ + description: string | null; + /** @description Whether the repository is a fork. */ + fork: boolean; + /** + * Format: uri + * @description The URL to get more information about the repository from the GitHub API. + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ + archive_url: string; + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ + assignees_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ + blobs_url: string; + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ + branches_url: string; + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ + collaborators_url: string; + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ + comments_url: string; + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ + commits_url: string; + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ + compare_url: string; + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ + contents_url: string; + /** + * Format: uri + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ + git_commits_url: string; + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ + git_refs_url: string; + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ + git_tags_url: string; + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ + issue_comment_url: string; + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ + issue_events_url: string; + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ + issues_url: string; + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ + keys_url: string; + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ + labels_url: string; + /** + * Format: uri + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ + milestones_url: string; + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ + notifications_url: string; + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ + pulls_url: string; + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ + releases_url: string; + /** + * Format: uri + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ + statuses_url: string; + /** + * Format: uri + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ + trees_url: string; + /** + * Format: uri + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + }; + "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"]["code-scanning-alert-fixed-at"]; + dismissed_by: components["schemas"]["nullable-simple-user"]; + dismissed_at: components["schemas"]["code-scanning-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"]; + }; + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + "nullable-alert-updated-at": string | null; + /** + * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @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": + | (null | "false_positive" | "wont_fix" | "revoked" | "used_in_tests") + | null; + "organization-secret-scanning-alert": { + number?: components["schemas"]["alert-number"]; + created_at?: components["schemas"]["alert-created-at"]; + updated_at?: components["schemas"]["nullable-alert-updated-at"]; + url?: components["schemas"]["alert-url"]; + html_url?: components["schemas"]["alert-html-url"]; + /** + * Format: uri + * @description The REST API URL of the code locations for this alert. + */ + locations_url?: string; + state?: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + /** + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + resolved_at?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + repository?: components["schemas"]["simple-repository"]; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + "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; + }; + }; + "advanced-security-active-committers-user": { + user_login: string; + /** @example 2021-11-03 */ + last_pushed_date: string; + }; + "advanced-security-active-committers-repository": { + /** @example octocat/Hello-World */ + name: string; + /** @example 25 */ + advanced_security_committers: number; + advanced_security_committers_breakdown: components["schemas"]["advanced-security-active-committers-user"][]; + }; + "advanced-security-active-committers": { + /** @example 25 */ + total_advanced_security_committers?: number; + /** @example 2 */ + total_count?: number; + repositories: components["schemas"]["advanced-security-active-committers-repository"][]; + }; + "packages-billing-usage": { + /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ + total_gigabytes_bandwidth_used: number; + /** @description Total paid storage space (GB) for GitHuub Packages. */ + total_paid_gigabytes_bandwidth_used: number; + /** @description Free storage space (GB) for GitHub Packages. */ + included_gigabytes_bandwidth: number; + }; + "combined-billing-usage": { + /** @description Numbers of days left in billing cycle. */ + days_left_in_billing_cycle: number; + /** @description Estimated storage space (GB) used in billing cycle. */ + estimated_paid_storage_for_month: number; + /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ + estimated_storage_for_month: number; + }; + /** + * Actor + * @description Actor + */ + actor: { + id: number; + login: string; + display_login?: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + avatar_url: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + "nullable-milestone": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + } | null; + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + "nullable-integration": { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number; + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string; + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string; + owner: components["schemas"]["nullable-simple-user"]; + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string; + /** @example The description of the app. */ + description: string | null; + /** + * Format: uri + * @example https://example.com + */ + external_url: string; + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string; + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string; + checks?: string; + metadata?: string; + contents?: string; + deployments?: string; + } & { [key: string]: string }; + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[]; + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number; + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string; + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string; + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null; + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string; + } | null; + /** + * author_association + * @description How the author is associated with the repository. + * @example OWNER + * @enum {string} + */ + "author-association": + | "COLLABORATOR" + | "CONTRIBUTOR" + | "FIRST_TIMER" + | "FIRST_TIME_CONTRIBUTOR" + | "MANNEQUIN" + | "MEMBER" + | "NONE" + | "OWNER"; + /** Reaction Rollup */ + "reaction-rollup": { + /** Format: uri */ + url: string; + total_count: number; + "+1": number; + "-1": number; + laugh: number; + confused: number; + heart: number; + hooray: number; + eyes: number; + rocket: number; + }; + /** + * Issue + * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. + */ + issue: { + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue + * @example https://api.github.com/repositories/42/issues/1 + */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + /** + * @description Number uniquely identifying the issue within its repository + * @example 42 + */ + number: number; + /** + * @description State of the issue; either 'open' or 'closed' + * @example open + */ + state: string; + /** + * @description The reason for the current state + * @example not_planned + */ + state_reason?: string | null; + /** + * @description Title of the issue + * @example Widget creation fails in Safari on OS X 10.8 + */ + title: string; + /** + * @description Contents of the issue + * @example It looks like the new widget form is broken on Safari. When I try and create the widget, Safari crashes. This is reproducible on 10.8, but not 10.9. Maybe a browser bug? + */ + body?: string | null; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description Labels to associate with this issue; pass one or more label names to replace the set of labels on this issue; send an empty array to clear all labels from the issue; note that the labels are silently dropped for users without push access to the repository + * @example [ + * "bug", + * "registration" + * ] + */ + labels: ( + | string + | { + /** Format: int64 */ + id?: number; + node_id?: string; + /** Format: uri */ + url?: string; + name?: string; + description?: string | null; + color?: string | null; + default?: boolean; + } + )[]; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + milestone: components["schemas"]["nullable-milestone"]; + locked: boolean; + active_lock_reason?: string | null; + comments: number; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + /** Format: date-time */ + closed_at: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + draft?: boolean; + closed_by?: components["schemas"]["nullable-simple-user"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + repository?: components["schemas"]["repository"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + author_association: components["schemas"]["author-association"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Issue Comment + * @description Comments provide a way for people to collaborate on an issue. + */ + "issue-comment": { + /** + * @description Unique identifier of the issue comment + * @example 42 + */ + id: number; + node_id: string; + /** + * Format: uri + * @description URL for the issue comment + * @example https://api.github.com/repositories/42/issues/comments/1 + */ + url: string; + /** + * @description Contents of the issue comment + * @example What version of Safari were you using when you observed this bug? + */ + body?: string; + body_text?: string; + body_html?: string; + /** Format: uri */ + html_url: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** Format: uri */ + issue_url: string; + author_association: components["schemas"]["author-association"]; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Event + * @description Event + */ + event: { + id: string; + type: string | null; + actor: components["schemas"]["actor"]; + repo: { + id: number; + name: string; + /** Format: uri */ + url: string; + }; + org?: components["schemas"]["actor"]; + payload: { + action?: string; + issue?: components["schemas"]["issue"]; + comment?: components["schemas"]["issue-comment"]; + pages?: { + page_name?: string; + title?: string; + summary?: string | null; + action?: string; + sha?: string; + html_url?: string; + }[]; + }; + public: boolean; + /** Format: date-time */ + created_at: string | null; + }; + /** + * Link With Type + * @description Hypermedia Link with Type + */ + "link-with-type": { + href: string; + type: string; + }; + /** + * Feed + * @description Feed + */ + feed: { + /** @example https://github.com/timeline */ + timeline_url: string; + /** @example https://github.com/{user} */ + user_url: string; + /** @example https://github.com/octocat */ + current_user_public_url?: string; + /** @example https://github.com/octocat.private?token=abc123 */ + current_user_url?: string; + /** @example https://github.com/octocat.private.actor?token=abc123 */ + current_user_actor_url?: string; + /** @example https://github.com/octocat-org */ + current_user_organization_url?: string; + /** + * @example [ + * "https://github.com/organizations/github/octocat.private.atom?token=abc123" + * ] + */ + current_user_organization_urls?: string[]; + /** @example https://github.com/security-advisories */ + security_advisories_url?: string; + _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"][]; + }; + }; + /** + * Base Gist + * @description Base Gist + */ + "base-gist": { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + }; + /** + * Public User + * @description Public User + */ + "public-user": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + events_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + site_admin: boolean; + name: string | null; + company: string | null; + blog: string | null; + location: string | null; + /** Format: email */ + email: string | null; + hireable: boolean | null; + bio: string | null; + twitter_username?: string | null; + public_repos: number; + public_gists: number; + followers: number; + following: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + /** @example 1 */ + private_gists?: number; + /** @example 2 */ + total_private_repos?: number; + /** @example 2 */ + owned_private_repos?: number; + /** @example 1 */ + disk_usage?: number; + /** @example 3 */ + collaborators?: number; + }; + /** + * Gist History + * @description Gist History + */ + "gist-history": { + user?: components["schemas"]["nullable-simple-user"]; + version?: string; + /** Format: date-time */ + committed_at?: string; + change_status?: { + total?: number; + additions?: number; + deletions?: number; + }; + /** Format: uri */ + url?: string; + }; + /** + * Gist Simple + * @description Gist Simple + */ + "gist-simple": { + /** @deprecated */ + forks?: + | { + id?: string; + /** Format: uri */ + url?: string; + user?: components["schemas"]["public-user"]; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + }[] + | null; + /** @deprecated */ + history?: components["schemas"]["gist-history"][] | null; + /** + * Gist + * @description Gist + */ + fork_of?: { + /** Format: uri */ + url: string; + /** Format: uri */ + forks_url: string; + /** Format: uri */ + commits_url: string; + id: string; + node_id: string; + /** Format: uri */ + git_pull_url: string; + /** Format: uri */ + git_push_url: string; + /** Format: uri */ + html_url: string; + files: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + }; + }; + public: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + description: string | null; + comments: number; + user: components["schemas"]["nullable-simple-user"]; + /** Format: uri */ + comments_url: string; + owner?: components["schemas"]["nullable-simple-user"]; + truncated?: boolean; + forks?: unknown[]; + history?: unknown[]; + } | null; + url?: string; + forks_url?: string; + commits_url?: string; + id?: string; + node_id?: string; + git_pull_url?: string; + git_push_url?: string; + html_url?: string; + files?: { + [key: string]: { + filename?: string; + type?: string; + language?: string; + raw_url?: string; + size?: number; + truncated?: boolean; + content?: string; + } | null; + }; + public?: boolean; + created_at?: string; + updated_at?: string; + description?: string | null; + comments?: number; + user?: string | null; + comments_url?: string; + owner?: components["schemas"]["simple-user"]; + truncated?: boolean; + }; + /** + * Gist Comment + * @description A comment made to a gist. + */ + "gist-comment": { + /** @example 1 */ + id: number; + /** @example MDExOkdpc3RDb21tZW50MQ== */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + */ + url: string; + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-18T23:23:56Z + */ + updated_at: string; + author_association: components["schemas"]["author-association"]; + }; + /** + * Gist Commit + * @description Gist Commit + */ + "gist-commit": { + /** + * Format: uri + * @example https://api.github.com/gists/aa5a315d61ae9438b18d/57a7f021a713b1c5a6a199b54cc514735d2d462f + */ + url: string; + /** @example 57a7f021a713b1c5a6a199b54cc514735d2d462f */ + version: string; + user: components["schemas"]["nullable-simple-user"]; + change_status: { + total?: number; + additions?: number; + deletions?: number; + }; + /** + * Format: date-time + * @example 2010-04-14T02:15:15Z + */ + committed_at: string; + }; + /** + * Gitignore Template + * @description Gitignore Template + */ + "gitignore-template": { + /** @example C */ + name: string; + /** + * @example # Object files + * *.o + * + * # Libraries + * *.lib + * *.a + * + * # Shared objects (inc. Windows DLLs) + * *.dll + * *.so + * *.so.* + * *.dylib + * + * # Executables + * *.exe + * *.out + * *.app + */ + source: string; + }; + /** + * License Simple + * @description License Simple + */ + "license-simple": { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MIT */ + spdx_id: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** Format: uri */ + html_url?: string; + }; + /** + * License + * @description License + */ + license: { + /** @example mit */ + key: string; + /** @example MIT License */ + name: string; + /** @example MIT */ + spdx_id: string | null; + /** + * Format: uri + * @example https://api.github.com/licenses/mit + */ + url: string | null; + /** @example MDc6TGljZW5zZW1pdA== */ + node_id: string; + /** + * Format: uri + * @example http://choosealicense.com/licenses/mit/ + */ + html_url: string; + /** @example A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty. */ + description: string; + /** @example Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. */ + implementation: string; + /** + * @example [ + * "commercial-use", + * "modifications", + * "distribution", + * "sublicense", + * "private-use" + * ] + */ + permissions: string[]; + /** + * @example [ + * "include-copyright" + * ] + */ + conditions: string[]; + /** + * @example [ + * "no-liability" + * ] + */ + limitations: string[]; + /** + * @example + * + * The MIT License (MIT) + * + * Copyright (c) [year] [fullname] + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + body: string; + /** @example true */ + featured: boolean; + }; + /** + * Marketplace Listing Plan + * @description Marketplace Listing Plan + */ + "marketplace-listing-plan": { + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/marketplace_listing/plans/1313/accounts + */ + accounts_url: string; + /** @example 1313 */ + id: number; + /** @example 3 */ + number: number; + /** @example Pro */ + name: string; + /** @example A professional-grade CI solution */ + description: string; + /** @example 1099 */ + monthly_price_in_cents: number; + /** @example 11870 */ + yearly_price_in_cents: number; + /** @example flat-rate */ + price_model: string; + /** @example true */ + has_free_trial: boolean; + unit_name: string | null; + /** @example published */ + state: string; + /** + * @example [ + * "Up to 25 private repositories", + * "11 concurrent builds" + * ] + */ + bullets: string[]; + }; + /** + * Marketplace Purchase + * @description Marketplace Purchase + */ + "marketplace-purchase": { + url: string; + type: string; + id: number; + login: string; + organization_billing_email?: string; + email?: string | null; + marketplace_pending_change?: { + is_installed?: boolean; + effective_date?: string; + unit_count?: number | null; + id?: number; + plan?: components["schemas"]["marketplace-listing-plan"]; + } | null; + marketplace_purchase: { + billing_cycle?: string; + next_billing_date?: string | null; + is_installed?: boolean; + unit_count?: number | null; + on_free_trial?: boolean; + free_trial_ends_on?: string | null; + updated_at?: string; + plan?: components["schemas"]["marketplace-listing-plan"]; + }; + }; + /** + * Api Overview + * @description Api Overview + */ + "api-overview": { + /** @example true */ + verifiable_password_authentication: boolean; + ssh_key_fingerprints?: { + SHA256_RSA?: string; + SHA256_DSA?: string; + SHA256_ECDSA?: string; + SHA256_ED25519?: string; + }; + /** + * @example [ + * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" + * ] + */ + ssh_keys?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + hooks?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + web?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + api?: string[]; + /** + * @example [ + * "127.0.0.1/32" + * ] + */ + git?: string[]; + /** + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] + */ + packages?: string[]; + /** + * @example [ + * "192.30.252.153/32", + * "192.30.252.154/32" + * ] + */ + pages?: string[]; + /** + * @example [ + * "54.158.161.132", + * "54.226.70.38" + * ] + */ + importer?: string[]; + /** + * @example [ + * "13.64.0.0/16", + * "13.65.0.0/16" + * ] + */ + actions?: string[]; + /** + * @example [ + * "192.168.7.15/32", + * "192.168.7.16/32" + * ] + */ + dependabot?: string[]; + }; + /** + * Repository + * @description A git repository + */ + "nullable-repository": { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + license: components["schemas"]["nullable-license-simple"]; + organization?: components["schemas"]["nullable-simple-user"]; + forks: number; + permissions?: { + admin: boolean; + pull: boolean; + triage?: boolean; + push: boolean; + maintain?: boolean; + }; + owner: components["schemas"]["simple-user"]; + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string; + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string; + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null; + language: string | null; + /** @example 9 */ + forks_count: number; + /** @example 80 */ + stargazers_count: number; + /** @example 80 */ + watchers_count: number; + /** @example 108 */ + size: number; + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string; + /** @example 0 */ + open_issues_count: number; + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean; + topics?: string[]; + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean; + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean; + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean; + has_pages: boolean; + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean; + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null; + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean; + template_repository?: { + id?: number; + node_id?: string; + name?: string; + full_name?: string; + owner?: { + login?: string; + id?: number; + node_id?: string; + avatar_url?: string; + gravatar_id?: string; + url?: string; + html_url?: string; + followers_url?: string; + following_url?: string; + gists_url?: string; + starred_url?: string; + subscriptions_url?: string; + organizations_url?: string; + repos_url?: string; + events_url?: string; + received_events_url?: string; + type?: string; + site_admin?: boolean; + }; + 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; + allow_merge_commit?: boolean; + subscribers_count?: number; + network_count?: number; + } | null; + temp_clone_token?: string; + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean; + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean; + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean; + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean; + /** + * @description Whether a squash merge commit can use the pull request title as default. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean; + /** @description Whether to allow forking this repo */ + allow_forking?: boolean; + subscribers_count?: number; + network_count?: number; + open_issues: number; + watchers: number; + master_branch?: string; + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string; + } | null; + /** + * Minimal Repository + * @description Minimal Repository + */ + "minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + }; + /** + * Thread + * @description Thread + */ + thread: { + id: string; + repository: components["schemas"]["minimal-repository"]; + subject: { + title: string; + url: string; + latest_comment_url: string; + type: string; + }; + reason: string; + unread: boolean; + updated_at: string; + last_read_at: string | null; + url: string; + /** @example https://api.github.com/notifications/threads/2/subscription */ + subscription_url: string; + }; + /** + * Thread Subscription + * @description Thread Subscription + */ + "thread-subscription": { + /** @example true */ + subscribed: boolean; + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string | null; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/notifications/threads/1 + */ + thread_url?: string; + /** + * Format: uri + * @example https://api.github.com/repos/1 + */ + repository_url?: string; + }; + /** + * Organization Custom Repository Role + * @description Custom repository roles created by organization administrators + */ + "organization-custom-repository-role": { + id: number; + name: string; + }; + /** + * Organization Full + * @description Organization Full + */ + "organization-full": { + /** @example github */ + login: string; + /** @example 1 */ + id: number; + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string; + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string; + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string; + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string; + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string; + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string; + /** @example A great organization */ + description: string | null; + /** @example github */ + name?: string; + /** @example GitHub */ + company?: string; + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string; + /** @example San Francisco */ + location?: string; + /** + * Format: email + * @example octocat@github.com + */ + email?: string; + /** @example github */ + twitter_username?: string | null; + /** @example true */ + is_verified?: boolean; + /** @example true */ + has_organization_projects: boolean; + /** @example true */ + has_repository_projects: boolean; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** @example Organization */ + type: string; + /** @example 100 */ + total_private_repos?: number; + /** @example 100 */ + owned_private_repos?: number; + /** @example 81 */ + private_gists?: number | null; + /** @example 10000 */ + disk_usage?: number | null; + /** @example 8 */ + collaborators?: number | null; + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null; + plan?: { + name: string; + space: number; + private_repos: number; + filled_seats?: number; + seats?: number; + }; + default_repository_permission?: string | null; + /** @example true */ + members_can_create_repositories?: boolean | null; + /** @example true */ + two_factor_requirement_enabled?: boolean | null; + /** @example all */ + members_allowed_repository_creation_type?: string; + /** @example true */ + members_can_create_public_repositories?: boolean; + /** @example true */ + members_can_create_private_repositories?: boolean; + /** @example true */ + members_can_create_internal_repositories?: boolean; + /** @example true */ + members_can_create_pages?: boolean; + /** @example true */ + members_can_create_public_pages?: boolean; + /** @example true */ + members_can_create_private_pages?: boolean; + /** @example false */ + members_can_fork_private_repositories?: boolean | null; + /** Format: date-time */ + updated_at: string; + }; + /** + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + "actions-cache-usage-by-repository": { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string; + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number; + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number; + }; + /** + * Actions OIDC Subject customization + * @description Actions OIDC Subject customization + */ + "oidc-custom-sub": { + include_claim_keys: string[]; + }; + /** + * Empty Object + * @description An object without any properties. + */ + "empty-object": { [key: string]: unknown }; + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. + * @enum {string} + */ + "enabled-repositories": "all" | "none" | "selected"; + "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. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * ActionsPublicKey + * @description The public key used for setting Actions Secrets. + */ + "actions-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + /** @example 2 */ + id?: number; + /** @example https://api.github.com/user/keys/2 */ + url?: string; + /** @example ssh-rsa AAAAB3NzaC1yc2EAAA */ + title?: string; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + }; + /** + * Codespace machine + * @description A description of the machine powering a codespace. + */ + "nullable-codespace-machine": { + /** + * @description The name of the machine. + * @example standardLinux + */ + name: string; + /** + * @description The display name of the machine includes cores, memory, and storage. + * @example 4 cores, 8 GB RAM, 64 GB storage + */ + display_name: string; + /** + * @description The operating system of the machine. + * @example linux + */ + operating_system: string; + /** + * @description How much storage is available to the codespace. + * @example 68719476736 + */ + storage_in_bytes: number; + /** + * @description How much memory is available to the codespace. + * @example 8589934592 + */ + memory_in_bytes: number; + /** + * @description How many cores are available to the codespace. + * @example 4 + */ + cpus: number; + /** + * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value will be "none" if no prebuild is available. Latest values "ready" and "in_progress" indicate the prebuild availability status. + * @example ready + * @enum {string|null} + */ + prebuild_availability: ("none" | "ready" | "in_progress") | null; + } | null; + /** + * Codespace + * @description A codespace. + */ + codespace: { + /** @example 1 */ + id: number; + /** + * @description Automatically generated name of this codespace. + * @example monalisa-octocat-hello-world-g4wpq6h95q + */ + name: string; + /** + * @description Display name for this codespace. + * @example bookish space pancake + */ + display_name?: string | null; + /** + * @description UUID identifying this codespace's environment. + * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 + */ + environment_id: string | null; + owner: components["schemas"]["simple-user"]; + billable_owner: components["schemas"]["simple-user"]; + repository: components["schemas"]["minimal-repository"]; + machine: components["schemas"]["nullable-codespace-machine"]; + /** + * @description Path to devcontainer.json from repo root used to create Codespace. + * @example .devcontainer/example/devcontainer.json + */ + devcontainer_path?: string | null; + /** + * @description Whether the codespace was created from a prebuild. + * @example false + */ + prebuild: boolean | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @description Last known time this codespace was started. + * @example 2011-01-26T19:01:12Z + */ + last_used_at: string; + /** + * @description State of this codespace. + * @example Available + * @enum {string} + */ + state: + | "Unknown" + | "Created" + | "Queued" + | "Provisioning" + | "Available" + | "Awaiting" + | "Unavailable" + | "Deleted" + | "Moved" + | "Shutdown" + | "Archived" + | "Starting" + | "ShuttingDown" + | "Failed" + | "Exporting" + | "Updating" + | "Rebuilding"; + /** + * Format: uri + * @description API URL for this codespace. + */ + url: string; + /** @description Details about the codespace's git repository. */ + git_status: { + /** + * @description The number of commits the local repository is ahead of the remote. + * @example 0 + */ + ahead?: number; + /** + * @description The number of commits the local repository is behind the remote. + * @example 0 + */ + behind?: number; + /** @description Whether the local repository has unpushed changes. */ + has_unpushed_changes?: boolean; + /** @description Whether the local repository has uncommitted changes. */ + has_uncommitted_changes?: boolean; + /** + * @description The current branch (or SHA if in detached HEAD state) of the local repository. + * @example main + */ + ref?: string; + }; + /** + * @description The Azure region where this codespace is located. + * @example WestUs2 + * @enum {string} + */ + location: "EastUs" | "SouthEastAsia" | "WestEurope" | "WestUs2"; + /** + * @description The number of minutes of inactivity after which this codespace will be automatically stopped. + * @example 60 + */ + idle_timeout_minutes: number | null; + /** + * Format: uri + * @description URL to access this codespace on the web. + */ + web_url: string; + /** + * Format: uri + * @description API URL to access available alternate machine types for this codespace. + */ + machines_url: string; + /** + * Format: uri + * @description API URL to start this codespace. + */ + start_url: string; + /** + * Format: uri + * @description API URL to stop this codespace. + */ + stop_url: string; + /** + * Format: uri + * @description API URL for the Pull Request associated with this codespace, if any. + */ + pulls_url: string | null; + recent_folders: string[]; + runtime_constraints?: { + /** @description The privacy settings a user can select from when forwarding a port. */ + allowed_port_privacy_settings?: string[] | null; + }; + /** @description Whether or not a codespace has a pending async operation. This would mean that the codespace is temporarily unavailable. The only thing that you can do with a codespace in this state is delete it. */ + pending_operation?: boolean | null; + /** @description Text to show user when codespace is disabled by a pending operation */ + pending_operation_disabled_reason?: string | null; + /** @description Text to show user when codespace idle timeout minutes has been overriden by an organization policy */ + idle_timeout_notice?: string | null; + }; + /** + * Credential Authorization + * @description Credential Authorization + */ + "credential-authorization": { + /** + * @description User login that owns the underlying credential. + * @example monalisa + */ + login: string; + /** + * @description Unique identifier for the credential. + * @example 1 + */ + credential_id: number; + /** + * @description Human-readable description of the credential type. + * @example SSH Key + */ + credential_type: string; + /** + * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. + * @example 12345678 + */ + token_last_eight?: string; + /** + * Format: date-time + * @description Date when the credential was authorized for use. + * @example 2011-01-26T19:06:43Z + */ + credential_authorized_at: string; + /** + * @description List of oauth scopes the token has been granted. + * @example [ + * "user", + * "repo" + * ] + */ + scopes?: string[]; + /** + * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. + * @example jklmnop12345678 + */ + fingerprint?: string; + /** + * Format: date-time + * @description Date when the credential was last accessed. May be null if it was never accessed + * @example 2011-01-26T19:06:43Z + */ + credential_accessed_at: string | null; + /** @example 12345678 */ + authorized_credential_id: number | null; + /** + * @description The title given to the ssh key. This will only be present when the credential is an ssh key. + * @example my ssh key + */ + authorized_credential_title?: string | null; + /** + * @description The note given to the token. This will only be present when the credential is a token. + * @example my token + */ + authorized_credential_note?: string | null; + /** + * Format: date-time + * @description The expiry for the token. This will only be present when the credential is a token. + */ + authorized_credential_expires_at?: string | null; + }; + /** + * Dependabot Secret for an Organization + * @description Secrets for GitHub Dependabot for an organization. + */ + "organization-dependabot-secret": { + /** + * @description The name of the secret. + * @example SECRET_TOKEN + */ + name: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** + * @description Visibility of a secret + * @enum {string} + */ + visibility: "all" | "private" | "selected"; + /** + * Format: uri + * @example https://api.github.com/organizations/org/dependabot/secrets/my_secret/repositories + */ + selected_repositories_url?: string; + }; + /** + * DependabotPublicKey + * @description The public key used for setting Dependabot Secrets. + */ + "dependabot-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * ExternalGroup + * @description Information about an external group's usage and its members + */ + "external-group": { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number; + /** + * @description The display name for the group + * @example group-azuread-test + */ + group_name: string; + /** + * @description The date when the group was last updated_at + * @example 2021-01-03 22:27:15:000 -700 + */ + updated_at?: string; + /** + * @description An array of teams linked to this group + * @example [ + * { + * "team_id": 1, + * "team_name": "team-test" + * }, + * { + * "team_id": 2, + * "team_name": "team-test2" + * } + * ] + */ + teams: { + /** + * @description The id for a team + * @example 1 + */ + team_id: number; + /** + * @description The name of the team + * @example team-test + */ + team_name: string; + }[]; + /** + * @description An array of external members linked to this group + * @example [ + * { + * "member_id": 1, + * "member_login": "mona-lisa_eocsaxrs", + * "member_name": "Mona Lisa", + * "member_email": "mona_lisa@github.com" + * }, + * { + * "member_id": 2, + * "member_login": "octo-lisa_eocsaxrs", + * "member_name": "Octo Lisa", + * "member_email": "octo_lisa@github.com" + * } + * ] + */ + members: { + /** + * @description The internal user ID of the identity + * @example 1 + */ + member_id: number; + /** + * @description The handle/login for the user + * @example mona-lisa_eocsaxrs + */ + member_login: string; + /** + * @description The user display name/profile name + * @example Mona Lisa + */ + member_name: string; + /** + * @description An email attached to a user + * @example mona_lisa@github.com + */ + member_email: string; + }[]; + }; + /** + * ExternalGroups + * @description A list of external groups available to be connected to a team + */ + "external-groups": { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + groups?: { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number; + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string; + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string; + }[]; + }; + /** + * Organization Invitation + * @description Organization Invitation + */ + "organization-invitation": { + id: number; + login: string | null; + email: string | null; + role: string; + created_at: string; + failed_at?: string | null; + failed_reason?: string | null; + inviter: components["schemas"]["simple-user"]; + team_count: number; + /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ + node_id: string; + /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ + invitation_teams_url: string; + }; + /** + * Org Hook + * @description Org Hook + */ + "org-hook": { + /** @example 1 */ + id: number; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries + */ + deliveries_url?: string; + /** @example web */ + name: string; + /** + * @example [ + * "push", + * "pull_request" + * ] + */ + events: string[]; + /** @example true */ + active: boolean; + config: { + /** @example "http://example.com/2" */ + url?: string; + /** @example "0" */ + insecure_ssl?: string; + /** @example "form" */ + content_type?: string; + /** @example "********" */ + secret?: string; + }; + /** + * Format: date-time + * @example 2011-09-06T20:39:23Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-09-06T17:26:27Z + */ + created_at: string; + type: string; + }; + /** + * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. + * @example collaborators_only + * @enum {string} + */ + "interaction-group": + | "existing_users" + | "contributors_only" + | "collaborators_only"; + /** + * Interaction Limits + * @description Interaction limit settings. + */ + "interaction-limit-response": { + limit: components["schemas"]["interaction-group"]; + /** @example repository */ + origin: string; + /** + * Format: date-time + * @example 2018-08-17T04:18:39Z + */ + expires_at: string; + }; + /** + * @description The duration of the interaction restriction. Default: `one_day`. + * @example one_month + * @enum {string} + */ + "interaction-expiry": + | "one_day" + | "three_days" + | "one_week" + | "one_month" + | "six_months"; + /** + * Interaction Restrictions + * @description Limit interactions to a specific type of user for a specified duration + */ + "interaction-limit": { + limit: components["schemas"]["interaction-group"]; + expiry?: components["schemas"]["interaction-expiry"]; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "nullable-team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + } | null; + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + team: { + id: number; + node_id: string; + name: string; + slug: string; + description: string | null; + privacy?: string; + permission: string; + permissions?: { + pull: boolean; + triage: boolean; + push: boolean; + maintain: boolean; + admin: boolean; + }; + /** Format: uri */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + members_url: string; + /** Format: uri */ + repositories_url: string; + parent: components["schemas"]["nullable-team-simple"]; + }; + /** + * Org Membership + * @description Org Membership + */ + "org-membership": { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string; + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: "active" | "pending"; + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: "admin" | "member" | "billing_manager"; + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string; + organization: components["schemas"]["organization-simple"]; + user: components["schemas"]["nullable-simple-user"]; + permissions?: { + can_create_repository: boolean; + }; + }; + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ + id: number; + owner: components["schemas"]["nullable-simple-user"]; + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string; + /** @example pending */ + state: string; + /** @example true */ + lock_repositories: boolean; + exclude_metadata: boolean; + exclude_git_data: boolean; + exclude_attachments: boolean; + exclude_releases: boolean; + exclude_owner_projects: boolean; + org_metadata_only: boolean; + repositories: components["schemas"]["repository"][]; + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + created_at: string; + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string; + node_id: string; + /** Format: uri */ + archive_url?: string; + exclude?: unknown[]; + }; + /** + * Minimal Repository + * @description Minimal Repository + */ + "nullable-minimal-repository": { + /** @example 1296269 */ + id: number; + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string; + /** @example Hello-World */ + name: string; + /** @example octocat/Hello-World */ + full_name: string; + owner: components["schemas"]["simple-user"]; + private: boolean; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string; + /** @example This your first repo! */ + description: string | null; + fork: boolean; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string; + git_url?: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string; + ssh_url?: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string; + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string; + clone_url?: string; + mirror_url?: string | null; + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string; + svn_url?: string; + homepage?: string | null; + language?: string | null; + forks_count?: number; + stargazers_count?: number; + watchers_count?: number; + size?: number; + default_branch?: string; + open_issues_count?: number; + is_template?: boolean; + topics?: string[]; + has_issues?: boolean; + has_projects?: boolean; + has_wiki?: boolean; + has_pages?: boolean; + has_downloads?: boolean; + archived?: boolean; + disabled?: boolean; + visibility?: string; + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null; + permissions?: { + admin?: boolean; + maintain?: boolean; + push?: boolean; + triage?: boolean; + pull?: boolean; + }; + /** @example admin */ + role_name?: string; + template_repository?: components["schemas"]["nullable-repository"]; + temp_clone_token?: string; + delete_branch_on_merge?: boolean; + subscribers_count?: number; + network_count?: number; + code_of_conduct?: components["schemas"]["code-of-conduct"]; + license?: { + key?: string; + name?: string; + spdx_id?: string; + url?: string; + node_id?: string; + } | null; + /** @example 0 */ + forks?: number; + /** @example 0 */ + open_issues?: number; + /** @example 0 */ + watchers?: number; + allow_forking?: boolean; + } | null; + /** + * Package + * @description A software package + */ + package: { + /** + * @description Unique identifier of the package. + * @example 1 + */ + id: number; + /** + * @description The name of the package. + * @example super-linter + */ + name: string; + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** @example https://api.github.com/orgs/github/packages/container/super-linter */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + html_url: string; + /** + * @description The number of versions of the package. + * @example 1 + */ + version_count: number; + /** + * @example private + * @enum {string} + */ + visibility: "private" | "public"; + owner?: components["schemas"]["nullable-simple-user"]; + repository?: components["schemas"]["nullable-minimal-repository"]; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Package Version + * @description A version of a software package + */ + "package-version": { + /** + * @description Unique identifier of the package version. + * @example 1 + */ + id: number; + /** + * @description The name of the package version. + * @example latest + */ + name: string; + /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ + url: string; + /** @example https://github.com/orgs/github/packages/container/package/super-linter */ + package_html_url: string; + /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ + html_url?: string; + /** @example MIT */ + license?: string; + description?: string; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + deleted_at?: string; + /** Package Version Metadata */ + metadata?: { + /** + * @example docker + * @enum {string} + */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** Container Metadata */ + container?: { + tags: string[]; + }; + /** Docker Metadata */ + docker?: { + tag?: string[]; + } & { + tags: unknown; + }; + }; + }; + /** + * Project + * @description Projects are a way to organize columns and cards of work. + */ + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string; + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string; + /** @example 1002604 */ + id: number; + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string; + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null; + /** @example 1 */ + number: number; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string; + creator: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean; + }; + /** + * GroupMapping + * @description External Groups to be mapped to a team for membership + */ + "group-mapping": { + /** + * @description Array of groups to be mapped to this team + * @example [ + * { + * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", + * "group_name": "saml-azuread-test", + * "group_description": "A group of Developers working on AzureAD SAML SSO" + * }, + * { + * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", + * "group_name": "saml-azuread-test2", + * "group_description": "Another group of Developers working on AzureAD SAML SSO" + * } + * ] + */ + groups?: { + /** + * @description The ID of the group + * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa + */ + group_id: string; + /** + * @description The name of the group + * @example saml-azuread-test + */ + group_name: string; + /** + * @description a description of the group + * @example A group of Developers working on AzureAD SAML SSO + */ + group_description: string; + /** + * @description synchronization status for this group mapping + * @example unsynced + */ + status?: string; + /** + * @description the time of the last sync for this group-mapping + * @example 2019-06-03 22:27:15:000 -700 + */ + synced_at?: string | null; + }[]; + }; + /** + * Full Team + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-full": { + /** + * @description Unique identifier of the team + * @example 42 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * @description Name of the team + * @example Developers + */ + name: string; + /** @example justice-league */ + slug: string; + /** @example A great team. */ + description: string | null; + /** + * @description The level of privacy this team should have + * @example closed + * @enum {string} + */ + privacy?: "closed" | "secret"; + /** + * @description Permission that the team will have for its repositories + * @example push + */ + permission: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + parent?: components["schemas"]["nullable-team-simple"]; + /** @example 3 */ + members_count: number; + /** @example 10 */ + repos_count: number; + /** + * Format: date-time + * @example 2017-07-14T16:53:42Z + */ + created_at: string; + /** + * Format: date-time + * @example 2017-08-17T12:37:15Z + */ + updated_at: string; + organization: components["schemas"]["organization-full"]; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Team Discussion + * @description A team discussion is a persistent record of a free-form conversation within a team. + */ + "team-discussion": { + author: components["schemas"]["nullable-simple-user"]; + /** + * @description The main text of the discussion. + * @example Please suggest improvements to our workflow in comments. + */ + body: string; + /** @example

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

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

Do you like apples?

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

comment body

" */ + body_html?: string; + /** @example "comment body" */ + body_text?: string; + }; + /** + * Timeline Line Commented Event + * @description Timeline Line Commented Event + */ + "timeline-line-commented-event": { + event?: string; + node_id?: string; + comments?: components["schemas"]["pull-request-review-comment"][]; + }; + /** + * Timeline Commit Commented Event + * @description Timeline Commit Commented Event + */ + "timeline-commit-commented-event": { + event?: string; + node_id?: string; + commit_id?: string; + comments?: components["schemas"]["commit-comment"][]; + }; + /** + * Timeline Assigned Issue Event + * @description Timeline Assigned Issue Event + */ + "timeline-assigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * Timeline Unassigned Issue Event + * @description Timeline Unassigned Issue Event + */ + "timeline-unassigned-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + assignee: components["schemas"]["simple-user"]; + }; + /** + * State Change Issue Event + * @description State Change Issue Event + */ + "state-change-issue-event": { + id: number; + node_id: string; + url: string; + actor: components["schemas"]["simple-user"]; + event: string; + commit_id: string | null; + commit_url: string | null; + created_at: string; + performed_via_github_app: components["schemas"]["nullable-integration"]; + state_reason?: string | null; + }; + /** + * Timeline Event + * @description Timeline Event + */ + "timeline-issue-events": Partial< + components["schemas"]["labeled-issue-event"] + > & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial & + Partial; + /** + * 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; + }; + /** + * Language + * @description Language + */ + language: { [key: string]: number }; + /** + * License Content + * @description License Content + */ + "license-content": { + name: string; + path: string; + sha: string; + size: number; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + git_url: string | null; + /** Format: uri */ + download_url: string | null; + type: string; + content: string; + encoding: string; + _links: { + /** Format: uri */ + git: string | null; + /** Format: uri */ + html: string | null; + /** Format: uri */ + self: string; + }; + license: components["schemas"]["nullable-license-simple"]; + }; + /** + * Merged upstream + * @description Results of a successful merge upstream request + */ + "merged-upstream": { + message?: string; + /** @enum {string} */ + merge_type?: "merge" | "fast-forward" | "none"; + base_branch?: string; + }; + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + milestone: { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + */ + labels_url: string; + /** @example 1002604 */ + id: number; + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string; + /** + * @description The number of the milestone. + * @example 42 + */ + number: number; + /** + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** + * @description The title of the milestone. + * @example v1.0 + */ + title: string; + /** @example Tracking milestone for version 1.0 */ + description: string | null; + creator: components["schemas"]["nullable-simple-user"]; + /** @example 4 */ + open_issues: number; + /** @example 8 */ + closed_issues: number; + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string; + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2013-02-12T13:22:01Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2012-10-09T23:39:01Z + */ + due_on: string | null; + }; + /** Pages Source Hash */ + "pages-source-hash": { + branch: string; + path: string; + }; + /** Pages Https Certificate */ + "pages-https-certificate": { + /** + * @example approved + * @enum {string} + */ + state: + | "new" + | "authorization_created" + | "authorization_pending" + | "authorized" + | "authorization_revoked" + | "issued" + | "uploaded" + | "approved" + | "errored" + | "bad_authz" + | "destroy_pending" + | "dns_changed"; + /** @example Certificate is approved */ + description: string; + /** + * @description Array of the domain set and its alternate name (if it is configured) + * @example [ + * "example.com", + * "www.example.com" + * ] + */ + domains: string[]; + /** Format: date */ + expires_at?: string; + }; + /** + * GitHub Pages + * @description The configuration for GitHub Pages for a repository. + */ + page: { + /** + * Format: uri + * @description The API address for accessing this Page resource. + * @example https://api.github.com/repos/github/hello-world/pages + */ + url: string; + /** + * @description The status of the most recent build of the Page. + * @example built + * @enum {string|null} + */ + status: ("built" | "building" | "errored") | null; + /** + * @description The Pages site's custom domain + * @example example.com + */ + cname: string | null; + /** + * @description The state if the domain is verified + * @example pending + * @enum {string|null} + */ + protected_domain_state?: ("pending" | "verified" | "unverified") | null; + /** + * Format: date-time + * @description The timestamp when a pending domain becomes unverified. + */ + pending_domain_unverified_at?: string | null; + /** + * @description Whether the Page has a custom 404 page. + * @default false + * @example false + */ + custom_404: boolean; + /** + * Format: uri + * @description The web address the Page can be accessed from. + * @example https://example.com + */ + html_url?: string; + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ("legacy" | "workflow") | null; + source?: components["schemas"]["pages-source-hash"]; + /** + * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. + * @example true + */ + public: boolean; + https_certificate?: components["schemas"]["pages-https-certificate"]; + /** + * @description Whether https is enabled on the domain + * @example true + */ + https_enforced?: boolean; + }; + /** + * Page Build + * @description Page Build + */ + "page-build": { + /** Format: uri */ + url: string; + status: string; + error: { + message: string | null; + }; + pusher: components["schemas"]["nullable-simple-user"]; + commit: string; + duration: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + }; + /** + * Page Build Status + * @description Page Build Status + */ + "page-build-status": { + /** + * Format: uri + * @example https://api.github.com/repos/github/hello-world/pages/builds/latest + */ + url: string; + /** @example queued */ + status: string; + }; + /** + * Pages Health Check Status + * @description Pages Health Check Status + */ + "pages-health-check": { + domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + }; + alt_domain?: { + host?: string; + uri?: string; + nameservers?: string; + dns_resolves?: boolean; + is_proxied?: boolean | null; + is_cloudflare_ip?: boolean | null; + is_fastly_ip?: boolean | null; + is_old_ip_address?: boolean | null; + is_a_record?: boolean | null; + has_cname_record?: boolean | null; + has_mx_records_present?: boolean | null; + is_valid_domain?: boolean; + is_apex_domain?: boolean; + should_be_a_record?: boolean | null; + is_cname_to_github_user_domain?: boolean | null; + is_cname_to_pages_dot_github_dot_com?: boolean | null; + is_cname_to_fastly?: boolean | null; + is_pointed_to_github_pages_ip?: boolean | null; + is_non_github_pages_ip_present?: boolean | null; + is_pages_domain?: boolean; + is_served_by_pages?: boolean | null; + is_valid?: boolean; + reason?: string | null; + responds_to_https?: boolean; + enforces_https?: boolean; + https_error?: string | null; + is_https_eligible?: boolean | null; + caa_error?: string | null; + } | null; + }; + /** + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + "team-simple": { + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number; + /** @example MDQ6VGVhbTE= */ + node_id: string; + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string; + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string; + /** + * @description Name of the team + * @example Justice League + */ + name: string; + /** + * @description Description of the team + * @example A great team. + */ + description: string | null; + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string; + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string; + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string; + /** @example justice-league */ + slug: string; + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string; + }; + /** + * Pull Request + * @description Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary. + */ + "pull-request": { + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347 + */ + url: string; + /** @example 1 */ + id: number; + /** @example MDExOlB1bGxSZXF1ZXN0MQ== */ + node_id: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347 + */ + html_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.diff + */ + diff_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1347.patch + */ + patch_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347 + */ + issue_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + */ + commits_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + */ + review_comments_url: string; + /** @example https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} */ + review_comment_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + */ + comments_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + */ + statuses_url: string; + /** + * @description Number uniquely identifying the pull request within its repository. + * @example 42 + */ + number: number; + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @example open + * @enum {string} + */ + state: "open" | "closed"; + /** @example true */ + locked: boolean; + /** + * @description The title of the pull request. + * @example Amazing new feature + */ + title: string; + user: components["schemas"]["nullable-simple-user"]; + /** @example Please pull these awesome changes */ + body: string | null; + labels: { + /** Format: int64 */ + id: number; + node_id: string; + url: string; + name: string; + description: string | null; + color: string; + default: boolean; + }[]; + milestone: components["schemas"]["nullable-milestone"]; + /** @example too heated */ + active_lock_reason?: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + updated_at: string; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + closed_at: string | null; + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + merged_at: string | null; + /** @example e5bd3914e2e596debea16f433f57875b5b90bcd6 */ + merge_commit_sha: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + assignees?: components["schemas"]["simple-user"][] | null; + requested_reviewers?: components["schemas"]["simple-user"][] | null; + requested_teams?: components["schemas"]["team-simple"][] | null; + head: { + label: string; + ref: string; + repo: { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: { + key: string; + name: string; + /** Format: uri */ + url: string | null; + spdx_id: string | null; + node_id: string; + } | null; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + is_template?: boolean; + } | null; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + base: { + label: string; + ref: string; + repo: { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + deployments_url: string; + description: string | null; + /** Format: uri */ + downloads_url: string; + /** Format: uri */ + events_url: string; + fork: boolean; + /** Format: uri */ + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + /** Format: uri */ + hooks_url: string; + /** Format: uri */ + html_url: string; + id: number; + is_template?: boolean; + node_id: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + merges_url: string; + milestones_url: string; + name: string; + notifications_url: string; + owner: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + private: boolean; + pulls_url: string; + releases_url: string; + /** Format: uri */ + stargazers_url: string; + statuses_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + /** Format: uri */ + tags_url: string; + /** Format: uri */ + teams_url: string; + trees_url: string; + /** Format: uri */ + url: string; + clone_url: string; + default_branch: string; + forks: number; + forks_count: number; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_projects: boolean; + has_wiki: boolean; + has_pages: boolean; + /** Format: uri */ + homepage: string | null; + language: string | null; + master_branch?: string; + archived: boolean; + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + /** Format: uri */ + mirror_url: string | null; + open_issues: number; + open_issues_count: number; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + license: components["schemas"]["nullable-license-simple"]; + /** Format: date-time */ + pushed_at: string; + size: number; + ssh_url: string; + stargazers_count: number; + /** Format: uri */ + svn_url: string; + topics?: string[]; + watchers: number; + watchers_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + allow_forking?: boolean; + }; + sha: string; + user: { + /** Format: uri */ + avatar_url: string; + events_url: string; + /** Format: uri */ + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string | null; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + login: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + received_events_url: string; + /** Format: uri */ + repos_url: string; + site_admin: boolean; + starred_url: string; + /** Format: uri */ + subscriptions_url: string; + type: string; + /** Format: uri */ + url: string; + }; + }; + _links: { + comments: components["schemas"]["link"]; + commits: components["schemas"]["link"]; + statuses: components["schemas"]["link"]; + html: components["schemas"]["link"]; + issue: components["schemas"]["link"]; + review_comments: components["schemas"]["link"]; + review_comment: components["schemas"]["link"]; + self: components["schemas"]["link"]; + }; + author_association: components["schemas"]["author-association"]; + auto_merge: components["schemas"]["auto-merge"]; + /** + * @description Indicates whether or not the pull request is a draft. + * @example false + */ + draft?: boolean; + merged: boolean; + /** @example true */ + mergeable: boolean | null; + /** @example true */ + rebaseable?: boolean | null; + /** @example clean */ + mergeable_state: string; + merged_by: components["schemas"]["nullable-simple-user"]; + /** @example 10 */ + comments: number; + /** @example 0 */ + review_comments: number; + /** + * @description Indicates whether maintainers can modify the pull request. + * @example true + */ + maintainer_can_modify: boolean; + /** @example 3 */ + commits: number; + /** @example 100 */ + additions: number; + /** @example 3 */ + deletions: number; + /** @example 5 */ + changed_files: number; + }; + /** + * Pull Request Merge Result + * @description Pull Request Merge Result + */ + "pull-request-merge-result": { + sha: string; + merged: boolean; + message: string; + }; + /** + * Pull Request Review Request + * @description Pull Request Review Request + */ + "pull-request-review-request": { + users: components["schemas"]["simple-user"][]; + teams: components["schemas"]["team"][]; + }; + /** + * Pull Request Review + * @description Pull Request Reviews are reviews on pull requests. + */ + "pull-request-review": { + /** + * @description Unique identifier of the review + * @example 42 + */ + id: number; + /** @example MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= */ + node_id: string; + user: components["schemas"]["nullable-simple-user"]; + /** + * @description The text of the review. + * @example This looks great. + */ + body: string; + /** @example CHANGES_REQUESTED */ + state: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/12 + */ + pull_request_url: string; + _links: { + html: { + href: string; + }; + pull_request: { + href: string; + }; + }; + /** Format: date-time */ + submitted_at?: string; + /** + * @description A commit SHA for the review. + * @example 54bb654c9e6025347f57900a4a5c2313a96b8035 + */ + 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 + * @example https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + */ + url: string; + /** @example 42 */ + pull_request_review_id: number | null; + /** @example 10 */ + id: number; + /** @example MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw */ + node_id: string; + /** @example @@ -16,33 +16,40 @@ public class Connection : IConnection... */ + diff_hunk: string; + /** @example file1.txt */ + path: string; + /** @example 1 */ + position: number | null; + /** @example 4 */ + original_position: number; + /** @example 6dcb09b5b57875f334f61aebed695e2e4193db5e */ + commit_id: string; + /** @example 9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840 */ + original_commit_id: string; + /** @example 8 */ + in_reply_to_id?: number; + user: components["schemas"]["nullable-simple-user"]; + /** @example Great stuff */ + body: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + created_at: string; + /** + * Format: date-time + * @example 2011-04-14T16:00:49Z + */ + updated_at: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/pull/1#discussion-diff-1 + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 + */ + pull_request_url: string; + author_association: components["schemas"]["author-association"]; + _links: { + self: components["schemas"]["link"]; + html: components["schemas"]["link"]; + pull_request: components["schemas"]["link"]; + }; + body_text?: string; + body_html?: string; + reactions?: components["schemas"]["reaction-rollup"]; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** + * @description The side of the first line of the range for a multi-line comment. + * @default RIGHT + * @enum {string|null} + */ + start_side?: ("LEFT" | "RIGHT") | null; + /** + * @description The line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + line?: number; + /** + * @description The original line of the blob to which the comment applies. The last line of the range for a multi-line comment + * @example 2 + */ + original_line?: number; + /** + * @description The first line of the range for a multi-line comment. + * @example 2 + */ + start_line?: number | null; + /** + * @description The original first line of the range for a multi-line comment. + * @example 2 + */ + original_start_line?: number | null; + }; + /** + * Release Asset + * @description Data related to a release. + */ + "release-asset": { + /** Format: uri */ + url: string; + /** Format: uri */ + browser_download_url: string; + id: number; + node_id: string; + /** + * @description The file name of the asset. + * @example Team Environment + */ + name: string; + label: string | null; + /** + * @description State of the release asset. + * @enum {string} + */ + state: "uploaded" | "open"; + content_type: string; + size: number; + download_count: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + uploader: components["schemas"]["nullable-simple-user"]; + }; + /** + * Release + * @description A release. + */ + release: { + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + assets_url: string; + upload_url: string; + /** Format: uri */ + tarball_url: string | null; + /** Format: uri */ + zipball_url: string | null; + id: number; + node_id: string; + /** + * @description The name of the tag. + * @example v1.0.0 + */ + tag_name: string; + /** + * @description Specifies the commitish value that determines where the Git tag is created from. + * @example master + */ + target_commitish: string; + name: string | null; + body?: string | null; + /** + * @description true to create a draft (unpublished) release, false to create a published one. + * @example false + */ + draft: boolean; + /** + * @description Whether to identify the release as a prerelease or a full release. + * @example false + */ + prerelease: boolean; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + published_at: string | null; + author: components["schemas"]["simple-user"]; + assets: components["schemas"]["release-asset"][]; + body_html?: string; + body_text?: string; + mentions_count?: number; + /** + * Format: uri + * @description The URL of the release discussion. + */ + discussion_url?: string; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Generated Release Notes Content + * @description Generated name and body describing a release + */ + "release-notes-content": { + /** + * @description The generated name of the release + * @example Release v1.0.0 is now available! + */ + name: string; + /** @description The generated body describing the contents of the release supporting markdown formatting */ + body: string; + }; + "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?: string | null; + resolved_by?: components["schemas"]["nullable-simple-user"]; + /** @description The type of secret that secret scanning detected. */ + secret_type?: string; + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string; + /** @description The secret that was detected. */ + secret?: string; + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null; + push_protection_bypassed_by?: components["schemas"]["nullable-simple-user"]; + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null; + }; + /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ + "secret-scanning-location-commit": { + /** + * @description The file path in the repository + * @example /example/secrets.txt + */ + path: string; + /** @description Line number at which the secret starts in the file */ + start_line: number; + /** @description Line number at which the secret ends in the file */ + end_line: number; + /** @description The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII */ + start_column: number; + /** @description The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII */ + end_column: number; + /** + * @description SHA-1 hash ID of the associated blob + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + blob_sha: string; + /** @description The API URL to get the associated blob resource */ + blob_url: string; + /** + * @description SHA-1 hash ID of the associated commit + * @example af5626b4a114abcb82d63db7c8082c3c4756e51b + */ + commit_sha: string; + /** @description The API URL to get the associated commit resource */ + commit_url: string; + }; + "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. + * @example commit + * @enum {string} + */ + type: "commit"; + details: components["schemas"]["secret-scanning-location-commit"]; + }; + /** + * Stargazer + * @description Stargazer + */ + stargazer: { + /** Format: date-time */ + starred_at: string; + user: components["schemas"]["nullable-simple-user"]; + }; + /** + * Code Frequency Stat + * @description Code Frequency Stat + */ + "code-frequency-stat": number[]; + /** + * Commit Activity + * @description Commit Activity + */ + "commit-activity": { + /** + * @example [ + * 0, + * 3, + * 26, + * 20, + * 39, + * 1, + * 0 + * ] + */ + days: number[]; + /** @example 89 */ + total: number; + /** @example 1336280400 */ + week: number; + }; + /** + * Contributor Activity + * @description Contributor Activity + */ + "contributor-activity": { + author: components["schemas"]["nullable-simple-user"]; + /** @example 135 */ + total: number; + /** + * @example [ + * { + * "w": "1367712000", + * "a": 6898, + * "d": 77, + * "c": 10 + * } + * ] + */ + weeks: { + w?: number; + a?: number; + d?: number; + c?: number; + }[]; + }; + /** Participation Stats */ + "participation-stats": { + all: number[]; + owner: number[]; + }; + /** + * Repository Invitation + * @description Repository invitations let you manage who you collaborate with. + */ + "repository-subscription": { + /** + * @description Determines if notifications should be received from this repository. + * @example true + */ + subscribed: boolean; + /** @description Determines if all notifications should be blocked from this repository. */ + ignored: boolean; + reason: string | null; + /** + * Format: date-time + * @example 2012-10-06T21:34:12Z + */ + created_at: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example/subscription + */ + url: string; + /** + * Format: uri + * @example https://api.github.com/repos/octocat/example + */ + repository_url: string; + }; + /** + * Tag + * @description Tag + */ + tag: { + /** @example v0.1 */ + name: string; + commit: { + sha: string; + /** Format: uri */ + url: string; + }; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/zipball/v0.1 + */ + zipball_url: string; + /** + * Format: uri + * @example https://github.com/octocat/Hello-World/tarball/v0.1 + */ + tarball_url: string; + node_id: string; + }; + /** + * Tag protection + * @description Tag protection + */ + "tag-protection": { + /** @example 2 */ + id?: number; + /** @example 2011-01-26T19:01:12Z */ + created_at?: string; + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string; + /** @example true */ + enabled?: boolean; + /** @example v1.* */ + pattern: string; + }; + /** + * Topic + * @description A topic aggregates entities that are related to a subject. + */ + topic: { + names: string[]; + }; + /** Traffic */ + traffic: { + /** Format: date-time */ + timestamp: string; + uniques: number; + count: number; + }; + /** + * Clone Traffic + * @description Clone Traffic + */ + "clone-traffic": { + /** @example 173 */ + count: number; + /** @example 128 */ + uniques: number; + clones: components["schemas"]["traffic"][]; + }; + /** + * Content Traffic + * @description Content Traffic + */ + "content-traffic": { + /** @example /github/hubot */ + path: string; + /** @example github/hubot: A customizable life embetterment robot. */ + title: string; + /** @example 3542 */ + count: number; + /** @example 2225 */ + uniques: number; + }; + /** + * Referrer Traffic + * @description Referrer Traffic + */ + "referrer-traffic": { + /** @example Google */ + referrer: string; + /** @example 4 */ + count: number; + /** @example 3 */ + uniques: number; + }; + /** + * View Traffic + * @description View Traffic + */ + "view-traffic": { + /** @example 14850 */ + count: number; + /** @example 3782 */ + uniques: number; + views: components["schemas"]["traffic"][]; + }; + "scim-group-list-enterprise": { + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: { + schemas: string[]; + id: string; + externalId?: string | null; + displayName?: string; + members?: { + value?: string; + $ref?: string; + display?: string; + }[]; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }[]; + }; + "scim-enterprise-group": { + schemas: string[]; + id: string; + externalId?: string | null; + displayName?: string; + members?: { + value?: string; + $ref?: string; + display?: string; + }[]; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }; + "scim-user-list-enterprise": { + schemas: string[]; + totalResults: number; + itemsPerPage: number; + startIndex: number; + Resources: { + schemas: string[]; + id: string; + externalId?: string; + userName?: string; + name?: { + givenName?: string; + familyName?: string; + }; + emails?: { + value?: string; + primary?: boolean; + type?: string; + }[]; + groups?: { + value?: string; + }[]; + active?: boolean; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }[]; + }; + "scim-enterprise-user": { + schemas: string[]; + id: string; + externalId?: string; + userName?: string; + name?: { + givenName?: string; + familyName?: string; + }; + emails?: { + value?: string; + type?: string; + primary?: boolean; + }[]; + groups?: { + value?: string; + }[]; + active?: boolean; + meta?: { + resourceType?: string; + created?: string; + lastModified?: string; + location?: string; + }; + }; + /** + * SCIM /Users + * @description SCIM /Users provisioning endpoints + */ + "scim-user": { + /** @description SCIM schema used. */ + schemas: string[]; + /** + * @description Unique identifier of an external identity + * @example 1b78eada-9baa-11e6-9eb6-a431576d590e + */ + id: string; + /** + * @description The ID of the User. + * @example a7b0f98395 + */ + externalId: string | null; + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string | null; + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string | null; + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + givenName: string | null; + familyName: string | null; + formatted?: string | null; + }; + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + value: string; + primary?: boolean; + }[]; + /** + * @description The active status of the User. + * @example true + */ + active: boolean; + meta: { + /** @example User */ + resourceType?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + created?: string; + /** + * Format: date-time + * @example 2019-01-24T22:45:36.000Z + */ + lastModified?: string; + /** + * Format: uri + * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d + */ + location?: string; + }; + /** @description The ID of the organization. */ + organization_id?: number; + /** + * @description Set of operations to be performed + * @example [ + * { + * "op": "replace", + * "value": { + * "active": false + * } + * } + * ] + */ + operations?: { + /** @enum {string} */ + op: "add" | "remove" | "replace"; + path?: string; + value?: string | { [key: string]: unknown } | unknown[]; + }[]; + /** @description associated groups */ + groups?: { + value?: string; + display?: string; + }[]; + }; + /** + * SCIM User List + * @description SCIM User List + */ + "scim-user-list": { + /** @description SCIM schema used. */ + schemas: string[]; + /** @example 3 */ + totalResults: number; + /** @example 10 */ + itemsPerPage: number; + /** @example 1 */ + startIndex: number; + Resources: components["schemas"]["scim-user"][]; + }; + /** Search Result Text Matches */ + "search-result-text-matches": { + object_url?: string; + object_type?: string | null; + property?: string; + fragment?: string; + matches?: { + text?: string; + indices?: number[]; + }[]; + }[]; + /** + * Code Search Result Item + * @description Code Search Result Item + */ + "code-search-result-item": { + name: string; + path: string; + sha: string; + /** Format: uri */ + url: string; + /** Format: uri */ + git_url: string; + /** Format: uri */ + html_url: string; + repository: components["schemas"]["minimal-repository"]; + score: number; + file_size?: number; + language?: string | null; + /** Format: date-time */ + last_modified_at?: string; + /** + * @example [ + * "73..77", + * "77..78" + * ] + */ + line_numbers?: string[]; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Commit Search Result Item + * @description Commit Search Result Item + */ + "commit-search-result-item": { + /** Format: uri */ + url: string; + sha: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + comments_url: string; + commit: { + author: { + name: string; + email: string; + /** Format: date-time */ + date: string; + }; + committer: components["schemas"]["nullable-git-user"]; + comment_count: number; + message: string; + tree: { + sha: string; + /** Format: uri */ + url: string; + }; + /** Format: uri */ + url: string; + verification?: components["schemas"]["verification"]; + }; + author: components["schemas"]["nullable-simple-user"]; + committer: components["schemas"]["nullable-git-user"]; + parents: { + url?: string; + html_url?: string; + sha?: string; + }[]; + repository: components["schemas"]["minimal-repository"]; + score: number; + node_id: string; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Issue Search Result Item + * @description Issue Search Result Item + */ + "issue-search-result-item": { + /** Format: uri */ + url: string; + /** Format: uri */ + repository_url: string; + labels_url: string; + /** Format: uri */ + comments_url: string; + /** Format: uri */ + events_url: string; + /** Format: uri */ + html_url: string; + id: number; + node_id: string; + number: number; + title: string; + locked: boolean; + active_lock_reason?: string | null; + assignees?: components["schemas"]["simple-user"][] | null; + user: components["schemas"]["nullable-simple-user"]; + labels: { + /** Format: int64 */ + id?: number; + node_id?: string; + url?: string; + name?: string; + color?: string; + default?: boolean; + description?: string | null; + }[]; + state: string; + state_reason?: string | null; + assignee: components["schemas"]["nullable-simple-user"]; + milestone: components["schemas"]["nullable-milestone"]; + comments: number; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + closed_at: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + pull_request?: { + /** Format: date-time */ + merged_at?: string | null; + /** Format: uri */ + diff_url: string | null; + /** Format: uri */ + html_url: string | null; + /** Format: uri */ + patch_url: string | null; + /** Format: uri */ + url: string | null; + }; + body?: string; + score: number; + author_association: components["schemas"]["author-association"]; + draft?: boolean; + repository?: components["schemas"]["repository"]; + body_html?: string; + body_text?: string; + /** Format: uri */ + timeline_url?: string; + performed_via_github_app?: components["schemas"]["nullable-integration"]; + reactions?: components["schemas"]["reaction-rollup"]; + }; + /** + * Label Search Result Item + * @description Label Search Result Item + */ + "label-search-result-item": { + id: number; + node_id: string; + /** Format: uri */ + url: string; + name: string; + color: string; + default: boolean; + description: string | null; + score: number; + text_matches?: components["schemas"]["search-result-text-matches"]; + }; + /** + * Repo Search Result Item + * @description Repo Search Result Item + */ + "repo-search-result-item": { + id: number; + node_id: string; + name: string; + full_name: string; + owner: components["schemas"]["nullable-simple-user"]; + private: boolean; + /** Format: uri */ + html_url: string; + description: string | null; + fork: boolean; + /** Format: uri */ + url: string; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + /** Format: date-time */ + pushed_at: string; + /** Format: uri */ + homepage: string | null; + size: number; + stargazers_count: number; + watchers_count: number; + language: string | null; + forks_count: number; + open_issues_count: number; + master_branch?: string; + default_branch: string; + score: number; + /** Format: uri */ + forks_url: string; + keys_url: string; + collaborators_url: string; + /** Format: uri */ + teams_url: string; + /** Format: uri */ + hooks_url: string; + issue_events_url: string; + /** Format: uri */ + events_url: string; + assignees_url: string; + branches_url: string; + /** Format: uri */ + tags_url: string; + blobs_url: string; + git_tags_url: string; + git_refs_url: string; + trees_url: string; + statuses_url: string; + /** Format: uri */ + languages_url: string; + /** Format: uri */ + stargazers_url: string; + /** Format: uri */ + contributors_url: string; + /** Format: uri */ + subscribers_url: string; + /** Format: uri */ + subscription_url: string; + commits_url: string; + git_commits_url: string; + comments_url: string; + issue_comment_url: string; + contents_url: string; + compare_url: string; + /** Format: uri */ + merges_url: string; + archive_url: string; + /** Format: uri */ + downloads_url: string; + issues_url: string; + pulls_url: string; + milestones_url: string; + notifications_url: string; + labels_url: string; + releases_url: string; + /** Format: uri */ + deployments_url: string; + git_url: string; + ssh_url: string; + clone_url: string; + /** Format: uri */ + svn_url: string; + forks: number; + open_issues: number; + watchers: number; + topics?: string[]; + /** Format: uri */ + mirror_url: string | null; + has_issues: boolean; + has_projects: boolean; + has_pages: boolean; + has_wiki: boolean; + has_downloads: boolean; + archived: boolean; + /** @description Returns whether or not this repository disabled. */ + disabled: boolean; + /** @description The repository visibility: public, private, or internal. */ + visibility?: string; + license: components["schemas"]["nullable-license-simple"]; + permissions?: { + admin: boolean; + maintain?: boolean; + push: boolean; + triage?: boolean; + pull: boolean; + }; + text_matches?: components["schemas"]["search-result-text-matches"]; + temp_clone_token?: string; + allow_merge_commit?: boolean; + allow_squash_merge?: boolean; + allow_rebase_merge?: boolean; + allow_auto_merge?: boolean; + delete_branch_on_merge?: boolean; + allow_forking?: boolean; + is_template?: boolean; + }; + /** + * Topic Search Result Item + * @description Topic Search Result Item + */ + "topic-search-result-item": { + name: string; + display_name: string | null; + short_description: string | null; + description: string | null; + created_by: string | null; + released: string | null; + /** Format: date-time */ + created_at: string; + /** Format: date-time */ + updated_at: string; + featured: boolean; + curated: boolean; + score: number; + repository_count?: number | null; + /** Format: uri */ + logo_url?: string | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + related?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + aliases?: + | { + topic_relation?: { + id?: number; + name?: string; + topic_id?: number; + relation_type?: string; + }; + }[] + | null; + }; + /** + * User Search Result Item + * @description User Search Result Item + */ + "user-search-result-item": { + login: string; + id: number; + node_id: string; + /** Format: uri */ + avatar_url: string; + gravatar_id: string | null; + /** Format: uri */ + url: string; + /** Format: uri */ + html_url: string; + /** Format: uri */ + followers_url: string; + /** Format: uri */ + subscriptions_url: string; + /** Format: uri */ + organizations_url: string; + /** Format: uri */ + repos_url: string; + /** Format: uri */ + received_events_url: string; + type: string; + score: number; + following_url: string; + gists_url: string; + starred_url: string; + events_url: string; + public_repos?: number; + public_gists?: number; + followers?: number; + following?: number; + /** Format: date-time */ + created_at?: string; + /** Format: date-time */ + updated_at?: string; + name?: string | null; + bio?: string | null; + /** Format: email */ + email?: string | null; + location?: string | null; + site_admin: boolean; + hireable?: boolean | null; + text_matches?: components["schemas"]["search-result-text-matches"]; + blog?: string | null; + company?: string | null; + /** Format: date-time */ + suspended_at?: string | null; + }; + /** + * Private User + * @description Private User + */ + "private-user": { + /** @example octocat */ + login: string; + /** @example 1 */ + id: number; + /** @example MDQ6VXNlcjE= */ + node_id: string; + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string; + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null; + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string; + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string; + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string; + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string; + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string; + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string; + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string; + /** @example User */ + type: string; + site_admin: boolean; + /** @example monalisa octocat */ + name: string | null; + /** @example GitHub */ + company: string | null; + /** @example https://github.com/blog */ + blog: string | null; + /** @example San Francisco */ + location: string | null; + /** + * Format: email + * @example octocat@github.com + */ + email: string | null; + hireable: boolean | null; + /** @example There once was... */ + bio: string | null; + /** @example monalisa */ + twitter_username?: string | null; + /** @example 2 */ + public_repos: number; + /** @example 1 */ + public_gists: number; + /** @example 20 */ + followers: number; + /** @example 0 */ + following: number; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string; + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string; + /** @example 81 */ + private_gists: number; + /** @example 100 */ + total_private_repos: number; + /** @example 100 */ + owned_private_repos: number; + /** @example 10000 */ + disk_usage: number; + /** @example 8 */ + collaborators: number; + /** @example true */ + two_factor_authentication: boolean; + plan?: { + collaborators: number; + name: string; + space: number; + private_repos: number; + }; + /** Format: date-time */ + suspended_at?: string | null; + business_plus?: boolean; + ldap_dn?: string; + }; + /** + * Codespaces Secret + * @description Secrets for a GitHub Codespace. + */ + "codespaces-secret": { + /** + * @description The name of the secret + * @example SECRET_NAME + */ + name: string; + /** + * Format: date-time + * @description Secret created at + */ + created_at: string; + /** + * Format: date-time + * @description Secret last updated at + */ + 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 API URL at which the list of repositories this secret is vicible can be retrieved + * @example https://api.github.com/user/secrets/SECRET_NAME/repositories + */ + selected_repositories_url: string; + }; + /** + * CodespacesUserPublicKey + * @description The public key used for setting user Codespaces' Secrets. + */ + "codespaces-user-public-key": { + /** + * @description The identifier for the key. + * @example 1234567 + */ + key_id: string; + /** + * @description The Base64 encoded public key. + * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= + */ + key: string; + }; + /** + * Fetches information about an export of a codespace. + * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest + */ + "codespace-export-details": { + /** + * @description State of the latest export + * @example succeeded | failed | in_progress + */ + state?: string | null; + /** + * Format: date-time + * @description Completion time of the last export operation + * @example 2021-01-01T19:01:12Z + */ + completed_at?: string | null; + /** + * @description Name of the exported branch + * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q + */ + branch?: string | null; + /** + * @description Git commit SHA of the exported branch + * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 + */ + sha?: string | null; + /** + * @description Id for the export details + * @example latest + */ + id?: string; + /** + * @description Url for fetching export details + * @example https://api.github.com/user/codespaces/:name/exports/latest + */ + export_url?: string; + /** + * @description Web url for the exported branch + * @example https://github.com/octocat/hello-world/tree/:branch + */ + html_url?: string | null; + }; + /** + * Email + * @description Email + */ + email: { + /** + * Format: email + * @example octocat@github.com + */ + email: string; + /** @example true */ + primary: boolean; + /** @example true */ + verified: boolean; + /** @example public */ + visibility: string | null; + }; + /** + * GPG Key + * @description A unique encryption key + */ + "gpg-key": { + /** @example 3 */ + id: number; + /** @example Octocat's GPG Key */ + name?: string | null; + primary_key_id: number | null; + /** @example 3262EFF25BA0D270 */ + key_id: string; + /** @example xsBNBFayYZ... */ + public_key: string; + /** + * @example [ + * { + * "email": "octocat@users.noreply.github.com", + * "verified": true + * } + * ] + */ + emails: { + email?: string; + verified?: boolean; + }[]; + /** + * @example [ + * { + * "id": 4, + * "primary_key_id": 3, + * "key_id": "4A595D4C72EE49C7", + * "public_key": "zsBNBFayYZ...", + * "emails": [], + * "subkeys": [], + * "can_sign": false, + * "can_encrypt_comms": true, + * "can_encrypt_storage": true, + * "can_certify": false, + * "created_at": "2016-03-24T11:31:04-06:00", + * "expires_at": null, + * "revoked": false + * } + * ] + */ + subkeys: { + id?: number; + primary_key_id?: number; + key_id?: string; + public_key?: string; + emails?: unknown[]; + subkeys?: unknown[]; + can_sign?: boolean; + can_encrypt_comms?: boolean; + can_encrypt_storage?: boolean; + can_certify?: boolean; + created_at?: string; + expires_at?: string | null; + raw_key?: string | null; + revoked?: boolean; + }[]; + /** @example true */ + can_sign: boolean; + can_encrypt_comms: boolean; + can_encrypt_storage: boolean; + /** @example true */ + can_certify: boolean; + /** + * Format: date-time + * @example 2016-03-24T11:31:04-06:00 + */ + created_at: string; + /** Format: date-time */ + expires_at: string | null; + /** @example true */ + revoked: boolean; + raw_key: string | null; + }; + /** + * Key + * @description Key + */ + key: { + key: string; + id: number; + url: string; + title: string; + /** Format: date-time */ + created_at: string; + verified: boolean; + read_only: boolean; + }; + /** Marketplace Account */ + "marketplace-account": { + /** Format: uri */ + url: string; + id: number; + type: string; + node_id?: string; + login: string; + /** Format: email */ + email?: string | null; + /** Format: email */ + organization_billing_email?: string | null; + }; + /** + * User Marketplace Purchase + * @description User Marketplace Purchase + */ + "user-marketplace-purchase": { + /** @example monthly */ + billing_cycle: string; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + next_billing_date: string | null; + unit_count: number | null; + /** @example true */ + on_free_trial: boolean; + /** + * Format: date-time + * @example 2017-11-11T00:00:00Z + */ + free_trial_ends_on: string | null; + /** + * Format: date-time + * @example 2017-11-02T01:12:12Z + */ + updated_at: string | null; + account: components["schemas"]["marketplace-account"]; + plan: components["schemas"]["marketplace-listing-plan"]; + }; + /** + * 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; + }; + }; + responses: { + /** Resource not found */ + not_found: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Validation failed */ + validation_failed_simple: { + content: { + "application/json": components["schemas"]["validation-error-simple"]; + }; + }; + /** Bad Request */ + bad_request: { + content: { + "application/json": components["schemas"]["basic-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Validation failed */ + validation_failed: { + content: { + "application/json": components["schemas"]["validation-error"]; + }; + }; + /** Accepted */ + accepted: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden */ + forbidden: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Requires authentication */ + requires_authentication: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Not modified */ + not_modified: unknown; + /** Gone */ + gone: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response */ + actions_runner_labels: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response */ + actions_runner_labels_readonly: { + content: { + "application/json": { + total_count: number; + labels: components["schemas"]["runner-label"][]; + }; + }; + }; + /** Response if GitHub Advanced Security is not enabled for this repository */ + code_scanning_forbidden_read: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Service unavailable */ + service_unavailable: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Forbidden Gist */ + forbidden_gist: { + content: { + "application/json": { + block?: { + reason?: string; + created_at?: string; + html_url?: string | null; + }; + message?: string; + documentation_url?: string; + }; + }; + }; + /** Moved permanently */ + moved_permanently: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Conflict */ + conflict: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Internal Error */ + internal_error: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Temporary Redirect */ + temporary_redirect: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + code_scanning_forbidden_write: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + /** Found */ + found: unknown; + /** A header with no content is returned. */ + no_content: unknown; + /** Resource not found */ + scim_not_found: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Forbidden */ + scim_forbidden: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Bad Request */ + scim_bad_request: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Too Many Requests */ + scim_too_many_requests: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Internal Error */ + scim_internal_error: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + /** Conflict */ + scim_conflict: { + content: { + "application/json": components["schemas"]["scim-error"]; + "application/scim+json": components["schemas"]["scim-error"]; + }; + }; + }; + parameters: { + /** @description 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 unique identifier of the grant. */ + "grant-id": number; + /** @description The client ID of the GitHub app. */ + "client-id": string; + "app-slug": string; + /** @description The client ID of the OAuth app. */ + "oauth-client-id": string; + /** @description The unique identifier of the authorization. */ + "authorization-id": number; + /** @description The slug version of the enterprise name 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 A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + "audit-log-phrase": string; + /** + * @description The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + "audit-log-include": "web" | "git" | "all"; + /** @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. */ + "audit-log-after": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + "audit-log-before": string; + /** + * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + "audit-log-order": "desc" | "asc"; + /** @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 events before this cursor. */ + "pagination-before": string; + /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + "pagination-after": string; + /** @description The direction to sort the results by. */ + direction: "asc" | "desc"; + /** @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 pull request thread. */ + "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 group. */ + "group-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 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/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event: string; + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + "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 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 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 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 Used for pagination: the index of the first result to return. */ + "start-index": number; + /** @description Used for pagination: the number of results to return. */ + count: number; + /** @description Identifier generated by the GitHub SCIM endpoint. */ + "scim-group-id": string; + /** @description The unique identifier of the SCIM user. */ + "scim-user-id": string; + /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order: "desc" | "asc"; + /** @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; + }; + headers: { + link?: string; + "content-type"?: string; + "x-common-marker-version"?: string; + "x-rate-limit-limit"?: number; + "x-rate-limit-remaining"?: number; + "x-rate-limit-reset"?: number; + location?: string; + }; +} + +export interface operations { + /** Get Hypermedia links to resources accessible in GitHub's REST API */ + "meta/root": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["root"]; + }; + }; + }; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + }; + }; + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. */ + "apps/create-from-manifest": { + parameters: { + path: { + code: string; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["integration"] & + ({ + client_id: string; + client_secret: string; + webhook_secret: string | null; + pem: string; + } & { [key: string]: unknown }); + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/update-webhook-config-for-app": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/list-webhook-deliveries": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/redeliver-webhook-delivery": { + parameters: { + path: { + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. + */ + "apps/list-installations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + outdated?: string; + }; + }; + responses: { + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["installation"][]; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/delete-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/create-installation-access-token": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["installation-token"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository names that the token should have access to */ + repositories?: string[]; + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[]; + permissions?: components["schemas"]["app-permissions"]; + }; + }; + }; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/suspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/unsuspend-installation": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + */ + "oauth-authorizations/list-grants": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The client ID of your GitHub app. */ + client_id?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["application-grant"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/get-grant": { + parameters: { + path: { + /** The unique identifier of the grant. */ + grant_id: components["parameters"]["grant-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["application-grant"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + "oauth-authorizations/delete-grant": { + parameters: { + path: { + /** The unique identifier of the grant. */ + grant_id: components["parameters"]["grant-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + "apps/delete-authorization": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + "apps/check-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ + "apps/delete-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string; + }; + }; + }; + }; + /** OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/reset-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The access_token of the OAuth application. */ + access_token: string; + }; + }; + }; + }; + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + "apps/scope-token": { + parameters: { + path: { + /** The client ID of the GitHub app. */ + client_id: components["parameters"]["client-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @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"]; + }; + }; + }; + }; + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/get-by-slug": { + parameters: { + path: { + app_slug: components["parameters"]["app-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/list-authorizations": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The client ID of your GitHub app. */ + client_id?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["authorization"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + */ + "oauth-authorizations/create-authorization": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** @description The OAuth app client key for which to create the token. */ + client_id?: string; + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string; + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + */ + "oauth-authorizations/get-or-create-authorization-for-app": { + parameters: { + path: { + /** The client ID of the OAuth app. */ + client_id: components["parameters"]["oauth-client-id"]; + }; + }; + responses: { + /** if returning an existing token */ + 200: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string; + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + */ + "oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint": { + parameters: { + path: { + /** The client ID of the OAuth app. */ + client_id: components["parameters"]["oauth-client-id"]; + fingerprint: string; + }; + }; + responses: { + /** if returning an existing token */ + 200: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + /** Response if returning a new token */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string; + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + }; + }; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/get-authorization": { + parameters: { + path: { + /** The unique identifier of the authorization. */ + authorization_id: components["parameters"]["authorization-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + "oauth-authorizations/delete-authorization": { + parameters: { + path: { + /** The unique identifier of the authorization. */ + authorization_id: components["parameters"]["authorization-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + */ + "oauth-authorizations/update-authorization": { + parameters: { + path: { + /** The unique identifier of the authorization. */ + authorization_id: components["parameters"]["authorization-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["authorization"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null; + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[]; + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[]; + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string; + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string; + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string; + }; + }; + }; + }; + "codes-of-conduct/get-all-codes-of-conduct": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "codes-of-conduct/get-conduct-code": { + parameters: { + path: { + key: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-of-conduct"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the emojis available to use on GitHub. */ + "emojis/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": { [key: string]: string }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * 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)." + */ + "enterprise-admin/get-server-statistics": { + parameters: { + path: { + /** The slug version of the enterprise name or the login of an organization. */ + enterprise_or_org: components["parameters"]["enterprise-or-org"]; + }; + query: { + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + date_start?: string; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + date_end?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["server-statistics"]; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "actions/get-actions-cache-usage-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions OpenID Connect (OIDC) custom issuer policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + "actions/set-actions-oidc-custom-issuer-policy-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-oidc-custom-issuer-policy-for-enterprise"]; + }; + }; + }; + /** + * 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. + */ + "enterprise-admin/get-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-enterprise-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for organizations and allowed actions and reusable workflows in an enterprise. + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-github-actions-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_organizations: components["schemas"]["enabled-organizations"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the organizations that are selected to have GitHub Actions enabled in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/enable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + "enterprise-admin/disable-selected-organization-github-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "enterprise-admin/get-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * Sets the actions 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. + */ + "enterprise-admin/set-allowed-actions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * 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. + */ + "actions/get-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in 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. + */ + "actions/set-github-actions-default-workflow-permissions-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Success response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runner-groups-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components["parameters"]["visible-to-organization"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-enterprise"][]; + }; + }; + }; + }; + }; + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/create-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @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[]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + }; + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-group-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/update-self-hosted-runner-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-enterprise"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @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[]; + }; + }; + }; + }; + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + organizations: components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[]; + }; + }; + }; + }; + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the organization. */ + org_id: components["parameters"]["org-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-self-hosted-runners-in-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + "enterprise-admin/add-self-hosted-runner-to-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-self-hosted-runners-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count?: number; + runners?: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-runner-applications-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + "enterprise-admin/create-registration-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "enterprise-admin/create-remove-token-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/get-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/delete-self-hosted-runner-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + "enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + "enterprise-admin/get-audit-log": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + phrase?: components["parameters"]["audit-log-phrase"]; + /** + * The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + include?: components["parameters"]["audit-log-include"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["audit-log-after"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["audit-log-before"]; + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components["parameters"]["audit-log-order"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["audit-log-event"][]; + }; + }; + }; + }; + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an 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. + */ + "code-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + */ + "secret-scanning/list-alerts-for-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * The authenticated user must be an enterprise admin. + */ + "billing/get-github-actions-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the 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. + */ + "billing/get-github-advanced-security-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + "billing/get-github-packages-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * The authenticated user must be an enterprise admin. + */ + "billing/get-shared-storage-billing-ghe": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. */ + "activity/list-public-events": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + "activity/get-feeds": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["feed"]; + }; + }; + }; + }; + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + "gists/list": { + parameters: { + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + "gists/create": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string; + }; + }; + public?: boolean | ("true" | "false"); + }; + }; + }; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + */ + "gists/list-public": { + parameters: { + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List the authenticated user's starred gists: */ + "gists/list-starred": { + parameters: { + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "gists/get": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + "gists/update": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string; + /** + * @description Names of files to be updated + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: Partial<{ [key: string]: unknown }> }; + } | null; + }; + }; + }; + "gists/list-comments": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-comment"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/create-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/get-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden_gist"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/delete-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/update-comment": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string; + }; + }; + }; + }; + "gists/list-commits": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["gist-commit"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/list-forks": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gist-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: This was previously `/gists/:gist_id/fork`. */ + "gists/fork": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["base-gist"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "gists/check-is-starred": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response if gist is starred */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + /** Not Found if gist is not starred */ + 404: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "gists/star": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/unstar": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "gists/get-revision": { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components["parameters"]["gist-id"]; + sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gist-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + "gitignore/get-all-templates": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/rest/overview/media-types/) to get the raw contents. + */ + "gitignore/get-template": { + parameters: { + path: { + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gitignore-template"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List repositories that an app installation can access. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/list-repos-accessible-to-installation": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + /** @example selected */ + repository_selection?: string; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + "apps/revoke-installation-access-token": { + parameters: {}; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + collab?: boolean; + orgs?: boolean; + owned?: boolean; + pulls?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "licenses/get-all-commonly-used": { + parameters: { + query: { + featured?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "licenses/get": { + parameters: { + path: { + license: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "markdown/render": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: { + "Content-Length"?: string; + }; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The Markdown text to render in HTML. */ + text: string; + /** + * @description The rendering mode. Can be either `markdown` or `gfm`. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: "markdown" | "gfm"; + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string; + }; + }; + }; + }; + /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ + "markdown/render-raw": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "text/html": string; + }; + }; + 304: components["responses"]["not_modified"]; + }; + requestBody: { + content: { + "text/plain": string; + "text/x-markdown": string; + }; + }; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/get-subscription-plan-for-account-stubbed": { + parameters: { + path: { + /** account_id parameter */ + account_id: components["parameters"]["account-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["marketplace-purchase"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + /** Not Found when the account has not purchased the listing */ + 404: unknown; + }; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-plans-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-listing-plan"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + "apps/list-accounts-for-plan-stubbed": { + parameters: { + path: { + /** The unique identifier of the plan. */ + plan_id: components["parameters"]["plan-id"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["marketplace-purchase"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + }; + }; + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://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. + */ + "meta/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["api-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + "activity/list-public-events-for-repo-network": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List all notifications for the current user, sorted by most recently updated. */ + "activity/list-notifications-for-authenticated-user": { + parameters: { + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-notifications-as-read": { + parameters: {}; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + /** @description Whether the notification has been read. */ + read?: boolean; + }; + }; + }; + }; + "activity/get-thread": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/mark-thread-as-read": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Reset Content */ + 205: unknown; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/reference/activity#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + "activity/get-thread-subscription-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + "activity/set-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["thread-subscription"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean; + }; + }; + }; + }; + /** Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + "activity/delete-thread-subscription": { + parameters: { + path: { + /** The unique identifier of the pull request thread. */ + thread_id: components["parameters"]["thread-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the octocat as ASCII art */ + "meta/get-octocat": { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/octocat-stream": string; + }; + }; + }; + }; + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + "orgs/list": { + parameters: { + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components["parameters"]["since-org"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + "orgs/list-custom-roles": { + parameters: { + path: { + organization_id: string; + }; + }; + responses: { + /** Response - list of custom role names */ + 200: { + content: { + "application/json": { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number; + custom_roles?: components["schemas"]["organization-custom-repository-role"][]; + }; + }; + }; + }; + }; + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + */ + "orgs/get": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + "orgs/update": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-full"]; + }; + }; + 409: components["responses"]["conflict"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + }; + 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; + /** @example "http://github.blog" */ + blog?: string; + }; + }; + }; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-usage-org-enterprise"]; + }; + }; + }; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage-by-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_cache_usages: components["schemas"]["actions-cache-usage-by-repository"][]; + }; + }; + }; + }; + }; + /** + * Gets the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. + * GitHub Apps must have the `organization_administration:write` permission to use this endpoint. + */ + "oidc/get-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** A JSON serialized template for OIDC subject claim customization */ + 200: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + }; + /** + * Creates or updates the customization template for an OpenID Connect (OIDC) subject claim. + * You must authenticate using an access token with the `write:org` scope to use this endpoint. + * GitHub Apps must have the `admin:org` permission to use this endpoint. + */ + "oidc/update-oidc-custom-sub-template-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["oidc-custom-sub"]; + }; + }; + }; + /** + * 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. + */ + "actions/get-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-organization-permissions"]; + }; + }; + }; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions 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. + */ + "actions/set-github-actions-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled_repositories: components["schemas"]["enabled-repositories"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/list-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + }; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/set-selected-repositories-enabled-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/enable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + */ + "actions/disable-selected-repository-github-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "actions/get-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/set-allowed-actions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * 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. + */ + "actions/get-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in 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. + */ + "actions/set-github-actions-default-workflow-permissions-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runner-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components["parameters"]["visible-to-repository"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + runner_groups: components["schemas"]["runner-groups-org"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Creates a new self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/create-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[]; + /** @description List of runner IDs to add to the runner group. */ + runners?: number[]; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Gets a specific self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Deletes a self-hosted runner group for an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-group-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/update-self-hosted-runner-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-groups-org"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Name of the runner group. */ + name: string; + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: "selected" | "all" | "private"; + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean; + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean; + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud and GitHub Enterprise Server. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists the repositories with access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a repository to the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-organization)." + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-repo-access-to-self-hosted-runner-group-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Lists self-hosted runners that are in a specific organization group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * Replaces the list of self-hosted runners that are part of an organization runner group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-self-hosted-runners-in-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description List of runner IDs to add to the runner group. */ + runners: number[]; + }; + }; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Adds a self-hosted runner to a runner group configured in an organization. + * + * You must authenticate using an access token with the `admin:org` + * scope to use this endpoint. + */ + "actions/add-self-hosted-runner-to-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * + * + * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-self-hosted-runner-from-group-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components["parameters"]["runner-group-id"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all self-hosted runners configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-self-hosted-runners-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-runner-applications-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org --token TOKEN + * ``` + */ + "actions/create-registration-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an organization, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/get-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/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?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [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[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + "actions/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * + * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination)." + */ + "orgs/get-audit-log": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + phrase?: components["parameters"]["audit-log-phrase"]; + /** + * The event types to include: + * + * - `web` - returns web (non-Git) events. + * - `git` - returns Git events. + * - `all` - returns both web and Git events. + * + * The default is `web`. + */ + include?: components["parameters"]["audit-log-include"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["audit-log-after"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["audit-log-before"]; + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components["parameters"]["audit-log-order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["audit-log-event"][]; + }; + }; + }; + }; + /** List the users blocked by an organization. */ + "orgs/list-blocked-users": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-blocked-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked: */ + 204: never; + /** If the user is not blocked: */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "orgs/block-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/unblock-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components["parameters"]["pagination-before"]; + /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + after?: components["parameters"]["pagination-after"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components["schemas"]["code-scanning-alert-state"]; + /** The property by which to sort the results. */ + sort?: "created" | "updated"; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["code-scanning-organization-alert-items"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/list-in-organization": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + */ + "orgs/list-saml-sso-authorizations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page token */ + page?: number; + /** Limits the list of credentials authorizations for an organization to a specific login */ + login?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["credential-authorization"][]; + }; + }; + }; + }; + /** + * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * + * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + */ + "orgs/remove-saml-sso-authorization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + credential_id: number; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-org-secrets": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["organization-dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-public-key": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/get-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["organization-dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/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?: (Partial & Partial)[]; + }; + }; + }; + }; + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/delete-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/list-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + repositories: components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + }; + /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/set-selected-repos-for-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/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[]; + }; + }; + }; + }; + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/add-selected-repo-to-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + /** Conflict when visibility type is not set to selected */ + 409: unknown; + }; + }; + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + "dependabot/remove-selected-repo-from-org-secret": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** Response when repository was removed from the selected list */ + 204: never; + /** Conflict when visibility type not set to selected */ + 409: unknown; + }; + }; + "activity/list-public-org-events": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/external-idp-group-info-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the group. */ + group_id: components["parameters"]["group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["external-group"]; + }; + }; + }; + }; + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/list-external-idp-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page token */ + page?: number; + /** Limits the list to groups containing the text in the group name */ + display_name?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["external-groups"]; + }; + }; + }; + }; + /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ + "orgs/list-failed-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/list-webhooks": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Here's how you can create a hook that posts payloads in JSON format: */ + "orgs/create-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Must be passed as "web". */ + name: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + config: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "kdaigle" */ + username?: string; + /** @example "password" */ + password?: string; + }; + /** + * @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; + }; + }; + }; + }; + /** Returns a webhook configured in an organization. To get only the webhook `config` properties, see "[Get a webhook configuration for an organization](/rest/reference/orgs#get-a-webhook-configuration-for-an-organization)." */ + "orgs/get-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/delete-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ + "orgs/update-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @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; + }; + }; + }; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/reference/orgs#get-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + */ + "orgs/get-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/reference/orgs#update-an-organization-webhook)." + * + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + */ + "orgs/update-webhook-config-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + "orgs/list-webhook-deliveries": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in an organization. */ + "orgs/get-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a delivery for a webhook configured in an organization. */ + "orgs/redeliver-webhook-delivery": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "orgs/ping-webhook": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-org-installation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ + "orgs/list-app-installations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + }; + }; + /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ + "interactions/set-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ + "interactions/remove-restrictions-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ + "orgs/list-pending-invitations": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "orgs/create-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["organization-invitation"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ + invitee_id?: number; + /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ + email?: string; + /** + * @description 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[]; + }; + }; + }; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + "orgs/cancel-invitation": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ + "orgs/list-invitation-teams": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ + "orgs/list-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: "2fa_disabled" | "all"; + /** Filter members returned by their role. */ + role?: "all" | "admin" | "member"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + /** Response if requester is not an organization member */ + 302: never; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Check if a user is, publicly or privately, a member of the organization. */ + "orgs/check-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never; + /** Response if requester is not an organization member */ + 302: never; + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown; + }; + }; + /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ + "orgs/remove-member": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/delete-from-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + "codespaces/stop-in-organization": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + "orgs/get-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user) will be `pending` until they accept the invitation. + * + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. + */ + "orgs/set-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. + * @default member + * @enum {string} + */ + role?: "admin" | "member"; + }; + }; + }; + }; + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + "orgs/remove-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the most recent migrations. */ + "migrations/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + }; + }; + /** Initiates the generation of a migration archive. */ + "migrations/start-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[]; + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean; + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean; + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean; + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean; + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean; + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean; + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean; + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: "repositories"[]; + }; + }; + }; + }; + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + "migrations/get-status-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** Exclude attributes from the API response to improve performance */ + exclude?: "repositories"[]; + }; + }; + responses: { + /** + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Fetches the URL to a migration archive. */ + "migrations/download-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ + "migrations/delete-archive-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ + "migrations/unlock-repo-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** List all the repositories for this organization migration. */ + "migrations/list-repos-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** List all users who are outside collaborators of an organization. */ + "orgs/list-outside-collaborators": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: "2fa_disabled" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://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)." */ + "orgs/convert-member-to-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** User is getting converted asynchronously */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** User was converted */ + 204: never; + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/en/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: unknown; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean; + }; + }; + }; + }; + /** Removing a user from this list will remove them from all the organization's repositories. */ + "orgs/remove-outside-collaborator": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + }; + /** + * Lists all packages in an organization readable by the user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-organization": { + parameters: { + query: { + /** 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"; + /** 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. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package in an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-organization": { + parameters: { + path: { + /** 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: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version in an organization. + * + * You must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-organization": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-org": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Members of an organization can choose to have their membership publicized or not. */ + "orgs/list-public-members": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "orgs/check-public-membership-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a public member */ + 204: never; + /** Not Found if user is not a public member */ + 404: unknown; + }; + }; + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "orgs/set-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + "orgs/remove-public-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists repositories for the specified organization. */ + "repos/list-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean; + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean; + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean; + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean; + /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ + team_id?: number; + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean; + /** @description Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ + gitignore_template?: string; + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ + license_template?: string; + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean; + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean; + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean; + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean; + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean; + /** + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + }; + }; + }; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-alerts-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** 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. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** 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. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-secret-scanning-alert"][]; + }; + }; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-actions-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the GitHub Advanced Security active committers for an organization per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. + */ + "billing/get-github-advanced-security-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Success */ + 200: { + content: { + "application/json": components["schemas"]["advanced-security-active-committers"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-github-packages-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + "billing/get-shared-storage-billing-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + */ + "teams/list-idp-groups-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page token */ + page?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + }; + }; + /** Lists all teams in an organization that are visible to the authenticated user. */ + "teams/list": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + "teams/create": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @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; + }; + }; + }; + }; + /** + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. + */ + "teams/get-by-name": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + "teams/delete-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + "teams/update-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + }; + 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?: number | null; + }; + }; + }; + }; + /** + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + */ + "teams/list-discussions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Pinned discussions only filter */ + pinned?: string; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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`. + */ + "teams/create-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + 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; + }; + }; + }; + }; + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/get-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/delete-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}`. + */ + "teams/update-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/list-discussion-comments-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + "teams/create-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/get-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/delete-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments/{comment_number}`. + */ + "teams/update-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/list-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + "reactions/create-for-team-discussion-comment-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion-comment": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/list-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + "reactions/create-for-team-discussion-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/delete-for-team-discussion": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/list-linked-external-idp-groups-to-team-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["external-groups"]; + }; + }; + }; + }; + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + "teams/unlink-external-idp-group-from-team-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + "teams/link-external-idp-group-to-team-for-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["external-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description External Group Id + * @example 1 + */ + group_id: number; + }; + }; + }; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + "teams/list-pending-invitations-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/list-members-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + "teams/get-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** if user has no team membership */ + 404: unknown; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://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}`. + */ + "teams/add-or-update-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. + */ + "teams/remove-membership-for-user-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + "teams/list-projects-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/check-permissions-for-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/add-or-update-project-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + }; + 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"; + } | null; + }; + }; + }; + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + "teams/remove-project-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + "teams/list-repos-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/check-permissions-for-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with repository permissions */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never; + /** Not Found if team does not have permission for the repository */ + 404: unknown; + }; + }; + /** + * 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/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + "teams/add-or-update-repo-permissions-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. In addition to the enumerated values, 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 + * @enum {string} + */ + permission?: "pull" | "push" | "admin" | "maintain" | "triage"; + }; + }; + }; + }; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + "teams/remove-repo-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + "teams/list-idp-groups-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + }; + }; + /** + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + */ + "teams/create-or-update-idp-group-connections-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ + groups?: { + /** @description ID of the IdP group. */ + group_id: string; + /** @description Name of the IdP group. */ + group_name: string; + /** @description Description of the IdP group. */ + group_description: string; + }[]; + }; + }; + }; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + "teams/list-child-in-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The slug of the team name. */ + team_slug: components["parameters"]["team-slug"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "projects/get-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "projects/update-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null; + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean; + }; + }; + }; + }; + "projects/move-card": { + parameters: { + path: { + /** The unique identifier of the card. */ + card_id: components["parameters"]["card-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + resource?: string; + field?: string; + }[]; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string; + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number; + }; + }; + }; + }; + "projects/get-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/delete-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/update-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + "projects/list-cards": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: "all" | "archived" | "not_archived"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-card"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-card": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-card"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Validation failed */ + 422: { + content: { + "application/json": + | components["schemas"]["validation-error"] + | components["schemas"]["validation-error-simple"]; + }; + }; + /** Response */ + 503: { + content: { + "application/json": { + code?: string; + message?: string; + documentation_url?: string; + errors?: { + code?: string; + message?: string; + }[]; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": + | { + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null; + } + | { + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number; + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string; + }; + }; + }; + }; + "projects/move-column": { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components["parameters"]["column-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string; + }; + }; + }; + }; + /** Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/get": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + "projects/delete": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Delete Success */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/update": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + /** Forbidden */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + errors?: string[]; + }; + }; + }; + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string; + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: "read" | "write" | "admin" | "none"; + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean; + }; + }; + }; + }; + /** Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ + "projects/list-collaborators": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ + "projects/add-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: "read" | "write" | "admin"; + } | null; + }; + }; + }; + /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ + "projects/remove-collaborator": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ + "projects/get-permission-for-user": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** 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": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project-column"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "projects/create-column": { + parameters: { + path: { + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project-column"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string; + }; + }; + }; + }; + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + "rate-limit/get": { + parameters: {}; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["rate-limit-overview"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ + "repos/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned + * repositories, you will get a `403 Forbidden` response. + */ + "repos/delete": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 307: components["responses"]["temporary_redirect"]; + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. */ + "repos/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["full-repository"]; + }; + }; + 307: components["responses"]["temporary_redirect"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the repository. */ + name?: string; + /** @description A short description of the repository. */ + description?: string; + /** @description A URL with more information about the repository. */ + homepage?: string; + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * @default false + */ + private?: boolean; + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: "public" | "private" | "internal"; + /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + security_and_analysis?: { + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string; + }; + /** @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; + /** + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. + * @default false + */ + use_squash_pr_title_as_default?: boolean; + /** + * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean; + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean; + }; + }; + }; + }; + /** Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-artifacts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["artifact"]; + }; + }; + }; + }; + /** Deletes an artifact for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-artifact": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the artifact. */ + artifact_id: components["parameters"]["artifact-id"]; + archive_format: string; + }; + }; + responses: { + /** Response */ + 302: never; + 410: components["responses"]["gone"]; + }; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-actions-cache-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-usage-by-repository"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/get-actions-cache-list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** An explicit key or prefix for identifying the cache */ + key?: components["parameters"]["actions-cache-key"]; + /** 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. */ + sort?: components["parameters"]["actions-cache-list-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/delete-actions-cache-by-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A key for identifying the cache. */ + key: components["parameters"]["actions-cache-key-required"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-cache-list"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/delete-actions-cache-by-id": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the GitHub Actions cache. */ + cache_id: components["parameters"]["cache-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["job"]; + }; + }; + }; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + "actions/download-job-logs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Re-run a job and its dependent jobs in a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-job-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the job. */ + job_id: components["parameters"]["job-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `organization_administration:read` permission to use this endpoint. + */ + "actions/get-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Status response */ + 200: { + content: { + "application/json": components["schemas"]["opt-out-oidc-custom-sub"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Sets the `opt-out` flag of a GitHub Actions OpenID Connect (OIDC) subject claim customization for a repository. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/set-custom-oidc-sub-claim-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Empty response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["opt-out-oidc-custom-sub"]; + }; + }; + }; + /** + * 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. + */ + "actions/get-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-repository-permissions"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/set-github-actions-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + enabled: components["schemas"]["actions-enabled"]; + allowed_actions?: components["schemas"]["allowed-actions"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/get-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + "actions/set-workflow-access-to-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-workflow-access-to-repository"]; + }; + }; + }; + /** + * Gets the settings for selected actions 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. + */ + "actions/get-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + }; + /** + * 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. + */ + "actions/set-allowed-actions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["selected-actions"]; + }; + }; + }; + /** + * 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. + */ + "actions/get-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-get-default-workflow-permissions"]; + }; + }; + }; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + "actions/set-github-actions-default-workflow-permissions-repository": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Success response */ + 204: never; + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["actions-set-default-workflow-permissions"]; + }; + }; + }; + /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/list-self-hosted-runners-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + runners: components["schemas"]["runner"][]; + }; + }; + }; + }; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/list-runner-applications-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner-application"][]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. You must authenticate + * using an access token with the `repo` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/octo-org/octo-repo-artifacts --token TOKEN + * ``` + */ + "actions/create-registration-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Returns a token that you can pass to remove a self-hosted runner from a repository. The token expires after one hour. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from a repository, replace TOKEN with the remove token provided by this endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` + */ + "actions/create-remove-token-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["authentication-token"]; + }; + }; + }; + }; + /** + * Gets a specific self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/get-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["runner"]; + }; + }; + }; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + "actions/delete-self-hosted-runner-from-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/list-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/set-custom-labels-for-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[]; + }; + }; + }; + }; + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/add-custom-labels-to-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The names of the custom labels to add to the runner. */ + labels: string[]; + }; + }; + }; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-all-custom-labels-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels_readonly"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + "actions/remove-custom-label-from-self-hosted-runner-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** Unique identifier of the self-hosted runner. */ + runner_id: components["parameters"]["runner-id"]; + /** The name of a self-hosted runner's custom label. */ + name: components["parameters"]["runner-label-name"]; + }; + }; + responses: { + 200: components["responses"]["actions_runner_labels"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/list-workflow-runs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** + * Delete a specific workflow run. Anyone with write access to the repository can use this endpoint. If the repository is + * private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:write` permission to use + * this endpoint. + */ + "actions/delete-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-reviews-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment-approvals"][]; + }; + }; + }; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/approve-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-workflow-run-artifacts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + artifacts: components["schemas"]["artifact"][]; + }; + }; + }; + }; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + "actions/get-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run"]; + }; + }; + }; + }; + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run-attempt": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-attempt-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + /** The attempt number of the workflow run. */ + attempt_number: components["parameters"]["attempt-number"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/cancel-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + 409: components["responses"]["conflict"]; + }; + }; + /** Lists jobs for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + "actions/list-jobs-for-workflow-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + query: { + /** Filters jobs by their `completed_at` timestamp. `latest` returns jobs from the most recent execution of the workflow run. `all` returns all jobs for a workflow run, including from old executions of the workflow run. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + jobs: components["schemas"]["job"][]; + }; + }; + }; + }; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + "actions/download-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** Deletes all logs for a workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/delete-workflow-run-logs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pending-deployment"][]; + }; + }; + }; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + "actions/review-pending-deployments-for-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[]; + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: "approved" | "rejected"; + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string; + }; + }; + }; + }; + /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ + "actions/re-run-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + "actions/re-run-workflow-failed-jobs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean; + } | null; + }; + }; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-run-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the workflow run. */ + run_id: components["parameters"]["run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-run-usage"]; + }; + }; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/list-repo-workflows": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflows: components["schemas"]["workflow"][]; + }; + }; + }; + }; + }; + /** Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "actions/get-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow"]; + }; + }; + }; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/disable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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)." + */ + "actions/create-workflow-dispatch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + 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 }; + }; + }; + }; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. + */ + "actions/enable-workflow": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + */ + "actions/list-workflow-runs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components["parameters"]["actor"]; + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components["parameters"]["workflow-run-branch"]; + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components["parameters"]["event"]; + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + status?: components["parameters"]["workflow-run-status"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components["parameters"]["created"]; + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components["parameters"]["exclude-pull-requests"]; + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components["parameters"]["workflow-run-check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + workflow_runs: components["schemas"]["workflow-run"][]; + }; + }; + }; + }; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "actions/get-workflow-usage": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components["parameters"]["workflow-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["workflow-usage"]; + }; + }; + }; + }; + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + "issues/list-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + "issues/check-user-can-be-assigned": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + assignee: string; + }; + }; + responses: { + /** If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. */ + 204: never; + /** Otherwise a `404` status code is returned. */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/list-autolinks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"][]; + }; + }; + }; + }; + /** Users with admin access to the repository can create an autolink. */ + "repos/create-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The prefix appended by alphanumeric 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 alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. */ + url_template: string; + }; + }; + }; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/get-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["autolink"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + "repos/delete-autolink": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the autolink. */ + autolink_id: components["parameters"]["autolink-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/enable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ + "repos/disable-automated-security-fixes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-branches": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["short-branch"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/get-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-protection"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + "repos/update-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: { + /** @description Require branches to be up to date before merging. */ + strict: boolean; + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[]; + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: { + /** @description The name of the required check */ + context: string; + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number; + }[]; + } | null; + /** @description Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ + enforce_admins: boolean | null; + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: { + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean; + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description 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/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null; + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean; + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean; + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/set-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/delete-admin-branch-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/delete-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + "repos/update-pull-request-review-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[]; + /** @description The list of team `slug`s with dismissal access */ + teams?: string[]; + /** @description The list of app `slug`s with dismissal access */ + apps?: string[]; + }; + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean; + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean; + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number; + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[]; + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[]; + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[]; + }; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + "repos/get-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + "repos/create-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["protected-branch-admin-enforced"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + "repos/delete-commit-signature-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-status-checks-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + "repos/update-status-check-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["status-check-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + 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; + }[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/get-all-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/set-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description contexts parameter */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/add-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description contexts parameter */ + contexts: string[]; + }; + }; + }; + }; + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "repos/remove-status-check-contexts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": string[]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description contexts parameter */ + contexts: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + "repos/get-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-restriction-policy"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + "repos/delete-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + "repos/get-apps-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-app-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["integration"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description apps parameter */ + apps: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + "repos/get-teams-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description teams parameter */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description teams parameter */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-team-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description teams parameter */ + teams: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + "repos/get-users-with-access-to-protected-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/set-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description users parameter */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/add-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description users parameter */ + users: string[]; + }; + }; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + "repos/remove-user-access-restrictions": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description users parameter */ + users: string[]; + }; + }; + }; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The permissions required to use this endpoint depends on whether you are renaming the default branch. + * + * To rename a non-default branch: + * + * * Users must have push access. + * * GitHub Apps must have the `contents:write` repository permission. + * + * To rename the default branch: + * + * * Users must have admin or owner permissions. + * * GitHub Apps must have the `administration:write` repository permission. + */ + "repos/rename-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the branch. */ + branch: components["parameters"]["branch"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["branch-with-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the branch. */ + new_name: string; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + "checks/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": ( + | ({ + /** @enum {undefined} */ + status: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string; + /** @description The SHA of the commit. */ + head_sha: string; + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * Format: date-time + * @description The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */ + output?: { + /** @description The title of the check run. */ + title: string; + /** @description The summary of the check run. This parameter supports Markdown. */ + summary: string; + /** @description The details of the check run. This parameter supports Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @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. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: { + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string; + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string; + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string; + }[]; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + "checks/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + "checks/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-run"]; + }; + }; + }; + requestBody: { + content: { + "application/json": (Partial< + { + /** @enum {undefined} */ + status?: "completed"; + } & { + conclusion: unknown; + } & { [key: string]: unknown } + > & + Partial< + { + /** @enum {undefined} */ + status?: "queued" | "in_progress"; + } & { [key: string]: unknown } + >) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string; + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string; + /** @description A reference for the run on the integrator's system. */ + external_id?: string; + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * @description The current status. + * @enum {string} + */ + status?: "queued" | "in_progress" | "completed"; + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "success" + | "skipped" + | "stale" + | "timed_out"; + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */ + output?: { + /** @description **Required**. */ + title?: string; + /** @description Can contain Markdown. */ + summary: string; + /** @description Can contain Markdown. */ + text?: string; + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + annotations?: { + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string; + /** @description The start line of the annotation. */ + start_line: number; + /** @description The end line of the annotation. */ + end_line: number; + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number; + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number; + /** + * @description The level of the annotation. + * @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. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + images?: { + /** @description The alternative text for the image. */ + alt: string; + /** @description The full URL of the image. */ + image_url: string; + /** @description A short image description. */ + caption?: string; + }[]; + }; + /** @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; + }[]; + }; + }; + }; + }; + /** Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. */ + "checks/list-annotations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["check-annotation"][]; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-run": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check run. */ + check_run_id: components["parameters"]["check-run-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 404: components["responses"]["not_found"]; + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + "checks/create-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the suite already exists */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + /** Response when the suite was created */ + 201: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The sha of the head commit. */ + head_sha: string; + }; + }; + }; + }; + /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + "checks/set-suites-preferences": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite-preference"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number; + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean; + }[]; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + "checks/get-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["check-suite"]; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + "checks/list-for-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + "checks/rerequest-suite": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the check suite. */ + check_suite_id: components["parameters"]["check-suite-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + "code-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The property by which to sort the results. . `number` is deprecated - we recommend that you use `created` instead. */ + sort?: "created" | "number" | "updated"; + /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + state?: components["schemas"]["code-scanning-alert-state"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-items"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. + */ + "code-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + "code-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["code-scanning-alert-set-state"]; + dismissed_reason?: components["schemas"]["code-scanning-alert-dismissed-reason"]; + dismissed_comment?: components["schemas"]["code-scanning-alert-dismissed-comment"]; + }; + }; + }; + }; + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + "code-scanning/list-alert-instances": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["parameters"]["git-ref"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-alert-instance"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the details of all code scanning analyses for a repository, + * starting with the most recent. + * The response is paginated and you can use the `page` and `per_page` parameters + * to list the analyses you're interested in. + * By default 30 analyses are listed per page. + * + * The `rules_count` field in the response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * **Deprecation notice**: + * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. + */ + "code-scanning/list-recent-analyses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + tool_name?: components["parameters"]["tool-name"]; + /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + tool_guid?: components["parameters"]["tool-guid"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ + ref?: components["schemas"]["code-scanning-ref"]; + /** Filter analyses belonging to the same SARIF upload. */ + sarif_id?: components["schemas"]["code-scanning-analysis-sarif-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"][]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + "code-scanning/get-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis"]; + "application/json+sarif": { [key: string]: unknown }; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + "code-scanning/delete-analysis": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number; + }; + query: { + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-analysis-deletion"]; + }; + }; + 400: components["responses"]["bad_request"]; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + */ + "code-scanning/upload-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-receipt"]; + }; + }; + /** Bad Request if the sarif field is invalid */ + 400: unknown; + 403: components["responses"]["code_scanning_forbidden_write"]; + 404: components["responses"]["not_found"]; + /** Payload Too Large if the sarif field is too large */ + 413: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + commit_sha: components["schemas"]["code-scanning-analysis-commit-sha"]; + ref: components["schemas"]["code-scanning-ref"]; + sarif: components["schemas"]["code-scanning-analysis-sarif-file"]; + /** + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ + */ + checkout_uri?: string; + /** + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string; + }; + }; + }; + }; + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + "code-scanning/get-sarif": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SARIF ID obtained after uploading. */ + sarif_id: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["code-scanning-sarifs-status"]; + }; + }; + 403: components["responses"]["code_scanning_forbidden_read"]; + /** Not Found if the sarif id does not match any upload */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + "repos/codeowners-errors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codeowners-errors"]; + }; + }; + /** Resource not found */ + 404: unknown; + }; + }; + /** + * 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. + */ + "codespaces/list-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + codespaces: components["schemas"]["codespace"][]; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * + * GitHub Apps must have write access to the `codespaces` repository permission to use this endpoint. + */ + "codespaces/create-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Git ref (typically a branch name) for this codespace */ + ref?: string; + /** @description Location for this codespace. 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; + }; + }; + }; + /** + * 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. + */ + "codespaces/list-devcontainers-in-repository-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + 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"]; + }; + }; + /** + * 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. + */ + "codespaces/repo-machines-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The location to check for available machines. Assigned by IP if not provided. */ + location?: string; + /** IP for location auto-detection when proxying a request */ + client_ip?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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. + */ + "codespaces/pre-flight-with-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The branch or commit to check for a default devcontainer path. If not specified, the default branch will be checked. */ + ref?: string; + /** An alternative IP for default location auto-detection, such as when proxying a request. */ + client_ip?: string; + }; + }; + responses: { + /** Response when a user is able to create codespaces from the repository. */ + 200: { + content: { + "application/json": { + billable_owner?: components["schemas"]["simple-user"]; + defaults?: { + location: string; + devcontainer_path: string | null; + }; + }; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "codespaces/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["repo-codespaces-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository 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. */ + "codespaces/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repo-codespaces-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository + * permission to use this endpoint. + * + * #### Example of encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example 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) + * ``` + */ + "codespaces/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. */ + "codespaces/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "repos/list-collaborators": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: "outside" | "direct" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["collaborator"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + "repos/check-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response if user is a collaborator */ + 204: never; + /** Not Found if user is not a collaborator */ + 404: unknown; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-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. + */ + "repos/add-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response when a new invitation is created */ + 201: { + content: { + "application/json": components["schemas"]["repository-invitation"]; + }; + }; + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** In addition to the enumerated values, you can also specify a custom repository role name, if the owning organization has defined any. + * @default push + * @enum {string} + */ + permission?: "pull" | "push" | "admin" | "maintain" | "triage"; + }; + }; + }; + }; + "repos/remove-collaborator": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + "repos/get-collaborator-permission-level": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user has admin permissions */ + 200: { + content: { + "application/json": components["schemas"]["repository-collaborator-permission"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + "repos/list-commit-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + "repos/get-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "repos/update-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + "reactions/list-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + "reactions/create-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + "reactions/delete-for-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + sha?: string; + /** Only commits containing this file path will be returned. */ + path?: string; + /** GitHub login or email address by which to filter by commit author. */ + author?: string; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + until?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + "repos/list-branches-for-head-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["branch-short"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + "repos/list-comments-for-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit-comment"][]; + }; + }; + }; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-commit-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["commit-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + /** @description Relative path of the file to comment on. */ + path?: string; + /** @description Line index in the diff to comment on. */ + position?: number; + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number; + }; + }; + }; + }; + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + "repos/list-pull-requests-associated-with-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + }; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + "checks/list-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** Returns check runs with the specified `status`. */ + status?: components["parameters"]["status"]; + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: "latest" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + app_id?: number; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_runs: components["schemas"]["check-run"][]; + }; + }; + }; + }; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + */ + "checks/list-suites-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** Filters check suites by GitHub App `id`. */ + app_id?: number; + /** Returns check runs with the specified `name`. */ + check_name?: components["parameters"]["check-name"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + check_suites: components["schemas"]["check-suite"][]; + }; + }; + }; + }; + }; + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + "repos/get-combined-status-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-commit-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + "repos/list-commit-statuses-for-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["status"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + }; + }; + /** + * This endpoint will return all community profile metrics, including an + * overall health score, repository description, the presence of documentation, detected + * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + "repos/get-community-profile-metrics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["community-profile"]; + }; + }; + }; + }; + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/compare-commits-with-basehead": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Note**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * + * #### 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. + */ + "repos/get-content": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/vnd.github.v3.object": components["schemas"]["content-tree"]; + "application/json": + | components["schemas"]["content-directory"] + | components["schemas"]["content-file"] + | components["schemas"]["content-symlink"] + | components["schemas"]["content-submodule"]; + }; + }; + 302: components["responses"]["found"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a new file or replaces an existing file in a repository. */ + "repos/create-or-update-file-contents": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The new file content, using Base64 encoding. */ + content: string; + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string; + }; + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string; + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string; + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string; + }; + }; + }; + }; + }; + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + "repos/delete-file": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** path parameter */ + path: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["file-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The commit message. */ + message: string; + /** @description The blob SHA of the file being replaced. */ + sha: string; + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string; + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string; + /** @description The email of the author (or committer) of the commit */ + email?: string; + }; + }; + }; + }; + }; + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + "repos/list-contributors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if repository contains content */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["contributor"][]; + }; + }; + /** Response if repository is empty */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/list-repo-secrets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["dependabot-secret"][]; + }; + }; + }; + }; + }; + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-public-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-public-key"]; + }; + }; + }; + }; + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/get-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["dependabot-secret"]; + }; + }; + }; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "dependabot/create-or-update-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string; + }; + }; + }; + }; + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + "dependabot/delete-repo-secret": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + "dependency-graph/diff-range": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string; + }; + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components["parameters"]["manifest-path"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["dependency-graph-diff"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** 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. */ + "dependency-graph/create-repository-snapshot": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": { + /** @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; + }; + }; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["snapshot"]; + }; + }; + }; + /** Simple filtering of deployments is available via query parameters: */ + "repos/list-deployments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The SHA recorded at creation time. */ + sha?: string; + /** The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string; + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string; + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment"][]; + }; + }; + }; + }; + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. + * + * #### Merged branch response + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating + * a deployment. This auto-merge happens when: + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. + * + * #### Merge conflict response + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't + * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * #### Failed commit status checks + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` + * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. + */ + "repos/create-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + /** Merged branch response */ + 202: { + content: { + "application/json": { + message?: string; + }; + }; + }; + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string; + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string; + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean; + /** @description The [status](https://docs.github.com/rest/commits/statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ + required_contexts?: string[]; + payload?: { [key: string]: unknown } | string; + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string; + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null; + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean; + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean; + }; + }; + }; + }; + "repos/get-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + */ + "repos/delete-deployment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Users with pull access can view deployment statuses for a deployment: */ + "repos/list-deployment-statuses": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deployment-status"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + "repos/create-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + 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; + }; + }; + }; + }; + /** Users with pull access can view a deployment status for a deployment: */ + "repos/get-deployment-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** deployment_id parameter */ + deployment_id: components["parameters"]["deployment-id"]; + status_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deployment-status"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "repos/create-dispatch-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + 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. */ + client_payload?: { [key: string]: unknown }; + }; + }; + }; + }; + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + "repos/get-all-environments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number; + environments?: components["schemas"]["environment"][]; + }; + }; + }; + }; + }; + /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ + "repos/get-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + }; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + "repos/create-or-update-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["environment"]; + }; + }; + /** Validation error when the environment name is invalid or when `protected_branches` and `custom_branch_policies` in `deployment_branch_policy` are set to the same value */ + 422: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + wait_timer?: components["schemas"]["wait-timer"]; + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components["schemas"]["deployment-reviewer-type"]; + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number; + }[] + | null; + deployment_branch_policy?: components["schemas"]["deployment-branch-policy"]; + } | null; + }; + }; + }; + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + "repos/delete-an-environment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + "activity/list-repo-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "repos/list-forks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ + sort?: "newest" | "oldest" | "stargazers" | "watchers"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 400: components["responses"]["bad_request"]; + }; + }; + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + "repos/create-fork": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string; + /** @description When forking from an existing repository, a new name for the fork. */ + name?: string; + } | null; + }; + }; + }; + "git/create-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["short-blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @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; + }; + }; + }; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + "git/get-blob": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + file_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["blob"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/create-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @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; + }; + }; + }; + }; + /** + * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/get-commit": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The SHA of the commit. */ + commit_sha: components["parameters"]["commit-sha"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-commit"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + */ + "git/list-matching-refs": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["git-ref"][]; + }; + }; + }; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + "git/get-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ + "git/create-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string; + /** @description The SHA1 value for this reference. */ + sha: string; + /** @example "refs/heads/newbranch" */ + key?: string; + }; + }; + }; + }; + "git/delete-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 204: never; + 422: components["responses"]["validation_failed"]; + }; + }; + "git/update-ref": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** ref parameter */ + ref: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-ref"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The SHA1 value to set this reference to */ + sha: string; + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean; + }; + }; + }; + }; + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/reference/git#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/create-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string; + /** @description The tag message. */ + message: string; + /** @description The SHA of the git object this is tagging. */ + object: string; + /** + * @description The 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; + }; + }; + }; + }; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "git/get-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tag_sha: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tag"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + "git/create-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string; + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: "100644" | "100755" | "040000" | "160000" | "120000"; + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: "blob" | "tree" | "commit"; + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null; + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string; + }[]; + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + base_tree?: string; + }; + }; + }; + }; + /** + * Returns a single tree using the SHA1 value for that tree. + * + * If `truncated` is `true` in the response then the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, use the non-recursive method of fetching trees, and fetch one sub-tree at a time. + */ + "git/get-tree": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + tree_sha: string; + }; + query: { + /** Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ + recursive?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["git-tree"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-webhooks": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["hook"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + "repos/create-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string; + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "abc" */ + token?: string; + /** @example "sha256" */ + digest?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + } | null; + }; + }; + }; + /** Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." */ + "repos/get-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." */ + "repos/update-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ + config?: { + url: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + /** @example "bar@example.com" */ + address?: string; + /** @example "The Serious Room" */ + room?: string; + }; + /** + * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[]; + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[]; + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[]; + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean; + }; + }; + }; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/reference/orgs#get-a-repository-webhook)." + * + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + */ + "repos/get-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * + * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + */ + "repos/update-webhook-config-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["webhook-config"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + url?: components["schemas"]["webhook-config-url"]; + content_type?: components["schemas"]["webhook-config-content-type"]; + secret?: components["schemas"]["webhook-config-secret"]; + insecure_ssl?: components["schemas"]["webhook-config-insecure-ssl"]; + }; + }; + }; + }; + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + "repos/list-webhook-deliveries": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components["parameters"]["cursor"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery-item"][]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a delivery for a webhook configured in a repository. */ + "repos/get-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hook-delivery"]; + }; + }; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + "repos/redeliver-webhook-delivery": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + delivery_id: components["parameters"]["delivery-id"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + "repos/ping-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + "repos/test-push-webhook": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the hook. */ + hook_id: components["parameters"]["hook-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "migrations/get-import-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Start a source import to a GitHub repository using GitHub Importer. */ + "migrations/start-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + 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; + }; + }; + }; + }; + /** Stop an import for a repository. */ + "migrations/cancel-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "migrations/update-import": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username to provide to the originating repository. */ + vcs_username?: string; + /** @description The password to provide to the originating repository. */ + vcs_password?: string; + /** + * @description The type of version control system you are migrating from. + * @example "git" + * @enum {string} + */ + vcs?: "subversion" | "tfvc" | "git" | "mercurial"; + /** + * @description For a tfvc import, the name of the project that is being imported. + * @example "project1" + */ + tfvc_project?: string; + } | null; + }; + }; + }; + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. + */ + "migrations/get-commit-authors": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ + "migrations/map-commit-author": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + author_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-author"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The new Git author email. */ + email?: string; + /** @description The new Git author name. */ + name?: string; + }; + }; + }; + }; + /** List files larger than 100MB found during the import */ + "migrations/get-large-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["porter-large-file"][]; + }; + }; + }; + }; + /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ + "migrations/set-lfs-preference": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["import"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + 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"; + }; + }; + }; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-repo-installation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ + "interactions/get-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + }; + }; + /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/set-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + /** Response */ + 409: unknown; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ + "interactions/remove-restrictions-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Response */ + 409: unknown; + }; + }; + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + "repos/list-invitations": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository-invitation"][]; + }; + }; + }; + }; + "repos/delete-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/update-invitation": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["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"; + }; + }; + }; + }; + /** + * List issues in a repository. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */ + milestone?: string; + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ + assignee?: string; + /** The user that created the issue. */ + creator?: string; + /** A user that's mentioned in the issue. */ + mentioned?: string; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "issues/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title: string | number; + /** @description The contents of the issue. */ + body?: string; + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null; + milestone?: (string | number) | null; + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[]; + }; + }; + }; + }; + /** By default, Issue Comments are ordered by ascending ID. */ + "issues/list-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + direction?: "asc" | "desc"; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + "reactions/list-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + "reactions/create-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + "reactions/delete-for-issue-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + "issues/get-event": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + event_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue-event"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Issue owners and users with push access can edit an issue. */ + "issues/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + 301: components["responses"]["moved_permanently"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the issue. */ + title?: (string | number) | null; + /** @description The contents of the issue. */ + body?: string | null; + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null; + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: "open" | "closed"; + milestone?: (string | number) | null; + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number; + name?: string; + description?: string | null; + color?: string | null; + } + )[]; + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[]; + }; + }; + }; + }; + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + "issues/add-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["issue"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[]; + }; + }; + }; + }; + /** Removes one or more assignees from an issue. */ + "issues/remove-assignees": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["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[]; + }; + }; + }; + }; + /** Issue Comments are ordered by ascending ID. */ + "issues/list-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "issues/create-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["issue-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The contents of the comment. */ + body: string; + }; + }; + }; + }; + "issues/list-events": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue-event-for-issue"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + "issues/list-labels-on-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 410: components["responses"]["gone"]; + }; + }; + /** Removes any previous labels and sets the new labels for an issue. */ + "issues/set-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/add-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[]; + } + | { + labels?: { + name: string; + }[]; + }; + }; + }; + }; + "issues/remove-all-labels": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 410: components["responses"]["gone"]; + }; + }; + /** Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ + "issues/remove-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "issues/lock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The 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; + }; + }; + }; + /** Users with push access can unlock an issue's conversation. */ + "issues/unlock": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + "reactions/list-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + "reactions/create-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + "reactions/delete-for-issue": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-events-for-timeline": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the issue. */ + issue_number: components["parameters"]["issue-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["timeline-issue-events"][]; + }; + }; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + }; + }; + "repos/list-deploy-keys": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["deploy-key"][]; + }; + }; + }; + }; + /** You can create a read-only deploy key. */ + "repos/create-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A name for the key. */ + title?: string; + /** @description The contents of the key. */ + key: string; + /** + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean; + }; + }; + }; + }; + "repos/get-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["deploy-key"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + "repos/delete-deploy-key": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/list-labels-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + "issues/get-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "issues/update-label": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + name: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["label"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string; + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string; + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string; + }; + }; + }; + }; + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + "repos/list-languages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["language"]; + }; + }; + }; + }; + "repos/enable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown; + }; + }; + "repos/disable-lfs-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + "licenses/get-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["license-content"]; + }; + }; + }; + }; + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + "repos/merge-upstream": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The branch has been successfully synced with the upstream repository */ + 200: { + content: { + "application/json": components["schemas"]["merged-upstream"]; + }; + }; + /** The branch could not be synced because of a merge conflict */ + 409: unknown; + /** The branch could not be synced for some other reason */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the branch which should be updated to match upstream. */ + branch: string; + }; + }; + }; + }; + "repos/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Successful Response (The resulting merge commit) */ + 201: { + content: { + "application/json": components["schemas"]["commit"]; + }; + }; + /** Response when already merged */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found when the base or head does not exist */ + 404: unknown; + /** Conflict when there is a merge conflict */ + 409: unknown; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the base branch that the head will be merged into. */ + base: string; + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string; + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string; + }; + }; + }; + }; + "issues/list-milestones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The state of the milestone. Either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** What to sort results by. Either `due_on` or `completeness`. */ + sort?: "due_on" | "completeness"; + /** The direction of the sort. Either `asc` or `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["milestone"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/create-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @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; + }; + }; + }; + }; + "issues/get-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["milestone"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "issues/delete-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + "issues/update-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["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; + }; + }; + }; + }; + "issues/list-labels-for-milestone": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the milestone. */ + milestone_number: components["parameters"]["milestone-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["label"][]; + }; + }; + }; + }; + /** List all notifications for the current user. */ + "activity/list-repo-notifications-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** If `true`, show notifications marked as read. */ + all?: components["parameters"]["all"]; + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + participating?: components["parameters"]["participating"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: components["parameters"]["before"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["thread"][]; + }; + }; + }; + }; + /** Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + "activity/mark-repo-notifications-as-read": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + /** Reset Content */ + 205: unknown; + }; + 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; + }; + }; + }; + }; + "repos/get-pages": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + "repos/update-information-about-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 400: components["responses"]["bad_request"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null; + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean; + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean; + source?: Partial<"gh-pages" | "master" | "master /docs"> & + Partial<{ + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: "/" | "/docs"; + }>; + }; + }; + }; + }; + /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ + "repos/create-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page"]; + }; + }; + 409: components["responses"]["conflict"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string; + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: "/" | "/docs"; + }; + } | null; + }; + }; + }; + "repos/delete-pages-site": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "repos/list-pages-builds": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["page-build"][]; + }; + }; + }; + }; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + "repos/request-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["page-build-status"]; + }; + }; + }; + }; + "repos/get-latest-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + "repos/get-pages-build": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + build_id: number; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["page-build"]; + }; + }; + }; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + "repos/get-pages-health-check": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pages-health-check"]; + }; + }; + /** Empty response */ + 202: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Custom domains are not available for GitHub Pages */ + 400: unknown; + 404: components["responses"]["not_found"]; + /** There isn't a CNAME for this page */ + 422: unknown; + }; + }; + /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/list-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["project"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 410: components["responses"]["gone"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the project. */ + name: string; + /** @description The description of the project. */ + body?: string; + }; + }; + }; + }; + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + "pulls/list": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Either `open`, `closed`, or `all` to filter by state. */ + state?: "open" | "closed" | "all"; + /** Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */ + head?: string; + /** Filter pulls by base branch name. Example: `gh-pages`. */ + base?: string; + /** What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). */ + sort?: "created" | "updated" | "popularity" | "long-running"; + /** The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + "pulls/create": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The title of the new pull request. */ + title?: string; + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string; + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string; + /** @description The contents of the pull request. */ + body?: string; + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean; + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean; + /** @example 1 */ + issue?: number; + }; + }; + }; + }; + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + sort?: "created" | "updated" | "created_at"; + /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** Provides details for a review comment. */ + "pulls/get-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Deletes a review comment. */ + "pulls/delete-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + }; + }; + /** Enables you to edit a review comment. */ + "pulls/update-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the reply to the review comment. */ + body: string; + }; + }; + }; + }; + /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ + "reactions/list-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + "reactions/create-for-pull-request-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + "reactions/delete-for-pull-request-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + */ + "pulls/get": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + */ + "pulls/update": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + 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; + }; + }; + }; + }; + /** + * 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. + */ + "codespaces/create-with-pr-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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; + }; + }; + }; + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + "pulls/list-review-comments": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + direction?: "asc" | "desc"; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-comment"][]; + }; + }; + }; + }; + /** + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id?: string; + /** @description The relative path to the file that necessitates a comment. */ + path?: string; + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: "LEFT" | "RIGHT"; + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line?: number; + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number; + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: "LEFT" | "RIGHT" | "side"; + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number; + }; + }; + }; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "pulls/create-reply-for-review-comment": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the comment. */ + comment_id: components["parameters"]["comment-id"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["pull-request-review-comment"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The text of the review comment. */ + body: string; + }; + }; + }; + }; + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + "pulls/list-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["commit"][]; + }; + }; + }; + }; + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + "pulls/list-files": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["diff-entry"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + 500: components["responses"]["internal_error"]; + }; + }; + "pulls/check-if-merged": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response if pull request has been merged */ + 204: never; + /** Not Found if pull request has not been merged */ + 404: unknown; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/merge": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** if merge was successful */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-merge-result"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + "application/json": { + message?: string; + documentation_url?: string; + }; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Title for the automatic commit message. */ + commit_title?: string; + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string; + /** @description SHA that pull request head must match to allow merge. */ + sha?: string; + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: "merge" | "squash" | "rebase"; + } | null; + }; + }; + }; + /** Lists the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + "pulls/list-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review-request"]; + }; + }; + }; + }; + /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + "pulls/request-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[]; + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[]; + }; + }; + }; + }; + "pulls/remove-requested-reviewers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-simple"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[]; + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[]; + }; + }; + }; + }; + /** The list of reviews returns in chronological order. */ + "pulls/list-reviews": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The list of reviews returns in chronological order. */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["pull-request-review"][]; + }; + }; + }; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + "pulls/create-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed_simple"]; + }; + 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/reference/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; + }[]; + }; + }; + }; + }; + "pulls/get-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Update the review summary comment with new text. */ + "pulls/update-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review. */ + body: string; + }; + }; + }; + }; + "pulls/delete-pending-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + }; + /** List comments for a specific pull request review. */ + "pulls/list-comments-for-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["review-comment"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/rest/reference/repos#branches), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ + "pulls/dismiss-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The message for the pull request review dismissal */ + message: string; + /** @example "APPROVE" */ + event?: string; + }; + }; + }; + }; + "pulls/submit-review": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + /** The unique identifier of the review. */ + review_id: components["parameters"]["review-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["pull-request-review"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The body text of the pull request review */ + body?: string; + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + }; + }; + }; + }; + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + "pulls/update-branch": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies the pull request. */ + pull_number: components["parameters"]["pull-number"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": { + message?: string; + url?: string; + }; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ + expected_head_sha?: string; + } | null; + }; + }; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + "repos/get-readme-in-directory": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The alternate path to look for a README file */ + dir: string; + }; + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-file"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + "repos/list-releases": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + "repos/create-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean; + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean; + }; + }; + }; + }; + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ + "repos/get-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + 302: components["responses"]["found"]; + 404: components["responses"]["not_found"]; + }; + }; + "repos/delete-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release asset. */ + "repos/update-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the asset. */ + asset_id: components["parameters"]["asset-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The file name of the asset. */ + name?: string; + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string; + /** @example "uploaded" */ + state?: string; + }; + }; + }; + }; + /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + "repos/generate-release-notes": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Name and body of generated release notes */ + 200: { + content: { + "application/json": components["schemas"]["release-notes-content"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string; + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string; + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string; + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string; + }; + }; + }; + }; + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + "repos/get-latest-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + }; + }; + /** Get a published release with the specified tag. */ + "repos/get-release-by-tag": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** tag parameter */ + tag: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + "repos/get-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia). */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Users with push access to the repository can delete a release. */ + "repos/delete-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Users with push access to the repository can edit a release. */ + "repos/update-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["release"]; + }; + }; + /** Not Found if the discussion category name is invalid */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The name of the tag. */ + tag_name?: string; + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string; + /** @description The name of the release. */ + name?: string; + /** @description Text describing the contents of the tag. */ + body?: string; + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean; + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean; + /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ + discussion_category_name?: string; + }; + }; + }; + }; + "repos/list-release-assets": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["release-asset"][]; + }; + }; + }; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in + * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. + * + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, + * you'll still need to pass your authentication to be able to upload an asset. + * + * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. + * + * **Notes:** + * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. + */ + "repos/upload-release-asset": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + name: string; + label?: string; + }; + }; + responses: { + /** Response for successful upload */ + 201: { + content: { + "application/json": components["schemas"]["release-asset"]; + }; + }; + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown; + }; + requestBody: { + content: { + "*/*": string; + }; + }; + }; + /** List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). */ + "reactions/list-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + "reactions/create-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + }; + }; + responses: { + /** Reaction exists */ + 200: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + /** Reaction created */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: "+1" | "laugh" | "heart" | "hooray" | "rocket" | "eyes"; + }; + }; + }; + }; + /** + * **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). + */ + "reactions/delete-for-release": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the release. */ + release_id: components["parameters"]["release-id"]; + /** The unique identifier of the reaction. */ + reaction_id: components["parameters"]["reaction-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "secret-scanning/list-alerts-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components["parameters"]["secret-scanning-alert-state"]; + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components["parameters"]["secret-scanning-alert-secret-type"]; + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components["parameters"]["secret-scanning-alert-resolution"]; + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components["parameters"]["secret-scanning-alert-sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** 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. */ + before?: components["parameters"]["secret-scanning-pagination-before-org-repo"]; + /** 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. */ + after?: components["parameters"]["secret-scanning-pagination-after-org-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"][]; + }; + }; + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/get-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + 304: components["responses"]["not_modified"]; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + */ + "secret-scanning/update-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["secret-scanning-alert"]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + /** State does not match the resolution */ + 422: unknown; + 503: components["responses"]["service_unavailable"]; + }; + requestBody: { + content: { + "application/json": { + state: components["schemas"]["secret-scanning-alert-state"]; + resolution?: components["schemas"]["secret-scanning-alert-resolution"]; + }; + }; + }; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + "secret-scanning/list-locations-for-alert": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components["parameters"]["alert-number"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["secret-scanning-location"][]; + }; + }; + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** + * Lists the people that have starred the repository. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "activity/list-stargazers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial & + Partial; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + "repos/get-code-frequency-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + "application/json": components["schemas"]["code-frequency-stat"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + "repos/get-commit-activity-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + "repos/get-contributors-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + 200: { + content: { + "application/json": components["schemas"]["contributor-activity"][]; + }; + }; + 202: components["responses"]["accepted"]; + 204: components["responses"]["no_content"]; + }; + }; + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + "repos/get-participation-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** The array order is oldest week (index 0) to most recent week. */ + 200: { + content: { + "application/json": components["schemas"]["participation-stats"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + "repos/get-punch-card-stats": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + "repos/create-commit-status": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + sha: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["status"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state of the status. + * @enum {string} + */ + state: "error" | "failure" | "pending" | "success"; + /** + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` + */ + target_url?: string; + /** @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; + }; + }; + }; + }; + /** Lists the people watching the specified repository. */ + "activity/list-watchers-for-repo": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "activity/get-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + 403: components["responses"]["forbidden"]; + /** Not Found if you don't subscribe to the repository */ + 404: unknown; + }; + }; + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ + "activity/set-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository-subscription"]; + }; + }; + }; + 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; + }; + }; + }; + }; + /** This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). */ + "activity/delete-repo-subscription": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + "repos/list-tags": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["tag"][]; + }; + }; + }; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + "repos/list-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["tag-protection"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/create-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["tag-protection"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string; + }; + }; + }; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + "repos/delete-tag-protection": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + /** The unique identifier of the tag protection. */ + tag_protection_id: components["parameters"]["tag-protection-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + "repos/download-tarball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + "repos/list-teams": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + }; + }; + "repos/get-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + "repos/replace-all-topics": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["topic"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed_simple"]; + }; + requestBody: { + content: { + "application/json": { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[]; + }; + }; + }; + }; + /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + "repos/get-clones": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["clone-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 popular contents over the last 14 days. */ + "repos/get-top-paths": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["content-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the top 10 referrers over the last 14 days. */ + "repos/get-top-referrers": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["referrer-traffic"][]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ + "repos/get-views": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + query: { + /** The time frame to display results for. */ + per?: components["parameters"]["per"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["view-traffic"]; + }; + }; + 403: components["responses"]["forbidden"]; + }; + }; + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + "repos/transfer": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 202: { + content: { + "application/json": components["schemas"]["minimal-repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string; + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[]; + }; + }; + }; + }; + /** 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/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/check-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if repository is enabled with vulnerability alerts */ + 204: never; + /** Not Found if repository is not enabled with vulnerability alerts */ + 404: unknown; + }; + }; + /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/enable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ + "repos/disable-vulnerability-alerts": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use + * the `Location` header to make a second `GET` request. + * **Note**: For private repositories, these links are temporary and expire after five minutes. + */ + "repos/download-zipball-archive": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + ref: string; + }; + }; + responses: { + /** Response */ + 302: never; + }; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository + */ + "repos/create-using-template": { + parameters: { + path: { + template_owner: string; + template_repo: string; + }; + }; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string; + /** @description The name of the new repository. */ + name: string; + /** @description A short description of the new repository. */ + description?: string; + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean; + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean; + }; + }; + }; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + "repos/list-public": { + parameters: { + query: { + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components["parameters"]["since-repo"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists all secrets available in an environment without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/list-environment-secrets": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["actions-secret"][]; + }; + }; + }; + }; + }; + /** Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-public-key": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-public-key"]; + }; + }; + }; + }; + /** Gets a single environment secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/get-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-secret"]; + }; + }; + }; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "actions/create-or-update-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response when creating a secret */ + 201: { + content: { + "application/json": components["schemas"]["empty-object"]; + }; + }; + /** Response when updating a secret */ + 204: never; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + }; + }; + }; + }; + /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ + "actions/delete-environment-secret": { + parameters: { + path: { + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + /** The name of the environment */ + environment_name: components["parameters"]["environment-name"]; + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Default response */ + 204: never; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/list-provisioned-groups-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components["parameters"]["start-index"]; + /** Used for pagination: the number of results to return. */ + count?: components["parameters"]["count"]; + /** filter results */ + filter?: string; + /** attributes to exclude */ + excludedAttributes?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-group-list-enterprise"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision an enterprise group, and invite users to the group. This sends invitation emails to the email address of the invited users to join the GitHub organization that the SCIM group corresponds to. + */ + "enterprise-admin/provision-and-invite-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string; + members?: { + /** @description The SCIM user ID for a user. */ + value: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/get-provisioning-information-for-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + query: { + /** Attributes to exclude. */ + excludedAttributes?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned group’s information. You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + */ + "enterprise-admin/set-information-for-provisioned-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string; + members?: { + /** @description The SCIM user ID for a user. */ + value: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/delete-scim-group-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned group’s individual attributes. To change a group’s values, you must provide a specific Operations JSON format that contains at least one of the add, remove, or replace operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + */ + "enterprise-admin/update-attribute-for-enterprise-group": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components["parameters"]["scim-group-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-group"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { + /** @enum {string} */ + op: "add" | "Add" | "remove" | "Remove" | "replace" | "Replace"; + path?: string; + /** @description Can be any value - string, number, array or object. */ + value?: unknown; + }[]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Retrieves a paginated list of all provisioned enterprise members, including pending invitations. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an enterprise, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an enterprise, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub enterprise. + * + * 1. The user attempts to access the GitHub enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub enterprise, and the external identity `null` entry remains in place. + */ + "enterprise-admin/list-provisioned-identities-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components["parameters"]["start-index"]; + /** Used for pagination: the number of results to return. */ + count?: components["parameters"]["count"]; + /** filter results */ + filter?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-user-list-enterprise"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * + * You can optionally include the groups a user will be invited to join. If you do not provide a list of `groups`, the user is provisioned for the enterprise, but no organization invitation emails will be sent. + */ + "enterprise-admin/provision-and-invite-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The username for the user. */ + userName: string; + name: { + /** @description The first name of the user. */ + givenName: string; + /** @description The last name of the user. */ + familyName: string; + }; + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string; + /** @description The type of email address. */ + type: string; + /** @description Whether this email address is the primary address. */ + primary: boolean; + }[]; + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/get-provisioning-information-for-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](#update-an-attribute-for-an-enterprise-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + "enterprise-admin/set-information-for-provisioned-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description The username for the user. */ + userName: string; + name: { + /** @description The first name of the user. */ + givenName: string; + /** @description The last name of the user. */ + familyName: string; + }; + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string; + /** @description The type of email address. */ + type: string; + /** @description Whether this email address is the primary address. */ + primary: boolean; + }[]; + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string; + }[]; + }; + }; + }; + }; + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + "enterprise-admin/delete-user-from-enterprise": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the enterprise, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + "enterprise-admin/update-attribute-for-enterprise-user": { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components["parameters"]["enterprise"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["scim-enterprise-user"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The SCIM schema URIs. */ + schemas: string[]; + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: unknown }[]; + }; + }; + }; + }; + /** + * Retrieves a paginated list of all provisioned organization members, including pending invitations. If you provide the `filter` parameter, the resources for all matching provisions members are returned. + * + * When a user with a SAML-provisioned external identity leaves (or is removed from) an organization, the account's metadata is immediately removed. However, the returned list of user accounts might not always match the organization or enterprise member list you see on GitHub. This can happen in certain cases where an external identity associated with an organization will not match an organization member: + * - When a user with a SCIM-provisioned external identity is removed from an organization, the account's metadata is preserved to allow the user to re-join the organization in the future. + * - When inviting a user to join an organization, you can expect to see their external identity in the results before they accept the invitation, or if the invitation is cancelled (or never accepted). + * - When a user is invited over SCIM, an external identity is created that matches with the invitee's email address. However, this identity is only linked to a user account when the user accepts the invitation by going through SAML SSO. + * + * The returned list of external identities can include an entry for a `null` user. These are unlinked SAML identities that are created when a user goes through the following Single Sign-On (SSO) process but does not sign in to their GitHub account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub organization. + * + * 1. The user attempts to access the GitHub organization and initiates the SAML SSO process, and is not currently signed in to their GitHub account. + * + * 1. After successfully authenticating with the SAML SSO IdP, the `null` external identity entry is created and the user is prompted to sign in to their GitHub account: + * - If the user signs in, their GitHub account is linked to this entry. + * - If the user does not sign in (or does not create a new account when prompted), they are not added to the GitHub organization, and the external identity `null` entry remains in place. + */ + "scim/list-provisioned-identities": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: number; + /** Used for pagination: the number of results to return. */ + count?: number; + /** + * Filters results using the equals query parameter operator (`eq`). You can filter results that are equal to `id`, `userName`, `emails`, and `external_id`. For example, to search for an identity with the `userName` Octocat, you would use this query: + * + * `?filter=userName%20eq%20\"Octocat\"`. + * + * To filter results for the identity with the email `octocat@github.com`, you would use this query: + * + * `?filter=emails%20eq%20\"octocat@github.com\"`. + */ + filter?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user-list"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["scim_bad_request"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + 429: components["responses"]["scim_too_many_requests"]; + }; + }; + /** Provision organization membership for a user, and send an activation email to the email address. */ + "scim/provision-and-invite-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["scim_bad_request"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + 409: components["responses"]["scim_conflict"]; + 500: components["responses"]["scim_internal_error"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string; + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string; + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + givenName: string; + familyName: string; + formatted?: string; + }; + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + value: string; + primary?: boolean; + type?: string; + }[]; + schemas?: string[]; + externalId?: string; + groups?: string[]; + active?: boolean; + }; + }; + }; + }; + "scim/get-provisioning-information-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + }; + }; + /** + * Replaces an existing provisioned user's information. You must provide all the information required for the user as if you were provisioning them for the first time. Any existing user information that you don't provide will be removed. If you want to only update a specific attribute, use the [Update an attribute for a SCIM user](https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user) endpoint instead. + * + * You must at least provide the required values for the user: `userName`, `name`, and `emails`. + * + * **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + */ + "scim/set-information-for-provisioned-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + }; + requestBody: { + content: { + "application/json": { + schemas?: string[]; + /** + * @description The name of the user, suitable for display to end-users + * @example Jon Doe + */ + displayName?: string; + externalId?: string; + groups?: string[]; + active?: boolean; + /** + * @description Configured by the admin. Could be an email, login, or username + * @example someone@example.com + */ + userName: string; + /** + * @example { + * "givenName": "Jane", + * "familyName": "User" + * } + */ + name: { + givenName: string; + familyName: string; + formatted?: string; + }; + /** + * @description user emails + * @example [ + * { + * "value": "someone@example.com", + * "primary": true + * }, + * { + * "value": "another@example.com", + * "primary": false + * } + * ] + */ + emails: { + type?: string; + value: string; + primary?: boolean; + }[]; + }; + }; + }; + }; + "scim/delete-user-from-org": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + }; + }; + /** + * Allows you to change a provisioned user's individual attributes. To change a user's values, you must provide a specific `Operations` JSON format that contains at least one of the `add`, `remove`, or `replace` operations. For examples and more information on the SCIM operations format, see the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). + * + * **Note:** Complicated SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will not work. + * + * **Warning:** If you set `active:false` using the `replace` operation (as shown in the JSON example below), it removes the user from the organization, deletes the external identity, and deletes the associated `:scim_user_id`. + * + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` + */ + "scim/update-attribute-for-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + /** The unique identifier of the SCIM user. */ + scim_user_id: components["parameters"]["scim-user-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/scim+json": components["schemas"]["scim-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["scim_bad_request"]; + 403: components["responses"]["scim_forbidden"]; + 404: components["responses"]["scim_not_found"]; + /** Response */ + 429: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + schemas?: string[]; + /** + * @description Set of operations to be performed + * @example [ + * { + * "op": "replace", + * "value": { + * "active": false + * } + * } + * ] + */ + Operations: { + /** @enum {string} */ + op: "add" | "remove" | "replace"; + path?: string; + value?: + | { + active?: boolean | null; + userName?: string | null; + externalId?: string | null; + givenName?: string | null; + familyName?: string | null; + } + | { + value?: string; + primary?: boolean; + }[] + | string; + }[]; + }; + }; + }; + }; + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: + * + * `q=addClass+in:file+language:js+repo:jquery/jquery` + * + * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. + * + * #### Considerations for code search + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing + * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + */ + "search/code": { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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. */ + q: string; + /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: "indexed"; + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + 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"]; + }; + }; + /** + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match + * metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * + * `q=repo:octocat/Spoon-Knife+css` + */ + "search/commits": { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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. */ + q: string; + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: "author-date" | "committer-date"; + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["commit-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted + * search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * `q=windows+label:bug+language:python+state:open&sort=created&order=asc` + * + * This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results. + * + * **Note:** For [user-to-server](https://docs.github.com/developers/apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) GitHub App requests, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)." + */ + "search/issues-and-pull-requests": { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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. */ + q: string; + /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + 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"]; + }; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * `q=bug+defect+enhancement&repository_id=64778136` + * + * The labels that best match the query appear first in the search results. + */ + "search/labels": { + parameters: { + query: { + /** The id of the repository. */ + repository_id: number; + /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ + q: string; + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: "created" | "updated"; + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + 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"]; + }; + }; + /** + * 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. + */ + "search/repos": { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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. */ + q: string; + /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + 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"]; + }; + }; + /** + * 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. + */ + "search/topics": { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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). */ + q: string; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["topic-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + "search/users": { + parameters: { + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as 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. */ + q: string; + /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ + sort?: "followers" | "repositories" | "joined"; + /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ + order?: components["parameters"]["order"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + incomplete_results: boolean; + items: components["schemas"]["user-search-result-item"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 422: components["responses"]["validation_failed"]; + 503: components["responses"]["service_unavailable"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/rest/reference/teams#get-a-team-by-name) endpoint. */ + "teams/get-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a team](https://docs.github.com/rest/reference/teams#delete-a-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + */ + "teams/delete-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a team](https://docs.github.com/rest/reference/teams#update-a-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + */ + "teams/update-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response when the updated information already exists */ + 200: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-full"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "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 | null; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://docs.github.com/rest/reference/teams#list-discussions) endpoint. + * + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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. + */ + "teams/create-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + 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; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://docs.github.com/rest/reference/teams#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion](https://docs.github.com/rest/reference/teams#update-a-discussion) endpoint. + * + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion post's title. */ + title?: string; + /** @description The discussion post's body text. */ + body?: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/list-discussion-comments-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-discussion-comment"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Create a discussion comment](https://docs.github.com/rest/reference/teams#create-a-discussion-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in 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. + */ + "teams/create-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/get-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Delete a discussion comment](https://docs.github.com/rest/reference/teams#delete-a-discussion-comment) endpoint. + * + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/delete-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "teams/update-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-discussion-comment"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The discussion comment's body text. */ + body: string; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation 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. + */ + "reactions/create-for-team-discussion-comment-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + /** The number that identifies the comment. */ + comment_number: components["parameters"]["comment-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + "reactions/list-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + query: { + /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["reaction"][]; + }; + }; + }; + }; + /** + * **Deprecation 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. + */ + "reactions/create-for-team-discussion-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The number that identifies the discussion. */ + discussion_number: components["parameters"]["discussion-number"]; + }; + }; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["reaction"]; + }; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + "teams/list-pending-invitations-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-invitation"][]; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * + * Team members will include the members of child teams. + */ + "teams/list-members-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** Filters members returned by their role in the team. */ + role?: "member" | "maintainer" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + "teams/get-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** if user is a member */ + 204: never; + /** if user is not a member */ + 404: unknown; + }; + }; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * 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)." + */ + "teams/add-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + /** Not Found if team synchronization is set up */ + 404: unknown; + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown; + }; + }; + /** + * 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/)." + */ + "teams/remove-member-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** Not Found if team synchronization is setup */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The 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). + */ + "teams/get-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + */ + "teams/add-or-update-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-membership"]; + }; + }; + /** Forbidden if team synchronization is set up */ + 403: unknown; + 404: components["responses"]["not_found"]; + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: "member" | "maintainer"; + }; + }; + }; + }; + /** + * **Deprecation 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/)." + */ + "teams/remove-membership-for-user-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** if team synchronization is set up */ + 403: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * + * Lists the organization projects for a team. + */ + "teams/list-projects-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-project"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + */ + "teams/check-permissions-for-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["team-project"]; + }; + }; + /** Not Found if project is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + */ + "teams/add-or-update-project-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + /** 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"]; + }; + 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"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + */ + "teams/remove-project-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The unique identifier of the project. */ + project_id: components["parameters"]["project-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ + "teams/list-repos-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a repository](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "teams/check-permissions-for-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Alternative response with extra repository information */ + 200: { + content: { + "application/json": components["schemas"]["team-repository"]; + }; + }; + /** Response if repository is managed by this team */ + 204: never; + /** Not Found if repository is not managed by this team */ + 404: unknown; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. + * + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + "teams/add-or-update-repo-permissions-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: "pull" | "push" | "admin"; + }; + }; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + */ + "teams/remove-repo-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * List IdP groups connected to a team on GitHub. + */ + "teams/list-idp-groups-for-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. + */ + "teams/create-or-update-idp-group-connections-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["group-mapping"]; + }; + }; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ + groups: { + /** @description ID of the IdP group. */ + group_id: string; + /** @description Name of the IdP group. */ + group_name: string; + /** @description Description of the IdP group. */ + group_description: string; + /** @example "caceab43fc9ffa20081c" */ + id?: string; + /** @example "external-team-6c13e7288ef7" */ + name?: string; + /** @example "moar cheese pleese" */ + description?: string; + }[]; + /** @example "I am not a timestamp" */ + synced_at?: string; + }; + }; + }; + }; + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + "teams/list-child-legacy": { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components["parameters"]["team-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** if child teams exist */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team"][]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + * + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + */ + "users/get-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ + "users/update-authenticated": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["private-user"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string; + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string; + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string; + /** + * @description The new Twitter username of the user. + * @example therealomarj + */ + twitter_username?: string | null; + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string; + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string; + /** @description The new hiring availability of the user. */ + hireable?: boolean; + /** @description The new short biography of the user. */ + bio?: string; + }; + }; + }; + }; + /** List the users you've blocked on your personal account. */ + "users/list-blocked-by-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "users/check-blocked": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** If the user is blocked: */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** If the user is not blocked: */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + "users/block": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "users/unblock": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "codespaces/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** ID of the Repository to filter on */ + repository_id?: components["parameters"]["repository-id-in-query"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * 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. + */ + "codespaces/create-for-authenticated-user": { + responses: { + /** Response when the codespace was successfully created */ + 201: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + /** Response when the codespace creation partially failed but is being retried in the background */ + 202: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": + | { + /** @description 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; + }; + }; + }; + }; + /** + * 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. + */ + "codespaces/list-secrets-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + secrets: components["schemas"]["codespaces-secret"][]; + }; + }; + }; + }; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * 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. + */ + "codespaces/get-public-key-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-user-public-key"]; + }; + }; + }; + }; + /** + * 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. + */ + "codespaces/get-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespaces-secret"]; + }; + }; + }; + }; + /** + * 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 [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + "codespaces/create-or-update-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response after successfully creaing a secret */ + 201: { + content: { + "application/json": { [key: string]: unknown }; + }; + }; + /** Response after successfully updating a secret */ + 204: never; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ + encrypted_value?: string; + /** @description ID of the key you used to encrypt the secret. */ + key_id: string; + /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ + selected_repository_ids?: string[]; + }; + }; + }; + }; + /** + * 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. + */ + "codespaces/delete-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + }; + }; + /** + * 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. + */ + "codespaces/list-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * 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. + */ + "codespaces/set-repositories-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + }; + }; + responses: { + /** 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"]; + }; + 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[]; + }; + }; + }; + }; + /** + * 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. + */ + "codespaces/add-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** No Content when repository was added to the selected list */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * Removes a repository from the selected repositories for a user's codespace secret. + * You must authenticate using an access token with the `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. + */ + "codespaces/remove-repository-for-secret-for-authenticated-user": { + parameters: { + path: { + /** The name of the secret. */ + secret_name: components["parameters"]["secret-name"]; + repository_id: number; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * 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. + */ + "codespaces/get-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * 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. + */ + "codespaces/delete-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + 202: components["responses"]["accepted"]; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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. + */ + "codespaces/update-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + requestBody: { + content: { + "application/json": { + /** @description 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[]; + }; + }; + }; + }; + /** + * 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. + */ + "codespaces/export-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** + * 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. + */ + "codespaces/get-export-details-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ + export_id: components["parameters"]["export-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace-export-details"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * 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. + */ + "codespaces/codespace-machines-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": { + total_count: number; + machines: components["schemas"]["codespace-machine"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; + /** + * 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. + */ + "codespaces/start-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["codespace"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + /** 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"]; + }; + }; + /** + * 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. + */ + "codespaces/stop-for-authenticated-user": { + parameters: { + path: { + /** The name of the codespace. */ + codespace_name: components["parameters"]["codespace-name"]; + }; + }; + responses: { + /** 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"]; + }; + }; + /** Sets the visibility for your primary email addresses. */ + "users/set-primary-email-visibility-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Denotes whether an email is publicly visible. + * @enum {string} + */ + visibility: "public" | "private"; + }; + }; + }; + }; + /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ + "users/list-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/add-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @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[]; + }; + }; + }; + }; + /** This endpoint is accessible with the `user` scope. */ + "users/delete-email-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description Email addresses associated with the GitHub user account. */ + emails: string[]; + }; + }; + }; + }; + /** Lists the people following the authenticated user. */ + "users/list-followers-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Lists the people who the authenticated user follows. */ + "users/list-followed-by-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "users/check-person-is-followed-by-authenticated": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** 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"]; + /** if the person is not followed by the authenticated user */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + "users/follow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ + "users/unfollow": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-gpg-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-gpg-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** @description A descriptive name for the new key. */ + name?: string; + /** @description A GPG key in ASCII-armored format. */ + armored_public_key: string; + }; + }; + }; + }; + /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["gpg-key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-gpg-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the GPG key. */ + gpg_key_id: components["parameters"]["gpg-key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. + */ + "apps/list-installations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** You can find the permissions for the installation under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + installations: components["schemas"]["installation"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. + */ + "apps/list-installation-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** The access the user has to each repository is included in the hash under the `permissions` key. */ + 200: { + headers: {}; + content: { + "application/json": { + total_count: number; + repository_selection?: string; + repositories: components["schemas"]["repository"][]; + }; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/add-repo-to-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + */ + "apps/remove-repo-from-installation-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the installation. */ + installation_id: components["parameters"]["installation-id"]; + /** The unique identifier of the repository. */ + repository_id: components["parameters"]["repository-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ + "interactions/get-restrictions-for-authenticated-user": { + responses: { + /** Default response */ + 200: { + content: { + "application/json": Partial< + components["schemas"]["interaction-limit-response"] + > & + Partial<{ [key: string]: unknown }>; + }; + }; + /** Response when there are no restrictions */ + 204: never; + }; + }; + /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ + "interactions/set-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["interaction-limit-response"]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": components["schemas"]["interaction-limit"]; + }; + }; + }; + /** Removes any interaction restrictions from your public repositories. */ + "interactions/remove-restrictions-for-authenticated-user": { + responses: { + /** Response */ + 204: never; + }; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + "issues/list-for-authenticated-user": { + parameters: { + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: + | "assigned" + | "created" + | "mentioned" + | "subscribed" + | "repos" + | "all"; + /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components["parameters"]["labels"]; + /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + sort?: "created" | "updated" | "comments"; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["issue"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/list-public-ssh-keys-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/create-public-ssh-key-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @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; + }; + }; + }; + }; + /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/get-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["key"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + "users/delete-public-ssh-key-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the key. */ + key_id: components["parameters"]["key-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ + "apps/list-subscriptions-for-authenticated-user-stubbed": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["user-marketplace-purchase"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + }; + }; + "orgs/list-memberships-for-authenticated-user": { + parameters: { + query: { + /** Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. */ + state?: "active" | "pending"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["org-membership"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + "orgs/get-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "orgs/update-membership-for-authenticated-user": { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["org-membership"]; + }; + }; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The state that the membership should be in. Only `"active"` will be accepted. + * @enum {string} + */ + state: "active"; + }; + }; + }; + }; + /** Lists all migrations a user has started. */ + "migrations/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["migration"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Initiates the generation of a user migration archive. */ + "migrations/start-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @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[]; + }; + }; + }; + }; + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + "migrations/get-status-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + exclude?: string[]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["migration"]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + "migrations/get-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 302: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ + "migrations/delete-archive-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ + "migrations/unlock-repo-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + /** repo_name parameter */ + repo_name: components["parameters"]["repo-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists all the repositories for this user migration. */ + "migrations/list-repos-for-authenticated-user": { + parameters: { + path: { + /** The unique identifier of the migration. */ + migration_id: components["parameters"]["migration-id"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + */ + "orgs/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Lists packages owned by the authenticated user within the user's namespace. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-authenticated-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + }; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + }; + query: { + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** The state of the package, either active or deleted. */ + state?: "active" | "deleted"; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/delete-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/restore-package-version-for-authenticated-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + "projects/create-for-authenticated-user": { + parameters: {}; + responses: { + /** 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"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string; + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null; + }; + }; + }; + }; + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ + "users/list-public-emails-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["email"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + "repos/list-for-authenticated-user": { + parameters: { + query: { + /** Limit results to repositories with the specified visibility. */ + visibility?: "all" | "public" | "private"; + /** + * Comma-separated list of values. Can include: + * \* `owner`: Repositories that are owned by the authenticated user. + * \* `collaborator`: Repositories that the user has been added to as a collaborator. + * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + */ + affiliation?: string; + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ + type?: "all" | "owner" | "public" | "private" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + before?: components["parameters"]["before"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository. + */ + "repos/create-for-authenticated-user": { + parameters: {}; + responses: { + /** Response */ + 201: { + headers: { + Location?: string; + }; + content: { + "application/json": components["schemas"]["repository"]; + }; + }; + 304: components["responses"]["not_modified"]; + 400: components["responses"]["bad_request"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + requestBody: { + content: { + "application/json": { + /** + * @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 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; + }; + }; + }; + }; + /** When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ + "repos/list-invitations-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["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": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** 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": { + parameters: { + path: { + /** The unique identifier of the invitation. */ + invitation_id: components["parameters"]["invitation-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + 409: components["responses"]["conflict"]; + }; + }; + /** + * Lists repositories the authenticated user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "activity/list-repos-starred-by-authenticated-user": { + parameters: { + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["repository"][]; + "application/vnd.github.v3.star+json": components["schemas"]["starred-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + "activity/check-repo-is-starred-by-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response if this repository is starred by you */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + /** Not Found if this repository is not starred by you */ + 404: { + content: { + "application/json": components["schemas"]["basic-error"]; + }; + }; + }; + }; + /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ + "activity/star-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "activity/unstar-repo-for-authenticated-user": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + }; + }; + responses: { + /** Response */ + 204: never; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** Lists repositories the authenticated user is watching. */ + "activity/list-watched-repos-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/apps/building-oauth-apps/). */ + "teams/list-for-authenticated-user": { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["team-full"][]; + }; + }; + 304: components["responses"]["not_modified"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + "users/list": { + parameters: { + query: { + /** A user ID. Only return users with an ID greater than this ID. */ + since?: components["parameters"]["since-user"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: { + Link?: string; + }; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + 304: components["responses"]["not_modified"]; + }; + }; + /** + * Provides publicly available information about someone with a GitHub account. + * + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub plan information' below" + * + * The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/overview/resources-in-the-rest-api#authentication). + * + * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/reference/users#emails)". + */ + "users/get-by-username": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": + | components["schemas"]["private-user"] + | components["schemas"]["public-user"]; + }; + }; + 404: components["responses"]["not_found"]; + }; + }; + /** If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. */ + "activity/list-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** This is the user's organization dashboard. You must be authenticated as the user to view this. */ + "activity/list-org-events-for-authenticated-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** The organization name. The name is not case sensitive. */ + org: components["parameters"]["org"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists the people following the specified user. */ + "users/list-followers-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + /** Lists the people who the specified user follows. */ + "users/list-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["simple-user"][]; + }; + }; + }; + }; + "users/check-following-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + target_user: string; + }; + }; + responses: { + /** if the user follows the target user */ + 204: never; + /** if the user does not follow the target user */ + 404: unknown; + }; + }; + /** Lists public gists for the specified user: */ + "gists/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ + since?: components["parameters"]["since"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["base-gist"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** Lists the GPG keys for a user. This information is accessible by anyone. */ + "users/list-gpg-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["gpg-key"][]; + }; + }; + }; + }; + /** + * Provides hovercard information when authenticated through basic auth or OAuth with the `repo` scope. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations. + * + * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: + * + * ```shell + * curl -u username:token + * https://api.github.com/users/octocat/hovercard?subject_type=repository&subject_id=1300192 + * ``` + */ + "users/get-context-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`. */ + subject_type?: "organization" | "repository" | "issue" | "pull_request"; + /** Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ + subject_id?: string; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["hovercard"]; + }; + }; + 404: components["responses"]["not_found"]; + 422: components["responses"]["validation_failed"]; + }; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + "apps/get-user-installation": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["installation"]; + }; + }; + }; + }; + /** Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ + "users/list-public-keys-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["key-simple"][]; + }; + }; + }; + }; + /** + * 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. + */ + "orgs/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["organization-simple"][]; + }; + }; + }; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/list-packages-for-user": { + parameters: { + query: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: + | "npm" + | "maven" + | "rubygems" + | "docker" + | "nuget" + | "container"; + /** The selected visibility of the packages. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ + visibility?: components["parameters"]["package-visibility"]; + }; + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + }; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package"]; + }; + }; + }; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** package token */ + token?: string; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-all-package-versions-for-package-owned-by-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"][]; + }; + }; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + "packages/get-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["package-version"]; + }; + }; + }; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + */ + "packages/delete-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: + * - If `package_type` is not `container`, your token must also include the `repo` scope. + * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + */ + "packages/restore-package-version-for-user": { + parameters: { + path: { + /** The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ + package_type: components["parameters"]["package-type"]; + /** The name of the package. */ + package_name: components["parameters"]["package-name"]; + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + /** Unique identifier of the package version. */ + package_version_id: components["parameters"]["package-version-id"]; + }; + }; + responses: { + /** Response */ + 204: never; + 401: components["responses"]["requires_authentication"]; + 403: components["responses"]["forbidden"]; + 404: components["responses"]["not_found"]; + }; + }; + "projects/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + state?: "open" | "closed" | "all"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["project"][]; + }; + }; + 422: components["responses"]["validation_failed"]; + }; + }; + /** These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. */ + "activity/list-received-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + "activity/list-received-public-events-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["event"][]; + }; + }; + }; + }; + /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ + "repos/list-for-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** Limit results to repositories of the specified type. */ + type?: "all" | "owner" | "member"; + /** The property to sort the results by. */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: "asc" | "desc"; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-actions-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["actions-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-github-packages-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["packages-billing-usage"]; + }; + }; + }; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + "billing/get-shared-storage-billing-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["combined-billing-usage"]; + }; + }; + }; + }; + /** + * Lists repositories a user has starred. + * + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `Accept` header: + */ + "activity/list-repos-starred-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components["parameters"]["sort"]; + /** The direction to sort the results by. */ + direction?: components["parameters"]["direction"]; + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": Partial< + components["schemas"]["starred-repository"][] + > & + Partial; + }; + }; + }; + }; + /** Lists repositories a user is watching. */ + "activity/list-repos-watched-by-user": { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components["parameters"]["username"]; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + headers: {}; + content: { + "application/json": components["schemas"]["minimal-repository"][]; + }; + }; + }; + }; + /** Get a random sentence from the Zen of GitHub */ + "meta/get-zen": { + responses: { + /** Response */ + 200: { + content: { + "text/plain": string; + }; + }; + }; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + "repos/compare-commits": { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components["parameters"]["owner"]; + /** The name of the repository. The name is not case sensitive. */ + repo: components["parameters"]["repo"]; + base: string; + head: string; + }; + query: { + /** The number of results per page (max 100). */ + per_page?: components["parameters"]["per-page"]; + /** Page number of the results to fetch. */ + page?: components["parameters"]["page"]; + }; + }; + responses: { + /** Response */ + 200: { + content: { + "application/json": components["schemas"]["commit-comparison"]; + }; + }; + 404: components["responses"]["not_found"]; + 500: components["responses"]["internal_error"]; + }; + }; +} + +export interface external {} diff --git a/node_modules/@octokit/plugin-paginate-rest/LICENSE b/node_modules/@octokit/plugin-paginate-rest/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@octokit/plugin-paginate-rest/README.md b/node_modules/@octokit/plugin-paginate-rest/README.md new file mode 100644 index 0000000..1e3c0ba --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/README.md @@ -0,0 +1,269 @@ +# plugin-paginate-rest.js + +> Octokit plugin to paginate REST API endpoint responses + +[![@latest](https://img.shields.io/npm/v/@octokit/plugin-paginate-rest.svg)](https://www.npmjs.com/package/@octokit/plugin-paginate-rest) +[![Build Status](https://github.com/octokit/plugin-paginate-rest.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-paginate-rest.js/actions?workflow=Test) + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/plugin-paginate-rest` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with `npm install @octokit/core @octokit/plugin-paginate-rest`. Optionally replace `@octokit/core` with a core-compatible module + +```js +const { Octokit } = require("@octokit/core"); +const { + paginateRest, + composePaginateRest, +} = require("@octokit/plugin-paginate-rest"); +``` + +
+ +```js +const MyOctokit = Octokit.plugin(paginateRest); +const octokit = new MyOctokit({ auth: "secret123" }); + +// See https://developer.github.com/v3/issues/#list-issues-for-a-repository +const issues = await octokit.paginate("GET /repos/{owner}/{repo}/issues", { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}); +``` + +If you want to utilize the pagination methods in another plugin, use `composePaginateRest`. + +```js +function myPlugin(octokit, options) { + return { + allStars({owner, repo}) => { + return composePaginateRest( + octokit, + "GET /repos/{owner}/{repo}/stargazers", + {owner, repo } + ) + } + } +} +``` + +## `octokit.paginate()` + +The `paginateRest` plugin adds a new `octokit.paginate()` method which accepts the same parameters as [`octokit.request`](https://github.com/octokit/request.js#request). Only "List ..." endpoints such as [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) are supporting pagination. Their [response includes a Link header](https://developer.github.com/v3/issues/#response-1). For other endpoints, `octokit.paginate()` behaves the same as `octokit.request()`. + +The `per_page` parameter is usually defaulting to `30`, and can be set to up to `100`, which helps retrieving a big amount of data without hitting the rate limits too soon. + +An optional `mapFunction` can be passed to map each page response to a new value, usually an array with only the data you need. This can help to reduce memory usage, as only the relevant data has to be kept in memory until the pagination is complete. + +```js +const issueTitles = await octokit.paginate( + "GET /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, + }, + (response) => response.data.map((issue) => issue.title) +); +``` + +The `mapFunction` gets a 2nd argument `done` which can be called to end the pagination early. + +```js +const issues = await octokit.paginate( + "GET /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, + }, + (response, done) => { + if (response.data.find((issue) => issue.title.includes("something"))) { + done(); + } + return response.data; + } +); +``` + +Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/): + +```js +const issues = await octokit.paginate(octokit.rest.issues.listForRepo, { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}); +``` + +## `octokit.paginate.iterator()` + +If your target runtime environments supports async iterators (such as most modern browsers and Node 10+), you can iterate through each response + +```js +const parameters = { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}; +for await (const response of octokit.paginate.iterator( + "GET /repos/{owner}/{repo}/issues", + parameters +)) { + // do whatever you want with each response, break out of the loop, etc. + const issues = response.data; + console.log("%d issues found", issues.length); +} +``` + +Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/): + +```js +const parameters = { + owner: "octocat", + repo: "hello-world", + since: "2010-10-01", + per_page: 100, +}; +for await (const response of octokit.paginate.iterator( + octokit.rest.issues.listForRepo, + parameters +)) { + // do whatever you want with each response, break out of the loop, etc. + const issues = response.data; + console.log("%d issues found", issues.length); +} +``` + +## `composePaginateRest` and `composePaginateRest.iterator` + +The `compose*` methods work just like their `octokit.*` counterparts described above, with the differenct that both methods require an `octokit` instance to be passed as first argument + +## How it works + +`octokit.paginate()` wraps `octokit.request()`. As long as a `rel="next"` link value is present in the response's `Link` header, it sends another request for that URL, and so on. + +Most of GitHub's paginating REST API endpoints return an array, but there are a few exceptions which return an object with a key that includes the items array. For example: + +- [Search repositories](https://developer.github.com/v3/search/#example) (key `items`) +- [List check runs for a specific ref](https://developer.github.com/v3/checks/runs/#response-3) (key: `check_runs`) +- [List check suites for a specific ref](https://developer.github.com/v3/checks/suites/#response-1) (key: `check_suites`) +- [List repositories](https://developer.github.com/v3/apps/installations/#list-repositories) for an installation (key: `repositories`) +- [List installations for a user](https://developer.github.com/v3/apps/installations/#response-1) (key `installations`) + +`octokit.paginate()` is working around these inconsistencies so you don't have to worry about it. + +If a response is lacking the `Link` header, `octokit.paginate()` still resolves with an array, even if the response returns a single object. + +## Types + +The plugin also exposes some types and runtime type guards for TypeScript projects. + + + + + + +
+Types + + +```typescript +import { + PaginateInterface, + PaginatingEndpoints, +} from "@octokit/plugin-paginate-rest"; +``` + +
+Guards + + +```typescript +import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest"; +``` + +
+ +### PaginateInterface + +An `interface` that declares all the overloads of the `.paginate` method. + +### PaginatingEndpoints + +An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments. + +```typescript +import { Octokit } from "@octokit/core"; +import { + PaginatingEndpoints, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; + +type DataType = "data" extends keyof T ? T["data"] : unknown; + +async function myPaginatePlugin( + octokit: Octokit, + endpoint: E, + parameters?: PaginatingEndpoints[E]["parameters"] +): Promise> { + return await composePaginateRest(octokit, endpoint, parameters); +} +``` + +### isPaginatingEndpoint + +A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`). + +```typescript +import { Octokit } from "@octokit/core"; +import { + isPaginatingEndpoint, + composePaginateRest, +} from "@octokit/plugin-paginate-rest"; + +async function myPlugin(octokit: Octokit, arg: unknown) { + if (isPaginatingEndpoint(arg)) { + return await composePaginateRest(octokit, arg); + } + // ... +} +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js new file mode 100644 index 0000000..d5fc599 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js @@ -0,0 +1,205 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "2.21.3"; + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + enumerableOnly && (symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + })), keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = null != arguments[i] ? arguments[i] : {}; + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { + _defineProperty(target, key, source[key]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint. + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. + * + * We check if a "total_count" key is present in the response data, but also make sure that + * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would + * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + */ +function normalizePaginatedListResponse(response) { + // endpoints can respond with 204 if repository is empty + if (!response.data) { + return _objectSpread2(_objectSpread2({}, response), {}, { + data: [] + }); + } + + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) return response; // keep the additional properties intact as there is currently no other way + // to retrieve the same information. + + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + + response.data.total_count = totalCount; + return response; +} + +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) return { + done: true + }; + + try { + const response = await requestMethod({ + method, + url, + headers + }); + const normalizedResponse = normalizePaginatedListResponse(response); // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set + + url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { + value: normalizedResponse + }; + } catch (error) { + if (error.status !== 409) throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + + }) + }; +} + +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = undefined; + } + + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); +} + +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then(result => { + if (result.done) { + return results; + } + + let earlyExit = false; + + function done() { + earlyExit = true; + } + + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); + + if (earlyExit) { + return results; + } + + return gather(octokit, results, iterator, mapFn); + }); +} + +const composePaginateRest = Object.assign(paginate, { + iterator +}); + +const paginatingEndpoints = ["GET /app/hook/deliveries", "GET /app/installations", "GET /applications/grants", "GET /authorizations", "GET /enterprises/{enterprise}/actions/permissions/organizations", "GET /enterprises/{enterprise}/actions/runner-groups", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "GET /enterprises/{enterprise}/actions/runners", "GET /enterprises/{enterprise}/audit-log", "GET /enterprises/{enterprise}/secret-scanning/alerts", "GET /enterprises/{enterprise}/settings/billing/advanced-security", "GET /events", "GET /gists", "GET /gists/public", "GET /gists/starred", "GET /gists/{gist_id}/comments", "GET /gists/{gist_id}/commits", "GET /gists/{gist_id}/forks", "GET /installation/repositories", "GET /issues", "GET /licenses", "GET /marketplace_listing/plans", "GET /marketplace_listing/plans/{plan_id}/accounts", "GET /marketplace_listing/stubbed/plans", "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", "GET /networks/{owner}/{repo}/events", "GET /notifications", "GET /organizations", "GET /orgs/{org}/actions/cache/usage-by-repository", "GET /orgs/{org}/actions/permissions/repositories", "GET /orgs/{org}/actions/runner-groups", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "GET /orgs/{org}/actions/runners", "GET /orgs/{org}/actions/secrets", "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", "GET /orgs/{org}/audit-log", "GET /orgs/{org}/blocks", "GET /orgs/{org}/code-scanning/alerts", "GET /orgs/{org}/codespaces", "GET /orgs/{org}/credential-authorizations", "GET /orgs/{org}/dependabot/secrets", "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", "GET /orgs/{org}/events", "GET /orgs/{org}/external-groups", "GET /orgs/{org}/failed_invitations", "GET /orgs/{org}/hooks", "GET /orgs/{org}/hooks/{hook_id}/deliveries", "GET /orgs/{org}/installations", "GET /orgs/{org}/invitations", "GET /orgs/{org}/invitations/{invitation_id}/teams", "GET /orgs/{org}/issues", "GET /orgs/{org}/members", "GET /orgs/{org}/migrations", "GET /orgs/{org}/migrations/{migration_id}/repositories", "GET /orgs/{org}/outside_collaborators", "GET /orgs/{org}/packages", "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", "GET /orgs/{org}/projects", "GET /orgs/{org}/public_members", "GET /orgs/{org}/repos", "GET /orgs/{org}/secret-scanning/alerts", "GET /orgs/{org}/settings/billing/advanced-security", "GET /orgs/{org}/team-sync/groups", "GET /orgs/{org}/teams", "GET /orgs/{org}/teams/{team_slug}/discussions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "GET /orgs/{org}/teams/{team_slug}/invitations", "GET /orgs/{org}/teams/{team_slug}/members", "GET /orgs/{org}/teams/{team_slug}/projects", "GET /orgs/{org}/teams/{team_slug}/repos", "GET /orgs/{org}/teams/{team_slug}/teams", "GET /projects/columns/{column_id}/cards", "GET /projects/{project_id}/collaborators", "GET /projects/{project_id}/columns", "GET /repos/{owner}/{repo}/actions/artifacts", "GET /repos/{owner}/{repo}/actions/caches", "GET /repos/{owner}/{repo}/actions/runners", "GET /repos/{owner}/{repo}/actions/runs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "GET /repos/{owner}/{repo}/actions/secrets", "GET /repos/{owner}/{repo}/actions/workflows", "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "GET /repos/{owner}/{repo}/assignees", "GET /repos/{owner}/{repo}/branches", "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "GET /repos/{owner}/{repo}/code-scanning/alerts", "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "GET /repos/{owner}/{repo}/code-scanning/analyses", "GET /repos/{owner}/{repo}/codespaces", "GET /repos/{owner}/{repo}/codespaces/devcontainers", "GET /repos/{owner}/{repo}/codespaces/secrets", "GET /repos/{owner}/{repo}/collaborators", "GET /repos/{owner}/{repo}/comments", "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/commits", "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", "GET /repos/{owner}/{repo}/commits/{ref}/status", "GET /repos/{owner}/{repo}/commits/{ref}/statuses", "GET /repos/{owner}/{repo}/contributors", "GET /repos/{owner}/{repo}/dependabot/secrets", "GET /repos/{owner}/{repo}/deployments", "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "GET /repos/{owner}/{repo}/environments", "GET /repos/{owner}/{repo}/events", "GET /repos/{owner}/{repo}/forks", "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", "GET /repos/{owner}/{repo}/hooks", "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "GET /repos/{owner}/{repo}/invitations", "GET /repos/{owner}/{repo}/issues", "GET /repos/{owner}/{repo}/issues/comments", "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/issues/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", "GET /repos/{owner}/{repo}/issues/{issue_number}/events", "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", "GET /repos/{owner}/{repo}/keys", "GET /repos/{owner}/{repo}/labels", "GET /repos/{owner}/{repo}/milestones", "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", "GET /repos/{owner}/{repo}/notifications", "GET /repos/{owner}/{repo}/pages/builds", "GET /repos/{owner}/{repo}/projects", "GET /repos/{owner}/{repo}/pulls", "GET /repos/{owner}/{repo}/pulls/comments", "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "GET /repos/{owner}/{repo}/releases", "GET /repos/{owner}/{repo}/releases/{release_id}/assets", "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", "GET /repos/{owner}/{repo}/secret-scanning/alerts", "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "GET /repos/{owner}/{repo}/stargazers", "GET /repos/{owner}/{repo}/subscribers", "GET /repos/{owner}/{repo}/tags", "GET /repos/{owner}/{repo}/teams", "GET /repos/{owner}/{repo}/topics", "GET /repositories", "GET /repositories/{repository_id}/environments/{environment_name}/secrets", "GET /search/code", "GET /search/commits", "GET /search/issues", "GET /search/labels", "GET /search/repositories", "GET /search/topics", "GET /search/users", "GET /teams/{team_id}/discussions", "GET /teams/{team_id}/discussions/{discussion_number}/comments", "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "GET /teams/{team_id}/discussions/{discussion_number}/reactions", "GET /teams/{team_id}/invitations", "GET /teams/{team_id}/members", "GET /teams/{team_id}/projects", "GET /teams/{team_id}/repos", "GET /teams/{team_id}/teams", "GET /user/blocks", "GET /user/codespaces", "GET /user/codespaces/secrets", "GET /user/emails", "GET /user/followers", "GET /user/following", "GET /user/gpg_keys", "GET /user/installations", "GET /user/installations/{installation_id}/repositories", "GET /user/issues", "GET /user/keys", "GET /user/marketplace_purchases", "GET /user/marketplace_purchases/stubbed", "GET /user/memberships/orgs", "GET /user/migrations", "GET /user/migrations/{migration_id}/repositories", "GET /user/orgs", "GET /user/packages", "GET /user/packages/{package_type}/{package_name}/versions", "GET /user/public_emails", "GET /user/repos", "GET /user/repository_invitations", "GET /user/starred", "GET /user/subscriptions", "GET /user/teams", "GET /users", "GET /users/{username}/events", "GET /users/{username}/events/orgs/{org}", "GET /users/{username}/events/public", "GET /users/{username}/followers", "GET /users/{username}/following", "GET /users/{username}/gists", "GET /users/{username}/gpg_keys", "GET /users/{username}/keys", "GET /users/{username}/orgs", "GET /users/{username}/packages", "GET /users/{username}/projects", "GET /users/{username}/received_events", "GET /users/{username}/received_events/public", "GET /users/{username}/repos", "GET /users/{username}/starred", "GET /users/{username}/subscriptions"]; + +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ + +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; + +exports.composePaginateRest = composePaginateRest; +exports.isPaginatingEndpoint = isPaginatingEndpoint; +exports.paginateRest = paginateRest; +exports.paginatingEndpoints = paginatingEndpoints; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map new file mode 100644 index 0000000..fb04fff --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/normalize-paginated-list-response.js","../dist-src/iterator.js","../dist-src/paginate.js","../dist-src/compose-paginate.js","../dist-src/generated/paginating-endpoints.js","../dist-src/paginating-endpoints.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.21.3\";\n","/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nexport function normalizePaginatedListResponse(response) {\n // endpoints can respond with 204 if repository is empty\n if (!response.data) {\n return {\n ...response,\n data: [],\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n","import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response\";\nexport function iterator(octokit, route, parameters) {\n const options = typeof route === \"function\"\n ? route.endpoint(parameters)\n : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return { value: normalizedResponse };\n }\n catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: [],\n },\n };\n }\n },\n }),\n };\n}\n","import { iterator } from \"./iterator\";\nexport function paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator, mapFn);\n });\n}\n","import { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport const composePaginateRest = Object.assign(paginate, {\n iterator,\n});\n","export const paginatingEndpoints = [\n \"GET /app/hook/deliveries\",\n \"GET /app/installations\",\n \"GET /applications/grants\",\n \"GET /authorizations\",\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /enterprises/{enterprise}/actions/runners\",\n \"GET /enterprises/{enterprise}/audit-log\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runner-groups\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/audit-log\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/credential-authorizations\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/external-groups\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n \"GET /orgs/{org}/team-sync/groups\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\",\n];\n","import { paginatingEndpoints, } from \"./generated/paginating-endpoints\";\nexport { paginatingEndpoints } from \"./generated/paginating-endpoints\";\nexport function isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n }\n else {\n return false;\n }\n}\n","import { VERSION } from \"./version\";\nimport { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport { composePaginateRest } from \"./compose-paginate\";\nexport { isPaginatingEndpoint, paginatingEndpoints, } from \"./paginating-endpoints\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit),\n }),\n };\n}\npaginateRest.VERSION = VERSION;\n"],"names":["VERSION","normalizePaginatedListResponse","response","data","responseNeedsNormalization","incompleteResults","incomplete_results","repositorySelection","repository_selection","totalCount","total_count","namespaceKey","Object","keys","iterator","octokit","route","parameters","options","endpoint","request","requestMethod","method","headers","url","Symbol","asyncIterator","next","done","normalizedResponse","link","match","value","error","status","paginate","mapFn","undefined","gather","results","then","result","earlyExit","concat","composePaginateRest","assign","paginatingEndpoints","isPaginatingEndpoint","arg","includes","paginateRest","bind"],"mappings":";;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AAAO,SAASC,8BAAT,CAAwCC,QAAxC,EAAkD;;EAErD,IAAI,CAACA,QAAQ,CAACC,IAAd,EAAoB;IAChB,yCACOD,QADP;MAEIC,IAAI,EAAE;;;;EAGd,MAAMC,0BAA0B,GAAG,iBAAiBF,QAAQ,CAACC,IAA1B,IAAkC,EAAE,SAASD,QAAQ,CAACC,IAApB,CAArE;EACA,IAAI,CAACC,0BAAL,EACI,OAAOF,QAAP,CAViD;;;EAarD,MAAMG,iBAAiB,GAAGH,QAAQ,CAACC,IAAT,CAAcG,kBAAxC;EACA,MAAMC,mBAAmB,GAAGL,QAAQ,CAACC,IAAT,CAAcK,oBAA1C;EACA,MAAMC,UAAU,GAAGP,QAAQ,CAACC,IAAT,CAAcO,WAAjC;EACA,OAAOR,QAAQ,CAACC,IAAT,CAAcG,kBAArB;EACA,OAAOJ,QAAQ,CAACC,IAAT,CAAcK,oBAArB;EACA,OAAON,QAAQ,CAACC,IAAT,CAAcO,WAArB;EACA,MAAMC,YAAY,GAAGC,MAAM,CAACC,IAAP,CAAYX,QAAQ,CAACC,IAArB,EAA2B,CAA3B,CAArB;EACA,MAAMA,IAAI,GAAGD,QAAQ,CAACC,IAAT,CAAcQ,YAAd,CAAb;EACAT,QAAQ,CAACC,IAAT,GAAgBA,IAAhB;;EACA,IAAI,OAAOE,iBAAP,KAA6B,WAAjC,EAA8C;IAC1CH,QAAQ,CAACC,IAAT,CAAcG,kBAAd,GAAmCD,iBAAnC;;;EAEJ,IAAI,OAAOE,mBAAP,KAA+B,WAAnC,EAAgD;IAC5CL,QAAQ,CAACC,IAAT,CAAcK,oBAAd,GAAqCD,mBAArC;;;EAEJL,QAAQ,CAACC,IAAT,CAAcO,WAAd,GAA4BD,UAA5B;EACA,OAAOP,QAAP;AACH;;AC7CM,SAASY,QAAT,CAAkBC,OAAlB,EAA2BC,KAA3B,EAAkCC,UAAlC,EAA8C;EACjD,MAAMC,OAAO,GAAG,OAAOF,KAAP,KAAiB,UAAjB,GACVA,KAAK,CAACG,QAAN,CAAeF,UAAf,CADU,GAEVF,OAAO,CAACK,OAAR,CAAgBD,QAAhB,CAAyBH,KAAzB,EAAgCC,UAAhC,CAFN;EAGA,MAAMI,aAAa,GAAG,OAAOL,KAAP,KAAiB,UAAjB,GAA8BA,KAA9B,GAAsCD,OAAO,CAACK,OAApE;EACA,MAAME,MAAM,GAAGJ,OAAO,CAACI,MAAvB;EACA,MAAMC,OAAO,GAAGL,OAAO,CAACK,OAAxB;EACA,IAAIC,GAAG,GAAGN,OAAO,CAACM,GAAlB;EACA,OAAO;IACH,CAACC,MAAM,CAACC,aAAR,GAAwB,OAAO;MAC3B,MAAMC,IAAN,GAAa;QACT,IAAI,CAACH,GAAL,EACI,OAAO;UAAEI,IAAI,EAAE;SAAf;;QACJ,IAAI;UACA,MAAM1B,QAAQ,GAAG,MAAMmB,aAAa,CAAC;YAAEC,MAAF;YAAUE,GAAV;YAAeD;WAAhB,CAApC;UACA,MAAMM,kBAAkB,GAAG5B,8BAA8B,CAACC,QAAD,CAAzD,CAFA;;;;UAMAsB,GAAG,GAAG,CAAC,CAACK,kBAAkB,CAACN,OAAnB,CAA2BO,IAA3B,IAAmC,EAApC,EAAwCC,KAAxC,CAA8C,yBAA9C,KAA4E,EAA7E,EAAiF,CAAjF,CAAN;UACA,OAAO;YAAEC,KAAK,EAAEH;WAAhB;SAPJ,CASA,OAAOI,KAAP,EAAc;UACV,IAAIA,KAAK,CAACC,MAAN,KAAiB,GAArB,EACI,MAAMD,KAAN;UACJT,GAAG,GAAG,EAAN;UACA,OAAO;YACHQ,KAAK,EAAE;cACHE,MAAM,EAAE,GADL;cAEHX,OAAO,EAAE,EAFN;cAGHpB,IAAI,EAAE;;WAJd;;;;KAjBY;GAD5B;AA6BH;;ACrCM,SAASgC,QAAT,CAAkBpB,OAAlB,EAA2BC,KAA3B,EAAkCC,UAAlC,EAA8CmB,KAA9C,EAAqD;EACxD,IAAI,OAAOnB,UAAP,KAAsB,UAA1B,EAAsC;IAClCmB,KAAK,GAAGnB,UAAR;IACAA,UAAU,GAAGoB,SAAb;;;EAEJ,OAAOC,MAAM,CAACvB,OAAD,EAAU,EAAV,EAAcD,QAAQ,CAACC,OAAD,EAAUC,KAAV,EAAiBC,UAAjB,CAAR,CAAqCQ,MAAM,CAACC,aAA5C,GAAd,EAA4EU,KAA5E,CAAb;AACH;;AACD,SAASE,MAAT,CAAgBvB,OAAhB,EAAyBwB,OAAzB,EAAkCzB,QAAlC,EAA4CsB,KAA5C,EAAmD;EAC/C,OAAOtB,QAAQ,CAACa,IAAT,GAAgBa,IAAhB,CAAsBC,MAAD,IAAY;IACpC,IAAIA,MAAM,CAACb,IAAX,EAAiB;MACb,OAAOW,OAAP;;;IAEJ,IAAIG,SAAS,GAAG,KAAhB;;IACA,SAASd,IAAT,GAAgB;MACZc,SAAS,GAAG,IAAZ;;;IAEJH,OAAO,GAAGA,OAAO,CAACI,MAAR,CAAeP,KAAK,GAAGA,KAAK,CAACK,MAAM,CAACT,KAAR,EAAeJ,IAAf,CAAR,GAA+Ba,MAAM,CAACT,KAAP,CAAa7B,IAAhE,CAAV;;IACA,IAAIuC,SAAJ,EAAe;MACX,OAAOH,OAAP;;;IAEJ,OAAOD,MAAM,CAACvB,OAAD,EAAUwB,OAAV,EAAmBzB,QAAnB,EAA6BsB,KAA7B,CAAb;GAZG,CAAP;AAcH;;MCrBYQ,mBAAmB,GAAGhC,MAAM,CAACiC,MAAP,CAAcV,QAAd,EAAwB;EACvDrB;AADuD,CAAxB,CAA5B;;MCFMgC,mBAAmB,GAAG,CAC/B,0BAD+B,EAE/B,wBAF+B,EAG/B,0BAH+B,EAI/B,qBAJ+B,EAK/B,iEAL+B,EAM/B,qDAN+B,EAO/B,qFAP+B,EAQ/B,+EAR+B,EAS/B,+CAT+B,EAU/B,yCAV+B,EAW/B,sDAX+B,EAY/B,kEAZ+B,EAa/B,aAb+B,EAc/B,YAd+B,EAe/B,mBAf+B,EAgB/B,oBAhB+B,EAiB/B,+BAjB+B,EAkB/B,8BAlB+B,EAmB/B,4BAnB+B,EAoB/B,gCApB+B,EAqB/B,aArB+B,EAsB/B,eAtB+B,EAuB/B,gCAvB+B,EAwB/B,mDAxB+B,EAyB/B,wCAzB+B,EA0B/B,2DA1B+B,EA2B/B,qCA3B+B,EA4B/B,oBA5B+B,EA6B/B,oBA7B+B,EA8B/B,mDA9B+B,EA+B/B,kDA/B+B,EAgC/B,uCAhC+B,EAiC/B,sEAjC+B,EAkC/B,iEAlC+B,EAmC/B,iCAnC+B,EAoC/B,iCApC+B,EAqC/B,4DArC+B,EAsC/B,2BAtC+B,EAuC/B,wBAvC+B,EAwC/B,sCAxC+B,EAyC/B,4BAzC+B,EA0C/B,2CA1C+B,EA2C/B,oCA3C+B,EA4C/B,+DA5C+B,EA6C/B,wBA7C+B,EA8C/B,iCA9C+B,EA+C/B,oCA/C+B,EAgD/B,uBAhD+B,EAiD/B,4CAjD+B,EAkD/B,+BAlD+B,EAmD/B,6BAnD+B,EAoD/B,mDApD+B,EAqD/B,wBArD+B,EAsD/B,yBAtD+B,EAuD/B,4BAvD+B,EAwD/B,wDAxD+B,EAyD/B,uCAzD+B,EA0D/B,0BA1D+B,EA2D/B,iEA3D+B,EA4D/B,0BA5D+B,EA6D/B,gCA7D+B,EA8D/B,uBA9D+B,EA+D/B,wCA/D+B,EAgE/B,oDAhE+B,EAiE/B,kCAjE+B,EAkE/B,uBAlE+B,EAmE/B,+CAnE+B,EAoE/B,4EApE+B,EAqE/B,uGArE+B,EAsE/B,6EAtE+B,EAuE/B,+CAvE+B,EAwE/B,2CAxE+B,EAyE/B,4CAzE+B,EA0E/B,yCA1E+B,EA2E/B,yCA3E+B,EA4E/B,yCA5E+B,EA6E/B,0CA7E+B,EA8E/B,oCA9E+B,EA+E/B,6CA/E+B,EAgF/B,0CAhF+B,EAiF/B,2CAjF+B,EAkF/B,wCAlF+B,EAmF/B,2DAnF+B,EAoF/B,gFApF+B,EAqF/B,sDArF+B,EAsF/B,2CAtF+B,EAuF/B,6CAvF+B,EAwF/B,gEAxF+B,EAyF/B,qCAzF+B,EA0F/B,oCA1F+B,EA2F/B,iEA3F+B,EA4F/B,oEA5F+B,EA6F/B,gDA7F+B,EA8F/B,yEA9F+B,EA+F/B,kDA/F+B,EAgG/B,sCAhG+B,EAiG/B,oDAjG+B,EAkG/B,8CAlG+B,EAmG/B,yCAnG+B,EAoG/B,oCApG+B,EAqG/B,2DArG+B,EAsG/B,mCAtG+B,EAuG/B,yDAvG+B,EAwG/B,sDAxG+B,EAyG/B,oDAzG+B,EA0G/B,sDA1G+B,EA2G/B,gDA3G+B,EA4G/B,kDA5G+B,EA6G/B,wCA7G+B,EA8G/B,8CA9G+B,EA+G/B,uCA/G+B,EAgH/B,gEAhH+B,EAiH/B,wCAjH+B,EAkH/B,kCAlH+B,EAmH/B,iCAnH+B,EAoH/B,mDApH+B,EAqH/B,iCArH+B,EAsH/B,sDAtH+B,EAuH/B,uCAvH+B,EAwH/B,kCAxH+B,EAyH/B,2CAzH+B,EA0H/B,kEA1H+B,EA2H/B,yCA3H+B,EA4H/B,0DA5H+B,EA6H/B,wDA7H+B,EA8H/B,wDA9H+B,EA+H/B,2DA/H+B,EAgI/B,0DAhI+B,EAiI/B,gCAjI+B,EAkI/B,kCAlI+B,EAmI/B,sCAnI+B,EAoI/B,gEApI+B,EAqI/B,yCArI+B,EAsI/B,wCAtI+B,EAuI/B,oCAvI+B,EAwI/B,iCAxI+B,EAyI/B,0CAzI+B,EA0I/B,iEA1I+B,EA2I/B,wDA3I+B,EA4I/B,uDA5I+B,EA6I/B,qDA7I+B,EA8I/B,mEA9I+B,EA+I/B,uDA/I+B,EAgJ/B,4EAhJ+B,EAiJ/B,oCAjJ+B,EAkJ/B,wDAlJ+B,EAmJ/B,2DAnJ+B,EAoJ/B,kDApJ+B,EAqJ/B,2EArJ+B,EAsJ/B,sCAtJ+B,EAuJ/B,uCAvJ+B,EAwJ/B,gCAxJ+B,EAyJ/B,iCAzJ+B,EA0J/B,kCA1J+B,EA2J/B,mBA3J+B,EA4J/B,2EA5J+B,EA6J/B,kBA7J+B,EA8J/B,qBA9J+B,EA+J/B,oBA/J+B,EAgK/B,oBAhK+B,EAiK/B,0BAjK+B,EAkK/B,oBAlK+B,EAmK/B,mBAnK+B,EAoK/B,kCApK+B,EAqK/B,+DArK+B,EAsK/B,0FAtK+B,EAuK/B,gEAvK+B,EAwK/B,kCAxK+B,EAyK/B,8BAzK+B,EA0K/B,+BA1K+B,EA2K/B,4BA3K+B,EA4K/B,4BA5K+B,EA6K/B,kBA7K+B,EA8K/B,sBA9K+B,EA+K/B,8BA/K+B,EAgL/B,kBAhL+B,EAiL/B,qBAjL+B,EAkL/B,qBAlL+B,EAmL/B,oBAnL+B,EAoL/B,yBApL+B,EAqL/B,wDArL+B,EAsL/B,kBAtL+B,EAuL/B,gBAvL+B,EAwL/B,iCAxL+B,EAyL/B,yCAzL+B,EA0L/B,4BA1L+B,EA2L/B,sBA3L+B,EA4L/B,kDA5L+B,EA6L/B,gBA7L+B,EA8L/B,oBA9L+B,EA+L/B,2DA/L+B,EAgM/B,yBAhM+B,EAiM/B,iBAjM+B,EAkM/B,kCAlM+B,EAmM/B,mBAnM+B,EAoM/B,yBApM+B,EAqM/B,iBArM+B,EAsM/B,YAtM+B,EAuM/B,8BAvM+B,EAwM/B,yCAxM+B,EAyM/B,qCAzM+B,EA0M/B,iCA1M+B,EA2M/B,iCA3M+B,EA4M/B,6BA5M+B,EA6M/B,gCA7M+B,EA8M/B,4BA9M+B,EA+M/B,4BA/M+B,EAgN/B,gCAhN+B,EAiN/B,gCAjN+B,EAkN/B,uCAlN+B,EAmN/B,8CAnN+B,EAoN/B,6BApN+B,EAqN/B,+BArN+B,EAsN/B,qCAtN+B,CAA5B;;ACEA,SAASC,oBAAT,CAA8BC,GAA9B,EAAmC;EACtC,IAAI,OAAOA,GAAP,KAAe,QAAnB,EAA6B;IACzB,OAAOF,mBAAmB,CAACG,QAApB,CAA6BD,GAA7B,CAAP;GADJ,MAGK;IACD,OAAO,KAAP;;AAEP;;ACJD;AACA;AACA;AACA;;AACA,AAAO,SAASE,YAAT,CAAsBnC,OAAtB,EAA+B;EAClC,OAAO;IACHoB,QAAQ,EAAEvB,MAAM,CAACiC,MAAP,CAAcV,QAAQ,CAACgB,IAAT,CAAc,IAAd,EAAoBpC,OAApB,CAAd,EAA4C;MAClDD,QAAQ,EAAEA,QAAQ,CAACqC,IAAT,CAAc,IAAd,EAAoBpC,OAApB;KADJ;GADd;AAKH;AACDmC,YAAY,CAAClD,OAAb,GAAuBA,OAAvB;;;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js new file mode 100644 index 0000000..09ca53f --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/compose-paginate.js @@ -0,0 +1,5 @@ +import { paginate } from "./paginate"; +import { iterator } from "./iterator"; +export const composePaginateRest = Object.assign(paginate, { + iterator, +}); diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js new file mode 100644 index 0000000..863af10 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/generated/paginating-endpoints.js @@ -0,0 +1,216 @@ +export const paginatingEndpoints = [ + "GET /app/hook/deliveries", + "GET /app/installations", + "GET /applications/grants", + "GET /authorizations", + "GET /enterprises/{enterprise}/actions/permissions/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", + "GET /enterprises/{enterprise}/actions/runners", + "GET /enterprises/{enterprise}/audit-log", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runner-groups", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/audit-log", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/credential-authorizations", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/external-groups", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/settings/billing/advanced-security", + "GET /orgs/{org}/team-sync/groups", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions", +]; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js new file mode 100644 index 0000000..5ba74de --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/index.js @@ -0,0 +1,17 @@ +import { VERSION } from "./version"; +import { paginate } from "./paginate"; +import { iterator } from "./iterator"; +export { composePaginateRest } from "./compose-paginate"; +export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints"; +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ +export function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit), + }), + }; +} +paginateRest.VERSION = VERSION; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js new file mode 100644 index 0000000..7f9ee64 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js @@ -0,0 +1,39 @@ +import { normalizePaginatedListResponse } from "./normalize-paginated-list-response"; +export function iterator(octokit, route, parameters) { + const options = typeof route === "function" + ? route.endpoint(parameters) + : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set + url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { value: normalizedResponse }; + } + catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [], + }, + }; + } + }, + }), + }; +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js new file mode 100644 index 0000000..a87028b --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js @@ -0,0 +1,47 @@ +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint. + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. + * + * We check if a "total_count" key is present in the response data, but also make sure that + * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would + * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + */ +export function normalizePaginatedListResponse(response) { + // endpoints can respond with 204 if repository is empty + if (!response.data) { + return { + ...response, + data: [], + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + // keep the additional properties intact as there is currently no other way + // to retrieve the same information. + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js new file mode 100644 index 0000000..8d18a60 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js @@ -0,0 +1,24 @@ +import { iterator } from "./iterator"; +export function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = undefined; + } + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); +} +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then((result) => { + if (result.done) { + return results; + } + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator, mapFn); + }); +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js new file mode 100644 index 0000000..1e52899 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/paginating-endpoints.js @@ -0,0 +1,10 @@ +import { paginatingEndpoints, } from "./generated/paginating-endpoints"; +export { paginatingEndpoints } from "./generated/paginating-endpoints"; +export function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } + else { + return false; + } +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/types.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js b/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js new file mode 100644 index 0000000..af4553e --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "2.21.3"; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts new file mode 100644 index 0000000..38a7432 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/compose-paginate.d.ts @@ -0,0 +1,2 @@ +import { ComposePaginateInterface } from "./types"; +export declare const composePaginateRest: ComposePaginateInterface; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts new file mode 100644 index 0000000..4882d94 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts @@ -0,0 +1,1612 @@ +import { Endpoints } from "@octokit/types"; +export interface PaginatingEndpoints { + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": { + parameters: Endpoints["GET /app/hook/deliveries"]["parameters"]; + response: Endpoints["GET /app/hook/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": { + parameters: Endpoints["GET /app/installations"]["parameters"]; + response: Endpoints["GET /app/installations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#list-your-grants + */ + "GET /applications/grants": { + parameters: Endpoints["GET /applications/grants"]["parameters"]; + response: Endpoints["GET /applications/grants"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations + */ + "GET /authorizations": { + parameters: Endpoints["GET /authorizations"]["parameters"]; + response: Endpoints["GET /authorizations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/organizations": { + parameters: Endpoints["GET /enterprises/{enterprise}/actions/permissions/organizations"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/actions/permissions/organizations"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/actions/permissions/organizations"]["response"]["data"]["organizations"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": { + parameters: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups"]["response"]["data"]["runner_groups"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": { + parameters: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations"]["response"]["data"]["organizations"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": { + parameters: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners": { + parameters: Endpoints["GET /enterprises/{enterprise}/actions/runners"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/actions/runners"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/actions/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise + */ + "GET /enterprises/{enterprise}/audit-log": { + parameters: Endpoints["GET /enterprises/{enterprise}/audit-log"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/audit-log"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": { + parameters: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/advanced-security": { + parameters: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["parameters"]; + response: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["response"] & { + data: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": { + parameters: Endpoints["GET /events"]["parameters"]; + response: Endpoints["GET /events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": { + parameters: Endpoints["GET /gists"]["parameters"]; + response: Endpoints["GET /gists"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": { + parameters: Endpoints["GET /gists/public"]["parameters"]; + response: Endpoints["GET /gists/public"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": { + parameters: Endpoints["GET /gists/starred"]["parameters"]; + response: Endpoints["GET /gists/starred"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": { + parameters: Endpoints["GET /gists/{gist_id}/comments"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": { + parameters: Endpoints["GET /gists/{gist_id}/commits"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/commits"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": { + parameters: Endpoints["GET /gists/{gist_id}/forks"]["parameters"]; + response: Endpoints["GET /gists/{gist_id}/forks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": { + parameters: Endpoints["GET /installation/repositories"]["parameters"]; + response: Endpoints["GET /installation/repositories"]["response"] & { + data: Endpoints["GET /installation/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": { + parameters: Endpoints["GET /issues"]["parameters"]; + response: Endpoints["GET /issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": { + parameters: Endpoints["GET /licenses"]["parameters"]; + response: Endpoints["GET /licenses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": { + parameters: Endpoints["GET /marketplace_listing/plans"]["parameters"]; + response: Endpoints["GET /marketplace_listing/plans"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": { + parameters: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["parameters"]; + response: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": { + parameters: Endpoints["GET /marketplace_listing/stubbed/plans"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/plans"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": { + parameters: Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["parameters"]; + response: Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": { + parameters: Endpoints["GET /networks/{owner}/{repo}/events"]["parameters"]; + response: Endpoints["GET /networks/{owner}/{repo}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": { + parameters: Endpoints["GET /notifications"]["parameters"]; + response: Endpoints["GET /notifications"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": { + parameters: Endpoints["GET /organizations"]["parameters"]; + response: Endpoints["GET /organizations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": { + parameters: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]["data"]["repository_cache_usages"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": { + parameters: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": { + parameters: Endpoints["GET /orgs/{org}/actions/runner-groups"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runner-groups"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/runner-groups"]["response"]["data"]["runner_groups"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": { + parameters: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": { + parameters: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": { + parameters: Endpoints["GET /orgs/{org}/actions/runners"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/runners"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": { + parameters: Endpoints["GET /orgs/{org}/actions/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#get-audit-log + */ + "GET /orgs/{org}/audit-log": { + parameters: Endpoints["GET /orgs/{org}/audit-log"]["parameters"]; + response: Endpoints["GET /orgs/{org}/audit-log"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": { + parameters: Endpoints["GET /orgs/{org}/blocks"]["parameters"]; + response: Endpoints["GET /orgs/{org}/blocks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": { + parameters: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": { + parameters: Endpoints["GET /orgs/{org}/codespaces"]["parameters"]; + response: Endpoints["GET /orgs/{org}/codespaces"]["response"] & { + data: Endpoints["GET /orgs/{org}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization + */ + "GET /orgs/{org}/credential-authorizations": { + parameters: Endpoints["GET /orgs/{org}/credential-authorizations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/credential-authorizations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": { + parameters: Endpoints["GET /orgs/{org}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"] & { + data: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": { + parameters: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"] & { + data: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": { + parameters: Endpoints["GET /orgs/{org}/events"]["parameters"]; + response: Endpoints["GET /orgs/{org}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization + */ + "GET /orgs/{org}/external-groups": { + parameters: Endpoints["GET /orgs/{org}/external-groups"]["parameters"]; + response: Endpoints["GET /orgs/{org}/external-groups"]["response"] & { + data: Endpoints["GET /orgs/{org}/external-groups"]["response"]["data"]["groups"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": { + parameters: Endpoints["GET /orgs/{org}/failed_invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/failed_invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": { + parameters: Endpoints["GET /orgs/{org}/hooks"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": { + parameters: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": { + parameters: Endpoints["GET /orgs/{org}/installations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/installations"]["response"] & { + data: Endpoints["GET /orgs/{org}/installations"]["response"]["data"]["installations"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": { + parameters: Endpoints["GET /orgs/{org}/invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": { + parameters: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": { + parameters: Endpoints["GET /orgs/{org}/issues"]["parameters"]; + response: Endpoints["GET /orgs/{org}/issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": { + parameters: Endpoints["GET /orgs/{org}/members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": { + parameters: Endpoints["GET /orgs/{org}/migrations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": { + parameters: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": { + parameters: Endpoints["GET /orgs/{org}/outside_collaborators"]["parameters"]; + response: Endpoints["GET /orgs/{org}/outside_collaborators"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": { + parameters: Endpoints["GET /orgs/{org}/packages"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": { + parameters: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": { + parameters: Endpoints["GET /orgs/{org}/projects"]["parameters"]; + response: Endpoints["GET /orgs/{org}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": { + parameters: Endpoints["GET /orgs/{org}/public_members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/public_members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": { + parameters: Endpoints["GET /orgs/{org}/repos"]["parameters"]; + response: Endpoints["GET /orgs/{org}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": { + parameters: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + */ + "GET /orgs/{org}/settings/billing/advanced-security": { + parameters: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["parameters"]; + response: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["response"] & { + data: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-an-organization + */ + "GET /orgs/{org}/team-sync/groups": { + parameters: Endpoints["GET /orgs/{org}/team-sync/groups"]["parameters"]; + response: Endpoints["GET /orgs/{org}/team-sync/groups"]["response"] & { + data: Endpoints["GET /orgs/{org}/team-sync/groups"]["response"]["data"]["groups"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": { + parameters: Endpoints["GET /orgs/{org}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": { + parameters: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["parameters"]; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": { + parameters: Endpoints["GET /projects/columns/{column_id}/cards"]["parameters"]; + response: Endpoints["GET /projects/columns/{column_id}/cards"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": { + parameters: Endpoints["GET /projects/{project_id}/collaborators"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/collaborators"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": { + parameters: Endpoints["GET /projects/{project_id}/columns"]["parameters"]; + response: Endpoints["GET /projects/{project_id}/columns"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"]["data"]["artifacts"]; + }; + }; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"]["data"]["actions_caches"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"]["data"]["runners"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"]["data"]["workflow_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"]["data"]["artifacts"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]["data"]["jobs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"]["data"]["jobs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["response"]["data"]["workflows"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["response"]["data"]["workflow_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": { + parameters: Endpoints["GET /repos/{owner}/{repo}/assignees"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/assignees"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-branches + */ + "GET /repos/{owner}/{repo}/branches": { + parameters: Endpoints["GET /repos/{owner}/{repo}/branches"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/branches"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["response"]["data"]["check_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": { + parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": { + parameters: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"]["data"]["devcontainers"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": { + parameters: Endpoints["GET /repos/{owner}/{repo}/collaborators"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-commits + */ + "GET /repos/{owner}/{repo}/commits": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["response"]["data"]["check_runs"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"]["data"]["check_suites"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"]["data"]["statuses"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": { + parameters: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": { + parameters: Endpoints["GET /repos/{owner}/{repo}/contributors"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/contributors"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/deployments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": { + parameters: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-environments + */ + "GET /repos/{owner}/{repo}/environments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/environments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"]["data"]["environments"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": { + parameters: Endpoints["GET /repos/{owner}/{repo}/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": { + parameters: Endpoints["GET /repos/{owner}/{repo}/forks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/forks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": { + parameters: Endpoints["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": { + parameters: Endpoints["GET /repos/{owner}/{repo}/hooks"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": { + parameters: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/invitations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": { + parameters: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": { + parameters: Endpoints["GET /repos/{owner}/{repo}/keys"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": { + parameters: Endpoints["GET /repos/{owner}/{repo}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/labels"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": { + parameters: Endpoints["GET /repos/{owner}/{repo}/milestones"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": { + parameters: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": { + parameters: Endpoints["GET /repos/{owner}/{repo}/notifications"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/notifications"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": { + parameters: Endpoints["GET /repos/{owner}/{repo}/projects"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]["data"]["users"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": { + parameters: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": { + parameters: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": { + parameters: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": { + parameters: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/stargazers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/stargazers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": { + parameters: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": { + parameters: Endpoints["GET /repos/{owner}/{repo}/tags"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/tags"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": { + parameters: Endpoints["GET /repos/{owner}/{repo}/teams"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": { + parameters: Endpoints["GET /repos/{owner}/{repo}/topics"]["parameters"]; + response: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"] & { + data: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"]["data"]["names"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": { + parameters: Endpoints["GET /repositories"]["parameters"]; + response: Endpoints["GET /repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": { + parameters: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["parameters"]; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["response"] & { + data: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": { + parameters: Endpoints["GET /search/code"]["parameters"]; + response: Endpoints["GET /search/code"]["response"] & { + data: Endpoints["GET /search/code"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": { + parameters: Endpoints["GET /search/commits"]["parameters"]; + response: Endpoints["GET /search/commits"]["response"] & { + data: Endpoints["GET /search/commits"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": { + parameters: Endpoints["GET /search/issues"]["parameters"]; + response: Endpoints["GET /search/issues"]["response"] & { + data: Endpoints["GET /search/issues"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": { + parameters: Endpoints["GET /search/labels"]["parameters"]; + response: Endpoints["GET /search/labels"]["response"] & { + data: Endpoints["GET /search/labels"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": { + parameters: Endpoints["GET /search/repositories"]["parameters"]; + response: Endpoints["GET /search/repositories"]["response"] & { + data: Endpoints["GET /search/repositories"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": { + parameters: Endpoints["GET /search/topics"]["parameters"]; + response: Endpoints["GET /search/topics"]["response"] & { + data: Endpoints["GET /search/topics"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": { + parameters: Endpoints["GET /search/users"]["parameters"]; + response: Endpoints["GET /search/users"]["response"] & { + data: Endpoints["GET /search/users"]["response"]["data"]["items"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": { + parameters: Endpoints["GET /teams/{team_id}/discussions"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": { + parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": { + parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": { + parameters: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/reactions"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/discussions/{discussion_number}/reactions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": { + parameters: Endpoints["GET /teams/{team_id}/invitations"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": { + parameters: Endpoints["GET /teams/{team_id}/members"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/members"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": { + parameters: Endpoints["GET /teams/{team_id}/projects"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": { + parameters: Endpoints["GET /teams/{team_id}/repos"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": { + parameters: Endpoints["GET /teams/{team_id}/teams"]["parameters"]; + response: Endpoints["GET /teams/{team_id}/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": { + parameters: Endpoints["GET /user/blocks"]["parameters"]; + response: Endpoints["GET /user/blocks"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": { + parameters: Endpoints["GET /user/codespaces"]["parameters"]; + response: Endpoints["GET /user/codespaces"]["response"] & { + data: Endpoints["GET /user/codespaces"]["response"]["data"]["codespaces"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": { + parameters: Endpoints["GET /user/codespaces/secrets"]["parameters"]; + response: Endpoints["GET /user/codespaces/secrets"]["response"] & { + data: Endpoints["GET /user/codespaces/secrets"]["response"]["data"]["secrets"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": { + parameters: Endpoints["GET /user/emails"]["parameters"]; + response: Endpoints["GET /user/emails"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": { + parameters: Endpoints["GET /user/followers"]["parameters"]; + response: Endpoints["GET /user/followers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": { + parameters: Endpoints["GET /user/following"]["parameters"]; + response: Endpoints["GET /user/following"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": { + parameters: Endpoints["GET /user/gpg_keys"]["parameters"]; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": { + parameters: Endpoints["GET /user/installations"]["parameters"]; + response: Endpoints["GET /user/installations"]["response"] & { + data: Endpoints["GET /user/installations"]["response"]["data"]["installations"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": { + parameters: Endpoints["GET /user/installations/{installation_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/installations/{installation_id}/repositories"]["response"] & { + data: Endpoints["GET /user/installations/{installation_id}/repositories"]["response"]["data"]["repositories"]; + }; + }; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": { + parameters: Endpoints["GET /user/issues"]["parameters"]; + response: Endpoints["GET /user/issues"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": { + parameters: Endpoints["GET /user/keys"]["parameters"]; + response: Endpoints["GET /user/keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": { + parameters: Endpoints["GET /user/marketplace_purchases"]["parameters"]; + response: Endpoints["GET /user/marketplace_purchases"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": { + parameters: Endpoints["GET /user/marketplace_purchases/stubbed"]["parameters"]; + response: Endpoints["GET /user/marketplace_purchases/stubbed"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": { + parameters: Endpoints["GET /user/memberships/orgs"]["parameters"]; + response: Endpoints["GET /user/memberships/orgs"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": { + parameters: Endpoints["GET /user/migrations"]["parameters"]; + response: Endpoints["GET /user/migrations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": { + parameters: Endpoints["GET /user/migrations/{migration_id}/repositories"]["parameters"]; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": { + parameters: Endpoints["GET /user/orgs"]["parameters"]; + response: Endpoints["GET /user/orgs"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": { + parameters: Endpoints["GET /user/packages"]["parameters"]; + response: Endpoints["GET /user/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": { + parameters: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["parameters"]; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": { + parameters: Endpoints["GET /user/public_emails"]["parameters"]; + response: Endpoints["GET /user/public_emails"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": { + parameters: Endpoints["GET /user/repos"]["parameters"]; + response: Endpoints["GET /user/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": { + parameters: Endpoints["GET /user/repository_invitations"]["parameters"]; + response: Endpoints["GET /user/repository_invitations"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": { + parameters: Endpoints["GET /user/starred"]["parameters"]; + response: Endpoints["GET /user/starred"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": { + parameters: Endpoints["GET /user/subscriptions"]["parameters"]; + response: Endpoints["GET /user/subscriptions"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": { + parameters: Endpoints["GET /user/teams"]["parameters"]; + response: Endpoints["GET /user/teams"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": { + parameters: Endpoints["GET /users"]["parameters"]; + response: Endpoints["GET /users"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": { + parameters: Endpoints["GET /users/{username}/events"]["parameters"]; + response: Endpoints["GET /users/{username}/events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": { + parameters: Endpoints["GET /users/{username}/events/orgs/{org}"]["parameters"]; + response: Endpoints["GET /users/{username}/events/orgs/{org}"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": { + parameters: Endpoints["GET /users/{username}/events/public"]["parameters"]; + response: Endpoints["GET /users/{username}/events/public"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": { + parameters: Endpoints["GET /users/{username}/followers"]["parameters"]; + response: Endpoints["GET /users/{username}/followers"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": { + parameters: Endpoints["GET /users/{username}/following"]["parameters"]; + response: Endpoints["GET /users/{username}/following"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": { + parameters: Endpoints["GET /users/{username}/gists"]["parameters"]; + response: Endpoints["GET /users/{username}/gists"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": { + parameters: Endpoints["GET /users/{username}/gpg_keys"]["parameters"]; + response: Endpoints["GET /users/{username}/gpg_keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": { + parameters: Endpoints["GET /users/{username}/keys"]["parameters"]; + response: Endpoints["GET /users/{username}/keys"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": { + parameters: Endpoints["GET /users/{username}/orgs"]["parameters"]; + response: Endpoints["GET /users/{username}/orgs"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": { + parameters: Endpoints["GET /users/{username}/packages"]["parameters"]; + response: Endpoints["GET /users/{username}/packages"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": { + parameters: Endpoints["GET /users/{username}/projects"]["parameters"]; + response: Endpoints["GET /users/{username}/projects"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": { + parameters: Endpoints["GET /users/{username}/received_events"]["parameters"]; + response: Endpoints["GET /users/{username}/received_events"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": { + parameters: Endpoints["GET /users/{username}/received_events/public"]["parameters"]; + response: Endpoints["GET /users/{username}/received_events/public"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": { + parameters: Endpoints["GET /users/{username}/repos"]["parameters"]; + response: Endpoints["GET /users/{username}/repos"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": { + parameters: Endpoints["GET /users/{username}/starred"]["parameters"]; + response: Endpoints["GET /users/{username}/starred"]["response"]; + }; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": { + parameters: Endpoints["GET /users/{username}/subscriptions"]["parameters"]; + response: Endpoints["GET /users/{username}/subscriptions"]["response"]; + }; +} +export declare const paginatingEndpoints: (keyof PaginatingEndpoints)[]; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts new file mode 100644 index 0000000..4d84aae --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts @@ -0,0 +1,16 @@ +import { Octokit } from "@octokit/core"; +import { PaginateInterface } from "./types"; +export { PaginateInterface } from "./types"; +export { PaginatingEndpoints } from "./types"; +export { composePaginateRest } from "./compose-paginate"; +export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints"; +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ +export declare function paginateRest(octokit: Octokit): { + paginate: PaginateInterface; +}; +export declare namespace paginateRest { + var VERSION: string; +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts new file mode 100644 index 0000000..931d530 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts @@ -0,0 +1,20 @@ +import { Octokit } from "@octokit/core"; +import { RequestInterface, RequestParameters, Route } from "./types"; +export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): { + [Symbol.asyncIterator]: () => { + next(): Promise<{ + done: boolean; + value?: undefined; + } | { + value: import("@octokit/types/dist-types/OctokitResponse").OctokitResponse; + done?: undefined; + } | { + value: { + status: number; + headers: {}; + data: never[]; + }; + done?: undefined; + }>; + }; +}; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts new file mode 100644 index 0000000..f948a78 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/normalize-paginated-list-response.d.ts @@ -0,0 +1,18 @@ +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint. + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. + * + * We check if a "total_count" key is present in the response data, but also make sure that + * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would + * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + */ +import { OctokitResponse } from "./types"; +export declare function normalizePaginatedListResponse(response: OctokitResponse): OctokitResponse; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts new file mode 100644 index 0000000..774c604 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts @@ -0,0 +1,3 @@ +import { Octokit } from "@octokit/core"; +import { MapFunction, PaginationResults, RequestParameters, Route, RequestInterface } from "./types"; +export declare function paginate(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters, mapFn?: MapFunction): Promise>; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts new file mode 100644 index 0000000..f6a4d7b --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/paginating-endpoints.d.ts @@ -0,0 +1,3 @@ +import { PaginatingEndpoints } from "./generated/paginating-endpoints"; +export { paginatingEndpoints } from "./generated/paginating-endpoints"; +export declare function isPaginatingEndpoint(arg: unknown): arg is keyof PaginatingEndpoints; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts new file mode 100644 index 0000000..0634907 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts @@ -0,0 +1,242 @@ +import { Octokit } from "@octokit/core"; +import * as OctokitTypes from "@octokit/types"; +export { EndpointOptions, RequestInterface, OctokitResponse, RequestParameters, Route, } from "@octokit/types"; +export { PaginatingEndpoints } from "./generated/paginating-endpoints"; +import { PaginatingEndpoints } from "./generated/paginating-endpoints"; +declare type KnownKeys = Extract<{ + [K in keyof T]: string extends K ? never : number extends K ? never : K; +} extends { + [_ in keyof T]: infer U; +} ? U : never, keyof T>; +declare type KeysMatching = { + [K in keyof T]: T[K] extends V ? K : never; +}[keyof T]; +declare type KnownKeysMatching = KeysMatching>, V>; +declare type GetResultsType = T extends { + data: any[]; +} ? T["data"] : T extends { + data: object; +} ? T["data"][KnownKeysMatching] : never; +declare type NormalizeResponse = T & { + data: GetResultsType; +}; +declare type DataType = "data" extends keyof T ? T["data"] : unknown; +export interface MapFunction>, M = unknown[]> { + (response: T, done: () => void): M; +} +export declare type PaginationResults = T[]; +export interface PaginateInterface { + /** + * Paginate a request using endpoint options and map each response to a custom array + * + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (options: OctokitTypes.EndpointOptions, mapFn: MapFunction>, M[]>): Promise>; + /** + * Paginate a request using endpoint options + * + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: OctokitTypes.EndpointOptions): Promise>; + /** + * Paginate a request using a known endpoint route string and map each response to a custom array + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {function} mapFn Optional method to map each response to a custom array + */ + (route: R, mapFn: MapFunction): Promise; + /** + * Paginate a request using a known endpoint route string and parameters, and map each response to a custom array + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction): Promise; + /** + * Paginate a request using an known endpoint route string + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise>; + /** + * Paginate a request using an unknown endpoint route string + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise; + /** + * Paginate a request using an endpoint method and a map function + * + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (request: R, mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method, parameters, and a map function + * + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (request: R, parameters: Parameters[0], mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method and parameters + * + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: R, parameters?: Parameters[0]): Promise>["data"]>; + iterator: { + /** + * Get an async iterator to paginate a request using endpoint options + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: OctokitTypes.EndpointOptions): AsyncIterableIterator>>; + /** + * Get an async iterator to paginate a request using a known endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator>>; + /** + * Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator>>; + /** + * Get an async iterator to paginate a request using a request method and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * @param {string} request `@octokit/request` or `octokit.request` method + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: R, parameters?: Parameters[0]): AsyncIterableIterator>>; + }; +} +export interface ComposePaginateInterface { + /** + * Paginate a request using endpoint options and map each response to a custom array + * + * @param {object} octokit Octokit instance + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (octokit: Octokit, options: OctokitTypes.EndpointOptions, mapFn: MapFunction>, M[]>): Promise>; + /** + * Paginate a request using endpoint options + * + * @param {object} octokit Octokit instance + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, options: OctokitTypes.EndpointOptions): Promise>; + /** + * Paginate a request using a known endpoint route string and map each response to a custom array + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {function} mapFn Optional method to map each response to a custom array + */ + (octokit: Octokit, route: R, mapFn: MapFunction): Promise; + /** + * Paginate a request using a known endpoint route string and parameters, and map each response to a custom array + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {function} mapFn Optional method to map each response to a custom array + */ + (octokit: Octokit, route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction): Promise; + /** + * Paginate a request using an known endpoint route string + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise>; + /** + * Paginate a request using an unknown endpoint route string + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise; + /** + * Paginate a request using an endpoint method and a map function + * + * @param {object} octokit Octokit instance + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (octokit: Octokit, request: R, mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method, parameters, and a map function + * + * @param {object} octokit Octokit instance + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * @param {function} mapFn? Optional method to map each response to a custom array + */ + (octokit: Octokit, request: R, parameters: Parameters[0], mapFn: MapFunction>, M>): Promise; + /** + * Paginate a request using an endpoint method and parameters + * + * @param {object} octokit Octokit instance + * @param {string} request Request method (`octokit.request` or `@octokit/request`) + * @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, request: R, parameters?: Parameters[0]): Promise>["data"]>; + iterator: { + /** + * Get an async iterator to paginate a request using endpoint options + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterableIterator>>; + /** + * Get an async iterator to paginate a request using a known endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator>>; + /** + * Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator>>; + /** + * Get an async iterator to paginate a request using a request method and optional parameters + * + * @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of + * + * @param {object} octokit Octokit instance + * @param {string} request `@octokit/request` or `octokit.request` method + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (octokit: Octokit, request: R, parameters?: Parameters[0]): AsyncIterableIterator>>; + }; +} diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts b/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts new file mode 100644 index 0000000..77e3d51 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "2.21.3"; diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js new file mode 100644 index 0000000..e76659f --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js @@ -0,0 +1,358 @@ +const VERSION = "2.21.3"; + +/** + * Some “list” response that can be paginated have a different response structure + * + * They have a `total_count` key in the response (search also has `incomplete_results`, + * /installation/repositories also has `repository_selection`), as well as a key with + * the list of the items which name varies from endpoint to endpoint. + * + * Octokit normalizes these responses so that paginated results are always returned following + * the same structure. One challenge is that if the list response has only one page, no Link + * header is provided, so this header alone is not sufficient to check wether a response is + * paginated or not. + * + * We check if a "total_count" key is present in the response data, but also make sure that + * a "url" property is not, as the "Get the combined status for a specific ref" endpoint would + * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref + */ +function normalizePaginatedListResponse(response) { + // endpoints can respond with 204 if repository is empty + if (!response.data) { + return { + ...response, + data: [], + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + // keep the additional properties intact as there is currently no other way + // to retrieve the same information. + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; +} + +function iterator(octokit, route, parameters) { + const options = typeof route === "function" + ? route.endpoint(parameters) + : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + // `response.headers.link` format: + // '; rel="next", ; rel="last"' + // sets `url` to undefined if "next" URL is not present or `link` header is not set + url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + return { value: normalizedResponse }; + } + catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [], + }, + }; + } + }, + }), + }; +} + +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = undefined; + } + return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn); +} +function gather(octokit, results, iterator, mapFn) { + return iterator.next().then((result) => { + if (result.done) { + return results; + } + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator, mapFn); + }); +} + +const composePaginateRest = Object.assign(paginate, { + iterator, +}); + +const paginatingEndpoints = [ + "GET /app/hook/deliveries", + "GET /app/installations", + "GET /applications/grants", + "GET /authorizations", + "GET /enterprises/{enterprise}/actions/permissions/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", + "GET /enterprises/{enterprise}/actions/runners", + "GET /enterprises/{enterprise}/audit-log", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runner-groups", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/audit-log", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/credential-authorizations", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/external-groups", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/settings/billing/advanced-security", + "GET /orgs/{org}/team-sync/groups", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions", +]; + +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } + else { + return false; + } +} + +/** + * @param octokit Octokit instance + * @param options Options passed to Octokit constructor + */ +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit), + }), + }; +} +paginateRest.VERSION = VERSION; + +export { composePaginateRest, isPaginatingEndpoint, paginateRest, paginatingEndpoints }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map new file mode 100644 index 0000000..878b8e4 --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/normalize-paginated-list-response.js","../dist-src/iterator.js","../dist-src/paginate.js","../dist-src/compose-paginate.js","../dist-src/generated/paginating-endpoints.js","../dist-src/paginating-endpoints.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"2.21.3\";\n","/**\n * Some “list” response that can be paginated have a different response structure\n *\n * They have a `total_count` key in the response (search also has `incomplete_results`,\n * /installation/repositories also has `repository_selection`), as well as a key with\n * the list of the items which name varies from endpoint to endpoint.\n *\n * Octokit normalizes these responses so that paginated results are always returned following\n * the same structure. One challenge is that if the list response has only one page, no Link\n * header is provided, so this header alone is not sufficient to check wether a response is\n * paginated or not.\n *\n * We check if a \"total_count\" key is present in the response data, but also make sure that\n * a \"url\" property is not, as the \"Get the combined status for a specific ref\" endpoint would\n * otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref\n */\nexport function normalizePaginatedListResponse(response) {\n // endpoints can respond with 204 if repository is empty\n if (!response.data) {\n return {\n ...response,\n data: [],\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n // keep the additional properties intact as there is currently no other way\n // to retrieve the same information.\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n","import { normalizePaginatedListResponse } from \"./normalize-paginated-list-response\";\nexport function iterator(octokit, route, parameters) {\n const options = typeof route === \"function\"\n ? route.endpoint(parameters)\n : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n // `response.headers.link` format:\n // '; rel=\"next\", ; rel=\"last\"'\n // sets `url` to undefined if \"next\" URL is not present or `link` header is not set\n url = ((normalizedResponse.headers.link || \"\").match(/<([^>]+)>;\\s*rel=\"next\"/) || [])[1];\n return { value: normalizedResponse };\n }\n catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: [],\n },\n };\n }\n },\n }),\n };\n}\n","import { iterator } from \"./iterator\";\nexport function paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = undefined;\n }\n return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);\n}\nfunction gather(octokit, results, iterator, mapFn) {\n return iterator.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator, mapFn);\n });\n}\n","import { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport const composePaginateRest = Object.assign(paginate, {\n iterator,\n});\n","export const paginatingEndpoints = [\n \"GET /app/hook/deliveries\",\n \"GET /app/installations\",\n \"GET /applications/grants\",\n \"GET /authorizations\",\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations\",\n \"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /enterprises/{enterprise}/actions/runners\",\n \"GET /enterprises/{enterprise}/audit-log\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runner-groups\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories\",\n \"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/audit-log\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/credential-authorizations\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/external-groups\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n \"GET /orgs/{org}/team-sync/groups\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\",\n];\n","import { paginatingEndpoints, } from \"./generated/paginating-endpoints\";\nexport { paginatingEndpoints } from \"./generated/paginating-endpoints\";\nexport function isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n }\n else {\n return false;\n }\n}\n","import { VERSION } from \"./version\";\nimport { paginate } from \"./paginate\";\nimport { iterator } from \"./iterator\";\nexport { composePaginateRest } from \"./compose-paginate\";\nexport { isPaginatingEndpoint, paginatingEndpoints, } from \"./paginating-endpoints\";\n/**\n * @param octokit Octokit instance\n * @param options Options passed to Octokit constructor\n */\nexport function paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit),\n }),\n };\n}\npaginateRest.VERSION = VERSION;\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AAAO,SAAS,8BAA8B,CAAC,QAAQ,EAAE;AACzD;AACA,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;AACxB,QAAQ,OAAO;AACf,YAAY,GAAG,QAAQ;AACvB,YAAY,IAAI,EAAE,EAAE;AACpB,SAAS,CAAC;AACV,KAAK;AACL,IAAI,MAAM,0BAA0B,GAAG,aAAa,IAAI,QAAQ,CAAC,IAAI,IAAI,EAAE,KAAK,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnG,IAAI,IAAI,CAAC,0BAA0B;AACnC,QAAQ,OAAO,QAAQ,CAAC;AACxB;AACA;AACA,IAAI,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC/D,IAAI,MAAM,mBAAmB,GAAG,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;AACnE,IAAI,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;AACjD,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAC5C,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC;AAC9C,IAAI,OAAO,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;AACrC,IAAI,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,IAAI,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC7C,IAAI,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;AACzB,IAAI,IAAI,OAAO,iBAAiB,KAAK,WAAW,EAAE;AAClD,QAAQ,QAAQ,CAAC,IAAI,CAAC,kBAAkB,GAAG,iBAAiB,CAAC;AAC7D,KAAK;AACL,IAAI,IAAI,OAAO,mBAAmB,KAAK,WAAW,EAAE;AACpD,QAAQ,QAAQ,CAAC,IAAI,CAAC,oBAAoB,GAAG,mBAAmB,CAAC;AACjE,KAAK;AACL,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;AAC3C,IAAI,OAAO,QAAQ,CAAC;AACpB,CAAC;;AC7CM,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE;AACrD,IAAI,MAAM,OAAO,GAAG,OAAO,KAAK,KAAK,UAAU;AAC/C,UAAU,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;AACpC,UAAU,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACtD,IAAI,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC;AAChF,IAAI,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;AAClC,IAAI,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACpC,IAAI,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;AAC1B,IAAI,OAAO;AACX,QAAQ,CAAC,MAAM,CAAC,aAAa,GAAG,OAAO;AACvC,YAAY,MAAM,IAAI,GAAG;AACzB,gBAAgB,IAAI,CAAC,GAAG;AACxB,oBAAoB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC1C,gBAAgB,IAAI;AACpB,oBAAoB,MAAM,QAAQ,GAAG,MAAM,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AACnF,oBAAoB,MAAM,kBAAkB,GAAG,8BAA8B,CAAC,QAAQ,CAAC,CAAC;AACxF;AACA;AACA;AACA,oBAAoB,GAAG,GAAG,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC,yBAAyB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9G,oBAAoB,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,KAAK,EAAE;AAC9B,oBAAoB,IAAI,KAAK,CAAC,MAAM,KAAK,GAAG;AAC5C,wBAAwB,MAAM,KAAK,CAAC;AACpC,oBAAoB,GAAG,GAAG,EAAE,CAAC;AAC7B,oBAAoB,OAAO;AAC3B,wBAAwB,KAAK,EAAE;AAC/B,4BAA4B,MAAM,EAAE,GAAG;AACvC,4BAA4B,OAAO,EAAE,EAAE;AACvC,4BAA4B,IAAI,EAAE,EAAE;AACpC,yBAAyB;AACzB,qBAAqB,CAAC;AACtB,iBAAiB;AACjB,aAAa;AACb,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC;;ACrCM,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;AAC5D,IAAI,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;AAC1C,QAAQ,KAAK,GAAG,UAAU,CAAC;AAC3B,QAAQ,UAAU,GAAG,SAAS,CAAC;AAC/B,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACpG,CAAC;AACD,SAAS,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;AACnD,IAAI,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK;AAC5C,QAAQ,IAAI,MAAM,CAAC,IAAI,EAAE;AACzB,YAAY,OAAO,OAAO,CAAC;AAC3B,SAAS;AACT,QAAQ,IAAI,SAAS,GAAG,KAAK,CAAC;AAC9B,QAAQ,SAAS,IAAI,GAAG;AACxB,YAAY,SAAS,GAAG,IAAI,CAAC;AAC7B,SAAS;AACT,QAAQ,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AACxF,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,OAAO,OAAO,CAAC;AAC3B,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;AACzD,KAAK,CAAC,CAAC;AACP,CAAC;;ACrBW,MAAC,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC3D,IAAI,QAAQ;AACZ,CAAC,CAAC;;ACJU,MAAC,mBAAmB,GAAG;AACnC,IAAI,0BAA0B;AAC9B,IAAI,wBAAwB;AAC5B,IAAI,0BAA0B;AAC9B,IAAI,qBAAqB;AACzB,IAAI,iEAAiE;AACrE,IAAI,qDAAqD;AACzD,IAAI,qFAAqF;AACzF,IAAI,+EAA+E;AACnF,IAAI,+CAA+C;AACnD,IAAI,yCAAyC;AAC7C,IAAI,sDAAsD;AAC1D,IAAI,kEAAkE;AACtE,IAAI,aAAa;AACjB,IAAI,YAAY;AAChB,IAAI,mBAAmB;AACvB,IAAI,oBAAoB;AACxB,IAAI,+BAA+B;AACnC,IAAI,8BAA8B;AAClC,IAAI,4BAA4B;AAChC,IAAI,gCAAgC;AACpC,IAAI,aAAa;AACjB,IAAI,eAAe;AACnB,IAAI,gCAAgC;AACpC,IAAI,mDAAmD;AACvD,IAAI,wCAAwC;AAC5C,IAAI,2DAA2D;AAC/D,IAAI,qCAAqC;AACzC,IAAI,oBAAoB;AACxB,IAAI,oBAAoB;AACxB,IAAI,mDAAmD;AACvD,IAAI,kDAAkD;AACtD,IAAI,uCAAuC;AAC3C,IAAI,sEAAsE;AAC1E,IAAI,iEAAiE;AACrE,IAAI,iCAAiC;AACrC,IAAI,iCAAiC;AACrC,IAAI,4DAA4D;AAChE,IAAI,2BAA2B;AAC/B,IAAI,wBAAwB;AAC5B,IAAI,sCAAsC;AAC1C,IAAI,4BAA4B;AAChC,IAAI,2CAA2C;AAC/C,IAAI,oCAAoC;AACxC,IAAI,+DAA+D;AACnE,IAAI,wBAAwB;AAC5B,IAAI,iCAAiC;AACrC,IAAI,oCAAoC;AACxC,IAAI,uBAAuB;AAC3B,IAAI,4CAA4C;AAChD,IAAI,+BAA+B;AACnC,IAAI,6BAA6B;AACjC,IAAI,mDAAmD;AACvD,IAAI,wBAAwB;AAC5B,IAAI,yBAAyB;AAC7B,IAAI,4BAA4B;AAChC,IAAI,wDAAwD;AAC5D,IAAI,uCAAuC;AAC3C,IAAI,0BAA0B;AAC9B,IAAI,iEAAiE;AACrE,IAAI,0BAA0B;AAC9B,IAAI,gCAAgC;AACpC,IAAI,uBAAuB;AAC3B,IAAI,wCAAwC;AAC5C,IAAI,oDAAoD;AACxD,IAAI,kCAAkC;AACtC,IAAI,uBAAuB;AAC3B,IAAI,+CAA+C;AACnD,IAAI,4EAA4E;AAChF,IAAI,uGAAuG;AAC3G,IAAI,6EAA6E;AACjF,IAAI,+CAA+C;AACnD,IAAI,2CAA2C;AAC/C,IAAI,4CAA4C;AAChD,IAAI,yCAAyC;AAC7C,IAAI,yCAAyC;AAC7C,IAAI,yCAAyC;AAC7C,IAAI,0CAA0C;AAC9C,IAAI,oCAAoC;AACxC,IAAI,6CAA6C;AACjD,IAAI,0CAA0C;AAC9C,IAAI,2CAA2C;AAC/C,IAAI,wCAAwC;AAC5C,IAAI,2DAA2D;AAC/D,IAAI,gFAAgF;AACpF,IAAI,sDAAsD;AAC1D,IAAI,2CAA2C;AAC/C,IAAI,6CAA6C;AACjD,IAAI,gEAAgE;AACpE,IAAI,qCAAqC;AACzC,IAAI,oCAAoC;AACxC,IAAI,iEAAiE;AACrE,IAAI,oEAAoE;AACxE,IAAI,gDAAgD;AACpD,IAAI,yEAAyE;AAC7E,IAAI,kDAAkD;AACtD,IAAI,sCAAsC;AAC1C,IAAI,oDAAoD;AACxD,IAAI,8CAA8C;AAClD,IAAI,yCAAyC;AAC7C,IAAI,oCAAoC;AACxC,IAAI,2DAA2D;AAC/D,IAAI,mCAAmC;AACvC,IAAI,yDAAyD;AAC7D,IAAI,sDAAsD;AAC1D,IAAI,oDAAoD;AACxD,IAAI,sDAAsD;AAC1D,IAAI,gDAAgD;AACpD,IAAI,kDAAkD;AACtD,IAAI,wCAAwC;AAC5C,IAAI,8CAA8C;AAClD,IAAI,uCAAuC;AAC3C,IAAI,gEAAgE;AACpE,IAAI,wCAAwC;AAC5C,IAAI,kCAAkC;AACtC,IAAI,iCAAiC;AACrC,IAAI,mDAAmD;AACvD,IAAI,iCAAiC;AACrC,IAAI,sDAAsD;AAC1D,IAAI,uCAAuC;AAC3C,IAAI,kCAAkC;AACtC,IAAI,2CAA2C;AAC/C,IAAI,kEAAkE;AACtE,IAAI,yCAAyC;AAC7C,IAAI,0DAA0D;AAC9D,IAAI,wDAAwD;AAC5D,IAAI,wDAAwD;AAC5D,IAAI,2DAA2D;AAC/D,IAAI,0DAA0D;AAC9D,IAAI,gCAAgC;AACpC,IAAI,kCAAkC;AACtC,IAAI,sCAAsC;AAC1C,IAAI,gEAAgE;AACpE,IAAI,yCAAyC;AAC7C,IAAI,wCAAwC;AAC5C,IAAI,oCAAoC;AACxC,IAAI,iCAAiC;AACrC,IAAI,0CAA0C;AAC9C,IAAI,iEAAiE;AACrE,IAAI,wDAAwD;AAC5D,IAAI,uDAAuD;AAC3D,IAAI,qDAAqD;AACzD,IAAI,mEAAmE;AACvE,IAAI,uDAAuD;AAC3D,IAAI,4EAA4E;AAChF,IAAI,oCAAoC;AACxC,IAAI,wDAAwD;AAC5D,IAAI,2DAA2D;AAC/D,IAAI,kDAAkD;AACtD,IAAI,2EAA2E;AAC/E,IAAI,sCAAsC;AAC1C,IAAI,uCAAuC;AAC3C,IAAI,gCAAgC;AACpC,IAAI,iCAAiC;AACrC,IAAI,kCAAkC;AACtC,IAAI,mBAAmB;AACvB,IAAI,2EAA2E;AAC/E,IAAI,kBAAkB;AACtB,IAAI,qBAAqB;AACzB,IAAI,oBAAoB;AACxB,IAAI,oBAAoB;AACxB,IAAI,0BAA0B;AAC9B,IAAI,oBAAoB;AACxB,IAAI,mBAAmB;AACvB,IAAI,kCAAkC;AACtC,IAAI,+DAA+D;AACnE,IAAI,0FAA0F;AAC9F,IAAI,gEAAgE;AACpE,IAAI,kCAAkC;AACtC,IAAI,8BAA8B;AAClC,IAAI,+BAA+B;AACnC,IAAI,4BAA4B;AAChC,IAAI,4BAA4B;AAChC,IAAI,kBAAkB;AACtB,IAAI,sBAAsB;AAC1B,IAAI,8BAA8B;AAClC,IAAI,kBAAkB;AACtB,IAAI,qBAAqB;AACzB,IAAI,qBAAqB;AACzB,IAAI,oBAAoB;AACxB,IAAI,yBAAyB;AAC7B,IAAI,wDAAwD;AAC5D,IAAI,kBAAkB;AACtB,IAAI,gBAAgB;AACpB,IAAI,iCAAiC;AACrC,IAAI,yCAAyC;AAC7C,IAAI,4BAA4B;AAChC,IAAI,sBAAsB;AAC1B,IAAI,kDAAkD;AACtD,IAAI,gBAAgB;AACpB,IAAI,oBAAoB;AACxB,IAAI,2DAA2D;AAC/D,IAAI,yBAAyB;AAC7B,IAAI,iBAAiB;AACrB,IAAI,kCAAkC;AACtC,IAAI,mBAAmB;AACvB,IAAI,yBAAyB;AAC7B,IAAI,iBAAiB;AACrB,IAAI,YAAY;AAChB,IAAI,8BAA8B;AAClC,IAAI,yCAAyC;AAC7C,IAAI,qCAAqC;AACzC,IAAI,iCAAiC;AACrC,IAAI,iCAAiC;AACrC,IAAI,6BAA6B;AACjC,IAAI,gCAAgC;AACpC,IAAI,4BAA4B;AAChC,IAAI,4BAA4B;AAChC,IAAI,gCAAgC;AACpC,IAAI,gCAAgC;AACpC,IAAI,uCAAuC;AAC3C,IAAI,8CAA8C;AAClD,IAAI,6BAA6B;AACjC,IAAI,+BAA+B;AACnC,IAAI,qCAAqC;AACzC,CAAC;;ACrNM,SAAS,oBAAoB,CAAC,GAAG,EAAE;AAC1C,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACjC,QAAQ,OAAO,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACjD,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,KAAK,CAAC;AACrB,KAAK;AACL,CAAC;;ACJD;AACA;AACA;AACA;AACA,AAAO,SAAS,YAAY,CAAC,OAAO,EAAE;AACtC,IAAI,OAAO;AACX,QAAQ,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;AAC9D,YAAY,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC;AAClD,SAAS,CAAC;AACV,KAAK,CAAC;AACN,CAAC;AACD,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-paginate-rest/package.json b/node_modules/@octokit/plugin-paginate-rest/package.json new file mode 100644 index 0000000..db9a6dc --- /dev/null +++ b/node_modules/@octokit/plugin-paginate-rest/package.json @@ -0,0 +1,51 @@ +{ + "name": "@octokit/plugin-paginate-rest", + "description": "Octokit plugin to paginate REST API endpoint responses", + "version": "2.21.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/plugin-paginate-rest.js", + "dependencies": { + "@octokit/types": "^6.40.0" + }, + "peerDependencies": { + "@octokit/core": ">=2" + }, + "devDependencies": { + "@octokit/core": "^4.0.0", + "@octokit/plugin-rest-endpoint-methods": "^6.0.0", + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^28.0.0", + "@types/node": "^16.0.0", + "fetch-mock": "^9.0.0", + "github-openapi-graphql-query": "^2.0.0", + "jest": "^28.0.0", + "npm-run-all": "^4.1.5", + "prettier": "2.7.1", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "ts-jest": "^28.0.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE b/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/README.md b/node_modules/@octokit/plugin-rest-endpoint-methods/README.md new file mode 100644 index 0000000..b23ff58 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/README.md @@ -0,0 +1,76 @@ +# plugin-rest-endpoint-methods.js + +> Octokit plugin adding one method for all of api.github.com REST API endpoints + +[![@latest](https://img.shields.io/npm/v/@octokit/plugin-rest-endpoint-methods.svg)](https://www.npmjs.com/package/@octokit/plugin-rest-endpoint-methods) +[![Build Status](https://github.com/octokit/plugin-rest-endpoint-methods.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-rest-endpoint-methods.js/actions?workflow=Test) + +## Usage + + + + + + +
+Browsers + + +Load `@octokit/plugin-rest-endpoint-methods` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev) + +```html + +``` + +
+Node + + +Install with `npm install @octokit/core @octokit/plugin-rest-endpoint-methods`. Optionally replace `@octokit/core` with a compatible module + +```js +const { Octokit } = require("@octokit/core"); +const { + restEndpointMethods, +} = require("@octokit/plugin-rest-endpoint-methods"); +``` + +
+ +```js +const MyOctokit = Octokit.plugin(restEndpointMethods); +const octokit = new MyOctokit({ auth: "secret123" }); + +// https://developer.github.com/v3/users/#get-the-authenticated-user +octokit.rest.users.getAuthenticated(); +``` + +There is one method for each REST API endpoint documented at [https://developer.github.com/v3](https://developer.github.com/v3). All endpoint methods are documented in the [docs/](docs/) folder, e.g. [docs/users/getAuthenticated.md](docs/users/getAuthenticated.md) + +## TypeScript + +Parameter and response types for all endpoint methods exported as `{ RestEndpointMethodTypes }`. + +Example + +```ts +import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"; + +type UpdateLabelParameters = + RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"]; +type UpdateLabelResponse = + RestEndpointMethodTypes["issues"]["updateLabel"]["response"]; +``` + +In order to get types beyond parameters and responses, check out [`@octokit/openapi-types`](https://github.com/octokit/openapi-types.ts/#readme), which is a direct transpilation from GitHub's official OpenAPI specification. + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js new file mode 100644 index 0000000..a7c5c16 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js @@ -0,0 +1,1107 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function ownKeys(object, enumerableOnly) { + var keys = Object.keys(object); + + if (Object.getOwnPropertySymbols) { + var symbols = Object.getOwnPropertySymbols(object); + + if (enumerableOnly) { + symbols = symbols.filter(function (sym) { + return Object.getOwnPropertyDescriptor(object, sym).enumerable; + }); + } + + keys.push.apply(keys, symbols); + } + + return keys; +} + +function _objectSpread2(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + + if (i % 2) { + ownKeys(Object(source), true).forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } else if (Object.getOwnPropertyDescriptors) { + Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); + } else { + ownKeys(Object(source)).forEach(function (key) { + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); + }); + } + } + + return target; +} + +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; +} + +const Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"], + addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], + approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"], + cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"], + createOrUpdateEnvironmentSecret: ["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"], + createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"], + createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"], + deleteActionsCacheById: ["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"], + deleteActionsCacheByKey: ["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"], + deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + deleteEnvironmentSecret: ["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"], + deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], + disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"], + disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"], + downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"], + downloadJobLogsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"], + downloadWorkflowRunAttemptLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"], + downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], + enableSelectedRepositoryGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"], + enableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: ["GET /orgs/{org}/actions/cache/usage-by-repository"], + getActionsCacheUsageForEnterprise: ["GET /enterprises/{enterprise}/actions/cache/usage"], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: ["GET /orgs/{org}/actions/permissions/selected-actions"], + getAllowedActionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"], + getEnvironmentSecret: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], + getGithubActionsDefaultWorkflowPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/workflow"], + getGithubActionsDefaultWorkflowPermissionsOrganization: ["GET /orgs/{org}/actions/permissions/workflow"], + getGithubActionsDefaultWorkflowPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/workflow"], + getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"], + getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], + getRepoPermissions: ["GET /repos/{owner}/{repo}/actions/permissions", {}, { + renamed: ["actions", "getGithubActionsPermissionsRepository"] + }], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: ["GET /repos/{owner}/{repo}/actions/permissions/access"], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"], + getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"], + getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: ["GET /repositories/{repository_id}/environments/{environment_name}/secrets"], + listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"], + listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"], + listLabelsForSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}/labels"], + listLabelsForSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"], + listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"], + listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"], + listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: ["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + removeCustomLabelFromSelfHostedRunnerForOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"], + removeCustomLabelFromSelfHostedRunnerForRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"], + removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], + reviewPendingDeploymentsForRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], + setAllowedActionsOrganization: ["PUT /orgs/{org}/actions/permissions/selected-actions"], + setAllowedActionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"], + setCustomLabelsForSelfHostedRunnerForOrg: ["PUT /orgs/{org}/actions/runners/{runner_id}/labels"], + setCustomLabelsForSelfHostedRunnerForRepo: ["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], + setGithubActionsDefaultWorkflowPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/workflow"], + setGithubActionsDefaultWorkflowPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions/workflow"], + setGithubActionsDefaultWorkflowPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/workflow"], + setGithubActionsPermissionsOrganization: ["PUT /orgs/{org}/actions/permissions"], + setGithubActionsPermissionsRepository: ["PUT /repos/{owner}/{repo}/actions/permissions"], + setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"], + setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"], + setWorkflowAccessToRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/access"] + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] + }, + apps: { + addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}", {}, { + renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] + }], + addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"], + getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"], + listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"], + removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}", {}, { + renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] + }], + removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"], + updateWebhookConfigForApp: ["PATCH /app/hook/config"] + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"], + getGithubAdvancedSecurityBillingGhe: ["GET /enterprises/{enterprise}/settings/billing/advanced-security"], + getGithubAdvancedSecurityBillingOrg: ["GET /orgs/{org}/settings/billing/advanced-security"], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"], + getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"], + getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"] + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"], + rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"], + setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] + }, + codeScanning: { + deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"], + getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, { + renamedParameters: { + alert_id: "alert_number" + } + }], + getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", {}, { + renamed: ["codeScanning", "listAlertInstances"] + }], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"] + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + codespaceMachinesForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/machines"], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + createOrUpdateSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}"], + createWithPrForAuthenticatedUser: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"], + createWithRepoForAuthenticatedUser: ["POST /repos/{owner}/{repo}/codespaces"], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: ["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + deleteSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}"], + exportForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/exports"], + getExportDetailsForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}/exports/{export_id}"], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getPublicKeyForAuthenticatedUser: ["GET /user/codespaces/secrets/public-key"], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"], + getSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}"], + listDevcontainersInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/devcontainers"], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: ["GET /orgs/{org}/codespaces", {}, { + renamedParameters: { + org_id: "org" + } + }], + listInRepositoryForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: ["GET /user/codespaces/secrets/{secret_name}/repositories"], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + removeRepositoryForSecretForAuthenticatedUser: ["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], + repoMachinesForAuthenticatedUser: ["GET /repos/{owner}/{repo}/codespaces/machines"], + setRepositoriesForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories"], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: ["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] + }, + dependabot: { + addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}"], + createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"], + removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"], + setSelectedReposForOrgSecret: ["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"] + }, + dependencyGraph: { + createRepositorySnapshot: ["POST /repos/{owner}/{repo}/dependency-graph/snapshots"], + diffRange: ["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"] + }, + emojis: { + get: ["GET /emojis"] + }, + enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: ["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], + disableSelectedOrganizationGithubActionsEnterprise: ["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], + enableSelectedOrganizationGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], + getAllowedActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/selected-actions"], + getGithubActionsPermissionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions"], + getServerStatistics: ["GET /enterprise-installation/{enterprise_or_org}/server-statistics"], + listLabelsForSelfHostedRunnerForEnterprise: ["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], + listSelectedOrganizationsEnabledGithubActionsEnterprise: ["GET /enterprises/{enterprise}/actions/permissions/organizations"], + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: ["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], + removeCustomLabelFromSelfHostedRunnerForEnterprise: ["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"], + setAllowedActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"], + setCustomLabelsForSelfHostedRunnerForEnterprise: ["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], + setGithubActionsPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions"], + setSelectedOrganizationsEnabledGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations"] + }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"] + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"] + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"] + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits", {}, { + renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] + }], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"], + removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits", {}, { + renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] + }], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits", {}, { + renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] + }] + }, + issues: { + addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"], + removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"], + removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"] + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"] + }, + markdown: { + render: ["POST /markdown"], + renderRaw: ["POST /markdown/raw", { + headers: { + "content-type": "text/plain; charset=utf-8" + } + }] + }, + meta: { + get: ["GET /meta"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"] + }, + migrations: { + cancelImport: ["DELETE /repos/{owner}/{repo}/import"], + deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"], + deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"], + downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive"], + getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive"], + getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], + getImportStatus: ["GET /repos/{owner}/{repo}/import"], + getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: ["GET /user/migrations/{migration_id}/repositories", {}, { + renamed: ["migrations", "listReposForAuthenticatedUser"] + }], + mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], + setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: ["PUT /repos/{owner}/{repo}/import"], + unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"], + unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"], + updateImport: ["PATCH /repos/{owner}/{repo}/import"] + }, + orgs: { + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"], + createInvitation: ["POST /orgs/{org}/invitations"], + createWebhook: ["POST /orgs/{org}/hooks"], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + get: ["GET /orgs/{org}"], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"], + removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] + }, + packages: { + deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"], + deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"], + deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"], + deletePackageVersionForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], + deletePackageVersionForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + deletePackageVersionForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getAllPackageVersionsForAPackageOwnedByAnOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions", {}, { + renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] + }], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions", {}, { + renamed: ["packages", "getAllPackageVersionsForPackageOwnedByAuthenticatedUser"] + }], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions"], + getAllPackageVersionsForPackageOwnedByOrg: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"], + getAllPackageVersionsForPackageOwnedByUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions"], + getPackageForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}"], + getPackageForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}"], + getPackageForUser: ["GET /users/{username}/packages/{package_type}/{package_name}"], + getPackageVersionForAuthenticatedUser: ["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getPackageVersionForOrganization: ["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + getPackageVersionForUser: ["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"], + restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], + restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], + restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"] + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission"], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}"], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"] + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"], + deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], + listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], + requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], + submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"], + updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"] + }, + rateLimit: { + get: ["GET /rate_limit"] + }, + reactions: { + createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"], + createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], + createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], + createForRelease: ["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"], + createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], + createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"], + deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"], + deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"], + deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"], + deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"], + deleteForRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"], + deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"], + deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"], + listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], + listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"], + listForRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"], + listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"], + listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"] + }, + repos: { + acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}", {}, { + renamed: ["repos", "acceptInvitationForAuthenticatedUser"] + }], + acceptInvitationForAuthenticatedUser: ["PATCH /user/repository_invitations/{invitation_id}"], + addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { + mapToData: "apps" + }], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { + mapToData: "contexts" + }], + addTeamAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { + mapToData: "teams" + }], + addUserAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { + mapToData: "users" + }], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: ["GET /repos/{owner}/{repo}/compare/{basehead}"], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"], + createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate"], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}", {}, { + renamed: ["repos", "declineInvitationForAuthenticatedUser"] + }], + declineInvitationForAuthenticatedUser: ["DELETE /user/repository_invitations/{invitation_id}"], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], + deleteAdminBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + deleteAnEnvironment: ["DELETE /repos/{owner}/{repo}/environments/{environment_name}"], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"], + deleteTagProtection: ["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes"], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], + disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts"], + downloadArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}", {}, { + renamed: ["repos", "downloadZipballArchive"] + }], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes"], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], + enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"], + generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], + getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"], + getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"], + getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"], + listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], + removeAppAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { + mapToData: "apps" + }], + removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"], + removeStatusCheckContexts: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { + mapToData: "contexts" + }], + removeStatusCheckProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + removeTeamAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { + mapToData: "teams" + }], + removeUserAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { + mapToData: "users" + }], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + setAppAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { + mapToData: "apps" + }], + setStatusCheckContexts: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { + mapToData: "contexts" + }], + setTeamAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { + mapToData: "teams" + }], + setUserAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { + mapToData: "users" + }], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"], + updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"], + updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", {}, { + renamed: ["repos", "updateStatusCheckProtection"] + }], + updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"], + uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", { + baseUrl: "https://uploads.github.com" + }] + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"] + }, + secretScanning: { + getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"], + listAlertsForEnterprise: ["GET /enterprises/{enterprise}/secret-scanning/alerts"], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"], + updateAlert: ["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"] + }, + teams: { + addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"], + addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"], + addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"], + checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], + deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], + getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"], + removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"], + removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], + updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], + updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] + }, + users: { + addEmailForAuthenticated: ["POST /user/emails", {}, { + renamed: ["users", "addEmailForAuthenticatedUser"] + }], + addEmailForAuthenticatedUser: ["POST /user/emails"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: ["POST /user/gpg_keys", {}, { + renamed: ["users", "createGpgKeyForAuthenticatedUser"] + }], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: ["POST /user/keys", {}, { + renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] + }], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + deleteEmailForAuthenticated: ["DELETE /user/emails", {}, { + renamed: ["users", "deleteEmailForAuthenticatedUser"] + }], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: ["DELETE /user/gpg_keys/{gpg_key_id}", {}, { + renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] + }], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: ["DELETE /user/keys/{key_id}", {}, { + renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] + }], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}", {}, { + renamed: ["users", "getGpgKeyForAuthenticatedUser"] + }], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: ["GET /user/keys/{key_id}", {}, { + renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] + }], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + list: ["GET /users"], + listBlockedByAuthenticated: ["GET /user/blocks", {}, { + renamed: ["users", "listBlockedByAuthenticatedUser"] + }], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: ["GET /user/emails", {}, { + renamed: ["users", "listEmailsForAuthenticatedUser"] + }], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: ["GET /user/following", {}, { + renamed: ["users", "listFollowedByAuthenticatedUser"] + }], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: ["GET /user/gpg_keys", {}, { + renamed: ["users", "listGpgKeysForAuthenticatedUser"] + }], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: ["GET /user/public_emails", {}, { + renamed: ["users", "listPublicEmailsForAuthenticatedUser"] + }], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: ["GET /user/keys", {}, { + renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] + }], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + setPrimaryEmailVisibilityForAuthenticated: ["PATCH /user/email/visibility", {}, { + renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] + }], + setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"] + } +}; + +const VERSION = "5.16.2"; + +function endpointsToMethods(octokit, endpointsMap) { + const newMethods = {}; + + for (const [scope, endpoints] of Object.entries(endpointsMap)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign({ + method, + url + }, defaults); + + if (!newMethods[scope]) { + newMethods[scope] = {}; + } + + const scopeMethods = newMethods[scope]; + + if (decorations) { + scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); + continue; + } + + scopeMethods[methodName] = octokit.request.defaults(endpointDefaults); + } + } + + return newMethods; +} + +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + /* istanbul ignore next */ + + function withDecorations(...args) { + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData` + + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: undefined + }); + return requestWithDefaults(options); + } + + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); + } + + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + + if (decorations.renamedParameters) { + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + const options = requestWithDefaults.endpoint.merge(...args); + + for (const [name, alias] of Object.entries(decorations.renamedParameters)) { + if (name in options) { + octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); + + if (!(alias in options)) { + options[alias] = options[name]; + } + + delete options[name]; + } + } + + return requestWithDefaults(options); + } // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + + + return requestWithDefaults(...args); + } + + return Object.assign(withDecorations, requestWithDefaults); +} + +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, Endpoints); + return { + rest: api + }; +} +restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, Endpoints); + return _objectSpread2(_objectSpread2({}, api), {}, { + rest: api + }); +} +legacyRestEndpointMethods.VERSION = VERSION; + +exports.legacyRestEndpointMethods = legacyRestEndpointMethods; +exports.restEndpointMethods = restEndpointMethods; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map new file mode 100644 index 0000000..20eff5f --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/generated/endpoints.js","../dist-src/version.js","../dist-src/endpoints-to-methods.js","../dist-src/index.js"],"sourcesContent":["const Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\",\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n ],\n getActionsCacheUsageForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/cache/usage\",\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\",\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n getGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\",\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\",\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\",\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] },\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] },\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubAdvancedSecurityBillingGhe: [\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n ],\n getGithubAdvancedSecurityBillingOrg: [\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\",\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] },\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"],\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\",\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\",\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\",\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\",\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\",\n ],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\",\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\",\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\",\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\",\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\",\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } },\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\",\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\",\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\",\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"],\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\",\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\",\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\",\n ],\n },\n emojis: { get: [\"GET /emojis\"] },\n enterpriseAdmin: {\n addCustomLabelsToSelfHostedRunnerForEnterprise: [\n \"POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n disableSelectedOrganizationGithubActionsEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n enableSelectedOrganizationGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n getAllowedActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n getGithubActionsPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions\",\n ],\n getServerStatistics: [\n \"GET /enterprise-installation/{enterprise_or_org}/server-statistics\",\n ],\n listLabelsForSelfHostedRunnerForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}\",\n ],\n setAllowedActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions\",\n ],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n ],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] },\n ],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"],\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomRoles: [\"GET /organizations/{organization_id}/custom_roles\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] },\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\",\n ],\n },\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] },\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\",\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] },\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n disableLfsForRepo: [\"DELETE /repos/{owner}/{repo}/lfs\"],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n enableLfsForRepo: [\"PUT /repos/{owner}/{repo}/lfs\"],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\",\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] },\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] },\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] },\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] },\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] },\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] },\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] },\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] },\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] },\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] },\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] },\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] },\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] },\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] },\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] },\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\",\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\nexport default Endpoints;\n","export const VERSION = \"5.16.2\";\n","export function endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({ method, url }, defaults);\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n const scopeMethods = newMethods[scope];\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n","import ENDPOINTS from \"./generated/endpoints\";\nimport { VERSION } from \"./version\";\nimport { endpointsToMethods } from \"./endpoints-to-methods\";\nexport function restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n rest: api,\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nexport function legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n ...api,\n rest: api,\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n"],"names":["Endpoints","actions","addCustomLabelsToSelfHostedRunnerForOrg","addCustomLabelsToSelfHostedRunnerForRepo","addSelectedRepoToOrgSecret","approveWorkflowRun","cancelWorkflowRun","createOrUpdateEnvironmentSecret","createOrUpdateOrgSecret","createOrUpdateRepoSecret","createRegistrationTokenForOrg","createRegistrationTokenForRepo","createRemoveTokenForOrg","createRemoveTokenForRepo","createWorkflowDispatch","deleteActionsCacheById","deleteActionsCacheByKey","deleteArtifact","deleteEnvironmentSecret","deleteOrgSecret","deleteRepoSecret","deleteSelfHostedRunnerFromOrg","deleteSelfHostedRunnerFromRepo","deleteWorkflowRun","deleteWorkflowRunLogs","disableSelectedRepositoryGithubActionsOrganization","disableWorkflow","downloadArtifact","downloadJobLogsForWorkflowRun","downloadWorkflowRunAttemptLogs","downloadWorkflowRunLogs","enableSelectedRepositoryGithubActionsOrganization","enableWorkflow","getActionsCacheList","getActionsCacheUsage","getActionsCacheUsageByRepoForOrg","getActionsCacheUsageForEnterprise","getActionsCacheUsageForOrg","getAllowedActionsOrganization","getAllowedActionsRepository","getArtifact","getEnvironmentPublicKey","getEnvironmentSecret","getGithubActionsDefaultWorkflowPermissionsEnterprise","getGithubActionsDefaultWorkflowPermissionsOrganization","getGithubActionsDefaultWorkflowPermissionsRepository","getGithubActionsPermissionsOrganization","getGithubActionsPermissionsRepository","getJobForWorkflowRun","getOrgPublicKey","getOrgSecret","getPendingDeploymentsForRun","getRepoPermissions","renamed","getRepoPublicKey","getRepoSecret","getReviewsForRun","getSelfHostedRunnerForOrg","getSelfHostedRunnerForRepo","getWorkflow","getWorkflowAccessToRepository","getWorkflowRun","getWorkflowRunAttempt","getWorkflowRunUsage","getWorkflowUsage","listArtifactsForRepo","listEnvironmentSecrets","listJobsForWorkflowRun","listJobsForWorkflowRunAttempt","listLabelsForSelfHostedRunnerForOrg","listLabelsForSelfHostedRunnerForRepo","listOrgSecrets","listRepoSecrets","listRepoWorkflows","listRunnerApplicationsForOrg","listRunnerApplicationsForRepo","listSelectedReposForOrgSecret","listSelectedRepositoriesEnabledGithubActionsOrganization","listSelfHostedRunnersForOrg","listSelfHostedRunnersForRepo","listWorkflowRunArtifacts","listWorkflowRuns","listWorkflowRunsForRepo","reRunJobForWorkflowRun","reRunWorkflow","reRunWorkflowFailedJobs","removeAllCustomLabelsFromSelfHostedRunnerForOrg","removeAllCustomLabelsFromSelfHostedRunnerForRepo","removeCustomLabelFromSelfHostedRunnerForOrg","removeCustomLabelFromSelfHostedRunnerForRepo","removeSelectedRepoFromOrgSecret","reviewPendingDeploymentsForRun","setAllowedActionsOrganization","setAllowedActionsRepository","setCustomLabelsForSelfHostedRunnerForOrg","setCustomLabelsForSelfHostedRunnerForRepo","setGithubActionsDefaultWorkflowPermissionsEnterprise","setGithubActionsDefaultWorkflowPermissionsOrganization","setGithubActionsDefaultWorkflowPermissionsRepository","setGithubActionsPermissionsOrganization","setGithubActionsPermissionsRepository","setSelectedReposForOrgSecret","setSelectedRepositoriesEnabledGithubActionsOrganization","setWorkflowAccessToRepository","activity","checkRepoIsStarredByAuthenticatedUser","deleteRepoSubscription","deleteThreadSubscription","getFeeds","getRepoSubscription","getThread","getThreadSubscriptionForAuthenticatedUser","listEventsForAuthenticatedUser","listNotificationsForAuthenticatedUser","listOrgEventsForAuthenticatedUser","listPublicEvents","listPublicEventsForRepoNetwork","listPublicEventsForUser","listPublicOrgEvents","listReceivedEventsForUser","listReceivedPublicEventsForUser","listRepoEvents","listRepoNotificationsForAuthenticatedUser","listReposStarredByAuthenticatedUser","listReposStarredByUser","listReposWatchedByUser","listStargazersForRepo","listWatchedReposForAuthenticatedUser","listWatchersForRepo","markNotificationsAsRead","markRepoNotificationsAsRead","markThreadAsRead","setRepoSubscription","setThreadSubscription","starRepoForAuthenticatedUser","unstarRepoForAuthenticatedUser","apps","addRepoToInstallation","addRepoToInstallationForAuthenticatedUser","checkToken","createFromManifest","createInstallationAccessToken","deleteAuthorization","deleteInstallation","deleteToken","getAuthenticated","getBySlug","getInstallation","getOrgInstallation","getRepoInstallation","getSubscriptionPlanForAccount","getSubscriptionPlanForAccountStubbed","getUserInstallation","getWebhookConfigForApp","getWebhookDelivery","listAccountsForPlan","listAccountsForPlanStubbed","listInstallationReposForAuthenticatedUser","listInstallations","listInstallationsForAuthenticatedUser","listPlans","listPlansStubbed","listReposAccessibleToInstallation","listSubscriptionsForAuthenticatedUser","listSubscriptionsForAuthenticatedUserStubbed","listWebhookDeliveries","redeliverWebhookDelivery","removeRepoFromInstallation","removeRepoFromInstallationForAuthenticatedUser","resetToken","revokeInstallationAccessToken","scopeToken","suspendInstallation","unsuspendInstallation","updateWebhookConfigForApp","billing","getGithubActionsBillingOrg","getGithubActionsBillingUser","getGithubAdvancedSecurityBillingGhe","getGithubAdvancedSecurityBillingOrg","getGithubPackagesBillingOrg","getGithubPackagesBillingUser","getSharedStorageBillingOrg","getSharedStorageBillingUser","checks","create","createSuite","get","getSuite","listAnnotations","listForRef","listForSuite","listSuitesForRef","rerequestRun","rerequestSuite","setSuitesPreferences","update","codeScanning","deleteAnalysis","getAlert","renamedParameters","alert_id","getAnalysis","getSarif","listAlertInstances","listAlertsForOrg","listAlertsForRepo","listAlertsInstances","listRecentAnalyses","updateAlert","uploadSarif","codesOfConduct","getAllCodesOfConduct","getConductCode","codespaces","addRepositoryForSecretForAuthenticatedUser","codespaceMachinesForAuthenticatedUser","createForAuthenticatedUser","createOrUpdateSecretForAuthenticatedUser","createWithPrForAuthenticatedUser","createWithRepoForAuthenticatedUser","deleteForAuthenticatedUser","deleteFromOrganization","deleteSecretForAuthenticatedUser","exportForAuthenticatedUser","getExportDetailsForAuthenticatedUser","getForAuthenticatedUser","getPublicKeyForAuthenticatedUser","getSecretForAuthenticatedUser","listDevcontainersInRepositoryForAuthenticatedUser","listForAuthenticatedUser","listInOrganization","org_id","listInRepositoryForAuthenticatedUser","listRepositoriesForSecretForAuthenticatedUser","listSecretsForAuthenticatedUser","removeRepositoryForSecretForAuthenticatedUser","repoMachinesForAuthenticatedUser","setRepositoriesForSecretForAuthenticatedUser","startForAuthenticatedUser","stopForAuthenticatedUser","stopInOrganization","updateForAuthenticatedUser","dependabot","dependencyGraph","createRepositorySnapshot","diffRange","emojis","enterpriseAdmin","addCustomLabelsToSelfHostedRunnerForEnterprise","disableSelectedOrganizationGithubActionsEnterprise","enableSelectedOrganizationGithubActionsEnterprise","getAllowedActionsEnterprise","getGithubActionsPermissionsEnterprise","getServerStatistics","listLabelsForSelfHostedRunnerForEnterprise","listSelectedOrganizationsEnabledGithubActionsEnterprise","removeAllCustomLabelsFromSelfHostedRunnerForEnterprise","removeCustomLabelFromSelfHostedRunnerForEnterprise","setAllowedActionsEnterprise","setCustomLabelsForSelfHostedRunnerForEnterprise","setGithubActionsPermissionsEnterprise","setSelectedOrganizationsEnabledGithubActionsEnterprise","gists","checkIsStarred","createComment","delete","deleteComment","fork","getComment","getRevision","list","listComments","listCommits","listForUser","listForks","listPublic","listStarred","star","unstar","updateComment","git","createBlob","createCommit","createRef","createTag","createTree","deleteRef","getBlob","getCommit","getRef","getTag","getTree","listMatchingRefs","updateRef","gitignore","getAllTemplates","getTemplate","interactions","getRestrictionsForAuthenticatedUser","getRestrictionsForOrg","getRestrictionsForRepo","getRestrictionsForYourPublicRepos","removeRestrictionsForAuthenticatedUser","removeRestrictionsForOrg","removeRestrictionsForRepo","removeRestrictionsForYourPublicRepos","setRestrictionsForAuthenticatedUser","setRestrictionsForOrg","setRestrictionsForRepo","setRestrictionsForYourPublicRepos","issues","addAssignees","addLabels","checkUserCanBeAssigned","createLabel","createMilestone","deleteLabel","deleteMilestone","getEvent","getLabel","getMilestone","listAssignees","listCommentsForRepo","listEvents","listEventsForRepo","listEventsForTimeline","listForOrg","listForRepo","listLabelsForMilestone","listLabelsForRepo","listLabelsOnIssue","listMilestones","lock","removeAllLabels","removeAssignees","removeLabel","setLabels","unlock","updateLabel","updateMilestone","licenses","getAllCommonlyUsed","getForRepo","markdown","render","renderRaw","headers","meta","getOctocat","getZen","root","migrations","cancelImport","deleteArchiveForAuthenticatedUser","deleteArchiveForOrg","downloadArchiveForOrg","getArchiveForAuthenticatedUser","getCommitAuthors","getImportStatus","getLargeFiles","getStatusForAuthenticatedUser","getStatusForOrg","listReposForAuthenticatedUser","listReposForOrg","listReposForUser","mapCommitAuthor","setLfsPreference","startForOrg","startImport","unlockRepoForAuthenticatedUser","unlockRepoForOrg","updateImport","orgs","blockUser","cancelInvitation","checkBlockedUser","checkMembershipForUser","checkPublicMembershipForUser","convertMemberToOutsideCollaborator","createInvitation","createWebhook","deleteWebhook","getMembershipForAuthenticatedUser","getMembershipForUser","getWebhook","getWebhookConfigForOrg","listAppInstallations","listBlockedUsers","listCustomRoles","listFailedInvitations","listInvitationTeams","listMembers","listMembershipsForAuthenticatedUser","listOutsideCollaborators","listPendingInvitations","listPublicMembers","listWebhooks","pingWebhook","removeMember","removeMembershipForUser","removeOutsideCollaborator","removePublicMembershipForAuthenticatedUser","setMembershipForUser","setPublicMembershipForAuthenticatedUser","unblockUser","updateMembershipForAuthenticatedUser","updateWebhook","updateWebhookConfigForOrg","packages","deletePackageForAuthenticatedUser","deletePackageForOrg","deletePackageForUser","deletePackageVersionForAuthenticatedUser","deletePackageVersionForOrg","deletePackageVersionForUser","getAllPackageVersionsForAPackageOwnedByAnOrg","getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser","getAllPackageVersionsForPackageOwnedByAuthenticatedUser","getAllPackageVersionsForPackageOwnedByOrg","getAllPackageVersionsForPackageOwnedByUser","getPackageForAuthenticatedUser","getPackageForOrganization","getPackageForUser","getPackageVersionForAuthenticatedUser","getPackageVersionForOrganization","getPackageVersionForUser","listPackagesForAuthenticatedUser","listPackagesForOrganization","listPackagesForUser","restorePackageForAuthenticatedUser","restorePackageForOrg","restorePackageForUser","restorePackageVersionForAuthenticatedUser","restorePackageVersionForOrg","restorePackageVersionForUser","projects","addCollaborator","createCard","createColumn","createForOrg","createForRepo","deleteCard","deleteColumn","getCard","getColumn","getPermissionForUser","listCards","listCollaborators","listColumns","moveCard","moveColumn","removeCollaborator","updateCard","updateColumn","pulls","checkIfMerged","createReplyForReviewComment","createReview","createReviewComment","deletePendingReview","deleteReviewComment","dismissReview","getReview","getReviewComment","listCommentsForReview","listFiles","listRequestedReviewers","listReviewComments","listReviewCommentsForRepo","listReviews","merge","removeRequestedReviewers","requestReviewers","submitReview","updateBranch","updateReview","updateReviewComment","rateLimit","reactions","createForCommitComment","createForIssue","createForIssueComment","createForPullRequestReviewComment","createForRelease","createForTeamDiscussionCommentInOrg","createForTeamDiscussionInOrg","deleteForCommitComment","deleteForIssue","deleteForIssueComment","deleteForPullRequestComment","deleteForRelease","deleteForTeamDiscussion","deleteForTeamDiscussionComment","listForCommitComment","listForIssue","listForIssueComment","listForPullRequestReviewComment","listForRelease","listForTeamDiscussionCommentInOrg","listForTeamDiscussionInOrg","repos","acceptInvitation","acceptInvitationForAuthenticatedUser","addAppAccessRestrictions","mapToData","addStatusCheckContexts","addTeamAccessRestrictions","addUserAccessRestrictions","checkCollaborator","checkVulnerabilityAlerts","codeownersErrors","compareCommits","compareCommitsWithBasehead","createAutolink","createCommitComment","createCommitSignatureProtection","createCommitStatus","createDeployKey","createDeployment","createDeploymentStatus","createDispatchEvent","createFork","createInOrg","createOrUpdateEnvironment","createOrUpdateFileContents","createPagesSite","createRelease","createTagProtection","createUsingTemplate","declineInvitation","declineInvitationForAuthenticatedUser","deleteAccessRestrictions","deleteAdminBranchProtection","deleteAnEnvironment","deleteAutolink","deleteBranchProtection","deleteCommitComment","deleteCommitSignatureProtection","deleteDeployKey","deleteDeployment","deleteFile","deleteInvitation","deletePagesSite","deletePullRequestReviewProtection","deleteRelease","deleteReleaseAsset","deleteTagProtection","disableAutomatedSecurityFixes","disableLfsForRepo","disableVulnerabilityAlerts","downloadArchive","downloadTarballArchive","downloadZipballArchive","enableAutomatedSecurityFixes","enableLfsForRepo","enableVulnerabilityAlerts","generateReleaseNotes","getAccessRestrictions","getAdminBranchProtection","getAllEnvironments","getAllStatusCheckContexts","getAllTopics","getAppsWithAccessToProtectedBranch","getAutolink","getBranch","getBranchProtection","getClones","getCodeFrequencyStats","getCollaboratorPermissionLevel","getCombinedStatusForRef","getCommitActivityStats","getCommitComment","getCommitSignatureProtection","getCommunityProfileMetrics","getContent","getContributorsStats","getDeployKey","getDeployment","getDeploymentStatus","getEnvironment","getLatestPagesBuild","getLatestRelease","getPages","getPagesBuild","getPagesHealthCheck","getParticipationStats","getPullRequestReviewProtection","getPunchCardStats","getReadme","getReadmeInDirectory","getRelease","getReleaseAsset","getReleaseByTag","getStatusChecksProtection","getTeamsWithAccessToProtectedBranch","getTopPaths","getTopReferrers","getUsersWithAccessToProtectedBranch","getViews","getWebhookConfigForRepo","listAutolinks","listBranches","listBranchesForHeadCommit","listCommentsForCommit","listCommitCommentsForRepo","listCommitStatusesForRef","listContributors","listDeployKeys","listDeploymentStatuses","listDeployments","listInvitations","listInvitationsForAuthenticatedUser","listLanguages","listPagesBuilds","listPullRequestsAssociatedWithCommit","listReleaseAssets","listReleases","listTagProtection","listTags","listTeams","mergeUpstream","removeAppAccessRestrictions","removeStatusCheckContexts","removeStatusCheckProtection","removeTeamAccessRestrictions","removeUserAccessRestrictions","renameBranch","replaceAllTopics","requestPagesBuild","setAdminBranchProtection","setAppAccessRestrictions","setStatusCheckContexts","setTeamAccessRestrictions","setUserAccessRestrictions","testPushWebhook","transfer","updateBranchProtection","updateCommitComment","updateInformationAboutPagesSite","updateInvitation","updatePullRequestReviewProtection","updateRelease","updateReleaseAsset","updateStatusCheckPotection","updateStatusCheckProtection","updateWebhookConfigForRepo","uploadReleaseAsset","baseUrl","search","code","commits","issuesAndPullRequests","labels","topics","users","secretScanning","listAlertsForEnterprise","listLocationsForAlert","teams","addOrUpdateMembershipForUserInOrg","addOrUpdateProjectPermissionsInOrg","addOrUpdateRepoPermissionsInOrg","checkPermissionsForProjectInOrg","checkPermissionsForRepoInOrg","createDiscussionCommentInOrg","createDiscussionInOrg","deleteDiscussionCommentInOrg","deleteDiscussionInOrg","deleteInOrg","getByName","getDiscussionCommentInOrg","getDiscussionInOrg","getMembershipForUserInOrg","listChildInOrg","listDiscussionCommentsInOrg","listDiscussionsInOrg","listMembersInOrg","listPendingInvitationsInOrg","listProjectsInOrg","listReposInOrg","removeMembershipForUserInOrg","removeProjectInOrg","removeRepoInOrg","updateDiscussionCommentInOrg","updateDiscussionInOrg","updateInOrg","addEmailForAuthenticated","addEmailForAuthenticatedUser","block","checkBlocked","checkFollowingForUser","checkPersonIsFollowedByAuthenticated","createGpgKeyForAuthenticated","createGpgKeyForAuthenticatedUser","createPublicSshKeyForAuthenticated","createPublicSshKeyForAuthenticatedUser","deleteEmailForAuthenticated","deleteEmailForAuthenticatedUser","deleteGpgKeyForAuthenticated","deleteGpgKeyForAuthenticatedUser","deletePublicSshKeyForAuthenticated","deletePublicSshKeyForAuthenticatedUser","follow","getByUsername","getContextForUser","getGpgKeyForAuthenticated","getGpgKeyForAuthenticatedUser","getPublicSshKeyForAuthenticated","getPublicSshKeyForAuthenticatedUser","listBlockedByAuthenticated","listBlockedByAuthenticatedUser","listEmailsForAuthenticated","listEmailsForAuthenticatedUser","listFollowedByAuthenticated","listFollowedByAuthenticatedUser","listFollowersForAuthenticatedUser","listFollowersForUser","listFollowingForUser","listGpgKeysForAuthenticated","listGpgKeysForAuthenticatedUser","listGpgKeysForUser","listPublicEmailsForAuthenticated","listPublicEmailsForAuthenticatedUser","listPublicKeysForUser","listPublicSshKeysForAuthenticated","listPublicSshKeysForAuthenticatedUser","setPrimaryEmailVisibilityForAuthenticated","setPrimaryEmailVisibilityForAuthenticatedUser","unblock","unfollow","updateAuthenticated","VERSION","endpointsToMethods","octokit","endpointsMap","newMethods","scope","endpoints","Object","entries","methodName","endpoint","route","defaults","decorations","method","url","split","endpointDefaults","assign","scopeMethods","decorate","request","requestWithDefaults","withDecorations","args","options","data","undefined","newScope","newMethodName","log","warn","deprecated","name","alias","restEndpointMethods","api","ENDPOINTS","rest","legacyRestEndpointMethods"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAMA,SAAS,GAAG;AACdC,EAAAA,OAAO,EAAE;AACLC,IAAAA,uCAAuC,EAAE,CACrC,qDADqC,CADpC;AAILC,IAAAA,wCAAwC,EAAE,CACtC,+DADsC,CAJrC;AAOLC,IAAAA,0BAA0B,EAAE,CACxB,4EADwB,CAPvB;AAULC,IAAAA,kBAAkB,EAAE,CAChB,0DADgB,CAVf;AAaLC,IAAAA,iBAAiB,EAAE,CACf,yDADe,CAbd;AAgBLC,IAAAA,+BAA+B,EAAE,CAC7B,yFAD6B,CAhB5B;AAmBLC,IAAAA,uBAAuB,EAAE,CAAC,+CAAD,CAnBpB;AAoBLC,IAAAA,wBAAwB,EAAE,CACtB,yDADsB,CApBrB;AAuBLC,IAAAA,6BAA6B,EAAE,CAC3B,qDAD2B,CAvB1B;AA0BLC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CA1B3B;AA6BLC,IAAAA,uBAAuB,EAAE,CAAC,+CAAD,CA7BpB;AA8BLC,IAAAA,wBAAwB,EAAE,CACtB,yDADsB,CA9BrB;AAiCLC,IAAAA,sBAAsB,EAAE,CACpB,uEADoB,CAjCnB;AAoCLC,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CApCnB;AAuCLC,IAAAA,uBAAuB,EAAE,CACrB,uDADqB,CAvCpB;AA0CLC,IAAAA,cAAc,EAAE,CACZ,8DADY,CA1CX;AA6CLC,IAAAA,uBAAuB,EAAE,CACrB,4FADqB,CA7CpB;AAgDLC,IAAAA,eAAe,EAAE,CAAC,kDAAD,CAhDZ;AAiDLC,IAAAA,gBAAgB,EAAE,CACd,4DADc,CAjDb;AAoDLC,IAAAA,6BAA6B,EAAE,CAC3B,gDAD2B,CApD1B;AAuDLC,IAAAA,8BAA8B,EAAE,CAC5B,0DAD4B,CAvD3B;AA0DLC,IAAAA,iBAAiB,EAAE,CAAC,oDAAD,CA1Dd;AA2DLC,IAAAA,qBAAqB,EAAE,CACnB,yDADmB,CA3DlB;AA8DLC,IAAAA,kDAAkD,EAAE,CAChD,qEADgD,CA9D/C;AAiELC,IAAAA,eAAe,EAAE,CACb,mEADa,CAjEZ;AAoELC,IAAAA,gBAAgB,EAAE,CACd,4EADc,CApEb;AAuELC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CAvE1B;AA0ELC,IAAAA,8BAA8B,EAAE,CAC5B,gFAD4B,CA1E3B;AA6ELC,IAAAA,uBAAuB,EAAE,CACrB,sDADqB,CA7EpB;AAgFLC,IAAAA,iDAAiD,EAAE,CAC/C,kEAD+C,CAhF9C;AAmFLC,IAAAA,cAAc,EAAE,CACZ,kEADY,CAnFX;AAsFLC,IAAAA,mBAAmB,EAAE,CAAC,0CAAD,CAtFhB;AAuFLC,IAAAA,oBAAoB,EAAE,CAAC,+CAAD,CAvFjB;AAwFLC,IAAAA,gCAAgC,EAAE,CAC9B,mDAD8B,CAxF7B;AA2FLC,IAAAA,iCAAiC,EAAE,CAC/B,mDAD+B,CA3F9B;AA8FLC,IAAAA,0BAA0B,EAAE,CAAC,qCAAD,CA9FvB;AA+FLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CA/F1B;AAkGLC,IAAAA,2BAA2B,EAAE,CACzB,gEADyB,CAlGxB;AAqGLC,IAAAA,WAAW,EAAE,CAAC,2DAAD,CArGR;AAsGLC,IAAAA,uBAAuB,EAAE,CACrB,sFADqB,CAtGpB;AAyGLC,IAAAA,oBAAoB,EAAE,CAClB,yFADkB,CAzGjB;AA4GLC,IAAAA,oDAAoD,EAAE,CAClD,4DADkD,CA5GjD;AA+GLC,IAAAA,sDAAsD,EAAE,CACpD,8CADoD,CA/GnD;AAkHLC,IAAAA,oDAAoD,EAAE,CAClD,wDADkD,CAlHjD;AAqHLC,IAAAA,uCAAuC,EAAE,CACrC,qCADqC,CArHpC;AAwHLC,IAAAA,qCAAqC,EAAE,CACnC,+CADmC,CAxHlC;AA2HLC,IAAAA,oBAAoB,EAAE,CAAC,iDAAD,CA3HjB;AA4HLC,IAAAA,eAAe,EAAE,CAAC,4CAAD,CA5HZ;AA6HLC,IAAAA,YAAY,EAAE,CAAC,+CAAD,CA7HT;AA8HLC,IAAAA,2BAA2B,EAAE,CACzB,qEADyB,CA9HxB;AAiILC,IAAAA,kBAAkB,EAAE,CAChB,+CADgB,EAEhB,EAFgB,EAGhB;AAAEC,MAAAA,OAAO,EAAE,CAAC,SAAD,EAAY,uCAAZ;AAAX,KAHgB,CAjIf;AAsILC,IAAAA,gBAAgB,EAAE,CAAC,sDAAD,CAtIb;AAuILC,IAAAA,aAAa,EAAE,CAAC,yDAAD,CAvIV;AAwILC,IAAAA,gBAAgB,EAAE,CACd,2DADc,CAxIb;AA2ILC,IAAAA,yBAAyB,EAAE,CAAC,6CAAD,CA3ItB;AA4ILC,IAAAA,0BAA0B,EAAE,CACxB,uDADwB,CA5IvB;AA+ILC,IAAAA,WAAW,EAAE,CAAC,2DAAD,CA/IR;AAgJLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CAhJ1B;AAmJLC,IAAAA,cAAc,EAAE,CAAC,iDAAD,CAnJX;AAoJLC,IAAAA,qBAAqB,EAAE,CACnB,2EADmB,CApJlB;AAuJLC,IAAAA,mBAAmB,EAAE,CACjB,wDADiB,CAvJhB;AA0JLC,IAAAA,gBAAgB,EAAE,CACd,kEADc,CA1Jb;AA6JLC,IAAAA,oBAAoB,EAAE,CAAC,6CAAD,CA7JjB;AA8JLC,IAAAA,sBAAsB,EAAE,CACpB,2EADoB,CA9JnB;AAiKLC,IAAAA,sBAAsB,EAAE,CACpB,sDADoB,CAjKnB;AAoKLC,IAAAA,6BAA6B,EAAE,CAC3B,gFAD2B,CApK1B;AAuKLC,IAAAA,mCAAmC,EAAE,CACjC,oDADiC,CAvKhC;AA0KLC,IAAAA,oCAAoC,EAAE,CAClC,8DADkC,CA1KjC;AA6KLC,IAAAA,cAAc,EAAE,CAAC,iCAAD,CA7KX;AA8KLC,IAAAA,eAAe,EAAE,CAAC,2CAAD,CA9KZ;AA+KLC,IAAAA,iBAAiB,EAAE,CAAC,6CAAD,CA/Kd;AAgLLC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAhLzB;AAiLLC,IAAAA,6BAA6B,EAAE,CAC3B,qDAD2B,CAjL1B;AAoLLC,IAAAA,6BAA6B,EAAE,CAC3B,4DAD2B,CApL1B;AAuLLC,IAAAA,wDAAwD,EAAE,CACtD,kDADsD,CAvLrD;AA0LLC,IAAAA,2BAA2B,EAAE,CAAC,iCAAD,CA1LxB;AA2LLC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CA3LzB;AA4LLC,IAAAA,wBAAwB,EAAE,CACtB,2DADsB,CA5LrB;AA+LLC,IAAAA,gBAAgB,EAAE,CACd,gEADc,CA/Lb;AAkMLC,IAAAA,uBAAuB,EAAE,CAAC,wCAAD,CAlMpB;AAmMLC,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CAnMnB;AAsMLC,IAAAA,aAAa,EAAE,CAAC,wDAAD,CAtMV;AAuMLC,IAAAA,uBAAuB,EAAE,CACrB,oEADqB,CAvMpB;AA0MLC,IAAAA,+CAA+C,EAAE,CAC7C,uDAD6C,CA1M5C;AA6MLC,IAAAA,gDAAgD,EAAE,CAC9C,iEAD8C,CA7M7C;AAgNLC,IAAAA,2CAA2C,EAAE,CACzC,8DADyC,CAhNxC;AAmNLC,IAAAA,4CAA4C,EAAE,CAC1C,wEAD0C,CAnNzC;AAsNLC,IAAAA,+BAA+B,EAAE,CAC7B,+EAD6B,CAtN5B;AAyNLC,IAAAA,8BAA8B,EAAE,CAC5B,sEAD4B,CAzN3B;AA4NLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B,CA5N1B;AA+NLC,IAAAA,2BAA2B,EAAE,CACzB,gEADyB,CA/NxB;AAkOLC,IAAAA,wCAAwC,EAAE,CACtC,oDADsC,CAlOrC;AAqOLC,IAAAA,yCAAyC,EAAE,CACvC,8DADuC,CArOtC;AAwOLC,IAAAA,oDAAoD,EAAE,CAClD,4DADkD,CAxOjD;AA2OLC,IAAAA,sDAAsD,EAAE,CACpD,8CADoD,CA3OnD;AA8OLC,IAAAA,oDAAoD,EAAE,CAClD,wDADkD,CA9OjD;AAiPLC,IAAAA,uCAAuC,EAAE,CACrC,qCADqC,CAjPpC;AAoPLC,IAAAA,qCAAqC,EAAE,CACnC,+CADmC,CApPlC;AAuPLC,IAAAA,4BAA4B,EAAE,CAC1B,4DAD0B,CAvPzB;AA0PLC,IAAAA,uDAAuD,EAAE,CACrD,kDADqD,CA1PpD;AA6PLC,IAAAA,6BAA6B,EAAE,CAC3B,sDAD2B;AA7P1B,GADK;AAkQdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,qCAAqC,EAAE,CAAC,kCAAD,CADjC;AAENC,IAAAA,sBAAsB,EAAE,CAAC,2CAAD,CAFlB;AAGNC,IAAAA,wBAAwB,EAAE,CACtB,wDADsB,CAHpB;AAMNC,IAAAA,QAAQ,EAAE,CAAC,YAAD,CANJ;AAONC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAPf;AAQNC,IAAAA,SAAS,EAAE,CAAC,wCAAD,CARL;AASNC,IAAAA,yCAAyC,EAAE,CACvC,qDADuC,CATrC;AAYNC,IAAAA,8BAA8B,EAAE,CAAC,8BAAD,CAZ1B;AAaNC,IAAAA,qCAAqC,EAAE,CAAC,oBAAD,CAbjC;AAcNC,IAAAA,iCAAiC,EAAE,CAC/B,yCAD+B,CAd7B;AAiBNC,IAAAA,gBAAgB,EAAE,CAAC,aAAD,CAjBZ;AAkBNC,IAAAA,8BAA8B,EAAE,CAAC,qCAAD,CAlB1B;AAmBNC,IAAAA,uBAAuB,EAAE,CAAC,qCAAD,CAnBnB;AAoBNC,IAAAA,mBAAmB,EAAE,CAAC,wBAAD,CApBf;AAqBNC,IAAAA,yBAAyB,EAAE,CAAC,uCAAD,CArBrB;AAsBNC,IAAAA,+BAA+B,EAAE,CAC7B,8CAD6B,CAtB3B;AAyBNC,IAAAA,cAAc,EAAE,CAAC,kCAAD,CAzBV;AA0BNC,IAAAA,yCAAyC,EAAE,CACvC,yCADuC,CA1BrC;AA6BNC,IAAAA,mCAAmC,EAAE,CAAC,mBAAD,CA7B/B;AA8BNC,IAAAA,sBAAsB,EAAE,CAAC,+BAAD,CA9BlB;AA+BNC,IAAAA,sBAAsB,EAAE,CAAC,qCAAD,CA/BlB;AAgCNC,IAAAA,qBAAqB,EAAE,CAAC,sCAAD,CAhCjB;AAiCNC,IAAAA,oCAAoC,EAAE,CAAC,yBAAD,CAjChC;AAkCNC,IAAAA,mBAAmB,EAAE,CAAC,uCAAD,CAlCf;AAmCNC,IAAAA,uBAAuB,EAAE,CAAC,oBAAD,CAnCnB;AAoCNC,IAAAA,2BAA2B,EAAE,CAAC,yCAAD,CApCvB;AAqCNC,IAAAA,gBAAgB,EAAE,CAAC,0CAAD,CArCZ;AAsCNC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAtCf;AAuCNC,IAAAA,qBAAqB,EAAE,CACnB,qDADmB,CAvCjB;AA0CNC,IAAAA,4BAA4B,EAAE,CAAC,kCAAD,CA1CxB;AA2CNC,IAAAA,8BAA8B,EAAE,CAAC,qCAAD;AA3C1B,GAlQI;AA+SdC,EAAAA,IAAI,EAAE;AACFC,IAAAA,qBAAqB,EAAE,CACnB,wEADmB,EAEnB,EAFmB,EAGnB;AAAEpF,MAAAA,OAAO,EAAE,CAAC,MAAD,EAAS,2CAAT;AAAX,KAHmB,CADrB;AAMFqF,IAAAA,yCAAyC,EAAE,CACvC,wEADuC,CANzC;AASFC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CATV;AAUFC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CAVlB;AAWFC,IAAAA,6BAA6B,EAAE,CAC3B,yDAD2B,CAX7B;AAcFC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAdnB;AAeFC,IAAAA,kBAAkB,EAAE,CAAC,6CAAD,CAflB;AAgBFC,IAAAA,WAAW,EAAE,CAAC,wCAAD,CAhBX;AAiBFC,IAAAA,gBAAgB,EAAE,CAAC,UAAD,CAjBhB;AAkBFC,IAAAA,SAAS,EAAE,CAAC,sBAAD,CAlBT;AAmBFC,IAAAA,eAAe,EAAE,CAAC,0CAAD,CAnBf;AAoBFC,IAAAA,kBAAkB,EAAE,CAAC,8BAAD,CApBlB;AAqBFC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CArBnB;AAsBFC,IAAAA,6BAA6B,EAAE,CAC3B,gDAD2B,CAtB7B;AAyBFC,IAAAA,oCAAoC,EAAE,CAClC,wDADkC,CAzBpC;AA4BFC,IAAAA,mBAAmB,EAAE,CAAC,oCAAD,CA5BnB;AA6BFC,IAAAA,sBAAsB,EAAE,CAAC,sBAAD,CA7BtB;AA8BFC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CA9BlB;AA+BFC,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CA/BnB;AAgCFC,IAAAA,0BAA0B,EAAE,CACxB,2DADwB,CAhC1B;AAmCFC,IAAAA,yCAAyC,EAAE,CACvC,wDADuC,CAnCzC;AAsCFC,IAAAA,iBAAiB,EAAE,CAAC,wBAAD,CAtCjB;AAuCFC,IAAAA,qCAAqC,EAAE,CAAC,yBAAD,CAvCrC;AAwCFC,IAAAA,SAAS,EAAE,CAAC,gCAAD,CAxCT;AAyCFC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAzChB;AA0CFC,IAAAA,iCAAiC,EAAE,CAAC,gCAAD,CA1CjC;AA2CFC,IAAAA,qCAAqC,EAAE,CAAC,iCAAD,CA3CrC;AA4CFC,IAAAA,4CAA4C,EAAE,CAC1C,yCAD0C,CA5C5C;AA+CFC,IAAAA,qBAAqB,EAAE,CAAC,0BAAD,CA/CrB;AAgDFC,IAAAA,wBAAwB,EAAE,CACtB,kDADsB,CAhDxB;AAmDFC,IAAAA,0BAA0B,EAAE,CACxB,2EADwB,EAExB,EAFwB,EAGxB;AAAElH,MAAAA,OAAO,EAAE,CAAC,MAAD,EAAS,gDAAT;AAAX,KAHwB,CAnD1B;AAwDFmH,IAAAA,8CAA8C,EAAE,CAC5C,2EAD4C,CAxD9C;AA2DFC,IAAAA,UAAU,EAAE,CAAC,uCAAD,CA3DV;AA4DFC,IAAAA,6BAA6B,EAAE,CAAC,4BAAD,CA5D7B;AA6DFC,IAAAA,UAAU,EAAE,CAAC,6CAAD,CA7DV;AA8DFC,IAAAA,mBAAmB,EAAE,CAAC,oDAAD,CA9DnB;AA+DFC,IAAAA,qBAAqB,EAAE,CACnB,uDADmB,CA/DrB;AAkEFC,IAAAA,yBAAyB,EAAE,CAAC,wBAAD;AAlEzB,GA/SQ;AAmXdC,EAAAA,OAAO,EAAE;AACLC,IAAAA,0BAA0B,EAAE,CAAC,0CAAD,CADvB;AAELC,IAAAA,2BAA2B,EAAE,CACzB,gDADyB,CAFxB;AAKLC,IAAAA,mCAAmC,EAAE,CACjC,kEADiC,CALhC;AAQLC,IAAAA,mCAAmC,EAAE,CACjC,oDADiC,CARhC;AAWLC,IAAAA,2BAA2B,EAAE,CAAC,2CAAD,CAXxB;AAYLC,IAAAA,4BAA4B,EAAE,CAC1B,iDAD0B,CAZzB;AAeLC,IAAAA,0BAA0B,EAAE,CACxB,iDADwB,CAfvB;AAkBLC,IAAAA,2BAA2B,EAAE,CACzB,uDADyB;AAlBxB,GAnXK;AAyYdC,EAAAA,MAAM,EAAE;AACJC,IAAAA,MAAM,EAAE,CAAC,uCAAD,CADJ;AAEJC,IAAAA,WAAW,EAAE,CAAC,yCAAD,CAFT;AAGJC,IAAAA,GAAG,EAAE,CAAC,qDAAD,CAHD;AAIJC,IAAAA,QAAQ,EAAE,CAAC,yDAAD,CAJN;AAKJC,IAAAA,eAAe,EAAE,CACb,iEADa,CALb;AAQJC,IAAAA,UAAU,EAAE,CAAC,oDAAD,CARR;AASJC,IAAAA,YAAY,EAAE,CACV,oEADU,CATV;AAYJC,IAAAA,gBAAgB,EAAE,CAAC,sDAAD,CAZd;AAaJC,IAAAA,YAAY,EAAE,CACV,gEADU,CAbV;AAgBJC,IAAAA,cAAc,EAAE,CACZ,oEADY,CAhBZ;AAmBJC,IAAAA,oBAAoB,EAAE,CAClB,sDADkB,CAnBlB;AAsBJC,IAAAA,MAAM,EAAE,CAAC,uDAAD;AAtBJ,GAzYM;AAiadC,EAAAA,YAAY,EAAE;AACVC,IAAAA,cAAc,EAAE,CACZ,oFADY,CADN;AAIVC,IAAAA,QAAQ,EAAE,CACN,+DADM,EAEN,EAFM,EAGN;AAAEC,MAAAA,iBAAiB,EAAE;AAAEC,QAAAA,QAAQ,EAAE;AAAZ;AAArB,KAHM,CAJA;AASVC,IAAAA,WAAW,EAAE,CACT,gEADS,CATH;AAYVC,IAAAA,QAAQ,EAAE,CAAC,2DAAD,CAZA;AAaVC,IAAAA,kBAAkB,EAAE,CAChB,yEADgB,CAbV;AAgBVC,IAAAA,gBAAgB,EAAE,CAAC,sCAAD,CAhBR;AAiBVC,IAAAA,iBAAiB,EAAE,CAAC,gDAAD,CAjBT;AAkBVC,IAAAA,mBAAmB,EAAE,CACjB,yEADiB,EAEjB,EAFiB,EAGjB;AAAE1J,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,oBAAjB;AAAX,KAHiB,CAlBX;AAuBV2J,IAAAA,kBAAkB,EAAE,CAAC,kDAAD,CAvBV;AAwBVC,IAAAA,WAAW,EAAE,CACT,iEADS,CAxBH;AA2BVC,IAAAA,WAAW,EAAE,CAAC,iDAAD;AA3BH,GAjaA;AA8bdC,EAAAA,cAAc,EAAE;AACZC,IAAAA,oBAAoB,EAAE,CAAC,uBAAD,CADV;AAEZC,IAAAA,cAAc,EAAE,CAAC,6BAAD;AAFJ,GA9bF;AAkcdC,EAAAA,UAAU,EAAE;AACRC,IAAAA,0CAA0C,EAAE,CACxC,yEADwC,CADpC;AAIRC,IAAAA,qCAAqC,EAAE,CACnC,gDADmC,CAJ/B;AAORC,IAAAA,0BAA0B,EAAE,CAAC,uBAAD,CAPpB;AAQRhN,IAAAA,wBAAwB,EAAE,CACtB,4DADsB,CARlB;AAWRiN,IAAAA,wCAAwC,EAAE,CACtC,4CADsC,CAXlC;AAcRC,IAAAA,gCAAgC,EAAE,CAC9B,2DAD8B,CAd1B;AAiBRC,IAAAA,kCAAkC,EAAE,CAChC,uCADgC,CAjB5B;AAoBRC,IAAAA,0BAA0B,EAAE,CAAC,0CAAD,CApBpB;AAqBRC,IAAAA,sBAAsB,EAAE,CACpB,mEADoB,CArBhB;AAwBR1M,IAAAA,gBAAgB,EAAE,CACd,+DADc,CAxBV;AA2BR2M,IAAAA,gCAAgC,EAAE,CAC9B,+CAD8B,CA3B1B;AA8BRC,IAAAA,0BAA0B,EAAE,CACxB,gDADwB,CA9BpB;AAiCRC,IAAAA,oCAAoC,EAAE,CAClC,2DADkC,CAjC9B;AAoCRC,IAAAA,uBAAuB,EAAE,CAAC,uCAAD,CApCjB;AAqCRC,IAAAA,gCAAgC,EAAE,CAC9B,yCAD8B,CArC1B;AAwCR7K,IAAAA,gBAAgB,EAAE,CACd,yDADc,CAxCV;AA2CRC,IAAAA,aAAa,EAAE,CACX,4DADW,CA3CP;AA8CR6K,IAAAA,6BAA6B,EAAE,CAC3B,4CAD2B,CA9CvB;AAiDRC,IAAAA,iDAAiD,EAAE,CAC/C,oDAD+C,CAjD3C;AAoDRC,IAAAA,wBAAwB,EAAE,CAAC,sBAAD,CApDlB;AAqDRC,IAAAA,kBAAkB,EAAE,CAChB,4BADgB,EAEhB,EAFgB,EAGhB;AAAE/B,MAAAA,iBAAiB,EAAE;AAAEgC,QAAAA,MAAM,EAAE;AAAV;AAArB,KAHgB,CArDZ;AA0DRC,IAAAA,oCAAoC,EAAE,CAClC,sCADkC,CA1D9B;AA6DRjK,IAAAA,eAAe,EAAE,CAAC,8CAAD,CA7DT;AA8DRkK,IAAAA,6CAA6C,EAAE,CAC3C,yDAD2C,CA9DvC;AAiERC,IAAAA,+BAA+B,EAAE,CAAC,8BAAD,CAjEzB;AAkERC,IAAAA,6CAA6C,EAAE,CAC3C,4EAD2C,CAlEvC;AAqERC,IAAAA,gCAAgC,EAAE,CAC9B,+CAD8B,CArE1B;AAwERC,IAAAA,4CAA4C,EAAE,CAC1C,yDAD0C,CAxEtC;AA2ERC,IAAAA,yBAAyB,EAAE,CAAC,8CAAD,CA3EnB;AA4ERC,IAAAA,wBAAwB,EAAE,CAAC,6CAAD,CA5ElB;AA6ERC,IAAAA,kBAAkB,EAAE,CAChB,sEADgB,CA7EZ;AAgFRC,IAAAA,0BAA0B,EAAE,CAAC,yCAAD;AAhFpB,GAlcE;AAohBdC,EAAAA,UAAU,EAAE;AACR/O,IAAAA,0BAA0B,EAAE,CACxB,+EADwB,CADpB;AAIRI,IAAAA,uBAAuB,EAAE,CACrB,kDADqB,CAJjB;AAORC,IAAAA,wBAAwB,EAAE,CACtB,4DADsB,CAPlB;AAURU,IAAAA,eAAe,EAAE,CAAC,qDAAD,CAVT;AAWRC,IAAAA,gBAAgB,EAAE,CACd,+DADc,CAXV;AAcR6B,IAAAA,eAAe,EAAE,CAAC,+CAAD,CAdT;AAeRC,IAAAA,YAAY,EAAE,CAAC,kDAAD,CAfN;AAgBRI,IAAAA,gBAAgB,EAAE,CACd,yDADc,CAhBV;AAmBRC,IAAAA,aAAa,EAAE,CACX,4DADW,CAnBP;AAsBRgB,IAAAA,cAAc,EAAE,CAAC,oCAAD,CAtBR;AAuBRC,IAAAA,eAAe,EAAE,CAAC,8CAAD,CAvBT;AAwBRI,IAAAA,6BAA6B,EAAE,CAC3B,+DAD2B,CAxBvB;AA2BRc,IAAAA,+BAA+B,EAAE,CAC7B,kFAD6B,CA3BzB;AA8BRW,IAAAA,4BAA4B,EAAE,CAC1B,+DAD0B;AA9BtB,GAphBE;AAsjBd+I,EAAAA,eAAe,EAAE;AACbC,IAAAA,wBAAwB,EAAE,CACtB,uDADsB,CADb;AAIbC,IAAAA,SAAS,EAAE,CACP,+DADO;AAJE,GAtjBH;AA8jBdC,EAAAA,MAAM,EAAE;AAAE5D,IAAAA,GAAG,EAAE,CAAC,aAAD;AAAP,GA9jBM;AA+jBd6D,EAAAA,eAAe,EAAE;AACbC,IAAAA,8CAA8C,EAAE,CAC5C,mEAD4C,CADnC;AAIbC,IAAAA,kDAAkD,EAAE,CAChD,6EADgD,CAJvC;AAObC,IAAAA,iDAAiD,EAAE,CAC/C,0EAD+C,CAPtC;AAUbC,IAAAA,2BAA2B,EAAE,CACzB,oEADyB,CAVhB;AAabC,IAAAA,qCAAqC,EAAE,CACnC,mDADmC,CAb1B;AAgBbC,IAAAA,mBAAmB,EAAE,CACjB,oEADiB,CAhBR;AAmBbC,IAAAA,0CAA0C,EAAE,CACxC,kEADwC,CAnB/B;AAsBbC,IAAAA,uDAAuD,EAAE,CACrD,iEADqD,CAtB5C;AAyBbC,IAAAA,sDAAsD,EAAE,CACpD,qEADoD,CAzB3C;AA4BbC,IAAAA,kDAAkD,EAAE,CAChD,4EADgD,CA5BvC;AA+BbC,IAAAA,2BAA2B,EAAE,CACzB,oEADyB,CA/BhB;AAkCbC,IAAAA,+CAA+C,EAAE,CAC7C,kEAD6C,CAlCpC;AAqCbC,IAAAA,qCAAqC,EAAE,CACnC,mDADmC,CArC1B;AAwCbC,IAAAA,sDAAsD,EAAE,CACpD,iEADoD;AAxC3C,GA/jBH;AA2mBdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,cAAc,EAAE,CAAC,2BAAD,CADb;AAEH/E,IAAAA,MAAM,EAAE,CAAC,aAAD,CAFL;AAGHgF,IAAAA,aAAa,EAAE,CAAC,gCAAD,CAHZ;AAIHC,IAAAA,MAAM,EAAE,CAAC,yBAAD,CAJL;AAKHC,IAAAA,aAAa,EAAE,CAAC,+CAAD,CALZ;AAMHC,IAAAA,IAAI,EAAE,CAAC,6BAAD,CANH;AAOHjF,IAAAA,GAAG,EAAE,CAAC,sBAAD,CAPF;AAQHkF,IAAAA,UAAU,EAAE,CAAC,4CAAD,CART;AASHC,IAAAA,WAAW,EAAE,CAAC,4BAAD,CATV;AAUHC,IAAAA,IAAI,EAAE,CAAC,YAAD,CAVH;AAWHC,IAAAA,YAAY,EAAE,CAAC,+BAAD,CAXX;AAYHC,IAAAA,WAAW,EAAE,CAAC,8BAAD,CAZV;AAaHC,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAbV;AAcHC,IAAAA,SAAS,EAAE,CAAC,4BAAD,CAdR;AAeHC,IAAAA,UAAU,EAAE,CAAC,mBAAD,CAfT;AAgBHC,IAAAA,WAAW,EAAE,CAAC,oBAAD,CAhBV;AAiBHC,IAAAA,IAAI,EAAE,CAAC,2BAAD,CAjBH;AAkBHC,IAAAA,MAAM,EAAE,CAAC,8BAAD,CAlBL;AAmBHnF,IAAAA,MAAM,EAAE,CAAC,wBAAD,CAnBL;AAoBHoF,IAAAA,aAAa,EAAE,CAAC,8CAAD;AApBZ,GA3mBO;AAioBdC,EAAAA,GAAG,EAAE;AACDC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CADX;AAEDC,IAAAA,YAAY,EAAE,CAAC,wCAAD,CAFb;AAGDC,IAAAA,SAAS,EAAE,CAAC,qCAAD,CAHV;AAIDC,IAAAA,SAAS,EAAE,CAAC,qCAAD,CAJV;AAKDC,IAAAA,UAAU,EAAE,CAAC,sCAAD,CALX;AAMDC,IAAAA,SAAS,EAAE,CAAC,6CAAD,CANV;AAODC,IAAAA,OAAO,EAAE,CAAC,gDAAD,CAPR;AAQDC,IAAAA,SAAS,EAAE,CAAC,oDAAD,CARV;AASDC,IAAAA,MAAM,EAAE,CAAC,yCAAD,CATP;AAUDC,IAAAA,MAAM,EAAE,CAAC,8CAAD,CAVP;AAWDC,IAAAA,OAAO,EAAE,CAAC,gDAAD,CAXR;AAYDC,IAAAA,gBAAgB,EAAE,CAAC,mDAAD,CAZjB;AAaDC,IAAAA,SAAS,EAAE,CAAC,4CAAD;AAbV,GAjoBS;AAgpBdC,EAAAA,SAAS,EAAE;AACPC,IAAAA,eAAe,EAAE,CAAC,0BAAD,CADV;AAEPC,IAAAA,WAAW,EAAE,CAAC,iCAAD;AAFN,GAhpBG;AAopBdC,EAAAA,YAAY,EAAE;AACVC,IAAAA,mCAAmC,EAAE,CAAC,8BAAD,CAD3B;AAEVC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CAFb;AAGVC,IAAAA,sBAAsB,EAAE,CAAC,8CAAD,CAHd;AAIVC,IAAAA,iCAAiC,EAAE,CAC/B,8BAD+B,EAE/B,EAF+B,EAG/B;AAAEzP,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,qCAAjB;AAAX,KAH+B,CAJzB;AASV0P,IAAAA,sCAAsC,EAAE,CAAC,iCAAD,CAT9B;AAUVC,IAAAA,wBAAwB,EAAE,CAAC,uCAAD,CAVhB;AAWVC,IAAAA,yBAAyB,EAAE,CACvB,iDADuB,CAXjB;AAcVC,IAAAA,oCAAoC,EAAE,CAClC,iCADkC,EAElC,EAFkC,EAGlC;AAAE7P,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,wCAAjB;AAAX,KAHkC,CAd5B;AAmBV8P,IAAAA,mCAAmC,EAAE,CAAC,8BAAD,CAnB3B;AAoBVC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CApBb;AAqBVC,IAAAA,sBAAsB,EAAE,CAAC,8CAAD,CArBd;AAsBVC,IAAAA,iCAAiC,EAAE,CAC/B,8BAD+B,EAE/B,EAF+B,EAG/B;AAAEjQ,MAAAA,OAAO,EAAE,CAAC,cAAD,EAAiB,qCAAjB;AAAX,KAH+B;AAtBzB,GAppBA;AAgrBdkQ,EAAAA,MAAM,EAAE;AACJC,IAAAA,YAAY,EAAE,CACV,4DADU,CADV;AAIJC,IAAAA,SAAS,EAAE,CAAC,yDAAD,CAJP;AAKJC,IAAAA,sBAAsB,EAAE,CAAC,gDAAD,CALpB;AAMJjI,IAAAA,MAAM,EAAE,CAAC,mCAAD,CANJ;AAOJgF,IAAAA,aAAa,EAAE,CACX,2DADW,CAPX;AAUJkD,IAAAA,WAAW,EAAE,CAAC,mCAAD,CAVT;AAWJC,IAAAA,eAAe,EAAE,CAAC,uCAAD,CAXb;AAYJjD,IAAAA,aAAa,EAAE,CACX,2DADW,CAZX;AAeJkD,IAAAA,WAAW,EAAE,CAAC,4CAAD,CAfT;AAgBJC,IAAAA,eAAe,EAAE,CACb,4DADa,CAhBb;AAmBJnI,IAAAA,GAAG,EAAE,CAAC,iDAAD,CAnBD;AAoBJkF,IAAAA,UAAU,EAAE,CAAC,wDAAD,CApBR;AAqBJkD,IAAAA,QAAQ,EAAE,CAAC,oDAAD,CArBN;AAsBJC,IAAAA,QAAQ,EAAE,CAAC,yCAAD,CAtBN;AAuBJC,IAAAA,YAAY,EAAE,CAAC,yDAAD,CAvBV;AAwBJlD,IAAAA,IAAI,EAAE,CAAC,aAAD,CAxBF;AAyBJmD,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAzBX;AA0BJlD,IAAAA,YAAY,EAAE,CAAC,0DAAD,CA1BV;AA2BJmD,IAAAA,mBAAmB,EAAE,CAAC,2CAAD,CA3BjB;AA4BJC,IAAAA,UAAU,EAAE,CAAC,wDAAD,CA5BR;AA6BJC,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CA7Bf;AA8BJC,IAAAA,qBAAqB,EAAE,CACnB,0DADmB,CA9BnB;AAiCJhG,IAAAA,wBAAwB,EAAE,CAAC,kBAAD,CAjCtB;AAkCJiG,IAAAA,UAAU,EAAE,CAAC,wBAAD,CAlCR;AAmCJC,IAAAA,WAAW,EAAE,CAAC,kCAAD,CAnCT;AAoCJC,IAAAA,sBAAsB,EAAE,CACpB,gEADoB,CApCpB;AAuCJC,IAAAA,iBAAiB,EAAE,CAAC,kCAAD,CAvCf;AAwCJC,IAAAA,iBAAiB,EAAE,CACf,wDADe,CAxCf;AA2CJC,IAAAA,cAAc,EAAE,CAAC,sCAAD,CA3CZ;AA4CJC,IAAAA,IAAI,EAAE,CAAC,sDAAD,CA5CF;AA6CJC,IAAAA,eAAe,EAAE,CACb,2DADa,CA7Cb;AAgDJC,IAAAA,eAAe,EAAE,CACb,8DADa,CAhDb;AAmDJC,IAAAA,WAAW,EAAE,CACT,kEADS,CAnDT;AAsDJC,IAAAA,SAAS,EAAE,CAAC,wDAAD,CAtDP;AAuDJC,IAAAA,MAAM,EAAE,CAAC,yDAAD,CAvDJ;AAwDJ9I,IAAAA,MAAM,EAAE,CAAC,mDAAD,CAxDJ;AAyDJoF,IAAAA,aAAa,EAAE,CAAC,0DAAD,CAzDX;AA0DJ2D,IAAAA,WAAW,EAAE,CAAC,2CAAD,CA1DT;AA2DJC,IAAAA,eAAe,EAAE,CACb,2DADa;AA3Db,GAhrBM;AA+uBdC,EAAAA,QAAQ,EAAE;AACN1J,IAAAA,GAAG,EAAE,CAAC,yBAAD,CADC;AAEN2J,IAAAA,kBAAkB,EAAE,CAAC,eAAD,CAFd;AAGNC,IAAAA,UAAU,EAAE,CAAC,mCAAD;AAHN,GA/uBI;AAovBdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,MAAM,EAAE,CAAC,gBAAD,CADF;AAENC,IAAAA,SAAS,EAAE,CACP,oBADO,EAEP;AAAEC,MAAAA,OAAO,EAAE;AAAE,wBAAgB;AAAlB;AAAX,KAFO;AAFL,GApvBI;AA2vBdC,EAAAA,IAAI,EAAE;AACFjK,IAAAA,GAAG,EAAE,CAAC,WAAD,CADH;AAEFkK,IAAAA,UAAU,EAAE,CAAC,cAAD,CAFV;AAGFC,IAAAA,MAAM,EAAE,CAAC,UAAD,CAHN;AAIFC,IAAAA,IAAI,EAAE,CAAC,OAAD;AAJJ,GA3vBQ;AAiwBdC,EAAAA,UAAU,EAAE;AACRC,IAAAA,YAAY,EAAE,CAAC,qCAAD,CADN;AAERC,IAAAA,iCAAiC,EAAE,CAC/B,gDAD+B,CAF3B;AAKRC,IAAAA,mBAAmB,EAAE,CACjB,sDADiB,CALb;AAQRC,IAAAA,qBAAqB,EAAE,CACnB,mDADmB,CARf;AAWRC,IAAAA,8BAA8B,EAAE,CAC5B,6CAD4B,CAXxB;AAcRC,IAAAA,gBAAgB,EAAE,CAAC,0CAAD,CAdV;AAeRC,IAAAA,eAAe,EAAE,CAAC,kCAAD,CAfT;AAgBRC,IAAAA,aAAa,EAAE,CAAC,8CAAD,CAhBP;AAiBRC,IAAAA,6BAA6B,EAAE,CAAC,qCAAD,CAjBvB;AAkBRC,IAAAA,eAAe,EAAE,CAAC,2CAAD,CAlBT;AAmBRpI,IAAAA,wBAAwB,EAAE,CAAC,sBAAD,CAnBlB;AAoBRiG,IAAAA,UAAU,EAAE,CAAC,4BAAD,CApBJ;AAqBRoC,IAAAA,6BAA6B,EAAE,CAC3B,kDAD2B,CArBvB;AAwBRC,IAAAA,eAAe,EAAE,CAAC,wDAAD,CAxBT;AAyBRC,IAAAA,gBAAgB,EAAE,CACd,kDADc,EAEd,EAFc,EAGd;AAAExT,MAAAA,OAAO,EAAE,CAAC,YAAD,EAAe,+BAAf;AAAX,KAHc,CAzBV;AA8BRyT,IAAAA,eAAe,EAAE,CAAC,wDAAD,CA9BT;AA+BRC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CA/BV;AAgCRhI,IAAAA,yBAAyB,EAAE,CAAC,uBAAD,CAhCnB;AAiCRiI,IAAAA,WAAW,EAAE,CAAC,6BAAD,CAjCL;AAkCRC,IAAAA,WAAW,EAAE,CAAC,kCAAD,CAlCL;AAmCRC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CAnCxB;AAsCRC,IAAAA,gBAAgB,EAAE,CACd,qEADc,CAtCV;AAyCRC,IAAAA,YAAY,EAAE,CAAC,oCAAD;AAzCN,GAjwBE;AA4yBdC,EAAAA,IAAI,EAAE;AACFC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CADT;AAEFC,IAAAA,gBAAgB,EAAE,CAAC,gDAAD,CAFhB;AAGFC,IAAAA,gBAAgB,EAAE,CAAC,mCAAD,CAHhB;AAIFC,IAAAA,sBAAsB,EAAE,CAAC,oCAAD,CAJtB;AAKFC,IAAAA,4BAA4B,EAAE,CAAC,2CAAD,CAL5B;AAMFC,IAAAA,kCAAkC,EAAE,CAChC,kDADgC,CANlC;AASFC,IAAAA,gBAAgB,EAAE,CAAC,8BAAD,CAThB;AAUFC,IAAAA,aAAa,EAAE,CAAC,wBAAD,CAVb;AAWFC,IAAAA,aAAa,EAAE,CAAC,oCAAD,CAXb;AAYFnM,IAAAA,GAAG,EAAE,CAAC,iBAAD,CAZH;AAaFoM,IAAAA,iCAAiC,EAAE,CAAC,kCAAD,CAbjC;AAcFC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CAdpB;AAeFC,IAAAA,UAAU,EAAE,CAAC,iCAAD,CAfV;AAgBFC,IAAAA,sBAAsB,EAAE,CAAC,wCAAD,CAhBtB;AAiBFxO,IAAAA,kBAAkB,EAAE,CAChB,0DADgB,CAjBlB;AAoBFqH,IAAAA,IAAI,EAAE,CAAC,oBAAD,CApBJ;AAqBFoH,IAAAA,oBAAoB,EAAE,CAAC,+BAAD,CArBpB;AAsBFC,IAAAA,gBAAgB,EAAE,CAAC,wBAAD,CAtBhB;AAuBFC,IAAAA,eAAe,EAAE,CAAC,mDAAD,CAvBf;AAwBFC,IAAAA,qBAAqB,EAAE,CAAC,oCAAD,CAxBrB;AAyBFhK,IAAAA,wBAAwB,EAAE,CAAC,gBAAD,CAzBxB;AA0BF4C,IAAAA,WAAW,EAAE,CAAC,4BAAD,CA1BX;AA2BFqH,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CA3BnB;AA4BFC,IAAAA,WAAW,EAAE,CAAC,yBAAD,CA5BX;AA6BFC,IAAAA,mCAAmC,EAAE,CAAC,4BAAD,CA7BnC;AA8BFC,IAAAA,wBAAwB,EAAE,CAAC,uCAAD,CA9BxB;AA+BFC,IAAAA,sBAAsB,EAAE,CAAC,6BAAD,CA/BtB;AAgCFC,IAAAA,iBAAiB,EAAE,CAAC,gCAAD,CAhCjB;AAiCFvO,IAAAA,qBAAqB,EAAE,CAAC,4CAAD,CAjCrB;AAkCFwO,IAAAA,YAAY,EAAE,CAAC,uBAAD,CAlCZ;AAmCFC,IAAAA,WAAW,EAAE,CAAC,wCAAD,CAnCX;AAoCFxO,IAAAA,wBAAwB,EAAE,CACtB,oEADsB,CApCxB;AAuCFyO,IAAAA,YAAY,EAAE,CAAC,uCAAD,CAvCZ;AAwCFC,IAAAA,uBAAuB,EAAE,CAAC,2CAAD,CAxCvB;AAyCFC,IAAAA,yBAAyB,EAAE,CACvB,qDADuB,CAzCzB;AA4CFC,IAAAA,0CAA0C,EAAE,CACxC,8CADwC,CA5C1C;AA+CFC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CA/CpB;AAgDFC,IAAAA,uCAAuC,EAAE,CACrC,2CADqC,CAhDvC;AAmDFC,IAAAA,WAAW,EAAE,CAAC,sCAAD,CAnDX;AAoDFjN,IAAAA,MAAM,EAAE,CAAC,mBAAD,CApDN;AAqDFkN,IAAAA,oCAAoC,EAAE,CAClC,oCADkC,CArDpC;AAwDFC,IAAAA,aAAa,EAAE,CAAC,mCAAD,CAxDb;AAyDFC,IAAAA,yBAAyB,EAAE,CAAC,0CAAD;AAzDzB,GA5yBQ;AAu2BdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,iCAAiC,EAAE,CAC/B,qDAD+B,CAD7B;AAINC,IAAAA,mBAAmB,EAAE,CACjB,2DADiB,CAJf;AAONC,IAAAA,oBAAoB,EAAE,CAClB,iEADkB,CAPhB;AAUNC,IAAAA,wCAAwC,EAAE,CACtC,mFADsC,CAVpC;AAaNC,IAAAA,0BAA0B,EAAE,CACxB,yFADwB,CAbtB;AAgBNC,IAAAA,2BAA2B,EAAE,CACzB,+FADyB,CAhBvB;AAmBNC,IAAAA,4CAA4C,EAAE,CAC1C,iEAD0C,EAE1C,EAF0C,EAG1C;AAAE3W,MAAAA,OAAO,EAAE,CAAC,UAAD,EAAa,2CAAb;AAAX,KAH0C,CAnBxC;AAwBN4W,IAAAA,2DAA2D,EAAE,CACzD,2DADyD,EAEzD,EAFyD,EAGzD;AACI5W,MAAAA,OAAO,EAAE,CACL,UADK,EAEL,yDAFK;AADb,KAHyD,CAxBvD;AAkCN6W,IAAAA,uDAAuD,EAAE,CACrD,2DADqD,CAlCnD;AAqCNC,IAAAA,yCAAyC,EAAE,CACvC,iEADuC,CArCrC;AAwCNC,IAAAA,0CAA0C,EAAE,CACxC,uEADwC,CAxCtC;AA2CNC,IAAAA,8BAA8B,EAAE,CAC5B,kDAD4B,CA3C1B;AA8CNC,IAAAA,yBAAyB,EAAE,CACvB,wDADuB,CA9CrB;AAiDNC,IAAAA,iBAAiB,EAAE,CACf,8DADe,CAjDb;AAoDNC,IAAAA,qCAAqC,EAAE,CACnC,gFADmC,CApDjC;AAuDNC,IAAAA,gCAAgC,EAAE,CAC9B,sFAD8B,CAvD5B;AA0DNC,IAAAA,wBAAwB,EAAE,CACtB,4FADsB,CA1DpB;AA6DNC,IAAAA,gCAAgC,EAAE,CAAC,oBAAD,CA7D5B;AA8DNC,IAAAA,2BAA2B,EAAE,CAAC,0BAAD,CA9DvB;AA+DNC,IAAAA,mBAAmB,EAAE,CAAC,gCAAD,CA/Df;AAgENC,IAAAA,kCAAkC,EAAE,CAChC,mEADgC,CAhE9B;AAmENC,IAAAA,oBAAoB,EAAE,CAClB,yEADkB,CAnEhB;AAsENC,IAAAA,qBAAqB,EAAE,CACnB,+EADmB,CAtEjB;AAyENC,IAAAA,yCAAyC,EAAE,CACvC,yFADuC,CAzErC;AA4ENC,IAAAA,2BAA2B,EAAE,CACzB,+FADyB,CA5EvB;AA+ENC,IAAAA,4BAA4B,EAAE,CAC1B,qGAD0B;AA/ExB,GAv2BI;AA07BdC,EAAAA,QAAQ,EAAE;AACNC,IAAAA,eAAe,EAAE,CAAC,qDAAD,CADX;AAENC,IAAAA,UAAU,EAAE,CAAC,0CAAD,CAFN;AAGNC,IAAAA,YAAY,EAAE,CAAC,qCAAD,CAHR;AAIN9N,IAAAA,0BAA0B,EAAE,CAAC,qBAAD,CAJtB;AAKN+N,IAAAA,YAAY,EAAE,CAAC,2BAAD,CALR;AAMNC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CANT;AAON/K,IAAAA,MAAM,EAAE,CAAC,+BAAD,CAPF;AAQNgL,IAAAA,UAAU,EAAE,CAAC,0CAAD,CARN;AASNC,IAAAA,YAAY,EAAE,CAAC,sCAAD,CATR;AAUNhQ,IAAAA,GAAG,EAAE,CAAC,4BAAD,CAVC;AAWNiQ,IAAAA,OAAO,EAAE,CAAC,uCAAD,CAXH;AAYNC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CAZL;AAaNC,IAAAA,oBAAoB,EAAE,CAClB,gEADkB,CAbhB;AAgBNC,IAAAA,SAAS,EAAE,CAAC,yCAAD,CAhBL;AAiBNC,IAAAA,iBAAiB,EAAE,CAAC,0CAAD,CAjBb;AAkBNC,IAAAA,WAAW,EAAE,CAAC,oCAAD,CAlBP;AAmBN1H,IAAAA,UAAU,EAAE,CAAC,0BAAD,CAnBN;AAoBNC,IAAAA,WAAW,EAAE,CAAC,oCAAD,CApBP;AAqBNtD,IAAAA,WAAW,EAAE,CAAC,gCAAD,CArBP;AAsBNgL,IAAAA,QAAQ,EAAE,CAAC,8CAAD,CAtBJ;AAuBNC,IAAAA,UAAU,EAAE,CAAC,0CAAD,CAvBN;AAwBNC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CAxBd;AA2BNhQ,IAAAA,MAAM,EAAE,CAAC,8BAAD,CA3BF;AA4BNiQ,IAAAA,UAAU,EAAE,CAAC,yCAAD,CA5BN;AA6BNC,IAAAA,YAAY,EAAE,CAAC,qCAAD;AA7BR,GA17BI;AAy9BdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,aAAa,EAAE,CAAC,qDAAD,CADZ;AAEH/Q,IAAAA,MAAM,EAAE,CAAC,kCAAD,CAFL;AAGHgR,IAAAA,2BAA2B,EAAE,CACzB,8EADyB,CAH1B;AAMHC,IAAAA,YAAY,EAAE,CAAC,wDAAD,CANX;AAOHC,IAAAA,mBAAmB,EAAE,CACjB,yDADiB,CAPlB;AAUHC,IAAAA,mBAAmB,EAAE,CACjB,sEADiB,CAVlB;AAaHC,IAAAA,mBAAmB,EAAE,CACjB,0DADiB,CAblB;AAgBHC,IAAAA,aAAa,EAAE,CACX,8EADW,CAhBZ;AAmBHnR,IAAAA,GAAG,EAAE,CAAC,+CAAD,CAnBF;AAoBHoR,IAAAA,SAAS,EAAE,CACP,mEADO,CApBR;AAuBHC,IAAAA,gBAAgB,EAAE,CAAC,uDAAD,CAvBf;AAwBHjM,IAAAA,IAAI,EAAE,CAAC,iCAAD,CAxBH;AAyBHkM,IAAAA,qBAAqB,EAAE,CACnB,4EADmB,CAzBpB;AA4BHhM,IAAAA,WAAW,EAAE,CAAC,uDAAD,CA5BV;AA6BHiM,IAAAA,SAAS,EAAE,CAAC,qDAAD,CA7BR;AA8BHC,IAAAA,sBAAsB,EAAE,CACpB,mEADoB,CA9BrB;AAiCHC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CAjCjB;AAoCHC,IAAAA,yBAAyB,EAAE,CAAC,0CAAD,CApCxB;AAqCHC,IAAAA,WAAW,EAAE,CAAC,uDAAD,CArCV;AAsCHC,IAAAA,KAAK,EAAE,CAAC,qDAAD,CAtCJ;AAuCHC,IAAAA,wBAAwB,EAAE,CACtB,sEADsB,CAvCvB;AA0CHC,IAAAA,gBAAgB,EAAE,CACd,oEADc,CA1Cf;AA6CHC,IAAAA,YAAY,EAAE,CACV,2EADU,CA7CX;AAgDHtR,IAAAA,MAAM,EAAE,CAAC,iDAAD,CAhDL;AAiDHuR,IAAAA,YAAY,EAAE,CACV,6DADU,CAjDX;AAoDHC,IAAAA,YAAY,EAAE,CACV,mEADU,CApDX;AAuDHC,IAAAA,mBAAmB,EAAE,CACjB,yDADiB;AAvDlB,GAz9BO;AAohCdC,EAAAA,SAAS,EAAE;AAAEnS,IAAAA,GAAG,EAAE,CAAC,iBAAD;AAAP,GAphCG;AAqhCdoS,EAAAA,SAAS,EAAE;AACPC,IAAAA,sBAAsB,EAAE,CACpB,4DADoB,CADjB;AAIPC,IAAAA,cAAc,EAAE,CACZ,4DADY,CAJT;AAOPC,IAAAA,qBAAqB,EAAE,CACnB,mEADmB,CAPhB;AAUPC,IAAAA,iCAAiC,EAAE,CAC/B,kEAD+B,CAV5B;AAaPC,IAAAA,gBAAgB,EAAE,CACd,4DADc,CAbX;AAgBPC,IAAAA,mCAAmC,EAAE,CACjC,wGADiC,CAhB9B;AAmBPC,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,CAnBvB;AAsBPC,IAAAA,sBAAsB,EAAE,CACpB,4EADoB,CAtBjB;AAyBPC,IAAAA,cAAc,EAAE,CACZ,4EADY,CAzBT;AA4BPC,IAAAA,qBAAqB,EAAE,CACnB,mFADmB,CA5BhB;AA+BPC,IAAAA,2BAA2B,EAAE,CACzB,kFADyB,CA/BtB;AAkCPC,IAAAA,gBAAgB,EAAE,CACd,4EADc,CAlCX;AAqCPC,IAAAA,uBAAuB,EAAE,CACrB,8FADqB,CArClB;AAwCPC,IAAAA,8BAA8B,EAAE,CAC5B,wHAD4B,CAxCzB;AA2CPC,IAAAA,oBAAoB,EAAE,CAClB,2DADkB,CA3Cf;AA8CPC,IAAAA,YAAY,EAAE,CAAC,2DAAD,CA9CP;AA+CPC,IAAAA,mBAAmB,EAAE,CACjB,kEADiB,CA/Cd;AAkDPC,IAAAA,+BAA+B,EAAE,CAC7B,iEAD6B,CAlD1B;AAqDPC,IAAAA,cAAc,EAAE,CACZ,2DADY,CArDT;AAwDPC,IAAAA,iCAAiC,EAAE,CAC/B,uGAD+B,CAxD5B;AA2DPC,IAAAA,0BAA0B,EAAE,CACxB,6EADwB;AA3DrB,GArhCG;AAolCdC,EAAAA,KAAK,EAAE;AACHC,IAAAA,gBAAgB,EAAE,CACd,oDADc,EAEd,EAFc,EAGd;AAAEjc,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,sCAAV;AAAX,KAHc,CADf;AAMHkc,IAAAA,oCAAoC,EAAE,CAClC,oDADkC,CANnC;AASHC,IAAAA,wBAAwB,EAAE,CACtB,2EADsB,EAEtB,EAFsB,EAGtB;AAAEC,MAAAA,SAAS,EAAE;AAAb,KAHsB,CATvB;AAcHpE,IAAAA,eAAe,EAAE,CAAC,oDAAD,CAdd;AAeHqE,IAAAA,sBAAsB,EAAE,CACpB,yFADoB,EAEpB,EAFoB,EAGpB;AAAED,MAAAA,SAAS,EAAE;AAAb,KAHoB,CAfrB;AAoBHE,IAAAA,yBAAyB,EAAE,CACvB,4EADuB,EAEvB,EAFuB,EAGvB;AAAEF,MAAAA,SAAS,EAAE;AAAb,KAHuB,CApBxB;AAyBHG,IAAAA,yBAAyB,EAAE,CACvB,4EADuB,EAEvB,EAFuB,EAGvB;AAAEH,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAzBxB;AA8BHI,IAAAA,iBAAiB,EAAE,CAAC,oDAAD,CA9BhB;AA+BHC,IAAAA,wBAAwB,EAAE,CACtB,gDADsB,CA/BvB;AAkCHC,IAAAA,gBAAgB,EAAE,CAAC,6CAAD,CAlCf;AAmCHC,IAAAA,cAAc,EAAE,CAAC,mDAAD,CAnCb;AAoCHC,IAAAA,0BAA0B,EAAE,CACxB,8CADwB,CApCzB;AAuCHC,IAAAA,cAAc,EAAE,CAAC,sCAAD,CAvCb;AAwCHC,IAAAA,mBAAmB,EAAE,CACjB,0DADiB,CAxClB;AA2CHC,IAAAA,+BAA+B,EAAE,CAC7B,6EAD6B,CA3C9B;AA8CHC,IAAAA,kBAAkB,EAAE,CAAC,2CAAD,CA9CjB;AA+CHC,IAAAA,eAAe,EAAE,CAAC,iCAAD,CA/Cd;AAgDHC,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAhDf;AAiDHC,IAAAA,sBAAsB,EAAE,CACpB,iEADoB,CAjDrB;AAoDHC,IAAAA,mBAAmB,EAAE,CAAC,uCAAD,CApDlB;AAqDHhT,IAAAA,0BAA0B,EAAE,CAAC,kBAAD,CArDzB;AAsDHiT,IAAAA,UAAU,EAAE,CAAC,kCAAD,CAtDT;AAuDHC,IAAAA,WAAW,EAAE,CAAC,wBAAD,CAvDV;AAwDHC,IAAAA,yBAAyB,EAAE,CACvB,2DADuB,CAxDxB;AA2DHC,IAAAA,0BAA0B,EAAE,CAAC,2CAAD,CA3DzB;AA4DHC,IAAAA,eAAe,EAAE,CAAC,kCAAD,CA5Dd;AA6DHC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CA7DZ;AA8DHC,IAAAA,mBAAmB,EAAE,CAAC,4CAAD,CA9DlB;AA+DHC,IAAAA,mBAAmB,EAAE,CACjB,uDADiB,CA/DlB;AAkEHpJ,IAAAA,aAAa,EAAE,CAAC,kCAAD,CAlEZ;AAmEHqJ,IAAAA,iBAAiB,EAAE,CACf,qDADe,EAEf,EAFe,EAGf;AAAE7d,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,uCAAV;AAAX,KAHe,CAnEhB;AAwEH8d,IAAAA,qCAAqC,EAAE,CACnC,qDADmC,CAxEpC;AA2EHzQ,IAAAA,MAAM,EAAE,CAAC,8BAAD,CA3EL;AA4EH0Q,IAAAA,wBAAwB,EAAE,CACtB,wEADsB,CA5EvB;AA+EHC,IAAAA,2BAA2B,EAAE,CACzB,0EADyB,CA/E1B;AAkFHC,IAAAA,mBAAmB,EAAE,CACjB,8DADiB,CAlFlB;AAqFHC,IAAAA,cAAc,EAAE,CAAC,sDAAD,CArFb;AAsFHC,IAAAA,sBAAsB,EAAE,CACpB,2DADoB,CAtFrB;AAyFHC,IAAAA,mBAAmB,EAAE,CAAC,oDAAD,CAzFlB;AA0FHC,IAAAA,+BAA+B,EAAE,CAC7B,+EAD6B,CA1F9B;AA6FHC,IAAAA,eAAe,EAAE,CAAC,4CAAD,CA7Fd;AA8FHC,IAAAA,gBAAgB,EAAE,CACd,0DADc,CA9Ff;AAiGHC,IAAAA,UAAU,EAAE,CAAC,8CAAD,CAjGT;AAkGHC,IAAAA,gBAAgB,EAAE,CACd,0DADc,CAlGf;AAqGHC,IAAAA,eAAe,EAAE,CAAC,oCAAD,CArGd;AAsGHC,IAAAA,iCAAiC,EAAE,CAC/B,yFAD+B,CAtGhC;AAyGHC,IAAAA,aAAa,EAAE,CAAC,oDAAD,CAzGZ;AA0GHC,IAAAA,kBAAkB,EAAE,CAChB,yDADgB,CA1GjB;AA6GHC,IAAAA,mBAAmB,EAAE,CACjB,kEADiB,CA7GlB;AAgHHrK,IAAAA,aAAa,EAAE,CAAC,8CAAD,CAhHZ;AAiHHsK,IAAAA,6BAA6B,EAAE,CAC3B,uDAD2B,CAjH5B;AAoHHC,IAAAA,iBAAiB,EAAE,CAAC,kCAAD,CApHhB;AAqHHC,IAAAA,0BAA0B,EAAE,CACxB,mDADwB,CArHzB;AAwHHC,IAAAA,eAAe,EAAE,CACb,yCADa,EAEb,EAFa,EAGb;AAAElf,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wBAAV;AAAX,KAHa,CAxHd;AA6HHmf,IAAAA,sBAAsB,EAAE,CAAC,yCAAD,CA7HrB;AA8HHC,IAAAA,sBAAsB,EAAE,CAAC,yCAAD,CA9HrB;AA+HHC,IAAAA,4BAA4B,EAAE,CAC1B,oDAD0B,CA/H3B;AAkIHC,IAAAA,gBAAgB,EAAE,CAAC,+BAAD,CAlIf;AAmIHC,IAAAA,yBAAyB,EAAE,CACvB,gDADuB,CAnIxB;AAsIHC,IAAAA,oBAAoB,EAAE,CAClB,oDADkB,CAtInB;AAyIHlX,IAAAA,GAAG,EAAE,CAAC,2BAAD,CAzIF;AA0IHmX,IAAAA,qBAAqB,EAAE,CACnB,qEADmB,CA1IpB;AA6IHC,IAAAA,wBAAwB,EAAE,CACtB,uEADsB,CA7IvB;AAgJHC,IAAAA,kBAAkB,EAAE,CAAC,wCAAD,CAhJjB;AAiJHC,IAAAA,yBAAyB,EAAE,CACvB,wFADuB,CAjJxB;AAoJHC,IAAAA,YAAY,EAAE,CAAC,kCAAD,CApJX;AAqJHC,IAAAA,kCAAkC,EAAE,CAChC,0EADgC,CArJjC;AAwJHC,IAAAA,WAAW,EAAE,CAAC,mDAAD,CAxJV;AAyJHC,IAAAA,SAAS,EAAE,CAAC,6CAAD,CAzJR;AA0JHC,IAAAA,mBAAmB,EAAE,CACjB,wDADiB,CA1JlB;AA6JHC,IAAAA,SAAS,EAAE,CAAC,0CAAD,CA7JR;AA8JHC,IAAAA,qBAAqB,EAAE,CAAC,gDAAD,CA9JpB;AA+JHC,IAAAA,8BAA8B,EAAE,CAC5B,+DAD4B,CA/J7B;AAkKHC,IAAAA,uBAAuB,EAAE,CAAC,gDAAD,CAlKtB;AAmKHzR,IAAAA,SAAS,EAAE,CAAC,yCAAD,CAnKR;AAoKH0R,IAAAA,sBAAsB,EAAE,CAAC,iDAAD,CApKrB;AAqKHC,IAAAA,gBAAgB,EAAE,CAAC,iDAAD,CArKf;AAsKHC,IAAAA,4BAA4B,EAAE,CAC1B,4EAD0B,CAtK3B;AAyKHC,IAAAA,0BAA0B,EAAE,CAAC,6CAAD,CAzKzB;AA0KHC,IAAAA,UAAU,EAAE,CAAC,2CAAD,CA1KT;AA2KHC,IAAAA,oBAAoB,EAAE,CAAC,8CAAD,CA3KnB;AA4KHC,IAAAA,YAAY,EAAE,CAAC,yCAAD,CA5KX;AA6KHC,IAAAA,aAAa,EAAE,CAAC,uDAAD,CA7KZ;AA8KHC,IAAAA,mBAAmB,EAAE,CACjB,4EADiB,CA9KlB;AAiLHC,IAAAA,cAAc,EAAE,CACZ,2DADY,CAjLb;AAoLHC,IAAAA,mBAAmB,EAAE,CAAC,+CAAD,CApLlB;AAqLHC,IAAAA,gBAAgB,EAAE,CAAC,2CAAD,CArLf;AAsLHC,IAAAA,QAAQ,EAAE,CAAC,iCAAD,CAtLP;AAuLHC,IAAAA,aAAa,EAAE,CAAC,mDAAD,CAvLZ;AAwLHC,IAAAA,mBAAmB,EAAE,CAAC,wCAAD,CAxLlB;AAyLHC,IAAAA,qBAAqB,EAAE,CAAC,+CAAD,CAzLpB;AA0LHC,IAAAA,8BAA8B,EAAE,CAC5B,sFAD4B,CA1L7B;AA6LHC,IAAAA,iBAAiB,EAAE,CAAC,4CAAD,CA7LhB;AA8LHC,IAAAA,SAAS,EAAE,CAAC,kCAAD,CA9LR;AA+LHC,IAAAA,oBAAoB,EAAE,CAAC,wCAAD,CA/LnB;AAgMHC,IAAAA,UAAU,EAAE,CAAC,iDAAD,CAhMT;AAiMHC,IAAAA,eAAe,EAAE,CAAC,sDAAD,CAjMd;AAkMHC,IAAAA,eAAe,EAAE,CAAC,+CAAD,CAlMd;AAmMHC,IAAAA,yBAAyB,EAAE,CACvB,+EADuB,CAnMxB;AAsMHC,IAAAA,mCAAmC,EAAE,CACjC,2EADiC,CAtMlC;AAyMHC,IAAAA,WAAW,EAAE,CAAC,iDAAD,CAzMV;AA0MHC,IAAAA,eAAe,EAAE,CAAC,qDAAD,CA1Md;AA2MHC,IAAAA,mCAAmC,EAAE,CACjC,2EADiC,CA3MlC;AA8MHC,IAAAA,QAAQ,EAAE,CAAC,yCAAD,CA9MP;AA+MHtN,IAAAA,UAAU,EAAE,CAAC,2CAAD,CA/MT;AAgNHuN,IAAAA,uBAAuB,EAAE,CACrB,kDADqB,CAhNtB;AAmNH9b,IAAAA,kBAAkB,EAAE,CAChB,oEADgB,CAnNjB;AAsNH+b,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAtNZ;AAuNHC,IAAAA,YAAY,EAAE,CAAC,oCAAD,CAvNX;AAwNHC,IAAAA,yBAAyB,EAAE,CACvB,oEADuB,CAxNxB;AA2NH3J,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CA3NhB;AA4NH4J,IAAAA,qBAAqB,EAAE,CACnB,yDADmB,CA5NpB;AA+NHC,IAAAA,yBAAyB,EAAE,CAAC,oCAAD,CA/NxB;AAgOHC,IAAAA,wBAAwB,EAAE,CACtB,kDADsB,CAhOvB;AAmOH7U,IAAAA,WAAW,EAAE,CAAC,mCAAD,CAnOV;AAoOH8U,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CApOf;AAqOHC,IAAAA,cAAc,EAAE,CAAC,gCAAD,CArOb;AAsOHC,IAAAA,sBAAsB,EAAE,CACpB,gEADoB,CAtOrB;AAyOHC,IAAAA,eAAe,EAAE,CAAC,uCAAD,CAzOd;AA0OH5X,IAAAA,wBAAwB,EAAE,CAAC,iBAAD,CA1OvB;AA2OHiG,IAAAA,UAAU,EAAE,CAAC,uBAAD,CA3OT;AA4OHrD,IAAAA,WAAW,EAAE,CAAC,6BAAD,CA5OV;AA6OHC,IAAAA,SAAS,EAAE,CAAC,iCAAD,CA7OR;AA8OHgV,IAAAA,eAAe,EAAE,CAAC,uCAAD,CA9Od;AA+OHC,IAAAA,mCAAmC,EAAE,CAAC,kCAAD,CA/OlC;AAgPHC,IAAAA,aAAa,EAAE,CAAC,qCAAD,CAhPZ;AAiPHC,IAAAA,eAAe,EAAE,CAAC,wCAAD,CAjPd;AAkPHlV,IAAAA,UAAU,EAAE,CAAC,mBAAD,CAlPT;AAmPHmV,IAAAA,oCAAoC,EAAE,CAClC,sDADkC,CAnPnC;AAsPHC,IAAAA,iBAAiB,EAAE,CACf,wDADe,CAtPhB;AAyPHC,IAAAA,YAAY,EAAE,CAAC,oCAAD,CAzPX;AA0PHC,IAAAA,iBAAiB,EAAE,CAAC,2CAAD,CA1PhB;AA2PHC,IAAAA,QAAQ,EAAE,CAAC,gCAAD,CA3PP;AA4PHC,IAAAA,SAAS,EAAE,CAAC,iCAAD,CA5PR;AA6PHvc,IAAAA,qBAAqB,EAAE,CACnB,sDADmB,CA7PpB;AAgQHwO,IAAAA,YAAY,EAAE,CAAC,iCAAD,CAhQX;AAiQH0E,IAAAA,KAAK,EAAE,CAAC,mCAAD,CAjQJ;AAkQHsJ,IAAAA,aAAa,EAAE,CAAC,2CAAD,CAlQZ;AAmQH/N,IAAAA,WAAW,EAAE,CAAC,kDAAD,CAnQV;AAoQHxO,IAAAA,wBAAwB,EAAE,CACtB,8EADsB,CApQvB;AAuQHwc,IAAAA,2BAA2B,EAAE,CACzB,6EADyB,EAEzB,EAFyB,EAGzB;AAAErH,MAAAA,SAAS,EAAE;AAAb,KAHyB,CAvQ1B;AA4QHrD,IAAAA,kBAAkB,EAAE,CAChB,uDADgB,CA5QjB;AA+QH2K,IAAAA,yBAAyB,EAAE,CACvB,2FADuB,EAEvB,EAFuB,EAGvB;AAAEtH,MAAAA,SAAS,EAAE;AAAb,KAHuB,CA/QxB;AAoRHuH,IAAAA,2BAA2B,EAAE,CACzB,kFADyB,CApR1B;AAuRHC,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B,EAF0B,EAG1B;AAAExH,MAAAA,SAAS,EAAE;AAAb,KAH0B,CAvR3B;AA4RHyH,IAAAA,4BAA4B,EAAE,CAC1B,8EAD0B,EAE1B,EAF0B,EAG1B;AAAEzH,MAAAA,SAAS,EAAE;AAAb,KAH0B,CA5R3B;AAiSH0H,IAAAA,YAAY,EAAE,CAAC,qDAAD,CAjSX;AAkSHC,IAAAA,gBAAgB,EAAE,CAAC,kCAAD,CAlSf;AAmSHC,IAAAA,iBAAiB,EAAE,CAAC,yCAAD,CAnShB;AAoSHC,IAAAA,wBAAwB,EAAE,CACtB,wEADsB,CApSvB;AAuSHC,IAAAA,wBAAwB,EAAE,CACtB,0EADsB,EAEtB,EAFsB,EAGtB;AAAE9H,MAAAA,SAAS,EAAE;AAAb,KAHsB,CAvSvB;AA4SH+H,IAAAA,sBAAsB,EAAE,CACpB,wFADoB,EAEpB,EAFoB,EAGpB;AAAE/H,MAAAA,SAAS,EAAE;AAAb,KAHoB,CA5SrB;AAiTHgI,IAAAA,yBAAyB,EAAE,CACvB,2EADuB,EAEvB,EAFuB,EAGvB;AAAEhI,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAjTxB;AAsTHiI,IAAAA,yBAAyB,EAAE,CACvB,2EADuB,EAEvB,EAFuB,EAGvB;AAAEjI,MAAAA,SAAS,EAAE;AAAb,KAHuB,CAtTxB;AA2THkI,IAAAA,eAAe,EAAE,CAAC,kDAAD,CA3Td;AA4THC,IAAAA,QAAQ,EAAE,CAAC,qCAAD,CA5TP;AA6THxb,IAAAA,MAAM,EAAE,CAAC,6BAAD,CA7TL;AA8THyb,IAAAA,sBAAsB,EAAE,CACpB,wDADoB,CA9TrB;AAiUHC,IAAAA,mBAAmB,EAAE,CAAC,mDAAD,CAjUlB;AAkUHC,IAAAA,+BAA+B,EAAE,CAAC,iCAAD,CAlU9B;AAmUHC,IAAAA,gBAAgB,EAAE,CACd,yDADc,CAnUf;AAsUHC,IAAAA,iCAAiC,EAAE,CAC/B,wFAD+B,CAtUhC;AAyUHC,IAAAA,aAAa,EAAE,CAAC,mDAAD,CAzUZ;AA0UHC,IAAAA,kBAAkB,EAAE,CAChB,wDADgB,CA1UjB;AA6UHC,IAAAA,0BAA0B,EAAE,CACxB,iFADwB,EAExB,EAFwB,EAGxB;AAAE/kB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,6BAAV;AAAX,KAHwB,CA7UzB;AAkVHglB,IAAAA,2BAA2B,EAAE,CACzB,iFADyB,CAlV1B;AAqVH9O,IAAAA,aAAa,EAAE,CAAC,6CAAD,CArVZ;AAsVH+O,IAAAA,0BAA0B,EAAE,CACxB,oDADwB,CAtVzB;AAyVHC,IAAAA,kBAAkB,EAAE,CAChB,sEADgB,EAEhB;AAAEC,MAAAA,OAAO,EAAE;AAAX,KAFgB;AAzVjB,GAplCO;AAk7CdC,EAAAA,MAAM,EAAE;AACJC,IAAAA,IAAI,EAAE,CAAC,kBAAD,CADF;AAEJC,IAAAA,OAAO,EAAE,CAAC,qBAAD,CAFL;AAGJC,IAAAA,qBAAqB,EAAE,CAAC,oBAAD,CAHnB;AAIJC,IAAAA,MAAM,EAAE,CAAC,oBAAD,CAJJ;AAKJxJ,IAAAA,KAAK,EAAE,CAAC,0BAAD,CALH;AAMJyJ,IAAAA,MAAM,EAAE,CAAC,oBAAD,CANJ;AAOJC,IAAAA,KAAK,EAAE,CAAC,mBAAD;AAPH,GAl7CM;AA27CdC,EAAAA,cAAc,EAAE;AACZzc,IAAAA,QAAQ,EAAE,CACN,iEADM,CADE;AAIZ0c,IAAAA,uBAAuB,EAAE,CACrB,sDADqB,CAJb;AAOZpc,IAAAA,gBAAgB,EAAE,CAAC,wCAAD,CAPN;AAQZC,IAAAA,iBAAiB,EAAE,CAAC,kDAAD,CARP;AASZoc,IAAAA,qBAAqB,EAAE,CACnB,2EADmB,CATX;AAYZjc,IAAAA,WAAW,EAAE,CACT,mEADS;AAZD,GA37CF;AA28Cdkc,EAAAA,KAAK,EAAE;AACHC,IAAAA,iCAAiC,EAAE,CAC/B,0DAD+B,CADhC;AAIHC,IAAAA,kCAAkC,EAAE,CAChC,yDADgC,CAJjC;AAOHC,IAAAA,+BAA+B,EAAE,CAC7B,wDAD6B,CAP9B;AAUHC,IAAAA,+BAA+B,EAAE,CAC7B,yDAD6B,CAV9B;AAaHC,IAAAA,4BAA4B,EAAE,CAC1B,wDAD0B,CAb3B;AAgBH/d,IAAAA,MAAM,EAAE,CAAC,wBAAD,CAhBL;AAiBHge,IAAAA,4BAA4B,EAAE,CAC1B,6EAD0B,CAjB3B;AAoBHC,IAAAA,qBAAqB,EAAE,CAAC,gDAAD,CApBpB;AAqBHC,IAAAA,4BAA4B,EAAE,CAC1B,gGAD0B,CArB3B;AAwBHC,IAAAA,qBAAqB,EAAE,CACnB,sEADmB,CAxBpB;AA2BHC,IAAAA,WAAW,EAAE,CAAC,sCAAD,CA3BV;AA4BHC,IAAAA,SAAS,EAAE,CAAC,mCAAD,CA5BR;AA6BHC,IAAAA,yBAAyB,EAAE,CACvB,6FADuB,CA7BxB;AAgCHC,IAAAA,kBAAkB,EAAE,CAChB,mEADgB,CAhCjB;AAmCHC,IAAAA,yBAAyB,EAAE,CACvB,0DADuB,CAnCxB;AAsCHlZ,IAAAA,IAAI,EAAE,CAAC,uBAAD,CAtCH;AAuCHmZ,IAAAA,cAAc,EAAE,CAAC,yCAAD,CAvCb;AAwCHC,IAAAA,2BAA2B,EAAE,CACzB,4EADyB,CAxC1B;AA2CHC,IAAAA,oBAAoB,EAAE,CAAC,+CAAD,CA3CnB;AA4CH9b,IAAAA,wBAAwB,EAAE,CAAC,iBAAD,CA5CvB;AA6CH+b,IAAAA,gBAAgB,EAAE,CAAC,2CAAD,CA7Cf;AA8CHC,IAAAA,2BAA2B,EAAE,CACzB,+CADyB,CA9C1B;AAiDHC,IAAAA,iBAAiB,EAAE,CAAC,4CAAD,CAjDhB;AAkDHC,IAAAA,cAAc,EAAE,CAAC,yCAAD,CAlDb;AAmDHC,IAAAA,4BAA4B,EAAE,CAC1B,6DAD0B,CAnD3B;AAsDHC,IAAAA,kBAAkB,EAAE,CAChB,4DADgB,CAtDjB;AAyDHC,IAAAA,eAAe,EAAE,CACb,2DADa,CAzDd;AA4DHC,IAAAA,4BAA4B,EAAE,CAC1B,+FAD0B,CA5D3B;AA+DHC,IAAAA,qBAAqB,EAAE,CACnB,qEADmB,CA/DpB;AAkEHC,IAAAA,WAAW,EAAE,CAAC,qCAAD;AAlEV,GA38CO;AA+gDd/B,EAAAA,KAAK,EAAE;AACHgC,IAAAA,wBAAwB,EAAE,CACtB,mBADsB,EAEtB,EAFsB,EAGtB;AAAE1nB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,8BAAV;AAAX,KAHsB,CADvB;AAMH2nB,IAAAA,4BAA4B,EAAE,CAAC,mBAAD,CAN3B;AAOHC,IAAAA,KAAK,EAAE,CAAC,6BAAD,CAPJ;AAQHC,IAAAA,YAAY,EAAE,CAAC,6BAAD,CARX;AASHC,IAAAA,qBAAqB,EAAE,CAAC,+CAAD,CATpB;AAUHC,IAAAA,oCAAoC,EAAE,CAAC,gCAAD,CAVnC;AAWHC,IAAAA,4BAA4B,EAAE,CAC1B,qBAD0B,EAE1B,EAF0B,EAG1B;AAAEhoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,kCAAV;AAAX,KAH0B,CAX3B;AAgBHioB,IAAAA,gCAAgC,EAAE,CAAC,qBAAD,CAhB/B;AAiBHC,IAAAA,kCAAkC,EAAE,CAChC,iBADgC,EAEhC,EAFgC,EAGhC;AAAEloB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wCAAV;AAAX,KAHgC,CAjBjC;AAsBHmoB,IAAAA,sCAAsC,EAAE,CAAC,iBAAD,CAtBrC;AAuBHC,IAAAA,2BAA2B,EAAE,CACzB,qBADyB,EAEzB,EAFyB,EAGzB;AAAEpoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,iCAAV;AAAX,KAHyB,CAvB1B;AA4BHqoB,IAAAA,+BAA+B,EAAE,CAAC,qBAAD,CA5B9B;AA6BHC,IAAAA,4BAA4B,EAAE,CAC1B,oCAD0B,EAE1B,EAF0B,EAG1B;AAAEtoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,kCAAV;AAAX,KAH0B,CA7B3B;AAkCHuoB,IAAAA,gCAAgC,EAAE,CAAC,oCAAD,CAlC/B;AAmCHC,IAAAA,kCAAkC,EAAE,CAChC,4BADgC,EAEhC,EAFgC,EAGhC;AAAExoB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,wCAAV;AAAX,KAHgC,CAnCjC;AAwCHyoB,IAAAA,sCAAsC,EAAE,CAAC,4BAAD,CAxCrC;AAyCHC,IAAAA,MAAM,EAAE,CAAC,gCAAD,CAzCL;AA0CH9iB,IAAAA,gBAAgB,EAAE,CAAC,WAAD,CA1Cf;AA2CH+iB,IAAAA,aAAa,EAAE,CAAC,uBAAD,CA3CZ;AA4CHC,IAAAA,iBAAiB,EAAE,CAAC,iCAAD,CA5ChB;AA6CHC,IAAAA,yBAAyB,EAAE,CACvB,iCADuB,EAEvB,EAFuB,EAGvB;AAAE7oB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,+BAAV;AAAX,KAHuB,CA7CxB;AAkDH8oB,IAAAA,6BAA6B,EAAE,CAAC,iCAAD,CAlD5B;AAmDHC,IAAAA,+BAA+B,EAAE,CAC7B,yBAD6B,EAE7B,EAF6B,EAG7B;AAAE/oB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,qCAAV;AAAX,KAH6B,CAnD9B;AAwDHgpB,IAAAA,mCAAmC,EAAE,CAAC,yBAAD,CAxDlC;AAyDHtb,IAAAA,IAAI,EAAE,CAAC,YAAD,CAzDH;AA0DHub,IAAAA,0BAA0B,EAAE,CACxB,kBADwB,EAExB,EAFwB,EAGxB;AAAEjpB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,gCAAV;AAAX,KAHwB,CA1DzB;AA+DHkpB,IAAAA,8BAA8B,EAAE,CAAC,kBAAD,CA/D7B;AAgEHC,IAAAA,0BAA0B,EAAE,CACxB,kBADwB,EAExB,EAFwB,EAGxB;AAAEnpB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,gCAAV;AAAX,KAHwB,CAhEzB;AAqEHopB,IAAAA,8BAA8B,EAAE,CAAC,kBAAD,CArE7B;AAsEHC,IAAAA,2BAA2B,EAAE,CACzB,qBADyB,EAEzB,EAFyB,EAGzB;AAAErpB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,iCAAV;AAAX,KAHyB,CAtE1B;AA2EHspB,IAAAA,+BAA+B,EAAE,CAAC,qBAAD,CA3E9B;AA4EHC,IAAAA,iCAAiC,EAAE,CAAC,qBAAD,CA5EhC;AA6EHC,IAAAA,oBAAoB,EAAE,CAAC,iCAAD,CA7EnB;AA8EHC,IAAAA,oBAAoB,EAAE,CAAC,iCAAD,CA9EnB;AA+EHC,IAAAA,2BAA2B,EAAE,CACzB,oBADyB,EAEzB,EAFyB,EAGzB;AAAE1pB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,iCAAV;AAAX,KAHyB,CA/E1B;AAoFH2pB,IAAAA,+BAA+B,EAAE,CAAC,oBAAD,CApF9B;AAqFHC,IAAAA,kBAAkB,EAAE,CAAC,gCAAD,CArFjB;AAsFHC,IAAAA,gCAAgC,EAAE,CAC9B,yBAD8B,EAE9B,EAF8B,EAG9B;AAAE7pB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,sCAAV;AAAX,KAH8B,CAtF/B;AA2FH8pB,IAAAA,oCAAoC,EAAE,CAAC,yBAAD,CA3FnC;AA4FHC,IAAAA,qBAAqB,EAAE,CAAC,4BAAD,CA5FpB;AA6FHC,IAAAA,iCAAiC,EAAE,CAC/B,gBAD+B,EAE/B,EAF+B,EAG/B;AAAEhqB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,uCAAV;AAAX,KAH+B,CA7FhC;AAkGHiqB,IAAAA,qCAAqC,EAAE,CAAC,gBAAD,CAlGpC;AAmGHC,IAAAA,yCAAyC,EAAE,CACvC,8BADuC,EAEvC,EAFuC,EAGvC;AAAElqB,MAAAA,OAAO,EAAE,CAAC,OAAD,EAAU,+CAAV;AAAX,KAHuC,CAnGxC;AAwGHmqB,IAAAA,6CAA6C,EAAE,CAC3C,8BAD2C,CAxG5C;AA2GHC,IAAAA,OAAO,EAAE,CAAC,gCAAD,CA3GN;AA4GHC,IAAAA,QAAQ,EAAE,CAAC,mCAAD,CA5GP;AA6GHC,IAAAA,mBAAmB,EAAE,CAAC,aAAD;AA7GlB;AA/gDO,CAAlB;;ACAO,MAAMC,OAAO,GAAG,mBAAhB;;ACAA,SAASC,kBAAT,CAA4BC,OAA5B,EAAqCC,YAArC,EAAmD;AACtD,QAAMC,UAAU,GAAG,EAAnB;;AACA,OAAK,MAAM,CAACC,KAAD,EAAQC,SAAR,CAAX,IAAiCC,MAAM,CAACC,OAAP,CAAeL,YAAf,CAAjC,EAA+D;AAC3D,SAAK,MAAM,CAACM,UAAD,EAAaC,QAAb,CAAX,IAAqCH,MAAM,CAACC,OAAP,CAAeF,SAAf,CAArC,EAAgE;AAC5D,YAAM,CAACK,KAAD,EAAQC,QAAR,EAAkBC,WAAlB,IAAiCH,QAAvC;AACA,YAAM,CAACI,MAAD,EAASC,GAAT,IAAgBJ,KAAK,CAACK,KAAN,CAAY,GAAZ,CAAtB;AACA,YAAMC,gBAAgB,GAAGV,MAAM,CAACW,MAAP,CAAc;AAAEJ,QAAAA,MAAF;AAAUC,QAAAA;AAAV,OAAd,EAA+BH,QAA/B,CAAzB;;AACA,UAAI,CAACR,UAAU,CAACC,KAAD,CAAf,EAAwB;AACpBD,QAAAA,UAAU,CAACC,KAAD,CAAV,GAAoB,EAApB;AACH;;AACD,YAAMc,YAAY,GAAGf,UAAU,CAACC,KAAD,CAA/B;;AACA,UAAIQ,WAAJ,EAAiB;AACbM,QAAAA,YAAY,CAACV,UAAD,CAAZ,GAA2BW,QAAQ,CAAClB,OAAD,EAAUG,KAAV,EAAiBI,UAAjB,EAA6BQ,gBAA7B,EAA+CJ,WAA/C,CAAnC;AACA;AACH;;AACDM,MAAAA,YAAY,CAACV,UAAD,CAAZ,GAA2BP,OAAO,CAACmB,OAAR,CAAgBT,QAAhB,CAAyBK,gBAAzB,CAA3B;AACH;AACJ;;AACD,SAAOb,UAAP;AACH;;AACD,SAASgB,QAAT,CAAkBlB,OAAlB,EAA2BG,KAA3B,EAAkCI,UAAlC,EAA8CG,QAA9C,EAAwDC,WAAxD,EAAqE;AACjE,QAAMS,mBAAmB,GAAGpB,OAAO,CAACmB,OAAR,CAAgBT,QAAhB,CAAyBA,QAAzB,CAA5B;AACA;;AACA,WAASW,eAAT,CAAyB,GAAGC,IAA5B,EAAkC;AAC9B;AACA,QAAIC,OAAO,GAAGH,mBAAmB,CAACZ,QAApB,CAA6B/Q,KAA7B,CAAmC,GAAG6R,IAAtC,CAAd,CAF8B;;AAI9B,QAAIX,WAAW,CAAChP,SAAhB,EAA2B;AACvB4P,MAAAA,OAAO,GAAGlB,MAAM,CAACW,MAAP,CAAc,EAAd,EAAkBO,OAAlB,EAA2B;AACjCC,QAAAA,IAAI,EAAED,OAAO,CAACZ,WAAW,CAAChP,SAAb,CADoB;AAEjC,SAACgP,WAAW,CAAChP,SAAb,GAAyB8P;AAFQ,OAA3B,CAAV;AAIA,aAAOL,mBAAmB,CAACG,OAAD,CAA1B;AACH;;AACD,QAAIZ,WAAW,CAACprB,OAAhB,EAAyB;AACrB,YAAM,CAACmsB,QAAD,EAAWC,aAAX,IAA4BhB,WAAW,CAACprB,OAA9C;AACAyqB,MAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAkB,WAAU1B,KAAM,IAAGI,UAAW,kCAAiCmB,QAAS,IAAGC,aAAc,IAA3G;AACH;;AACD,QAAIhB,WAAW,CAACmB,UAAhB,EAA4B;AACxB9B,MAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAiBlB,WAAW,CAACmB,UAA7B;AACH;;AACD,QAAInB,WAAW,CAACjiB,iBAAhB,EAAmC;AAC/B;AACA,YAAM6iB,OAAO,GAAGH,mBAAmB,CAACZ,QAApB,CAA6B/Q,KAA7B,CAAmC,GAAG6R,IAAtC,CAAhB;;AACA,WAAK,MAAM,CAACS,IAAD,EAAOC,KAAP,CAAX,IAA4B3B,MAAM,CAACC,OAAP,CAAeK,WAAW,CAACjiB,iBAA3B,CAA5B,EAA2E;AACvE,YAAIqjB,IAAI,IAAIR,OAAZ,EAAqB;AACjBvB,UAAAA,OAAO,CAAC4B,GAAR,CAAYC,IAAZ,CAAkB,IAAGE,IAAK,0CAAyC5B,KAAM,IAAGI,UAAW,aAAYyB,KAAM,WAAzG;;AACA,cAAI,EAAEA,KAAK,IAAIT,OAAX,CAAJ,EAAyB;AACrBA,YAAAA,OAAO,CAACS,KAAD,CAAP,GAAiBT,OAAO,CAACQ,IAAD,CAAxB;AACH;;AACD,iBAAOR,OAAO,CAACQ,IAAD,CAAd;AACH;AACJ;;AACD,aAAOX,mBAAmB,CAACG,OAAD,CAA1B;AACH,KA/B6B;;;AAiC9B,WAAOH,mBAAmB,CAAC,GAAGE,IAAJ,CAA1B;AACH;;AACD,SAAOjB,MAAM,CAACW,MAAP,CAAcK,eAAd,EAA+BD,mBAA/B,CAAP;AACH;;ACxDM,SAASa,mBAAT,CAA6BjC,OAA7B,EAAsC;AACzC,QAAMkC,GAAG,GAAGnC,kBAAkB,CAACC,OAAD,EAAUmC,SAAV,CAA9B;AACA,SAAO;AACHC,IAAAA,IAAI,EAAEF;AADH,GAAP;AAGH;AACDD,mBAAmB,CAACnC,OAApB,GAA8BA,OAA9B;AACA,AAAO,SAASuC,yBAAT,CAAmCrC,OAAnC,EAA4C;AAC/C,QAAMkC,GAAG,GAAGnC,kBAAkB,CAACC,OAAD,EAAUmC,SAAV,CAA9B;AACA,2CACOD,GADP;AAEIE,IAAAA,IAAI,EAAEF;AAFV;AAIH;AACDG,yBAAyB,CAACvC,OAA1B,GAAoCA,OAApC;;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js new file mode 100644 index 0000000..32c2f39 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/endpoints-to-methods.js @@ -0,0 +1,60 @@ +export function endpointsToMethods(octokit, endpointsMap) { + const newMethods = {}; + for (const [scope, endpoints] of Object.entries(endpointsMap)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign({ method, url }, defaults); + if (!newMethods[scope]) { + newMethods[scope] = {}; + } + const scopeMethods = newMethods[scope]; + if (decorations) { + scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); + continue; + } + scopeMethods[methodName] = octokit.request.defaults(endpointDefaults); + } + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + /* istanbul ignore next */ + function withDecorations(...args) { + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + let options = requestWithDefaults.endpoint.merge(...args); + // There are currently no other decorations than `.mapToData` + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: undefined, + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + const options = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries(decorations.renamedParameters)) { + if (name in options) { + octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); + if (!(alias in options)) { + options[alias] = options[name]; + } + delete options[name]; + } + } + return requestWithDefaults(options); + } + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js new file mode 100644 index 0000000..e61f6ac --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/endpoints.js @@ -0,0 +1,1664 @@ +const Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels", + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve", + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel", + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}", + ], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token", + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token", + ], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token", + ], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}", + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}", + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}", + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}", + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}", + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}", + ], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs", + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}", + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}", + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository", + ], + getActionsCacheUsageForEnterprise: [ + "GET /enterprises/{enterprise}/actions/cache/usage", + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions", + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions", + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key", + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + getGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow", + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions", + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions", + ], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] }, + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals", + ], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}", + ], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access", + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing", + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels", + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads", + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories", + ], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + ], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels", + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}", + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions", + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions", + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels", + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + setGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow", + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions", + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions", + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories", + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories", + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access", + ], + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription", + ], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription", + ], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}", + ], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public", + ], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications", + ], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription", + ], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"], + }, + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }, + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + ], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens", + ], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}", + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}", + ], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories", + ], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed", + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts", + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }, + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + ], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended", + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"], + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions", + ], + getGithubAdvancedSecurityBillingGhe: [ + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + ], + getGithubAdvancedSecurityBillingOrg: [ + "GET /orgs/{org}/settings/billing/advanced-security", + ], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages", + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage", + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage", + ], + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences", + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"], + }, + codeScanning: { + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}", + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } }, + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", + ], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] }, + ], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + ], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"], + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"], + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines", + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}", + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces", + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces", + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}", + ], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}", + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports", + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}", + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key", + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}", + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } }, + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces", + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories", + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines", + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories", + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"], + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}", + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots", + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}", + ], + }, + emojis: { get: ["GET /emojis"] }, + enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: [ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + disableSelectedOrganizationGithubActionsEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}", + ], + enableSelectedOrganizationGithubActionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}", + ], + getAllowedActionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/selected-actions", + ], + getGithubActionsPermissionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions", + ], + getServerStatistics: [ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics", + ], + listLabelsForSelfHostedRunnerForEnterprise: [ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + listSelectedOrganizationsEnabledGithubActionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/organizations", + ], + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", + ], + setAllowedActionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/selected-actions", + ], + setCustomLabelsForSelfHostedRunnerForEnterprise: [ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + setGithubActionsPermissionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions", + ], + setSelectedOrganizationsEnabledGithubActionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/organizations", + ], + }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"], + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"], + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"], + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] }, + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits", + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] }, + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] }, + ], + }, + issues: { + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees", + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments", + ], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}", + ], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}", + ], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + ], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + ], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + ], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels", + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees", + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", + ], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}", + ], + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"], + }, + markdown: { + render: ["POST /markdown"], + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } }, + ], + }, + meta: { + get: ["GET /meta"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"], + }, + migrations: { + cancelImport: ["DELETE /repos/{owner}/{repo}/import"], + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive", + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive", + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive", + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive", + ], + getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], + getImportStatus: ["GET /repos/{owner}/{repo}/import"], + getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories", + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] }, + ], + mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], + setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: ["PUT /repos/{owner}/{repo}/import"], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", + ], + updateImport: ["PATCH /repos/{owner}/{repo}/import"], + }, + orgs: { + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}", + ], + createInvitation: ["POST /orgs/{org}/invitations"], + createWebhook: ["POST /orgs/{org}/hooks"], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + get: ["GET /orgs/{org}"], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}", + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}", + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}", + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}", + ], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"], + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}", + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}", + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}", + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }, + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser", + ], + }, + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions", + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}", + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}", + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}", + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission", + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}", + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"], + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + ], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments", + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}", + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", + ], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + ], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + ], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + ], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", + ], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}", + ], + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions", + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + ], + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }, + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}", + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" }, + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" }, + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" }, + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" }, + ], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts", + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}", + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments", + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + ], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + ], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}", + ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate", + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] }, + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}", + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions", + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}", + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection", + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + ], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}", + ], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}", + ], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}", + ], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}", + ], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes", + ], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts", + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] }, + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes", + ], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts", + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes", + ], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions", + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection", + ], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission", + ], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}", + ], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + ], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + ], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + ], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config", + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", + ], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", + ], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + ], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + ], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + ], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + ], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + ], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" }, + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}", + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" }, + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" }, + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" }, + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" }, + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" }, + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" }, + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" }, + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection", + ], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}", + ], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + ], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}", + ], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] }, + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + ], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config", + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" }, + ], + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"], + }, + secretScanning: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts", + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", + ], + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}", + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", + ], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + ], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", + ], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}", + ], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + ], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations", + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}", + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}", + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", + ], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"], + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] }, + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] }, + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }, + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] }, + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }, + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }, + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] }, + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }, + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + list: ["GET /users"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] }, + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] }, + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] }, + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] }, + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }, + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }, + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }, + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility", + ], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"], + }, +}; +export default Endpoints; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/method-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/generated/parameters-and-response-types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js new file mode 100644 index 0000000..53d539d --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/index.js @@ -0,0 +1,18 @@ +import ENDPOINTS from "./generated/endpoints"; +import { VERSION } from "./version"; +import { endpointsToMethods } from "./endpoints-to-methods"; +export function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, ENDPOINTS); + return { + rest: api, + }; +} +restEndpointMethods.VERSION = VERSION; +export function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, ENDPOINTS); + return { + ...api, + rest: api, + }; +} +legacyRestEndpointMethods.VERSION = VERSION; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/types.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js new file mode 100644 index 0000000..80a383f --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "5.16.2"; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts new file mode 100644 index 0000000..2a97a4b --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/endpoints-to-methods.d.ts @@ -0,0 +1,4 @@ +import { Octokit } from "@octokit/core"; +import { EndpointsDefaultsAndDecorations } from "./types"; +import { RestEndpointMethods } from "./generated/method-types"; +export declare function endpointsToMethods(octokit: Octokit, endpointsMap: EndpointsDefaultsAndDecorations): RestEndpointMethods; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts new file mode 100644 index 0000000..a3c1d92 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/endpoints.d.ts @@ -0,0 +1,3 @@ +import { EndpointsDefaultsAndDecorations } from "../types"; +declare const Endpoints: EndpointsDefaultsAndDecorations; +export default Endpoints; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts new file mode 100644 index 0000000..91c55f3 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/method-types.d.ts @@ -0,0 +1,9945 @@ +import { EndpointInterface, RequestInterface } from "@octokit/types"; +import { RestEndpointMethodTypes } from "./parameters-and-response-types"; +export declare type RestEndpointMethods = { + actions: { + /** + * 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. + */ + addCustomLabelsToSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + addCustomLabelsToSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["addCustomLabelsToSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. 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. + */ + addSelectedRepoToOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + * + * 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. + */ + approveWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["approveWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + cancelWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["cancelWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates an environment secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + * this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["actions"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * 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 + * ``` + */ + createRegistrationTokenForOrg: { + (params?: RestEndpointMethodTypes["actions"]["createRegistrationTokenForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. 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 + * ``` + */ + createRegistrationTokenForRepo: { + (params?: RestEndpointMethodTypes["actions"]["createRegistrationTokenForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour. + * + * 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 + * ``` + */ + createRemoveTokenForOrg: { + (params?: RestEndpointMethodTypes["actions"]["createRemoveTokenForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 + * ``` + */ + createRemoveTokenForRepo: { + (params?: RestEndpointMethodTypes["actions"]["createRemoveTokenForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + * + * 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)." + */ + createWorkflowDispatch: { + (params?: RestEndpointMethodTypes["actions"]["createWorkflowDispatch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a GitHub Actions cache for a repository, using a cache ID. + * + * 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. + */ + deleteActionsCacheById: { + (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheById"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes one or more GitHub Actions caches for a repository, using a complete cache key. By default, all caches that match the provided key are deleted, but you can optionally provide a Git ref to restrict deletions to caches that match both the provided key and the Git ref. + * + * 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. + */ + deleteActionsCacheByKey: { + (params?: RestEndpointMethodTypes["actions"]["deleteActionsCacheByKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteArtifact: { + (params?: RestEndpointMethodTypes["actions"]["deleteArtifact"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + deleteEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + deleteOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["actions"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + deleteSelfHostedRunnerFromOrg: { + (params?: RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Forces the removal of a self-hosted runner from a repository. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + * + * You must authenticate using an access token with the `repo` + * scope to use this endpoint. + */ + deleteSelfHostedRunnerFromRepo: { + (params?: RestEndpointMethodTypes["actions"]["deleteSelfHostedRunnerFromRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["deleteWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteWorkflowRunLogs: { + (params?: RestEndpointMethodTypes["actions"]["deleteWorkflowRunLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * 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. + */ + disableSelectedRepositoryGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["disableSelectedRepositoryGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables a workflow and sets the `state` of the workflow to `disabled_manually`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * 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. + */ + disableWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["disableWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in + * the response header to find the URL for the download. The `:archive_format` must be `zip`. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + downloadArtifact: { + (params?: RestEndpointMethodTypes["actions"]["downloadArtifact"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a plain text file of logs for a workflow job. This link expires after 1 minute. Look + * for `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can + * use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must + * have the `actions:read` permission to use this endpoint. + */ + downloadJobLogsForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["downloadJobLogsForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + downloadWorkflowRunAttemptLogs: { + (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunAttemptLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download an archive of log files for a workflow run. This link expires after 1 minute. Look for + * `Location:` in the response header to find the URL for the download. Anyone with read access to the repository can use + * this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have + * the `actions:read` permission to use this endpoint. + */ + downloadWorkflowRunLogs: { + (params?: RestEndpointMethodTypes["actions"]["downloadWorkflowRunLogs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * 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. + */ + enableSelectedRepositoryGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["enableSelectedRepositoryGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables a workflow and sets the `state` of the workflow to `active`. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + * + * 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. + */ + enableWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["enableWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getActionsCacheList: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheList"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getActionsCacheUsage: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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. + */ + getActionsCacheUsageByRepoForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageByRepoForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getActionsCacheUsageForEnterprise: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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. + */ + getActionsCacheUsageForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getActionsCacheUsageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * + * 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. + */ + getAllowedActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getAllowedActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the settings for selected actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * 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. + */ + getAllowedActionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getAllowedActionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific artifact for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getArtifact: { + (params?: RestEndpointMethodTypes["actions"]["getArtifact"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the public key for an environment, which you need to encrypt environment secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + getEnvironmentPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single environment secret without revealing its encrypted value. 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. + */ + getEnvironmentSecret: { + (params?: RestEndpointMethodTypes["actions"]["getEnvironmentSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getGithubActionsDefaultWorkflowPermissionsEnterprise: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * 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. + */ + getGithubActionsDefaultWorkflowPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * 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. + */ + getGithubActionsDefaultWorkflowPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * 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. + */ + getGithubActionsPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * 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. + */ + getGithubActionsPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["getGithubActionsPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific job in a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getJobForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["getJobForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. 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. + */ + getOrgPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getOrgPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. + */ + getOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["getOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get all deployment environments for a workflow run that are waiting for protection rules to pass. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getPendingDeploymentsForRun: { + (params?: RestEndpointMethodTypes["actions"]["getPendingDeploymentsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the GitHub Actions permissions policy for a repository, including whether GitHub Actions is enabled and the actions and reusable workflows allowed to run in the repository. + * + * 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. + * @deprecated octokit.rest.actions.getRepoPermissions() has been renamed to octokit.rest.actions.getGithubActionsPermissionsRepository() (2020-11-10) + */ + getRepoPermissions: { + (params?: RestEndpointMethodTypes["actions"]["getRepoPermissions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `secrets` repository permission to use this endpoint. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["actions"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single repository secret without revealing its encrypted value. 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. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["actions"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getReviewsForRun: { + (params?: RestEndpointMethodTypes["actions"]["getReviewsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["getSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["getSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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. + */ + getWorkflowAccessToRepository: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowAccessToRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. + */ + getWorkflowRunAttempt: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunAttempt"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getWorkflowRunUsage: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowRunUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getWorkflowUsage: { + (params?: RestEndpointMethodTypes["actions"]["getWorkflowUsage"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all artifacts for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + listArtifactsForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listArtifactsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available in an environment without revealing their encrypted values. 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. + */ + listEnvironmentSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listEnvironmentSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + */ + listJobsForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["listJobsForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + */ + listJobsForWorkflowRunAttempt: { + (params?: RestEndpointMethodTypes["actions"]["listJobsForWorkflowRunAttempt"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + listLabelsForSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listLabelsForSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + listLabelsForSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listLabelsForSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available in an organization without revealing their encrypted values. 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. + */ + listOrgSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listOrgSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["actions"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the workflows in a repository. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + listRepoWorkflows: { + (params?: RestEndpointMethodTypes["actions"]["listRepoWorkflows"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + listRunnerApplicationsForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listRunnerApplicationsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + listRunnerApplicationsForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listRunnerApplicationsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. 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. + */ + listSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["listSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * 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. + */ + listSelectedRepositoriesEnabledGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["listSelectedRepositoriesEnabledGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listSelfHostedRunnersForOrg: { + (params?: RestEndpointMethodTypes["actions"]["listSelfHostedRunnersForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + listSelfHostedRunnersForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listSelfHostedRunnersForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + listWorkflowRunArtifacts: { + (params?: RestEndpointMethodTypes["actions"]["listWorkflowRunArtifacts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/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. + */ + listWorkflowRuns: { + (params?: RestEndpointMethodTypes["actions"]["listWorkflowRuns"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/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. + */ + listWorkflowRunsForRepo: { + (params?: RestEndpointMethodTypes["actions"]["listWorkflowRunsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Re-run a job and its dependent jobs in a workflow run. 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. + */ + reRunJobForWorkflowRun: { + (params?: RestEndpointMethodTypes["actions"]["reRunJobForWorkflowRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + reRunWorkflow: { + (params?: RestEndpointMethodTypes["actions"]["reRunWorkflow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. + */ + reRunWorkflowFailedJobs: { + (params?: RestEndpointMethodTypes["actions"]["reRunWorkflowFailedJobs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + removeAllCustomLabelsFromSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["removeAllCustomLabelsFromSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + removeAllCustomLabelsFromSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["removeAllCustomLabelsFromSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + removeCustomLabelFromSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["removeCustomLabelFromSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + removeCustomLabelFromSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["removeCustomLabelFromSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/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. + */ + removeSelectedRepoFromOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["removeSelectedRepoFromOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + reviewPendingDeploymentsForRun: { + (params?: RestEndpointMethodTypes["actions"]["reviewPendingDeploymentsForRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * 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. + */ + setAllowedActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setAllowedActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the actions and reusable workflows that are allowed in a repository. To use this endpoint, the repository permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for a repository](#set-github-actions-permissions-for-a-repository)." + * + * 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. + */ + setAllowedActionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setAllowedActionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + setCustomLabelsForSelfHostedRunnerForOrg: { + (params?: RestEndpointMethodTypes["actions"]["setCustomLabelsForSelfHostedRunnerForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + setCustomLabelsForSelfHostedRunnerForRepo: { + (params?: RestEndpointMethodTypes["actions"]["setCustomLabelsForSelfHostedRunnerForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setGithubActionsDefaultWorkflowPermissionsEnterprise: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." + * + * 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. + */ + setGithubActionsDefaultWorkflowPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * 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. + */ + setGithubActionsDefaultWorkflowPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsDefaultWorkflowPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an organization. + * + * 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. + */ + setGithubActionsPermissionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsPermissionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions and reusable workflows in the repository. + * + * 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. + */ + setGithubActionsPermissionsRepository: { + (params?: RestEndpointMethodTypes["actions"]["setGithubActionsPermissionsRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/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. + */ + setSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["actions"]["setSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * + * 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. + */ + setSelectedRepositoriesEnabledGithubActionsOrganization: { + (params?: RestEndpointMethodTypes["actions"]["setSelectedRepositoriesEnabledGithubActionsOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to 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. + */ + setWorkflowAccessToRepository: { + (params?: RestEndpointMethodTypes["actions"]["setWorkflowAccessToRepository"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + activity: { + checkRepoIsStarredByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["checkRepoIsStarredByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://docs.github.com/rest/reference/activity#set-a-repository-subscription). + */ + deleteRepoSubscription: { + (params?: RestEndpointMethodTypes["activity"]["deleteRepoSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. + */ + deleteThreadSubscription: { + (params?: RestEndpointMethodTypes["activity"]["deleteThreadSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getFeeds: { + (params?: RestEndpointMethodTypes["activity"]["getFeeds"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getRepoSubscription: { + (params?: RestEndpointMethodTypes["activity"]["getRepoSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getThread: { + (params?: RestEndpointMethodTypes["activity"]["getThread"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/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. + */ + getThreadSubscriptionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["getThreadSubscriptionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + listEventsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listEventsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all notifications for the current user, sorted by most recently updated. + */ + listNotificationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listNotificationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + listOrgEventsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listOrgEventsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + listPublicEvents: { + (params?: RestEndpointMethodTypes["activity"]["listPublicEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPublicEventsForRepoNetwork: { + (params?: RestEndpointMethodTypes["activity"]["listPublicEventsForRepoNetwork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPublicEventsForUser: { + (params?: RestEndpointMethodTypes["activity"]["listPublicEventsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPublicOrgEvents: { + (params?: RestEndpointMethodTypes["activity"]["listPublicOrgEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + */ + listReceivedEventsForUser: { + (params?: RestEndpointMethodTypes["activity"]["listReceivedEventsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listReceivedPublicEventsForUser: { + (params?: RestEndpointMethodTypes["activity"]["listReceivedPublicEventsForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listRepoEvents: { + (params?: RestEndpointMethodTypes["activity"]["listRepoEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all notifications for the current user. + */ + listRepoNotificationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listRepoNotificationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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: + */ + listReposStarredByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listReposStarredByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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: + */ + listReposStarredByUser: { + (params?: RestEndpointMethodTypes["activity"]["listReposStarredByUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories a user is watching. + */ + listReposWatchedByUser: { + (params?: RestEndpointMethodTypes["activity"]["listReposWatchedByUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people that have starred the repository. + * + * 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: + */ + listStargazersForRepo: { + (params?: RestEndpointMethodTypes["activity"]["listStargazersForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories the authenticated user is watching. + */ + listWatchedReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["listWatchedReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people watching the specified repository. + */ + listWatchersForRepo: { + (params?: RestEndpointMethodTypes["activity"]["listWatchersForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Marks all notifications as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + markNotificationsAsRead: { + (params?: RestEndpointMethodTypes["activity"]["markNotificationsAsRead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List repository notifications for the authenticated user](https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. + */ + markRepoNotificationsAsRead: { + (params?: RestEndpointMethodTypes["activity"]["markRepoNotificationsAsRead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + markThreadAsRead: { + (params?: RestEndpointMethodTypes["activity"]["markThreadAsRead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. + */ + setRepoSubscription: { + (params?: RestEndpointMethodTypes["activity"]["setRepoSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**. + * + * You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored. + * + * Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/reference/activity#delete-a-thread-subscription) endpoint. + */ + setThreadSubscription: { + (params?: RestEndpointMethodTypes["activity"]["setThreadSubscription"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + starRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["starRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + unstarRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["activity"]["unstarRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + apps: { + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * 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. + * @deprecated octokit.rest.apps.addRepoToInstallation() has been renamed to octokit.rest.apps.addRepoToInstallationForAuthenticatedUser() (2021-10-05) + */ + addRepoToInstallation: { + (params?: RestEndpointMethodTypes["apps"]["addRepoToInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * 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. + */ + addRepoToInstallationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["addRepoToInstallationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + checkToken: { + (params?: RestEndpointMethodTypes["apps"]["checkToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + createFromManifest: { + (params?: RestEndpointMethodTypes["apps"]["createFromManifest"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. 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. + */ + createInstallationAccessToken: { + (params?: RestEndpointMethodTypes["apps"]["createInstallationAccessToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + deleteAuthorization: { + (params?: RestEndpointMethodTypes["apps"]["deleteAuthorization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/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. + */ + deleteInstallation: { + (params?: RestEndpointMethodTypes["apps"]["deleteInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + */ + deleteToken: { + (params?: RestEndpointMethodTypes["apps"]["deleteToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/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. + */ + getAuthenticated: { + (params?: RestEndpointMethodTypes["apps"]["getAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * 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. + */ + getBySlug: { + (params?: RestEndpointMethodTypes["apps"]["getBySlug"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find an installation's information using the installation id. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getOrgInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getOrgInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getRepoInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getRepoInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + getSubscriptionPlanForAccount: { + (params?: RestEndpointMethodTypes["apps"]["getSubscriptionPlanForAccount"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + getSubscriptionPlanForAccountStubbed: { + (params?: RestEndpointMethodTypes["apps"]["getSubscriptionPlanForAccountStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getUserInstallation: { + (params?: RestEndpointMethodTypes["apps"]["getUserInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getWebhookConfigForApp: { + (params?: RestEndpointMethodTypes["apps"]["getWebhookConfigForApp"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["apps"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsForPlan: { + (params?: RestEndpointMethodTypes["apps"]["listAccountsForPlan"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsForPlanStubbed: { + (params?: RestEndpointMethodTypes["apps"]["listAccountsForPlanStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * 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. + */ + listInstallationReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["listInstallationReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must 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. + */ + listInstallations: { + (params?: RestEndpointMethodTypes["apps"]["listInstallations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * 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. + */ + listInstallationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["listInstallationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlans: { + (params?: RestEndpointMethodTypes["apps"]["listPlans"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all plans that are part of your GitHub Marketplace listing. + * + * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlansStubbed: { + (params?: RestEndpointMethodTypes["apps"]["listPlansStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List repositories that an app installation can access. + * + * 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. + */ + listReposAccessibleToInstallation: { + (params?: RestEndpointMethodTypes["apps"]["listReposAccessibleToInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/). + */ + listSubscriptionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["listSubscriptionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/). + */ + listSubscriptionsForAuthenticatedUserStubbed: { + (params?: RestEndpointMethodTypes["apps"]["listSubscriptionsForAuthenticatedUserStubbed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["apps"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a delivery for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["apps"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * 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. + * @deprecated octokit.rest.apps.removeRepoFromInstallation() has been renamed to octokit.rest.apps.removeRepoFromInstallationForAuthenticatedUser() (2021-10-05) + */ + removeRepoFromInstallation: { + (params?: RestEndpointMethodTypes["apps"]["removeRepoFromInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * 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. + */ + removeRepoFromInstallationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["apps"]["removeRepoFromInstallationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + resetToken: { + (params?: RestEndpointMethodTypes["apps"]["resetToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/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. + */ + revokeInstallationAccessToken: { + (params?: RestEndpointMethodTypes["apps"]["revokeInstallationAccessToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + scopeToken: { + (params?: RestEndpointMethodTypes["apps"]["scopeToken"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + suspendInstallation: { + (params?: RestEndpointMethodTypes["apps"]["suspendInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a GitHub App installation suspension. + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + unsuspendInstallation: { + (params?: RestEndpointMethodTypes["apps"]["unsuspendInstallation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." + * + * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + updateWebhookConfigForApp: { + (params?: RestEndpointMethodTypes["apps"]["updateWebhookConfigForApp"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + billing: { + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + getGithubActionsBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getGithubActionsBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the summary of the free and paid GitHub Actions minutes used. + * + * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * + * Access tokens must have the `user` scope. + */ + getGithubActionsBillingUser: { + (params?: RestEndpointMethodTypes["billing"]["getGithubActionsBillingUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getGithubAdvancedSecurityBillingGhe: { + (params?: RestEndpointMethodTypes["billing"]["getGithubAdvancedSecurityBillingGhe"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getGithubAdvancedSecurityBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getGithubAdvancedSecurityBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + getGithubPackagesBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getGithubPackagesBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the free and paid storage used for GitHub Packages in gigabytes. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + getGithubPackagesBillingUser: { + (params?: RestEndpointMethodTypes["billing"]["getGithubPackagesBillingUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `repo` or `admin:org` scope. + */ + getSharedStorageBillingOrg: { + (params?: RestEndpointMethodTypes["billing"]["getSharedStorageBillingOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the estimated paid and estimated total storage used for GitHub Actions and GitHub Packages. + * + * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * + * Access tokens must have the `user` scope. + */ + getSharedStorageBillingUser: { + (params?: RestEndpointMethodTypes["billing"]["getSharedStorageBillingUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + checks: { + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. + * + * In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs. + */ + create: { + (params?: RestEndpointMethodTypes["checks"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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. + */ + createSuite: { + (params?: RestEndpointMethodTypes["checks"]["createSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * 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: { + (params?: RestEndpointMethodTypes["checks"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array 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. + */ + getSuite: { + (params?: RestEndpointMethodTypes["checks"]["getSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listAnnotations: { + (params?: RestEndpointMethodTypes["checks"]["listAnnotations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForRef: { + (params?: RestEndpointMethodTypes["checks"]["listForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a 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. + */ + listForSuite: { + (params?: RestEndpointMethodTypes["checks"]["listForSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array 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. + */ + listSuitesForRef: { + (params?: RestEndpointMethodTypes["checks"]["listSuitesForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * 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. + */ + rerequestRun: { + (params?: RestEndpointMethodTypes["checks"]["rerequestRun"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * 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. + */ + rerequestSuite: { + (params?: RestEndpointMethodTypes["checks"]["rerequestSuite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { + (params?: RestEndpointMethodTypes["checks"]["setSuitesPreferences"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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. + */ + update: { + (params?: RestEndpointMethodTypes["checks"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codeScanning: { + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `analysis_key` + * * `environment` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + deleteAnalysis: { + (params?: RestEndpointMethodTypes["codeScanning"]["deleteAnalysis"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + getAlert: { + (params?: RestEndpointMethodTypes["codeScanning"]["getAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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). + */ + getAnalysis: { + (params?: RestEndpointMethodTypes["codeScanning"]["getAnalysis"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/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. + */ + getSarif: { + (params?: RestEndpointMethodTypes["codeScanning"]["getSarif"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listAlertInstances: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertInstances"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all code scanning alerts for the default branch (usually `main` + * or `master`) for all eligible repositories in an organization. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all open code scanning alerts for the default branch (usually `main` + * or `master`). You must use an access token with the `security_events` scope to use + * this endpoint with private repos, the `public_repo` scope also grants permission to read + * security events on public repos only. GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch or for the specified Git reference + * (if you used `ref` in the request). + */ + listAlertsForRepo: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all instances of the specified code scanning alert. + * 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. + * @deprecated octokit.rest.codeScanning.listAlertsInstances() has been renamed to octokit.rest.codeScanning.listAlertInstances() (2021-04-30) + */ + listAlertsInstances: { + (params?: RestEndpointMethodTypes["codeScanning"]["listAlertsInstances"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the 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. + */ + listRecentAnalyses: { + (params?: RestEndpointMethodTypes["codeScanning"]["listRecentAnalyses"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateAlert: { + (params?: RestEndpointMethodTypes["codeScanning"]["updateAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. 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)." + */ + uploadSarif: { + (params?: RestEndpointMethodTypes["codeScanning"]["uploadSarif"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codesOfConduct: { + getAllCodesOfConduct: { + (params?: RestEndpointMethodTypes["codesOfConduct"]["getAllCodesOfConduct"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getConductCode: { + (params?: RestEndpointMethodTypes["codesOfConduct"]["getConductCode"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + codespaces: { + /** + * Adds a repository to the selected repositories for a user's 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. + */ + addRepositoryForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["addRepositoryForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + codespaceMachinesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["codespaceMachinesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new codespace, owned by the authenticated user. + * + * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * + * 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. + */ + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). 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 [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example 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) + * ``` + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a codespace owned by the authenticated user for the specified pull request. + * + * 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. + */ + createWithPrForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createWithPrForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a codespace owned by the authenticated user in the specified repository. + * + * 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. + */ + createWithRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["createWithRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + deleteFromOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteFromOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["deleteSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * + * 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. + */ + exportForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["exportForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getExportDetailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getExportDetailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. + * + * 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. + */ + getPublicKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getPublicKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `codespaces_secrets` repository permission to use this endpoint. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["codespaces"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["codespaces"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["getSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the devcontainer.json files associated with a specified repository and the authenticated user. These files + * specify launchpoint configurations for codespaces created within the repository. + * + * 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. + */ + listDevcontainersInRepositoryForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listDevcontainersInRepositoryForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces associated to a specified organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + listInOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["listInOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the codespaces associated to a specified repository and the authenticated user. + * + * 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. + */ + listInRepositoryForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listInRepositoryForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["codespaces"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the repositories that have been granted the ability to use a user's 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. + */ + listRepositoriesForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listRepositoriesForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listSecretsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["listSecretsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + removeRepositoryForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["removeRepositoryForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + repoMachinesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["repoMachinesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setRepositoriesForSecretForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["setRepositoriesForSecretForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + startForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["startForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + stopForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["stopForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Stops a user's codespace. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + stopInOrganization: { + (params?: RestEndpointMethodTypes["codespaces"]["stopInOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * + * If you specify a new machine type it will be applied the next time your codespace is started. + * + * 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. + */ + updateForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["codespaces"]["updateForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + dependabot: { + /** + * Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/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. + */ + addSelectedRepoToOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["addSelectedRepoToOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["createOrUpdateOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + createOrUpdateRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["createOrUpdateRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + deleteOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["deleteOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. + */ + deleteRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["deleteRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. 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. + */ + getOrgPublicKey: { + (params?: RestEndpointMethodTypes["dependabot"]["getOrgPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. + */ + getOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["getOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. 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. + */ + getRepoPublicKey: { + (params?: RestEndpointMethodTypes["dependabot"]["getRepoPublicKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getRepoSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["getRepoSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listOrgSecrets: { + (params?: RestEndpointMethodTypes["dependabot"]["listOrgSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all secrets available in a repository without revealing their encrypted values. 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. + */ + listRepoSecrets: { + (params?: RestEndpointMethodTypes["dependabot"]["listRepoSecrets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. 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. + */ + listSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["listSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/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. + */ + removeSelectedRepoFromOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["removeSelectedRepoFromOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/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. + */ + setSelectedReposForOrgSecret: { + (params?: RestEndpointMethodTypes["dependabot"]["setSelectedReposForOrgSecret"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + dependencyGraph: { + /** + * 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. + */ + createRepositorySnapshot: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["createRepositorySnapshot"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. + */ + diffRange: { + (params?: RestEndpointMethodTypes["dependencyGraph"]["diffRange"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + emojis: { + /** + * Lists all the emojis available to use on GitHub. + */ + get: { + (params?: RestEndpointMethodTypes["emojis"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + enterpriseAdmin: { + /** + * 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. + */ + addCustomLabelsToSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["addCustomLabelsToSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + disableSelectedOrganizationGithubActionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["disableSelectedOrganizationGithubActionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + enableSelectedOrganizationGithubActionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["enableSelectedOrganizationGithubActionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getAllowedActionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["getAllowedActionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getGithubActionsPermissionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["getGithubActionsPermissionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getServerStatistics: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["getServerStatistics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listLabelsForSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["listLabelsForSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listSelectedOrganizationsEnabledGithubActionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["listSelectedOrganizationsEnabledGithubActionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["removeAllCustomLabelsFromSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + removeCustomLabelFromSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["removeCustomLabelFromSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setAllowedActionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["setAllowedActionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + setCustomLabelsForSelfHostedRunnerForEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["setCustomLabelsForSelfHostedRunnerForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setGithubActionsPermissionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["setGithubActionsPermissionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + setSelectedOrganizationsEnabledGithubActionsEnterprise: { + (params?: RestEndpointMethodTypes["enterpriseAdmin"]["setSelectedOrganizationsEnabledGithubActionsEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + gists: { + checkIsStarred: { + (params?: RestEndpointMethodTypes["gists"]["checkIsStarred"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + */ + create: { + (params?: RestEndpointMethodTypes["gists"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createComment: { + (params?: RestEndpointMethodTypes["gists"]["createComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + delete: { + (params?: RestEndpointMethodTypes["gists"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteComment: { + (params?: RestEndpointMethodTypes["gists"]["deleteComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: This was previously `/gists/:gist_id/fork`. + */ + fork: { + (params?: RestEndpointMethodTypes["gists"]["fork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + get: { + (params?: RestEndpointMethodTypes["gists"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getComment: { + (params?: RestEndpointMethodTypes["gists"]["getComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getRevision: { + (params?: RestEndpointMethodTypes["gists"]["getRevision"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: + */ + list: { + (params?: RestEndpointMethodTypes["gists"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listComments: { + (params?: RestEndpointMethodTypes["gists"]["listComments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listCommits: { + (params?: RestEndpointMethodTypes["gists"]["listCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists public gists for the specified user: + */ + listForUser: { + (params?: RestEndpointMethodTypes["gists"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listForks: { + (params?: RestEndpointMethodTypes["gists"]["listForks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/rest/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. + */ + listPublic: { + (params?: RestEndpointMethodTypes["gists"]["listPublic"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the authenticated user's starred gists: + */ + listStarred: { + (params?: RestEndpointMethodTypes["gists"]["listStarred"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + star: { + (params?: RestEndpointMethodTypes["gists"]["star"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + unstar: { + (params?: RestEndpointMethodTypes["gists"]["unstar"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. + */ + update: { + (params?: RestEndpointMethodTypes["gists"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateComment: { + (params?: RestEndpointMethodTypes["gists"]["updateComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + git: { + createBlob: { + (params?: RestEndpointMethodTypes["git"]["createBlob"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/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. | + */ + createCommit: { + (params?: RestEndpointMethodTypes["git"]["createCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + */ + createRef: { + (params?: RestEndpointMethodTypes["git"]["createRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/rest/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. | + */ + createTag: { + (params?: RestEndpointMethodTypes["git"]["createTag"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. + * + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://docs.github.com/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/rest/reference/git#update-a-reference)." + */ + createTree: { + (params?: RestEndpointMethodTypes["git"]["createTree"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteRef: { + (params?: RestEndpointMethodTypes["git"]["deleteRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + getBlob: { + (params?: RestEndpointMethodTypes["git"]["getBlob"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a Git [commit object](https://git-scm.com/book/en/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. | + */ + getCommit: { + (params?: RestEndpointMethodTypes["git"]["getCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/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)". + */ + getRef: { + (params?: RestEndpointMethodTypes["git"]["getRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on 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. | + */ + getTag: { + (params?: RestEndpointMethodTypes["git"]["getTag"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getTree: { + (params?: RestEndpointMethodTypes["git"]["getTree"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. + * + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/rest/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`. + */ + listMatchingRefs: { + (params?: RestEndpointMethodTypes["git"]["listMatchingRefs"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateRef: { + (params?: RestEndpointMethodTypes["git"]["updateRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + gitignore: { + /** + * List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user). + */ + getAllTemplates: { + (params?: RestEndpointMethodTypes["gitignore"]["getAllTemplates"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getTemplate: { + (params?: RestEndpointMethodTypes["gitignore"]["getTemplate"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + interactions: { + /** + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + */ + getRestrictionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. + */ + getRestrictionsForOrg: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + */ + getRestrictionsForRepo: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows which type of GitHub user can interact with your public repositories and when the restriction expires. + * @deprecated octokit.rest.interactions.getRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.getRestrictionsForAuthenticatedUser() (2021-02-02) + */ + getRestrictionsForYourPublicRepos: { + (params?: RestEndpointMethodTypes["interactions"]["getRestrictionsForYourPublicRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes any interaction restrictions from your public repositories. + */ + removeRestrictionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + */ + removeRestrictionsForOrg: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + removeRestrictionsForRepo: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes any interaction restrictions from your public repositories. + * @deprecated octokit.rest.interactions.removeRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.removeRestrictionsForAuthenticatedUser() (2021-02-02) + */ + removeRestrictionsForYourPublicRepos: { + (params?: RestEndpointMethodTypes["interactions"]["removeRestrictionsForYourPublicRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + */ + setRestrictionsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. + */ + setRestrictionsForOrg: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. + */ + setRestrictionsForRepo: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. + * @deprecated octokit.rest.interactions.setRestrictionsForYourPublicRepos() has been renamed to octokit.rest.interactions.setRestrictionsForAuthenticatedUser() (2021-02-02) + */ + setRestrictionsForYourPublicRepos: { + (params?: RestEndpointMethodTypes["interactions"]["setRestrictionsForYourPublicRepos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + issues: { + /** + * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + */ + addAssignees: { + (params?: RestEndpointMethodTypes["issues"]["addAssignees"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + addLabels: { + (params?: RestEndpointMethodTypes["issues"]["addLabels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks if a user has permission to be assigned to an issue in this repository. + * + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * + * Otherwise a `404` status code is returned. + */ + checkUserCanBeAssigned: { + (params?: RestEndpointMethodTypes["issues"]["checkUserCanBeAssigned"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + create: { + (params?: RestEndpointMethodTypes["issues"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + createComment: { + (params?: RestEndpointMethodTypes["issues"]["createComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createLabel: { + (params?: RestEndpointMethodTypes["issues"]["createLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createMilestone: { + (params?: RestEndpointMethodTypes["issues"]["createMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteComment: { + (params?: RestEndpointMethodTypes["issues"]["deleteComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteLabel: { + (params?: RestEndpointMethodTypes["issues"]["deleteLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteMilestone: { + (params?: RestEndpointMethodTypes["issues"]["deleteMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + get: { + (params?: RestEndpointMethodTypes["issues"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getComment: { + (params?: RestEndpointMethodTypes["issues"]["getComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getEvent: { + (params?: RestEndpointMethodTypes["issues"]["getEvent"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getLabel: { + (params?: RestEndpointMethodTypes["issues"]["getLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getMilestone: { + (params?: RestEndpointMethodTypes["issues"]["getMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues assigned to the authenticated user across all visible repositories including owned repositories, member + * repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not + * necessarily assigned to you. + * + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + list: { + (params?: RestEndpointMethodTypes["issues"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + */ + listAssignees: { + (params?: RestEndpointMethodTypes["issues"]["listAssignees"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Issue Comments are ordered by ascending ID. + */ + listComments: { + (params?: RestEndpointMethodTypes["issues"]["listComments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * By default, Issue Comments are ordered by ascending ID. + */ + listCommentsForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listCommentsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listEvents: { + (params?: RestEndpointMethodTypes["issues"]["listEvents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listEventsForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listEventsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listEventsForTimeline: { + (params?: RestEndpointMethodTypes["issues"]["listEventsForTimeline"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues across owned and member repositories assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["issues"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues in an organization assigned to the authenticated user. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["issues"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List issues in a repository. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this + * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by + * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull + * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + */ + listForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listLabelsForMilestone: { + (params?: RestEndpointMethodTypes["issues"]["listLabelsForMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listLabelsForRepo: { + (params?: RestEndpointMethodTypes["issues"]["listLabelsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listLabelsOnIssue: { + (params?: RestEndpointMethodTypes["issues"]["listLabelsOnIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listMilestones: { + (params?: RestEndpointMethodTypes["issues"]["listMilestones"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access can lock an issue or pull request's conversation. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + lock: { + (params?: RestEndpointMethodTypes["issues"]["lock"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + removeAllLabels: { + (params?: RestEndpointMethodTypes["issues"]["removeAllLabels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes one or more assignees from an issue. + */ + removeAssignees: { + (params?: RestEndpointMethodTypes["issues"]["removeAssignees"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + */ + removeLabel: { + (params?: RestEndpointMethodTypes["issues"]["removeLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes any previous labels and sets the new labels for an issue. + */ + setLabels: { + (params?: RestEndpointMethodTypes["issues"]["setLabels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access can unlock an issue's conversation. + */ + unlock: { + (params?: RestEndpointMethodTypes["issues"]["unlock"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Issue owners and users with push access can edit an issue. + */ + update: { + (params?: RestEndpointMethodTypes["issues"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateComment: { + (params?: RestEndpointMethodTypes["issues"]["updateComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateLabel: { + (params?: RestEndpointMethodTypes["issues"]["updateLabel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateMilestone: { + (params?: RestEndpointMethodTypes["issues"]["updateMilestone"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + licenses: { + get: { + (params?: RestEndpointMethodTypes["licenses"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getAllCommonlyUsed: { + (params?: RestEndpointMethodTypes["licenses"]["getAllCommonlyUsed"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * 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. + */ + getForRepo: { + (params?: RestEndpointMethodTypes["licenses"]["getForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + markdown: { + render: { + (params?: RestEndpointMethodTypes["markdown"]["render"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + */ + renderRaw: { + (params?: RestEndpointMethodTypes["markdown"]["renderRaw"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + meta: { + /** + * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * + * **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: { + (params?: RestEndpointMethodTypes["meta"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the octocat as ASCII art + */ + getOctocat: { + (params?: RestEndpointMethodTypes["meta"]["getOctocat"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a random sentence from the Zen of GitHub + */ + getZen: { + (params?: RestEndpointMethodTypes["meta"]["getZen"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get Hypermedia links to resources accessible in GitHub's REST API + */ + root: { + (params?: RestEndpointMethodTypes["meta"]["root"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + migrations: { + /** + * Stop an import for a repository. + */ + cancelImport: { + (params?: RestEndpointMethodTypes["migrations"]["cancelImport"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + deleteArchiveForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["deleteArchiveForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + deleteArchiveForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["deleteArchiveForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches the URL to a migration archive. + */ + downloadArchiveForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["downloadArchiveForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + getArchiveForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["getArchiveForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getCommitAuthors: { + (params?: RestEndpointMethodTypes["migrations"]["getCommitAuthors"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getImportStatus: { + (params?: RestEndpointMethodTypes["migrations"]["getImportStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List files larger than 100MB found during the import + */ + getLargeFiles: { + (params?: RestEndpointMethodTypes["migrations"]["getLargeFiles"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive). + */ + getStatusForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["getStatusForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. + */ + getStatusForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["getStatusForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all migrations a user has started. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the most recent migrations. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all the repositories for this user migration. + */ + listReposForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all the repositories for this organization migration. + */ + listReposForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all the repositories for this user migration. + * @deprecated octokit.rest.migrations.listReposForUser() has been renamed to octokit.rest.migrations.listReposForAuthenticatedUser() (2021-10-05) + */ + listReposForUser: { + (params?: RestEndpointMethodTypes["migrations"]["listReposForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + */ + mapCommitAuthor: { + (params?: RestEndpointMethodTypes["migrations"]["mapCommitAuthor"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/). + */ + setLfsPreference: { + (params?: RestEndpointMethodTypes["migrations"]["setLfsPreference"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Initiates the generation of a user migration archive. + */ + startForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["startForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Initiates the generation of a migration archive. + */ + startForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["startForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Start a source import to a GitHub repository using GitHub Importer. + */ + startImport: { + (params?: RestEndpointMethodTypes["migrations"]["startImport"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/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. + */ + unlockRepoForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["migrations"]["unlockRepoForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. + */ + unlockRepoForOrg: { + (params?: RestEndpointMethodTypes["migrations"]["unlockRepoForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + updateImport: { + (params?: RestEndpointMethodTypes["migrations"]["updateImport"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + orgs: { + blockUser: { + (params?: RestEndpointMethodTypes["orgs"]["blockUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + */ + cancelInvitation: { + (params?: RestEndpointMethodTypes["orgs"]["cancelInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkBlockedUser: { + (params?: RestEndpointMethodTypes["orgs"]["checkBlockedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Check if a user is, publicly or privately, a member of the organization. + */ + checkMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["checkMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkPublicMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["checkPublicMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/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)." + */ + convertMemberToOutsideCollaborator: { + (params?: RestEndpointMethodTypes["orgs"]["convertMemberToOutsideCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + createInvitation: { + (params?: RestEndpointMethodTypes["orgs"]["createInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Here's how you can create a hook that posts payloads in JSON format: + */ + createWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["createWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["deleteWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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: { + (params?: RestEndpointMethodTypes["orgs"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["getMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. + */ + getMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["getMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)." + */ + getWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/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. + */ + getWebhookConfigForOrg: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhookConfigForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a delivery for a webhook configured in an organization. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["orgs"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all organizations, in the order that they were created on GitHub. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + list: { + (params?: RestEndpointMethodTypes["orgs"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. + */ + listAppInstallations: { + (params?: RestEndpointMethodTypes["orgs"]["listAppInstallations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the users blocked by an organization. + */ + listBlockedUsers: { + (params?: RestEndpointMethodTypes["orgs"]["listBlockedUsers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. + * + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + */ + listCustomRoles: { + (params?: RestEndpointMethodTypes["orgs"]["listCustomRoles"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. + */ + listFailedInvitations: { + (params?: RestEndpointMethodTypes["orgs"]["listFailedInvitations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List organizations for the authenticated user. + * + * **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. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + */ + listForUser: { + (params?: RestEndpointMethodTypes["orgs"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + */ + listInvitationTeams: { + (params?: RestEndpointMethodTypes["orgs"]["listInvitationTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + */ + listMembers: { + (params?: RestEndpointMethodTypes["orgs"]["listMembers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listMembershipsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["listMembershipsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all users who are outside collaborators of an organization. + */ + listOutsideCollaborators: { + (params?: RestEndpointMethodTypes["orgs"]["listOutsideCollaborators"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listPendingInvitations: { + (params?: RestEndpointMethodTypes["orgs"]["listPendingInvitations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Members of an organization can choose to have their membership publicized or not. + */ + listPublicMembers: { + (params?: RestEndpointMethodTypes["orgs"]["listPublicMembers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a list of webhook deliveries for a webhook configured in an organization. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["orgs"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listWebhooks: { + (params?: RestEndpointMethodTypes["orgs"]["listWebhooks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["pingWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a delivery for a webhook configured in an organization. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["orgs"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + */ + removeMember: { + (params?: RestEndpointMethodTypes["orgs"]["removeMember"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + removeMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["removeMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removing a user from this list will remove them from all the organization's repositories. + */ + removeOutsideCollaborator: { + (params?: RestEndpointMethodTypes["orgs"]["removeOutsideCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + removePublicMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["removePublicMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Only authenticated organization owners can add a member to the organization or update the member's role. + * + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/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. + */ + setMembershipForUser: { + (params?: RestEndpointMethodTypes["orgs"]["setMembershipForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + setPublicMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["setPublicMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + unblockUser: { + (params?: RestEndpointMethodTypes["orgs"]["unblockUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + */ + update: { + (params?: RestEndpointMethodTypes["orgs"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateMembershipForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["orgs"]["updateMembershipForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." + */ + updateWebhook: { + (params?: RestEndpointMethodTypes["orgs"]["updateWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/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. + */ + updateWebhookConfigForOrg: { + (params?: RestEndpointMethodTypes["orgs"]["updateWebhookConfigForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + packages: { + /** + * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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. + */ + deletePackageForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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. + */ + deletePackageForOrg: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + * + * 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. + */ + deletePackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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. + */ + deletePackageVersionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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. + */ + deletePackageVersionForOrg: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. + * + * 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. + */ + deletePackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["deletePackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + * @deprecated octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByAnOrg() has been renamed to octokit.rest.packages.getAllPackageVersionsForPackageOwnedByOrg() (2021-03-24) + */ + getAllPackageVersionsForAPackageOwnedByAnOrg: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForAPackageOwnedByAnOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + * @deprecated octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser() has been renamed to octokit.rest.packages.getAllPackageVersionsForPackageOwnedByAuthenticatedUser() (2021-03-24) + */ + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all package versions for a package owned by the authenticated user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all package versions for a package owned by an organization. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + getAllPackageVersionsForPackageOwnedByOrg: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns all package versions for a public package owned by a specified user. + * + * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. + * If `package_type` is not `container`, your token must also include the `repo` scope. + */ + getAllPackageVersionsForPackageOwnedByUser: { + (params?: RestEndpointMethodTypes["packages"]["getAllPackageVersionsForPackageOwnedByUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package for a package owned by the authenticated user. + * + * 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. + */ + getPackageForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getPackageForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["getPackageForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package metadata for a public package owned by a user. + * + * 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. + */ + getPackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package version for a package owned by the authenticated user. + * + * 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. + */ + getPackageVersionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageVersionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getPackageVersionForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["getPackageVersionForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a specific package version for a public package owned by a specified user. + * + * 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. + */ + getPackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["getPackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listPackagesForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listPackagesForOrganization: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForOrganization"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all packages in a user's namespace for which the requesting user has access. + * + * 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. + */ + listPackagesForUser: { + (params?: RestEndpointMethodTypes["packages"]["listPackagesForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a package owned by the authenticated user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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. + */ + restorePackageForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores an entire package in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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. + */ + restorePackageForOrg: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores an entire package for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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. + */ + restorePackageForUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a package version owned by the authenticated user. + * + * You can restore a deleted package version under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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. + */ + restorePackageVersionForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a specific package version in an organization. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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. + */ + restorePackageVersionForOrg: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Restores a specific package version for a user. + * + * You can restore a deleted package under the following conditions: + * - The package was deleted within the last 30 days. + * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. + * + * 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. + */ + restorePackageVersionForUser: { + (params?: RestEndpointMethodTypes["packages"]["restorePackageVersionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + projects: { + /** + * Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + */ + addCollaborator: { + (params?: RestEndpointMethodTypes["projects"]["addCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createCard: { + (params?: RestEndpointMethodTypes["projects"]["createCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createColumn: { + (params?: RestEndpointMethodTypes["projects"]["createColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["projects"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForOrg: { + (params?: RestEndpointMethodTypes["projects"]["createForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + createForRepo: { + (params?: RestEndpointMethodTypes["projects"]["createForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + */ + delete: { + (params?: RestEndpointMethodTypes["projects"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteCard: { + (params?: RestEndpointMethodTypes["projects"]["deleteCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteColumn: { + (params?: RestEndpointMethodTypes["projects"]["deleteColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + get: { + (params?: RestEndpointMethodTypes["projects"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getCard: { + (params?: RestEndpointMethodTypes["projects"]["getCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getColumn: { + (params?: RestEndpointMethodTypes["projects"]["getColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + */ + getPermissionForUser: { + (params?: RestEndpointMethodTypes["projects"]["getPermissionForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listCards: { + (params?: RestEndpointMethodTypes["projects"]["listCards"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + */ + listCollaborators: { + (params?: RestEndpointMethodTypes["projects"]["listCollaborators"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listColumns: { + (params?: RestEndpointMethodTypes["projects"]["listColumns"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["projects"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + listForRepo: { + (params?: RestEndpointMethodTypes["projects"]["listForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listForUser: { + (params?: RestEndpointMethodTypes["projects"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + moveCard: { + (params?: RestEndpointMethodTypes["projects"]["moveCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + moveColumn: { + (params?: RestEndpointMethodTypes["projects"]["moveColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + */ + removeCollaborator: { + (params?: RestEndpointMethodTypes["projects"]["removeCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + */ + update: { + (params?: RestEndpointMethodTypes["projects"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateCard: { + (params?: RestEndpointMethodTypes["projects"]["updateCard"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateColumn: { + (params?: RestEndpointMethodTypes["projects"]["updateColumn"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + pulls: { + checkIfMerged: { + (params?: RestEndpointMethodTypes["pulls"]["checkIfMerged"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + */ + create: { + (params?: RestEndpointMethodTypes["pulls"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + createReplyForReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["createReplyForReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + * + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + */ + createReview: { + (params?: RestEndpointMethodTypes["pulls"]["createReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + createReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["createReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deletePendingReview: { + (params?: RestEndpointMethodTypes["pulls"]["deletePendingReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a review comment. + */ + deleteReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["deleteReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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. + */ + dismissReview: { + (params?: RestEndpointMethodTypes["pulls"]["dismissReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/rest/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: { + (params?: RestEndpointMethodTypes["pulls"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getReview: { + (params?: RestEndpointMethodTypes["pulls"]["getReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Provides details for a review comment. + */ + getReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["getReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + list: { + (params?: RestEndpointMethodTypes["pulls"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List comments for a specific pull request review. + */ + listCommentsForReview: { + (params?: RestEndpointMethodTypes["pulls"]["listCommentsForReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. + */ + listCommits: { + (params?: RestEndpointMethodTypes["pulls"]["listCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. + */ + listFiles: { + (params?: RestEndpointMethodTypes["pulls"]["listFiles"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listRequestedReviewers: { + (params?: RestEndpointMethodTypes["pulls"]["listRequestedReviewers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all review comments for a pull request. By default, review comments are in ascending order by ID. + */ + listReviewComments: { + (params?: RestEndpointMethodTypes["pulls"]["listReviewComments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. + */ + listReviewCommentsForRepo: { + (params?: RestEndpointMethodTypes["pulls"]["listReviewCommentsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The list of reviews returns in chronological order. + */ + listReviews: { + (params?: RestEndpointMethodTypes["pulls"]["listReviews"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + merge: { + (params?: RestEndpointMethodTypes["pulls"]["merge"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + removeRequestedReviewers: { + (params?: RestEndpointMethodTypes["pulls"]["removeRequestedReviewers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + requestReviewers: { + (params?: RestEndpointMethodTypes["pulls"]["requestReviewers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + submitReview: { + (params?: RestEndpointMethodTypes["pulls"]["submitReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + */ + update: { + (params?: RestEndpointMethodTypes["pulls"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + */ + updateBranch: { + (params?: RestEndpointMethodTypes["pulls"]["updateBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Update the review summary comment with new text. + */ + updateReview: { + (params?: RestEndpointMethodTypes["pulls"]["updateReview"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables you to edit a review comment. + */ + updateReviewComment: { + (params?: RestEndpointMethodTypes["pulls"]["updateReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + rateLimit: { + /** + * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * + * **Note:** The `rate` object is deprecated. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. + */ + get: { + (params?: RestEndpointMethodTypes["rateLimit"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + reactions: { + /** + * Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. + */ + createForCommitComment: { + (params?: RestEndpointMethodTypes["reactions"]["createForCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. + */ + createForIssue: { + (params?: RestEndpointMethodTypes["reactions"]["createForIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. + */ + createForIssueComment: { + (params?: RestEndpointMethodTypes["reactions"]["createForIssueComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. + */ + createForPullRequestReviewComment: { + (params?: RestEndpointMethodTypes["reactions"]["createForPullRequestReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. + */ + createForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["createForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/rest/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`. + */ + createForTeamDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["createForTeamDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a reaction to a [team discussion](https://docs.github.com/rest/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`. + */ + createForTeamDiscussionInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["createForTeamDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + deleteForCommitComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * + * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + */ + deleteForIssue: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. + * + * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + deleteForIssueComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForIssueComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` + * + * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + deleteForPullRequestComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForPullRequestComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + deleteForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + deleteForTeamDiscussion: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussion"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** You can also specify a team or organization with `team_id` and `org_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions/:reaction_id`. + * + * Delete a reaction to a [team discussion comment](https://docs.github.com/rest/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/). + */ + deleteForTeamDiscussionComment: { + (params?: RestEndpointMethodTypes["reactions"]["deleteForTeamDiscussionComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + */ + listForCommitComment: { + (params?: RestEndpointMethodTypes["reactions"]["listForCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to an [issue](https://docs.github.com/rest/reference/issues). + */ + listForIssue: { + (params?: RestEndpointMethodTypes["reactions"]["listForIssue"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + */ + listForIssueComment: { + (params?: RestEndpointMethodTypes["reactions"]["listForIssueComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + */ + listForPullRequestReviewComment: { + (params?: RestEndpointMethodTypes["reactions"]["listForPullRequestReviewComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [release](https://docs.github.com/rest/reference/repos#releases). + */ + listForRelease: { + (params?: RestEndpointMethodTypes["reactions"]["listForRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [team discussion comment](https://docs.github.com/rest/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`. + */ + listForTeamDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["listForTeamDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the reactions to a [team discussion](https://docs.github.com/rest/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`. + */ + listForTeamDiscussionInOrg: { + (params?: RestEndpointMethodTypes["reactions"]["listForTeamDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + repos: { + /** + * @deprecated octokit.rest.repos.acceptInvitation() has been renamed to octokit.rest.repos.acceptInvitationForAuthenticatedUser() (2021-10-05) + */ + acceptInvitation: { + (params?: RestEndpointMethodTypes["repos"]["acceptInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + acceptInvitationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["acceptInvitationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only 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. | + */ + addAppAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["addAppAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. 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. + */ + addCollaborator: { + (params?: RestEndpointMethodTypes["repos"]["addCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + addStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["addStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + * + * | 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. | + */ + addTeamAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["addTeamAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addUserAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["addUserAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + checkCollaborator: { + (params?: RestEndpointMethodTypes["repos"]["checkCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + checkVulnerabilityAlerts: { + (params?: RestEndpointMethodTypes["repos"]["checkVulnerabilityAlerts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List any syntax errors that are detected in the CODEOWNERS + * file. + * + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." + */ + codeownersErrors: { + (params?: RestEndpointMethodTypes["repos"]["codeownersErrors"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Deprecated**: Use `repos.compareCommitsWithBasehead()` (`GET /repos/{owner}/{repo}/compare/{basehead}`) instead. Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommits: { + (params?: RestEndpointMethodTypes["repos"]["compareCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommitsWithBasehead: { + (params?: RestEndpointMethodTypes["repos"]["compareCommitsWithBasehead"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with admin access to the repository can create an autolink. + */ + createAutolink: { + (params?: RestEndpointMethodTypes["repos"]["createAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + createCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["createCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + */ + createCommitSignatureProtection: { + (params?: RestEndpointMethodTypes["repos"]["createCommitSignatureProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access in a repository can create commit statuses for a given SHA. + * + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + */ + createCommitStatus: { + (params?: RestEndpointMethodTypes["repos"]["createCommitStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can create a read-only deploy key. + */ + createDeployKey: { + (params?: RestEndpointMethodTypes["repos"]["createDeployKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them + * before we merge a pull request. + * + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have + * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter + * makes it easier to track which environments have requested deployments. The default environment is `production`. + * + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If + * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, + * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will + * return a failure response. + * + * By default, [commit statuses](https://docs.github.com/rest/commits/statuses) for every submitted context must be in a `success` + * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to + * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do + * not require any contexts or create any commit statuses, the deployment will always succeed. + * + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text + * field that will be passed on when a deployment event is dispatched. + * + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might + * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an + * application with debugging enabled. + * + * 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`. + */ + createDeployment: { + (params?: RestEndpointMethodTypes["repos"]["createDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createDeploymentStatus: { + (params?: RestEndpointMethodTypes["repos"]["createDeploymentStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This 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. + */ + createDispatchEvent: { + (params?: RestEndpointMethodTypes["repos"]["createDispatchEvent"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + createForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["createForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + createFork: { + (params?: RestEndpointMethodTypes["repos"]["createFork"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. + * + * **OAuth 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 + */ + createInOrg: { + (params?: RestEndpointMethodTypes["repos"]["createInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "[Environments](/actions/reference/environments#environment-protection-rules)." + * + * **Note:** Although you can use this operation to specify that only branches that match specified name patterns can deploy to this environment, you must use the UI to set the name patterns. For more information, see "[Environments](/actions/reference/environments#deployment-branches)." + * + * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + createOrUpdateEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["createOrUpdateEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new file or replaces an existing file in a repository. + */ + createOrUpdateFileContents: { + (params?: RestEndpointMethodTypes["repos"]["createOrUpdateFileContents"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + */ + createPagesSite: { + (params?: RestEndpointMethodTypes["repos"]["createPagesSite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + createRelease: { + (params?: RestEndpointMethodTypes["repos"]["createRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + createTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["createTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. 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 + */ + createUsingTemplate: { + (params?: RestEndpointMethodTypes["repos"]["createUsingTemplate"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can + * share the same `config` as long as those webhooks do not have any `events` that overlap. + */ + createWebhook: { + (params?: RestEndpointMethodTypes["repos"]["createWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * @deprecated octokit.rest.repos.declineInvitation() has been renamed to octokit.rest.repos.declineInvitationForAuthenticatedUser() (2021-10-05) + */ + declineInvitation: { + (params?: RestEndpointMethodTypes["repos"]["declineInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + declineInvitationForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["declineInvitationForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deleting a repository requires admin access. If 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: { + (params?: RestEndpointMethodTypes["repos"]["delete"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + deleteAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["deleteAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + deleteAdminBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteAdminBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You must authenticate using an access token with the repo scope to use this endpoint. + */ + deleteAnEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["deleteAnEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This deletes a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + deleteAutolink: { + (params?: RestEndpointMethodTypes["repos"]["deleteAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + deleteBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["deleteCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + */ + deleteCommitSignatureProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteCommitSignatureProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. + */ + deleteDeployKey: { + (params?: RestEndpointMethodTypes["repos"]["deleteDeployKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. 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)." + */ + deleteDeployment: { + (params?: RestEndpointMethodTypes["repos"]["deleteDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Deletes a file in a repository. + * + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. + * + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + */ + deleteFile: { + (params?: RestEndpointMethodTypes["repos"]["deleteFile"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteInvitation: { + (params?: RestEndpointMethodTypes["repos"]["deleteInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deletePagesSite: { + (params?: RestEndpointMethodTypes["repos"]["deletePagesSite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + deletePullRequestReviewProtection: { + (params?: RestEndpointMethodTypes["repos"]["deletePullRequestReviewProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can delete a release. + */ + deleteRelease: { + (params?: RestEndpointMethodTypes["repos"]["deleteRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["deleteReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + deleteTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["deleteTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + deleteWebhook: { + (params?: RestEndpointMethodTypes["repos"]["deleteWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". + */ + disableAutomatedSecurityFixes: { + (params?: RestEndpointMethodTypes["repos"]["disableAutomatedSecurityFixes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + disableLfsForRepo: { + (params?: RestEndpointMethodTypes["repos"]["disableLfsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + disableVulnerabilityAlerts: { + (params?: RestEndpointMethodTypes["repos"]["disableVulnerabilityAlerts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `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. + * @deprecated octokit.rest.repos.downloadArchive() has been renamed to octokit.rest.repos.downloadZipballArchive() (2020-09-17) + */ + downloadArchive: { + (params?: RestEndpointMethodTypes["repos"]["downloadArchive"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a tar archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `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. + */ + downloadTarballArchive: { + (params?: RestEndpointMethodTypes["repos"]["downloadTarballArchive"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually + * `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. + */ + downloadZipballArchive: { + (params?: RestEndpointMethodTypes["repos"]["downloadZipballArchive"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". + */ + enableAutomatedSecurityFixes: { + (params?: RestEndpointMethodTypes["repos"]["enableAutomatedSecurityFixes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + enableLfsForRepo: { + (params?: RestEndpointMethodTypes["repos"]["enableLfsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". + */ + enableVulnerabilityAlerts: { + (params?: RestEndpointMethodTypes["repos"]["enableVulnerabilityAlerts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Generate a name and body describing a [release](https://docs.github.com/rest/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. + */ + generateReleaseNotes: { + (params?: RestEndpointMethodTypes["repos"]["generateReleaseNotes"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + */ + get: { + (params?: RestEndpointMethodTypes["repos"]["get"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + */ + getAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["getAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getAdminBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["getAdminBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get all environments for a repository. + * + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getAllEnvironments: { + (params?: RestEndpointMethodTypes["repos"]["getAllEnvironments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getAllStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["getAllStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getAllTopics: { + (params?: RestEndpointMethodTypes["repos"]["getAllTopics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + getAppsWithAccessToProtectedBranch: { + (params?: RestEndpointMethodTypes["repos"]["getAppsWithAccessToProtectedBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns a single autolink reference by ID that was configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + getAutolink: { + (params?: RestEndpointMethodTypes["repos"]["getAutolink"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getBranch: { + (params?: RestEndpointMethodTypes["repos"]["getBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["getBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getClones: { + (params?: RestEndpointMethodTypes["repos"]["getClones"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + */ + getCodeFrequencyStats: { + (params?: RestEndpointMethodTypes["repos"]["getCodeFrequencyStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. + */ + getCollaboratorPermissionLevel: { + (params?: RestEndpointMethodTypes["repos"]["getCollaboratorPermissionLevel"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + getCombinedStatusForRef: { + (params?: RestEndpointMethodTypes["repos"]["getCombinedStatusForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, 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. | + */ + getCommit: { + (params?: RestEndpointMethodTypes["repos"]["getCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + */ + getCommitActivityStats: { + (params?: RestEndpointMethodTypes["repos"]["getCommitActivityStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["getCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * + * **Note**: You must enable branch protection to require signed commits. + */ + getCommitSignatureProtection: { + (params?: RestEndpointMethodTypes["repos"]["getCommitSignatureProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint will return all community profile metrics, including an + * overall health score, repository description, the presence of documentation, detected + * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, + * README, and CONTRIBUTING files. + * + * The `health_percentage` score is defined as a percentage of how many of + * these four documents are present: README, CONTRIBUTING, LICENSE, and + * CODE_OF_CONDUCT. For example, if all four documents are present, then + * the `health_percentage` is `100`. If only one is present, then the + * `health_percentage` is `25`. + * + * `content_reports_enabled` is only returned for organization-owned repositories. + */ + getCommunityProfileMetrics: { + (params?: RestEndpointMethodTypes["repos"]["getCommunityProfileMetrics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit + * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. + * + * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for + * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media + * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Note**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees + * API](https://docs.github.com/rest/reference/git#get-a-tree). + * + * #### 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. + */ + getContent: { + (params?: RestEndpointMethodTypes["repos"]["getContent"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits + */ + getContributorsStats: { + (params?: RestEndpointMethodTypes["repos"]["getContributorsStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getDeployKey: { + (params?: RestEndpointMethodTypes["repos"]["getDeployKey"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getDeployment: { + (params?: RestEndpointMethodTypes["repos"]["getDeployment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access can view a deployment status for a deployment: + */ + getDeploymentStatus: { + (params?: RestEndpointMethodTypes["repos"]["getDeploymentStatus"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + getEnvironment: { + (params?: RestEndpointMethodTypes["repos"]["getEnvironment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getLatestPagesBuild: { + (params?: RestEndpointMethodTypes["repos"]["getLatestPagesBuild"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * View the latest published full release for the repository. + * + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + */ + getLatestRelease: { + (params?: RestEndpointMethodTypes["repos"]["getLatestRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getPages: { + (params?: RestEndpointMethodTypes["repos"]["getPages"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + getPagesBuild: { + (params?: RestEndpointMethodTypes["repos"]["getPagesBuild"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. + * + * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * + * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + */ + getPagesHealthCheck: { + (params?: RestEndpointMethodTypes["repos"]["getPagesHealthCheck"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + getParticipationStats: { + (params?: RestEndpointMethodTypes["repos"]["getParticipationStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getPullRequestReviewProtection: { + (params?: RestEndpointMethodTypes["repos"]["getPullRequestReviewProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Each array contains the day number, hour number, and number of commits: + * + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits + * + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + */ + getPunchCardStats: { + (params?: RestEndpointMethodTypes["repos"]["getPunchCardStats"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + getReadme: { + (params?: RestEndpointMethodTypes["repos"]["getReadme"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getReadmeInDirectory: { + (params?: RestEndpointMethodTypes["repos"]["getReadmeInDirectory"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **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). + */ + getRelease: { + (params?: RestEndpointMethodTypes["repos"]["getRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + */ + getReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["getReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get a published release with the specified tag. + */ + getReleaseByTag: { + (params?: RestEndpointMethodTypes["repos"]["getReleaseByTag"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + getStatusChecksProtection: { + (params?: RestEndpointMethodTypes["repos"]["getStatusChecksProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + */ + getTeamsWithAccessToProtectedBranch: { + (params?: RestEndpointMethodTypes["repos"]["getTeamsWithAccessToProtectedBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the top 10 popular contents over the last 14 days. + */ + getTopPaths: { + (params?: RestEndpointMethodTypes["repos"]["getTopPaths"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the top 10 referrers over the last 14 days. + */ + getTopReferrers: { + (params?: RestEndpointMethodTypes["repos"]["getTopReferrers"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + */ + getUsersWithAccessToProtectedBranch: { + (params?: RestEndpointMethodTypes["repos"]["getUsersWithAccessToProtectedBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + */ + getViews: { + (params?: RestEndpointMethodTypes["repos"]["getViews"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a webhook configured in a repository. To get only the webhook `config` properties, see "[Get a webhook configuration for a repository](/rest/reference/repos#get-a-webhook-configuration-for-a-repository)." + */ + getWebhook: { + (params?: RestEndpointMethodTypes["repos"]["getWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns the webhook configuration for a repository. To get more information about the webhook, including the `active` state and `events`, use "[Get a repository webhook](/rest/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. + */ + getWebhookConfigForRepo: { + (params?: RestEndpointMethodTypes["repos"]["getWebhookConfigForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a delivery for a webhook configured in a repository. + */ + getWebhookDelivery: { + (params?: RestEndpointMethodTypes["repos"]["getWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns a list of autolinks configured for the given repository. + * + * Information about autolinks are only available to repository administrators. + */ + listAutolinks: { + (params?: RestEndpointMethodTypes["repos"]["listAutolinks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listBranches: { + (params?: RestEndpointMethodTypes["repos"]["listBranches"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + */ + listBranchesForHeadCommit: { + (params?: RestEndpointMethodTypes["repos"]["listBranchesForHeadCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + * + * Team members will include the members of child teams. + * + * 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. + */ + listCollaborators: { + (params?: RestEndpointMethodTypes["repos"]["listCollaborators"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Use the `:commit_sha` to specify the commit that will have its comments listed. + */ + listCommentsForCommit: { + (params?: RestEndpointMethodTypes["repos"]["listCommentsForCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + listCommitCommentsForRepo: { + (params?: RestEndpointMethodTypes["repos"]["listCommitCommentsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + listCommitStatusesForRef: { + (params?: RestEndpointMethodTypes["repos"]["listCommitStatusesForRef"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on 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. | + */ + listCommits: { + (params?: RestEndpointMethodTypes["repos"]["listCommits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + */ + listContributors: { + (params?: RestEndpointMethodTypes["repos"]["listContributors"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listDeployKeys: { + (params?: RestEndpointMethodTypes["repos"]["listDeployKeys"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with pull access can view deployment statuses for a deployment: + */ + listDeploymentStatuses: { + (params?: RestEndpointMethodTypes["repos"]["listDeploymentStatuses"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Simple filtering of deployments is available via query parameters: + */ + listDeployments: { + (params?: RestEndpointMethodTypes["repos"]["listDeployments"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists repositories for the specified organization. + */ + listForOrg: { + (params?: RestEndpointMethodTypes["repos"]["listForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. + */ + listForUser: { + (params?: RestEndpointMethodTypes["repos"]["listForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listForks: { + (params?: RestEndpointMethodTypes["repos"]["listForks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + */ + listInvitations: { + (params?: RestEndpointMethodTypes["repos"]["listInvitations"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + */ + listInvitationsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["repos"]["listInvitationsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + */ + listLanguages: { + (params?: RestEndpointMethodTypes["repos"]["listLanguages"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listPagesBuilds: { + (params?: RestEndpointMethodTypes["repos"]["listPagesBuilds"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all public repositories in the order that they were created. + * + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + */ + listPublic: { + (params?: RestEndpointMethodTypes["repos"]["listPublic"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. + */ + listPullRequestsAssociatedWithCommit: { + (params?: RestEndpointMethodTypes["repos"]["listPullRequestsAssociatedWithCommit"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listReleaseAssets: { + (params?: RestEndpointMethodTypes["repos"]["listReleaseAssets"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + listReleases: { + (params?: RestEndpointMethodTypes["repos"]["listReleases"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + listTagProtection: { + (params?: RestEndpointMethodTypes["repos"]["listTagProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listTags: { + (params?: RestEndpointMethodTypes["repos"]["listTags"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listTeams: { + (params?: RestEndpointMethodTypes["repos"]["listTeams"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Returns a list of webhook deliveries for a webhook configured in a repository. + */ + listWebhookDeliveries: { + (params?: RestEndpointMethodTypes["repos"]["listWebhookDeliveries"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + listWebhooks: { + (params?: RestEndpointMethodTypes["repos"]["listWebhooks"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + merge: { + (params?: RestEndpointMethodTypes["repos"]["merge"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sync a branch of a forked repository to keep it up-to-date with the upstream repository. + */ + mergeUpstream: { + (params?: RestEndpointMethodTypes["repos"]["mergeUpstream"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. + */ + pingWebhook: { + (params?: RestEndpointMethodTypes["repos"]["pingWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Redeliver a webhook delivery for a webhook configured in a repository. + */ + redeliverWebhookDelivery: { + (params?: RestEndpointMethodTypes["repos"]["redeliverWebhookDelivery"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only 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. | + */ + removeAppAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["removeAppAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + removeCollaborator: { + (params?: RestEndpointMethodTypes["repos"]["removeCollaborator"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["removeStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeStatusCheckProtection: { + (params?: RestEndpointMethodTypes["repos"]["removeStatusCheckProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | 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. | + */ + removeTeamAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["removeTeamAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + removeUserAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["removeUserAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Renames a branch in a repository. + * + * **Note:** Although the API responds immediately, the branch rename process might take some extra time to complete in the background. You won't be able to push to the old branch name while the rename process is in progress. For more information, see "[Renaming a branch](https://docs.github.com/github/administering-a-repository/renaming-a-branch)". + * + * The 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. + */ + renameBranch: { + (params?: RestEndpointMethodTypes["repos"]["renameBranch"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + replaceAllTopics: { + (params?: RestEndpointMethodTypes["repos"]["replaceAllTopics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + */ + requestPagesBuild: { + (params?: RestEndpointMethodTypes["repos"]["requestPagesBuild"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + setAdminBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["setAdminBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only 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. | + */ + setAppAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["setAppAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + setStatusCheckContexts: { + (params?: RestEndpointMethodTypes["repos"]["setStatusCheckContexts"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + * + * | 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. | + */ + setTeamAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["setTeamAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + setUserAccessRestrictions: { + (params?: RestEndpointMethodTypes["repos"]["setUserAccessRestrictions"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + */ + testPushWebhook: { + (params?: RestEndpointMethodTypes["repos"]["testPushWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). + */ + transfer: { + (params?: RestEndpointMethodTypes["repos"]["transfer"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/reference/repos#replace-all-repository-topics) endpoint. + */ + update: { + (params?: RestEndpointMethodTypes["repos"]["update"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + updateBranchProtection: { + (params?: RestEndpointMethodTypes["repos"]["updateBranchProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateCommitComment: { + (params?: RestEndpointMethodTypes["repos"]["updateCommitComment"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + */ + updateInformationAboutPagesSite: { + (params?: RestEndpointMethodTypes["repos"]["updateInformationAboutPagesSite"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + updateInvitation: { + (params?: RestEndpointMethodTypes["repos"]["updateInvitation"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + */ + updatePullRequestReviewProtection: { + (params?: RestEndpointMethodTypes["repos"]["updatePullRequestReviewProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can edit a release. + */ + updateRelease: { + (params?: RestEndpointMethodTypes["repos"]["updateRelease"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Users with push access to the repository can edit a release asset. + */ + updateReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["updateReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + * @deprecated octokit.rest.repos.updateStatusCheckPotection() has been renamed to octokit.rest.repos.updateStatusCheckProtection() (2020-09-17) + */ + updateStatusCheckPotection: { + (params?: RestEndpointMethodTypes["repos"]["updateStatusCheckPotection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + */ + updateStatusCheckProtection: { + (params?: RestEndpointMethodTypes["repos"]["updateStatusCheckProtection"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates a webhook configured in a repository. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for a repository](/rest/reference/repos#update-a-webhook-configuration-for-a-repository)." + */ + updateWebhook: { + (params?: RestEndpointMethodTypes["repos"]["updateWebhook"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/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. + */ + updateWebhookConfigForRepo: { + (params?: RestEndpointMethodTypes["repos"]["updateWebhookConfigForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/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. + */ + uploadReleaseAsset: { + (params?: RestEndpointMethodTypes["repos"]["uploadReleaseAsset"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + search: { + /** + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/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. + */ + code: { + (params?: RestEndpointMethodTypes["search"]["code"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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` + */ + commits: { + (params?: RestEndpointMethodTypes["search"]["commits"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/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)." + */ + issuesAndPullRequests: { + (params?: RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/rest/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. + */ + labels: { + (params?: RestEndpointMethodTypes["search"]["labels"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/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. + */ + repos: { + (params?: RestEndpointMethodTypes["search"]["repos"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/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. + */ + topics: { + (params?: RestEndpointMethodTypes["search"]["topics"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * + * For example, if you're looking for a list of popular users, you might try this query: + * + * `q=tom+repos:%3E42+followers:%3E1000` + * + * This query searches for users with the name `tom`. The results are restricted to users with more than 42 repositories and over 1,000 followers. + */ + users: { + (params?: RestEndpointMethodTypes["search"]["users"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + secretScanning: { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * 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. + */ + getAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["getAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * 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). + */ + listAlertsForEnterprise: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForEnterprise"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * 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. + */ + listAlertsForOrg: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * 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. + */ + listAlertsForRepo: { + (params?: RestEndpointMethodTypes["secretScanning"]["listAlertsForRepo"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * 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. + */ + listLocationsForAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["listLocationsForAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Updates the status of a secret scanning alert in an eligible repository. + * 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. + */ + updateAlert: { + (params?: RestEndpointMethodTypes["secretScanning"]["updateAlert"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + 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. + * + * 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}`. + */ + addOrUpdateMembershipForUserInOrg: { + (params?: RestEndpointMethodTypes["teams"]["addOrUpdateMembershipForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + addOrUpdateProjectPermissionsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["addOrUpdateProjectPermissionsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP 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/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + addOrUpdateRepoPermissionsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["addOrUpdateRepoPermissionsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + checkPermissionsForProjectInOrg: { + (params?: RestEndpointMethodTypes["teams"]["checkPermissionsForProjectInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/overview/media-types/) via the `application/vnd.github.v3.repository+json` accept header. + * + * If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + checkPermissionsForRepoInOrg: { + (params?: RestEndpointMethodTypes["teams"]["checkPermissionsForRepoInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + */ + create: { + (params?: RestEndpointMethodTypes["teams"]["create"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + createDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["createDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + createDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["createDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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}`. + */ + deleteDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["deleteDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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}`. + */ + deleteDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["deleteDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. + */ + deleteInOrg: { + (params?: RestEndpointMethodTypes["teams"]["deleteInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Gets a team using the team's `slug`. 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}`. + */ + getByName: { + (params?: RestEndpointMethodTypes["teams"]["getByName"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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}`. + */ + getDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["getDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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}`. + */ + getDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["getDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + */ + getMembershipForUserInOrg: { + (params?: RestEndpointMethodTypes["teams"]["getMembershipForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all teams in an organization that are visible to the authenticated user. + */ + list: { + (params?: RestEndpointMethodTypes["teams"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the child teams of the team specified by `{team_slug}`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`. + */ + listChildInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listChildInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all comments on a team discussion. 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`. + */ + listDiscussionCommentsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listDiscussionCommentsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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`. + */ + listDiscussionsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listDiscussionsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List all of the teams across all of the organizations to which the authenticated user belongs. 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/). + */ + listForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["teams"]["listForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Team members will include the members of child teams. + * + * To list members in a team, the team must be visible to the authenticated user. + */ + listMembersInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listMembersInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. + */ + listPendingInvitationsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listPendingInvitationsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the organization projects for a team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + */ + listProjectsInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listProjectsInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + listReposInOrg: { + (params?: RestEndpointMethodTypes["teams"]["listReposInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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}`. + */ + removeMembershipForUserInOrg: { + (params?: RestEndpointMethodTypes["teams"]["removeMembershipForUserInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`. + */ + removeProjectInOrg: { + (params?: RestEndpointMethodTypes["teams"]["removeProjectInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + */ + removeRepoInOrg: { + (params?: RestEndpointMethodTypes["teams"]["removeRepoInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Edits the body text of a discussion comment. 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}`. + */ + updateDiscussionCommentInOrg: { + (params?: RestEndpointMethodTypes["teams"]["updateDiscussionCommentInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. 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}`. + */ + updateDiscussionInOrg: { + (params?: RestEndpointMethodTypes["teams"]["updateDiscussionInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + */ + updateInOrg: { + (params?: RestEndpointMethodTypes["teams"]["updateInOrg"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; + users: { + /** + * This endpoint is accessible with the `user` scope. + * @deprecated octokit.rest.users.addEmailForAuthenticated() has been renamed to octokit.rest.users.addEmailForAuthenticatedUser() (2021-10-05) + */ + addEmailForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["addEmailForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint is accessible with the `user` scope. + */ + addEmailForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["addEmailForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + block: { + (params?: RestEndpointMethodTypes["users"]["block"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkBlocked: { + (params?: RestEndpointMethodTypes["users"]["checkBlocked"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkFollowingForUser: { + (params?: RestEndpointMethodTypes["users"]["checkFollowingForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + checkPersonIsFollowedByAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["checkPersonIsFollowedByAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a GPG key to the authenticated user's GitHub account. 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/). + * @deprecated octokit.rest.users.createGpgKeyForAuthenticated() has been renamed to octokit.rest.users.createGpgKeyForAuthenticatedUser() (2021-10-05) + */ + createGpgKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["createGpgKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a GPG key to the authenticated user's GitHub account. 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/). + */ + createGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a public SSH key to the authenticated user's GitHub account. 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/). + * @deprecated octokit.rest.users.createPublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.createPublicSshKeyForAuthenticatedUser() (2021-10-05) + */ + createPublicSshKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["createPublicSshKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Adds a public SSH key to the authenticated user's GitHub account. 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/). + */ + createPublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["createPublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint is accessible with the `user` scope. + * @deprecated octokit.rest.users.deleteEmailForAuthenticated() has been renamed to octokit.rest.users.deleteEmailForAuthenticatedUser() (2021-10-05) + */ + deleteEmailForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["deleteEmailForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * This endpoint is accessible with the `user` scope. + */ + deleteEmailForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteEmailForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a GPG key from the authenticated user's GitHub account. 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/). + * @deprecated octokit.rest.users.deleteGpgKeyForAuthenticated() has been renamed to octokit.rest.users.deleteGpgKeyForAuthenticatedUser() (2021-10-05) + */ + deleteGpgKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["deleteGpgKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a GPG key from the authenticated user's GitHub account. 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/). + */ + deleteGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deleteGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a public SSH key from the authenticated user's GitHub account. 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/). + * @deprecated octokit.rest.users.deletePublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.deletePublicSshKeyForAuthenticatedUser() (2021-10-05) + */ + deletePublicSshKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["deletePublicSshKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Removes a public SSH key from the authenticated user's GitHub account. 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/). + */ + deletePublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["deletePublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/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. + */ + follow: { + (params?: RestEndpointMethodTypes["users"]["follow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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. + */ + getAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["getAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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)". + */ + getByUsername: { + (params?: RestEndpointMethodTypes["users"]["getByUsername"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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 + * ``` + */ + getContextForUser: { + (params?: RestEndpointMethodTypes["users"]["getContextForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated octokit.rest.users.getGpgKeyForAuthenticated() has been renamed to octokit.rest.users.getGpgKeyForAuthenticatedUser() (2021-10-05) + */ + getGpgKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["getGpgKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * View extended details for a single GPG key. 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/). + */ + getGpgKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getGpgKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * 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/). + * @deprecated octokit.rest.users.getPublicSshKeyForAuthenticated() has been renamed to octokit.rest.users.getPublicSshKeyForAuthenticatedUser() (2021-10-05) + */ + getPublicSshKeyForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["getPublicSshKeyForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * View extended details for a single public SSH key. 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/). + */ + getPublicSshKeyForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["getPublicSshKeyForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. + */ + list: { + (params?: RestEndpointMethodTypes["users"]["list"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the users you've blocked on your personal account. + * @deprecated octokit.rest.users.listBlockedByAuthenticated() has been renamed to octokit.rest.users.listBlockedByAuthenticatedUser() (2021-10-05) + */ + listBlockedByAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listBlockedByAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * List the users you've blocked on your personal account. + */ + listBlockedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listBlockedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + * @deprecated octokit.rest.users.listEmailsForAuthenticated() has been renamed to octokit.rest.users.listEmailsForAuthenticatedUser() (2021-10-05) + */ + listEmailsForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listEmailsForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. + */ + listEmailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listEmailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people who the authenticated user follows. + * @deprecated octokit.rest.users.listFollowedByAuthenticated() has been renamed to octokit.rest.users.listFollowedByAuthenticatedUser() (2021-10-05) + */ + listFollowedByAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listFollowedByAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people who the authenticated user follows. + */ + listFollowedByAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowedByAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people following the authenticated user. + */ + listFollowersForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowersForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people following the specified user. + */ + listFollowersForUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowersForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the people who the specified user follows. + */ + listFollowingForUser: { + (params?: RestEndpointMethodTypes["users"]["listFollowingForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the current user's GPG keys. 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/). + * @deprecated octokit.rest.users.listGpgKeysForAuthenticated() has been renamed to octokit.rest.users.listGpgKeysForAuthenticatedUser() (2021-10-05) + */ + listGpgKeysForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the current user's GPG keys. 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/). + */ + listGpgKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the GPG keys for a user. This information is accessible by anyone. + */ + listGpgKeysForUser: { + (params?: RestEndpointMethodTypes["users"]["listGpgKeysForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. + * @deprecated octokit.rest.users.listPublicEmailsForAuthenticated() has been renamed to octokit.rest.users.listPublicEmailsForAuthenticatedUser() (2021-10-05) + */ + listPublicEmailsForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listPublicEmailsForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. + */ + listPublicEmailsForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicEmailsForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. + */ + listPublicKeysForUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicKeysForUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the public SSH keys for the authenticated user's GitHub account. 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/). + * @deprecated octokit.rest.users.listPublicSshKeysForAuthenticated() has been renamed to octokit.rest.users.listPublicSshKeysForAuthenticatedUser() (2021-10-05) + */ + listPublicSshKeysForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["listPublicSshKeysForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Lists the public SSH keys for the authenticated user's GitHub account. 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/). + */ + listPublicSshKeysForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["listPublicSshKeysForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the visibility for your primary email addresses. + * @deprecated octokit.rest.users.setPrimaryEmailVisibilityForAuthenticated() has been renamed to octokit.rest.users.setPrimaryEmailVisibilityForAuthenticatedUser() (2021-10-05) + */ + setPrimaryEmailVisibilityForAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["setPrimaryEmailVisibilityForAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Sets the visibility for your primary email addresses. + */ + setPrimaryEmailVisibilityForAuthenticatedUser: { + (params?: RestEndpointMethodTypes["users"]["setPrimaryEmailVisibilityForAuthenticatedUser"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + unblock: { + (params?: RestEndpointMethodTypes["users"]["unblock"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + */ + unfollow: { + (params?: RestEndpointMethodTypes["users"]["unfollow"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + /** + * **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. + */ + updateAuthenticated: { + (params?: RestEndpointMethodTypes["users"]["updateAuthenticated"]["parameters"]): Promise; + defaults: RequestInterface["defaults"]; + endpoint: EndpointInterface<{ + url: string; + }>; + }; + }; +}; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts new file mode 100644 index 0000000..ce2a2f1 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts @@ -0,0 +1,3211 @@ +import { Endpoints, RequestParameters } from "@octokit/types"; +export declare type RestEndpointMethodTypes = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + addCustomLabelsToSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + addSelectedRepoToOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + approveWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"]["response"]; + }; + cancelWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"]["response"]; + }; + createOrUpdateEnvironmentSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + createOrUpdateOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; + }; + createRegistrationTokenForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/actions/runners/registration-token"]["response"]; + }; + createRegistrationTokenForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/registration-token"]["response"]; + }; + createRemoveTokenForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/actions/runners/remove-token"]["response"]; + }; + createRemoveTokenForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runners/remove-token"]["response"]; + }; + createWorkflowDispatch: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"]["response"]; + }; + deleteActionsCacheById: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"]["response"]; + }; + deleteActionsCacheByKey: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"]["response"]; + }; + deleteArtifact: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["response"]; + }; + deleteEnvironmentSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + deleteOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; + }; + deleteSelfHostedRunnerFromOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}"]["response"]; + }; + deleteSelfHostedRunnerFromRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"]["response"]; + }; + deleteWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"]["response"]; + }; + deleteWorkflowRunLogs: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["response"]; + }; + disableSelectedRepositoryGithubActionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"]["response"]; + }; + disableWorkflow: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"]["response"]; + }; + downloadArtifact: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"]["response"]; + }; + downloadJobLogsForWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"]["response"]; + }; + downloadWorkflowRunAttemptLogs: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"]["response"]; + }; + downloadWorkflowRunLogs: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"]["response"]; + }; + enableSelectedRepositoryGithubActionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"]["response"]; + }; + enableWorkflow: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"]["response"]; + }; + getActionsCacheList: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/caches"]["response"]; + }; + getActionsCacheUsage: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/cache/usage"]["response"]; + }; + getActionsCacheUsageByRepoForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]; + }; + getActionsCacheUsageForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/cache/usage"]["response"]; + }; + getActionsCacheUsageForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/cache/usage"]["response"]; + }; + getAllowedActionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/permissions/selected-actions"]["response"]; + }; + getAllowedActionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"]["response"]; + }; + getArtifact: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"]["response"]; + }; + getEnvironmentPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"]["response"]; + }; + getEnvironmentSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsDefaultWorkflowPermissionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/workflow"]["response"]; + }; + getGithubActionsPermissionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/permissions"]["response"]; + }; + getGithubActionsPermissionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["response"]; + }; + getJobForWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"]["response"]; + }; + getOrgPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/secrets/public-key"]["response"]; + }; + getOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}"]["response"]; + }; + getPendingDeploymentsForRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["response"]; + }; + getRepoPermissions: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"]["response"]; + }; + getReviewsForRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"]["response"]; + }; + getSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/runners/{runner_id}"]["response"]; + }; + getSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"]["response"]; + }; + getWorkflow: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"]["response"]; + }; + getWorkflowAccessToRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions/access"]["response"]; + }; + getWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}"]["response"]; + }; + getWorkflowRunAttempt: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"]["response"]; + }; + getWorkflowRunUsage: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"]["response"]; + }; + getWorkflowUsage: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"]["response"]; + }; + listArtifactsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/artifacts"]["response"]; + }; + listEnvironmentSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories/{repository_id}/environments/{environment_name}/secrets"]["response"]; + }; + listJobsForWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"]; + }; + listJobsForWorkflowRunAttempt: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"]["response"]; + }; + listLabelsForSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + listLabelsForSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + listOrgSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/secrets"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/secrets"]["response"]; + }; + listRepoWorkflows: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows"]["response"]; + }; + listRunnerApplicationsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/runners/downloads"]["response"]; + }; + listRunnerApplicationsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners/downloads"]["response"]; + }; + listSelectedReposForOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]; + }; + listSelectedRepositoriesEnabledGithubActionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/permissions/repositories"]["response"]; + }; + listSelfHostedRunnersForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/actions/runners"]["response"]; + }; + listSelfHostedRunnersForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runners"]["response"]; + }; + listWorkflowRunArtifacts: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"]["response"]; + }; + listWorkflowRuns: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"]["response"]; + }; + listWorkflowRunsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/actions/runs"]["response"]; + }; + reRunJobForWorkflowRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"]["response"]; + }; + reRunWorkflow: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"]["response"]; + }; + reRunWorkflowFailedJobs: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; + removeSelectedRepoFromOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + reviewPendingDeploymentsForRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"]["response"]; + }; + setAllowedActionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/permissions/selected-actions"]["response"]; + }; + setAllowedActionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"]["response"]; + }; + setCustomLabelsForSelfHostedRunnerForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/runners/{runner_id}/labels"]["response"]; + }; + setCustomLabelsForSelfHostedRunnerForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsDefaultWorkflowPermissionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/workflow"]["response"]; + }; + setGithubActionsPermissionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/permissions"]["response"]; + }; + setGithubActionsPermissionsRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions"]["response"]; + }; + setSelectedReposForOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]["response"]; + }; + setSelectedRepositoriesEnabledGithubActionsOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/actions/permissions/repositories"]["response"]; + }; + setWorkflowAccessToRepository: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/actions/permissions/access"]["response"]; + }; + }; + activity: { + checkRepoIsStarredByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/starred/{owner}/{repo}"]["response"]; + }; + deleteRepoSubscription: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/subscription"]["response"]; + }; + deleteThreadSubscription: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /notifications/threads/{thread_id}/subscription"]["response"]; + }; + getFeeds: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /feeds"]["response"]; + }; + getRepoSubscription: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/subscription"]["response"]; + }; + getThread: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /notifications/threads/{thread_id}"]["response"]; + }; + getThreadSubscriptionForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /notifications/threads/{thread_id}/subscription"]["response"]; + }; + listEventsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/events"]["response"]; + }; + listNotificationsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /notifications"]["response"]; + }; + listOrgEventsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/events/orgs/{org}"]["response"]; + }; + listPublicEvents: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /events"]["response"]; + }; + listPublicEventsForRepoNetwork: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /networks/{owner}/{repo}/events"]["response"]; + }; + listPublicEventsForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/events/public"]["response"]; + }; + listPublicOrgEvents: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/events"]["response"]; + }; + listReceivedEventsForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/received_events"]["response"]; + }; + listReceivedPublicEventsForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/received_events/public"]["response"]; + }; + listRepoEvents: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/events"]["response"]; + }; + listRepoNotificationsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/notifications"]["response"]; + }; + listReposStarredByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/starred"]["response"]; + }; + listReposStarredByUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/starred"]["response"]; + }; + listReposWatchedByUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/subscriptions"]["response"]; + }; + listStargazersForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/stargazers"]["response"]; + }; + listWatchedReposForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/subscriptions"]["response"]; + }; + listWatchersForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/subscribers"]["response"]; + }; + markNotificationsAsRead: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /notifications"]["response"]; + }; + markRepoNotificationsAsRead: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/notifications"]["response"]; + }; + markThreadAsRead: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /notifications/threads/{thread_id}"]["response"]; + }; + setRepoSubscription: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/subscription"]["response"]; + }; + setThreadSubscription: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /notifications/threads/{thread_id}/subscription"]["response"]; + }; + starRepoForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/starred/{owner}/{repo}"]["response"]; + }; + unstarRepoForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/starred/{owner}/{repo}"]["response"]; + }; + }; + apps: { + addRepoToInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + addRepoToInstallationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + checkToken: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /applications/{client_id}/token"]["response"]; + }; + createFromManifest: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /app-manifests/{code}/conversions"]["response"]; + }; + createInstallationAccessToken: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /app/installations/{installation_id}/access_tokens"]["response"]; + }; + deleteAuthorization: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /applications/{client_id}/grant"]["response"]; + }; + deleteInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /app/installations/{installation_id}"]["response"]; + }; + deleteToken: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /applications/{client_id}/token"]["response"]; + }; + getAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app"]["response"]; + }; + getBySlug: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /apps/{app_slug}"]["response"]; + }; + getInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/installations/{installation_id}"]["response"]; + }; + getOrgInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/installation"]["response"]; + }; + getRepoInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/installation"]["response"]; + }; + getSubscriptionPlanForAccount: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /marketplace_listing/accounts/{account_id}"]["response"]; + }; + getSubscriptionPlanForAccountStubbed: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /marketplace_listing/stubbed/accounts/{account_id}"]["response"]; + }; + getUserInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/installation"]["response"]; + }; + getWebhookConfigForApp: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/hook/config"]["response"]; + }; + getWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/hook/deliveries/{delivery_id}"]["response"]; + }; + listAccountsForPlan: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /marketplace_listing/plans/{plan_id}/accounts"]["response"]; + }; + listAccountsForPlanStubbed: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"]["response"]; + }; + listInstallationReposForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/installations/{installation_id}/repositories"]["response"]; + }; + listInstallations: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/installations"]["response"]; + }; + listInstallationsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/installations"]["response"]; + }; + listPlans: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /marketplace_listing/plans"]["response"]; + }; + listPlansStubbed: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /marketplace_listing/stubbed/plans"]["response"]; + }; + listReposAccessibleToInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /installation/repositories"]["response"]; + }; + listSubscriptionsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/marketplace_purchases"]["response"]; + }; + listSubscriptionsForAuthenticatedUserStubbed: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/marketplace_purchases/stubbed"]["response"]; + }; + listWebhookDeliveries: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /app/hook/deliveries"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /app/hook/deliveries/{delivery_id}/attempts"]["response"]; + }; + removeRepoFromInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + removeRepoFromInstallationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/installations/{installation_id}/repositories/{repository_id}"]["response"]; + }; + resetToken: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /applications/{client_id}/token"]["response"]; + }; + revokeInstallationAccessToken: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /installation/token"]["response"]; + }; + scopeToken: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /applications/{client_id}/token/scoped"]["response"]; + }; + suspendInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /app/installations/{installation_id}/suspended"]["response"]; + }; + unsuspendInstallation: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /app/installations/{installation_id}/suspended"]["response"]; + }; + updateWebhookConfigForApp: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /app/hook/config"]["response"]; + }; + }; + billing: { + getGithubActionsBillingOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/settings/billing/actions"]["response"]; + }; + getGithubActionsBillingUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/settings/billing/actions"]["response"]; + }; + getGithubAdvancedSecurityBillingGhe: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/settings/billing/advanced-security"]["response"]; + }; + getGithubAdvancedSecurityBillingOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/settings/billing/advanced-security"]["response"]; + }; + getGithubPackagesBillingOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/settings/billing/packages"]["response"]; + }; + getGithubPackagesBillingUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/settings/billing/packages"]["response"]; + }; + getSharedStorageBillingOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/settings/billing/shared-storage"]["response"]; + }; + getSharedStorageBillingUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/settings/billing/shared-storage"]["response"]; + }; + }; + checks: { + create: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/check-runs"]["response"]; + }; + createSuite: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/check-suites"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"]["response"]; + }; + getSuite: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"]["response"]; + }; + listAnnotations: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"]["response"]; + }; + listForRef: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"]["response"]; + }; + listForSuite: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"]["response"]; + }; + listSuitesForRef: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"]["response"]; + }; + rerequestRun: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"]["response"]; + }; + rerequestSuite: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"]["response"]; + }; + setSuitesPreferences: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/check-suites/preferences"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]["response"]; + }; + }; + codeScanning: { + deleteAnalysis: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"]["response"]; + }; + getAlert: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"]["response"]; + }; + getAnalysis: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"]["response"]; + }; + getSarif: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"]["response"]; + }; + listAlertInstances: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/code-scanning/alerts"]["response"]; + }; + listAlertsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts"]["response"]; + }; + listAlertsInstances: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"]["response"]; + }; + listRecentAnalyses: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/code-scanning/analyses"]["response"]; + }; + updateAlert: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"]["response"]; + }; + uploadSarif: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/code-scanning/sarifs"]["response"]; + }; + }; + codesOfConduct: { + getAllCodesOfConduct: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /codes_of_conduct"]["response"]; + }; + getConductCode: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /codes_of_conduct/{key}"]["response"]; + }; + }; + codespaces: { + addRepositoryForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + codespaceMachinesForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/{codespace_name}/machines"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + createOrUpdateSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}"]["response"]; + }; + createWithPrForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"]["response"]; + }; + createWithRepoForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/codespaces"]["response"]; + }; + deleteForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/codespaces/{codespace_name}"]["response"]; + }; + deleteFromOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + deleteSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/codespaces/secrets/{secret_name}"]["response"]; + }; + exportForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces/{codespace_name}/exports"]["response"]; + }; + getExportDetailsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/{codespace_name}/exports/{export_id}"]["response"]; + }; + getForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/{codespace_name}"]["response"]; + }; + getPublicKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets/public-key"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"]["response"]; + }; + getSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets/{secret_name}"]["response"]; + }; + listDevcontainersInRepositoryForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/devcontainers"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces"]["response"]; + }; + listInOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/codespaces"]["response"]; + }; + listInRepositoryForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/secrets"]["response"]; + }; + listRepositoriesForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + listSecretsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/codespaces/secrets"]["response"]; + }; + removeRepositoryForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + repoMachinesForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codespaces/machines"]["response"]; + }; + setRepositoriesForSecretForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/codespaces/secrets/{secret_name}/repositories"]["response"]; + }; + startForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces/{codespace_name}/start"]["response"]; + }; + stopForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/codespaces/{codespace_name}/stop"]["response"]; + }; + stopInOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"]["response"]; + }; + updateForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/codespaces/{codespace_name}"]["response"]; + }; + }; + dependabot: { + addSelectedRepoToOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + createOrUpdateOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + createOrUpdateRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + deleteOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + deleteRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + getOrgPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/public-key"]["response"]; + }; + getOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}"]["response"]; + }; + getRepoPublicKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/public-key"]["response"]; + }; + getRepoSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"]["response"]; + }; + listOrgSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets"]["response"]; + }; + listRepoSecrets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependabot/secrets"]["response"]; + }; + listSelectedReposForOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]; + }; + removeSelectedRepoFromOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"]["response"]; + }; + setSelectedReposForOrgSecret: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"]["response"]; + }; + }; + dependencyGraph: { + createRepositorySnapshot: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/dependency-graph/snapshots"]["response"]; + }; + diffRange: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"]["response"]; + }; + }; + emojis: { + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /emojis"]["response"]; + }; + }; + enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; + disableSelectedOrganizationGithubActionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"]["response"]; + }; + enableSelectedOrganizationGithubActionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"]["response"]; + }; + getAllowedActionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/permissions/selected-actions"]["response"]; + }; + getGithubActionsPermissionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/permissions"]["response"]; + }; + getServerStatistics: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprise-installation/{enterprise_or_org}/server-statistics"]["response"]; + }; + listLabelsForSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; + listSelectedOrganizationsEnabledGithubActionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/actions/permissions/organizations"]["response"]; + }; + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; + removeCustomLabelFromSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}"]["response"]; + }; + setAllowedActionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"]["response"]; + }; + setCustomLabelsForSelfHostedRunnerForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"]["response"]; + }; + setGithubActionsPermissionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions"]["response"]; + }; + setSelectedOrganizationsEnabledGithubActionsEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /enterprises/{enterprise}/actions/permissions/organizations"]["response"]; + }; + }; + gists: { + checkIsStarred: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}/star"]["response"]; + }; + create: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /gists"]["response"]; + }; + createComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /gists/{gist_id}/comments"]["response"]; + }; + delete: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /gists/{gist_id}"]["response"]; + }; + deleteComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /gists/{gist_id}/comments/{comment_id}"]["response"]; + }; + fork: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /gists/{gist_id}/forks"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}"]["response"]; + }; + getComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}/comments/{comment_id}"]["response"]; + }; + getRevision: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}/{sha}"]["response"]; + }; + list: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists"]["response"]; + }; + listComments: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}/comments"]["response"]; + }; + listCommits: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}/commits"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/gists"]["response"]; + }; + listForks: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/{gist_id}/forks"]["response"]; + }; + listPublic: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/public"]["response"]; + }; + listStarred: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gists/starred"]["response"]; + }; + star: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /gists/{gist_id}/star"]["response"]; + }; + unstar: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /gists/{gist_id}/star"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /gists/{gist_id}"]["response"]; + }; + updateComment: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /gists/{gist_id}/comments/{comment_id}"]["response"]; + }; + }; + git: { + createBlob: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/git/blobs"]["response"]; + }; + createCommit: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/git/commits"]["response"]; + }; + createRef: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/git/refs"]["response"]; + }; + createTag: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/git/tags"]["response"]; + }; + createTree: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/git/trees"]["response"]; + }; + deleteRef: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/git/refs/{ref}"]["response"]; + }; + getBlob: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"]["response"]; + }; + getCommit: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"]["response"]; + }; + getRef: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/git/ref/{ref}"]["response"]; + }; + getTag: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"]["response"]; + }; + getTree: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"]["response"]; + }; + listMatchingRefs: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"]["response"]; + }; + updateRef: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]["response"]; + }; + }; + gitignore: { + getAllTemplates: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gitignore/templates"]["response"]; + }; + getTemplate: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /gitignore/templates/{name}"]["response"]; + }; + }; + interactions: { + getRestrictionsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/interaction-limits"]["response"]; + }; + getRestrictionsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/interaction-limits"]["response"]; + }; + getRestrictionsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/interaction-limits"]["response"]; + }; + getRestrictionsForYourPublicRepos: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/interaction-limits"]["response"]; + }; + removeRestrictionsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/interaction-limits"]["response"]; + }; + removeRestrictionsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/interaction-limits"]["response"]; + }; + removeRestrictionsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/interaction-limits"]["response"]; + }; + removeRestrictionsForYourPublicRepos: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/interaction-limits"]["response"]; + }; + setRestrictionsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/interaction-limits"]["response"]; + }; + setRestrictionsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/interaction-limits"]["response"]; + }; + setRestrictionsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/interaction-limits"]["response"]; + }; + setRestrictionsForYourPublicRepos: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/interaction-limits"]["response"]; + }; + }; + issues: { + addAssignees: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"]["response"]; + }; + addLabels: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + checkUserCanBeAssigned: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/assignees/{assignee}"]["response"]; + }; + create: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/issues"]["response"]; + }; + createComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"]["response"]; + }; + createLabel: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/labels"]["response"]; + }; + createMilestone: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/milestones"]["response"]; + }; + deleteComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"]["response"]; + }; + deleteLabel: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/labels/{name}"]["response"]; + }; + deleteMilestone: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}"]["response"]; + }; + getComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"]["response"]; + }; + getEvent: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/events/{event_id}"]["response"]; + }; + getLabel: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/labels/{name}"]["response"]; + }; + getMilestone: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}"]["response"]; + }; + list: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /issues"]["response"]; + }; + listAssignees: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/assignees"]["response"]; + }; + listComments: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"]["response"]; + }; + listCommentsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments"]["response"]; + }; + listEvents: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/events"]["response"]; + }; + listEventsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/events"]["response"]; + }; + listEventsForTimeline: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/issues"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/issues"]["response"]; + }; + listForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues"]["response"]; + }; + listLabelsForMilestone: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"]["response"]; + }; + listLabelsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/labels"]["response"]; + }; + listLabelsOnIssue: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + listMilestones: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/milestones"]["response"]; + }; + lock: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"]["response"]; + }; + removeAllLabels: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + removeAssignees: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"]["response"]; + }; + removeLabel: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"]["response"]; + }; + setLabels: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"]["response"]; + }; + unlock: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/issues/{issue_number}"]["response"]; + }; + updateComment: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"]["response"]; + }; + updateLabel: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/labels/{name}"]["response"]; + }; + updateMilestone: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]["response"]; + }; + }; + licenses: { + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /licenses/{license}"]["response"]; + }; + getAllCommonlyUsed: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /licenses"]["response"]; + }; + getForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/license"]["response"]; + }; + }; + markdown: { + render: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /markdown"]["response"]; + }; + renderRaw: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /markdown/raw"]["response"]; + }; + }; + meta: { + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /meta"]["response"]; + }; + getOctocat: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /octocat"]["response"]; + }; + getZen: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /zen"]["response"]; + }; + root: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /"]["response"]; + }; + }; + migrations: { + cancelImport: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/import"]["response"]; + }; + deleteArchiveForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/migrations/{migration_id}/archive"]["response"]; + }; + deleteArchiveForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/archive"]["response"]; + }; + downloadArchiveForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/archive"]["response"]; + }; + getArchiveForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/migrations/{migration_id}/archive"]["response"]; + }; + getCommitAuthors: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/import/authors"]["response"]; + }; + getImportStatus: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/import"]["response"]; + }; + getLargeFiles: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/import/large_files"]["response"]; + }; + getStatusForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/migrations/{migration_id}"]["response"]; + }; + getStatusForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/migrations"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/migrations"]["response"]; + }; + listReposForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; + listReposForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/migrations/{migration_id}/repositories"]["response"]; + }; + listReposForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/migrations/{migration_id}/repositories"]["response"]; + }; + mapCommitAuthor: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"]["response"]; + }; + setLfsPreference: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/import/lfs"]["response"]; + }; + startForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/migrations"]["response"]; + }; + startForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/migrations"]["response"]; + }; + startImport: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/import"]["response"]; + }; + unlockRepoForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"]["response"]; + }; + unlockRepoForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"]["response"]; + }; + updateImport: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/import"]["response"]; + }; + }; + orgs: { + blockUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/blocks/{username}"]["response"]; + }; + cancelInvitation: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/invitations/{invitation_id}"]["response"]; + }; + checkBlockedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/blocks/{username}"]["response"]; + }; + checkMembershipForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/members/{username}"]["response"]; + }; + checkPublicMembershipForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/public_members/{username}"]["response"]; + }; + convertMemberToOutsideCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/outside_collaborators/{username}"]["response"]; + }; + createInvitation: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/invitations"]["response"]; + }; + createWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/hooks"]["response"]; + }; + deleteWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/hooks/{hook_id}"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}"]["response"]; + }; + getMembershipForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/memberships/orgs/{org}"]["response"]; + }; + getMembershipForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/memberships/{username}"]["response"]; + }; + getWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}"]["response"]; + }; + getWebhookConfigForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/config"]["response"]; + }; + getWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"]["response"]; + }; + list: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /organizations"]["response"]; + }; + listAppInstallations: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/installations"]["response"]; + }; + listBlockedUsers: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/blocks"]["response"]; + }; + listCustomRoles: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /organizations/{organization_id}/custom_roles"]["response"]; + }; + listFailedInvitations: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/failed_invitations"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/orgs"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/orgs"]["response"]; + }; + listInvitationTeams: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["response"]; + }; + listMembers: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/members"]["response"]; + }; + listMembershipsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/memberships/orgs"]["response"]; + }; + listOutsideCollaborators: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/outside_collaborators"]["response"]; + }; + listPendingInvitations: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/invitations"]["response"]; + }; + listPublicMembers: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/public_members"]["response"]; + }; + listWebhookDeliveries: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks/{hook_id}/deliveries"]["response"]; + }; + listWebhooks: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/hooks"]["response"]; + }; + pingWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/hooks/{hook_id}/pings"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["response"]; + }; + removeMember: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/members/{username}"]["response"]; + }; + removeMembershipForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/memberships/{username}"]["response"]; + }; + removeOutsideCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/outside_collaborators/{username}"]["response"]; + }; + removePublicMembershipForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/public_members/{username}"]["response"]; + }; + setMembershipForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/memberships/{username}"]["response"]; + }; + setPublicMembershipForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/public_members/{username}"]["response"]; + }; + unblockUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/blocks/{username}"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /orgs/{org}"]["response"]; + }; + updateMembershipForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/memberships/orgs/{org}"]["response"]; + }; + updateWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /orgs/{org}/hooks/{hook_id}"]["response"]; + }; + updateWebhookConfigForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /orgs/{org}/hooks/{hook_id}/config"]["response"]; + }; + }; + packages: { + deletePackageForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/packages/{package_type}/{package_name}"]["response"]; + }; + deletePackageForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}"]["response"]; + }; + deletePackageForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}"]["response"]; + }; + deletePackageVersionForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + deletePackageVersionForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + deletePackageVersionForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + getAllPackageVersionsForAPackageOwnedByAnOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getAllPackageVersionsForPackageOwnedByUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions"]["response"]; + }; + getPackageForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages/{package_type}/{package_name}"]["response"]; + }; + getPackageForOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}"]["response"]; + }; + getPackageForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}"]["response"]; + }; + getPackageVersionForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + getPackageVersionForOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + getPackageVersionForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"]["response"]; + }; + listPackagesForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/packages"]["response"]; + }; + listPackagesForOrganization: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/packages"]["response"]; + }; + listPackagesForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/packages"]["response"]; + }; + restorePackageForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"]["response"]; + }; + restorePackageVersionForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; + restorePackageVersionForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; + restorePackageVersionForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]["response"]; + }; + }; + projects: { + addCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /projects/{project_id}/collaborators/{username}"]["response"]; + }; + createCard: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /projects/columns/{column_id}/cards"]["response"]; + }; + createColumn: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /projects/{project_id}/columns"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/projects"]["response"]; + }; + createForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/projects"]["response"]; + }; + createForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/projects"]["response"]; + }; + delete: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /projects/{project_id}"]["response"]; + }; + deleteCard: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /projects/columns/cards/{card_id}"]["response"]; + }; + deleteColumn: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /projects/columns/{column_id}"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/{project_id}"]["response"]; + }; + getCard: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/columns/cards/{card_id}"]["response"]; + }; + getColumn: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/columns/{column_id}"]["response"]; + }; + getPermissionForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/{project_id}/collaborators/{username}/permission"]["response"]; + }; + listCards: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/columns/{column_id}/cards"]["response"]; + }; + listCollaborators: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/{project_id}/collaborators"]["response"]; + }; + listColumns: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /projects/{project_id}/columns"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/projects"]["response"]; + }; + listForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/projects"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/projects"]["response"]; + }; + moveCard: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /projects/columns/cards/{card_id}/moves"]["response"]; + }; + moveColumn: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /projects/columns/{column_id}/moves"]["response"]; + }; + removeCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /projects/{project_id}/collaborators/{username}"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /projects/{project_id}"]["response"]; + }; + updateCard: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /projects/columns/cards/{card_id}"]["response"]; + }; + updateColumn: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /projects/columns/{column_id}"]["response"]; + }; + }; + pulls: { + checkIfMerged: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["response"]; + }; + create: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls"]["response"]; + }; + createReplyForReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"]["response"]; + }; + createReview: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["response"]; + }; + createReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; + }; + deletePendingReview: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["response"]; + }; + deleteReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["response"]; + }; + dismissReview: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}"]["response"]; + }; + getReview: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["response"]; + }; + getReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["response"]; + }; + list: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls"]["response"]; + }; + listCommentsForReview: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"]["response"]; + }; + listCommits: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"]["response"]; + }; + listFiles: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"]["response"]; + }; + listRequestedReviewers: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]; + }; + listReviewComments: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"]["response"]; + }; + listReviewCommentsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments"]["response"]; + }; + listReviews: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"]["response"]; + }; + merge: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["response"]; + }; + removeRequestedReviewers: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]; + }; + requestReviewers: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"]["response"]; + }; + submitReview: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"]["response"]; + }; + updateBranch: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"]["response"]; + }; + updateReview: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]["response"]; + }; + updateReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]["response"]; + }; + }; + rateLimit: { + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /rate_limit"]["response"]; + }; + }; + reactions: { + createForCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; + }; + createForIssue: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["response"]; + }; + createForIssueComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["response"]; + }; + createForPullRequestReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; + }; + createForRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; + createForTeamDiscussionCommentInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + createForTeamDiscussionInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["response"]; + }; + deleteForCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForIssue: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"]["response"]; + }; + deleteForIssueComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForPullRequestComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"]["response"]; + }; + deleteForTeamDiscussion: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"]["response"]; + }; + deleteForTeamDiscussionComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"]["response"]; + }; + listForCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"]["response"]; + }; + listForIssue: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"]["response"]; + }; + listForIssueComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"]["response"]; + }; + listForPullRequestReviewComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"]["response"]; + }; + listForRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/reactions"]["response"]; + }; + listForTeamDiscussionCommentInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"]["response"]; + }; + listForTeamDiscussionInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"]["response"]; + }; + }; + repos: { + acceptInvitation: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["response"]; + }; + acceptInvitationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/repository_invitations/{invitation_id}"]["response"]; + }; + addAppAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + addCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/collaborators/{username}"]["response"]; + }; + addStatusCheckContexts: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + addTeamAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + addUserAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + checkCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators/{username}"]["response"]; + }; + checkVulnerabilityAlerts: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; + }; + codeownersErrors: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/codeowners/errors"]["response"]; + }; + compareCommits: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/compare/{base}...{head}"]["response"]; + }; + compareCommitsWithBasehead: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/compare/{basehead}"]["response"]; + }; + createAutolink: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/autolinks"]["response"]; + }; + createCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; + }; + createCommitSignatureProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["response"]; + }; + createCommitStatus: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/statuses/{sha}"]["response"]; + }; + createDeployKey: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/keys"]["response"]; + }; + createDeployment: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/deployments"]["response"]; + }; + createDeploymentStatus: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; + }; + createDispatchEvent: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/dispatches"]["response"]; + }; + createForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/repos"]["response"]; + }; + createFork: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/forks"]["response"]; + }; + createInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/repos"]["response"]; + }; + createOrUpdateEnvironment: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + createOrUpdateFileContents: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/contents/{path}"]["response"]; + }; + createPagesSite: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pages"]["response"]; + }; + createRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/releases"]["response"]; + }; + createTagProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/tags/protection"]["response"]; + }; + createUsingTemplate: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{template_owner}/{template_repo}/generate"]["response"]; + }; + createWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/hooks"]["response"]; + }; + declineInvitation: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["response"]; + }; + declineInvitationForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/repository_invitations/{invitation_id}"]["response"]; + }; + delete: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}"]["response"]; + }; + deleteAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"]["response"]; + }; + deleteAdminBranchProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; + }; + deleteAnEnvironment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + deleteAutolink: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"]["response"]; + }; + deleteBranchProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; + }; + deleteCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/comments/{comment_id}"]["response"]; + }; + deleteCommitSignatureProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["response"]; + }; + deleteDeployKey: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/keys/{key_id}"]["response"]; + }; + deleteDeployment: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"]["response"]; + }; + deleteFile: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/contents/{path}"]["response"]; + }; + deleteInvitation: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"]["response"]; + }; + deletePagesSite: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/pages"]["response"]; + }; + deletePullRequestReviewProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["response"]; + }; + deleteRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/{release_id}"]["response"]; + }; + deleteReleaseAsset: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; + }; + deleteTagProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"]["response"]; + }; + deleteWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; + }; + disableAutomatedSecurityFixes: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/automated-security-fixes"]["response"]; + }; + disableLfsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/lfs"]["response"]; + }; + disableVulnerabilityAlerts: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; + }; + downloadArchive: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/zipball/{ref}"]["response"]; + }; + downloadTarballArchive: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/tarball/{ref}"]["response"]; + }; + downloadZipballArchive: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/zipball/{ref}"]["response"]; + }; + enableAutomatedSecurityFixes: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/automated-security-fixes"]["response"]; + }; + enableLfsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/lfs"]["response"]; + }; + enableVulnerabilityAlerts: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/vulnerability-alerts"]["response"]; + }; + generateReleaseNotes: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/releases/generate-notes"]["response"]; + }; + get: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}"]["response"]; + }; + getAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"]["response"]; + }; + getAdminBranchProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; + }; + getAllEnvironments: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/environments"]["response"]; + }; + getAllStatusCheckContexts: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + getAllTopics: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/topics"]["response"]; + }; + getAppsWithAccessToProtectedBranch: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + getAutolink: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"]["response"]; + }; + getBranch: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}"]["response"]; + }; + getBranchProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; + }; + getClones: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/clones"]["response"]; + }; + getCodeFrequencyStats: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/stats/code_frequency"]["response"]; + }; + getCollaboratorPermissionLevel: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators/{username}/permission"]["response"]; + }; + getCombinedStatusForRef: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/status"]["response"]; + }; + getCommit: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}"]["response"]; + }; + getCommitActivityStats: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/stats/commit_activity"]["response"]; + }; + getCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/comments/{comment_id}"]["response"]; + }; + getCommitSignatureProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"]["response"]; + }; + getCommunityProfileMetrics: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/community/profile"]["response"]; + }; + getContent: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/contents/{path}"]["response"]; + }; + getContributorsStats: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/stats/contributors"]["response"]; + }; + getDeployKey: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/keys/{key_id}"]["response"]; + }; + getDeployment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}"]["response"]; + }; + getDeploymentStatus: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"]["response"]; + }; + getEnvironment: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}"]["response"]; + }; + getLatestPagesBuild: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds/latest"]["response"]; + }; + getLatestRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/latest"]["response"]; + }; + getPages: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pages"]["response"]; + }; + getPagesBuild: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds/{build_id}"]["response"]; + }; + getPagesHealthCheck: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pages/health"]["response"]; + }; + getParticipationStats: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/stats/participation"]["response"]; + }; + getPullRequestReviewProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["response"]; + }; + getPunchCardStats: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/stats/punch_card"]["response"]; + }; + getReadme: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/readme"]["response"]; + }; + getReadmeInDirectory: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/readme/{dir}"]["response"]; + }; + getRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}"]["response"]; + }; + getReleaseAsset: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; + }; + getReleaseByTag: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/tags/{tag}"]["response"]; + }; + getStatusChecksProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + getTeamsWithAccessToProtectedBranch: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + getTopPaths: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/popular/paths"]["response"]; + }; + getTopReferrers: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/popular/referrers"]["response"]; + }; + getUsersWithAccessToProtectedBranch: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + getViews: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/traffic/views"]["response"]; + }; + getWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; + }; + getWebhookConfigForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"]["response"]; + }; + getWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"]["response"]; + }; + listAutolinks: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/autolinks"]["response"]; + }; + listBranches: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/branches"]["response"]; + }; + listBranchesForHeadCommit: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"]["response"]; + }; + listCollaborators: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/collaborators"]["response"]; + }; + listCommentsForCommit: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"]["response"]; + }; + listCommitCommentsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/comments"]["response"]; + }; + listCommitStatusesForRef: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{ref}/statuses"]["response"]; + }; + listCommits: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits"]["response"]; + }; + listContributors: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/contributors"]["response"]; + }; + listDeployKeys: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/keys"]["response"]; + }; + listDeploymentStatuses: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"]["response"]; + }; + listDeployments: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/deployments"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/repos"]["response"]; + }; + listForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/repos"]["response"]; + }; + listForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/repos"]["response"]; + }; + listForks: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/forks"]["response"]; + }; + listInvitations: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/invitations"]["response"]; + }; + listInvitationsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/repository_invitations"]["response"]; + }; + listLanguages: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/languages"]["response"]; + }; + listPagesBuilds: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/pages/builds"]["response"]; + }; + listPublic: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repositories"]["response"]; + }; + listPullRequestsAssociatedWithCommit: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"]["response"]; + }; + listReleaseAssets: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases/{release_id}/assets"]["response"]; + }; + listReleases: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/releases"]["response"]; + }; + listTagProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/tags/protection"]["response"]; + }; + listTags: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/tags"]["response"]; + }; + listTeams: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/teams"]["response"]; + }; + listWebhookDeliveries: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"]["response"]; + }; + listWebhooks: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/hooks"]["response"]; + }; + merge: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/merges"]["response"]; + }; + mergeUpstream: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/merge-upstream"]["response"]; + }; + pingWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"]["response"]; + }; + redeliverWebhookDelivery: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"]["response"]; + }; + removeAppAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + removeCollaborator: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/collaborators/{username}"]["response"]; + }; + removeStatusCheckContexts: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + removeStatusCheckProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + removeTeamAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + removeUserAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + renameBranch: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/rename"]["response"]; + }; + replaceAllTopics: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/topics"]["response"]; + }; + requestPagesBuild: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/pages/builds"]["response"]; + }; + setAdminBranchProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"]["response"]; + }; + setAppAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"]["response"]; + }; + setStatusCheckContexts: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"]["response"]; + }; + setTeamAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"]["response"]; + }; + setUserAccessRestrictions: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"]["response"]; + }; + testPushWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"]["response"]; + }; + transfer: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /repos/{owner}/{repo}/transfer"]["response"]; + }; + update: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}"]["response"]; + }; + updateBranchProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/branches/{branch}/protection"]["response"]; + }; + updateCommitComment: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/comments/{comment_id}"]["response"]; + }; + updateInformationAboutPagesSite: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /repos/{owner}/{repo}/pages"]["response"]; + }; + updateInvitation: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"]["response"]; + }; + updatePullRequestReviewProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"]["response"]; + }; + updateRelease: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/releases/{release_id}"]["response"]; + }; + updateReleaseAsset: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"]["response"]; + }; + updateStatusCheckPotection: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + updateStatusCheckProtection: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"]["response"]; + }; + updateWebhook: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"]["response"]; + }; + updateWebhookConfigForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"]["response"]; + }; + uploadReleaseAsset: { + parameters: RequestParameters & Omit; + response: Endpoints["POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}"]["response"]; + }; + }; + search: { + code: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/code"]["response"]; + }; + commits: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/commits"]["response"]; + }; + issuesAndPullRequests: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/issues"]["response"]; + }; + labels: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/labels"]["response"]; + }; + repos: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/repositories"]["response"]; + }; + topics: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/topics"]["response"]; + }; + users: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /search/users"]["response"]; + }; + }; + secretScanning: { + getAlert: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["response"]; + }; + listAlertsForEnterprise: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /enterprises/{enterprise}/secret-scanning/alerts"]["response"]; + }; + listAlertsForOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/secret-scanning/alerts"]["response"]; + }; + listAlertsForRepo: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts"]["response"]; + }; + listLocationsForAlert: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"]["response"]; + }; + updateAlert: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]["response"]; + }; + }; + teams: { + addOrUpdateMembershipForUserInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"]; + }; + addOrUpdateProjectPermissionsInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"]; + }; + addOrUpdateRepoPermissionsInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"]; + }; + checkPermissionsForProjectInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"]; + }; + checkPermissionsForRepoInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"]; + }; + create: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/teams"]["response"]; + }; + createDiscussionCommentInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; + }; + createDiscussionInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /orgs/{org}/teams/{team_slug}/discussions"]["response"]; + }; + deleteDiscussionCommentInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["response"]; + }; + deleteDiscussionInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["response"]; + }; + deleteInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}"]["response"]; + }; + getByName: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}"]["response"]; + }; + getDiscussionCommentInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["response"]; + }; + getDiscussionInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["response"]; + }; + getMembershipForUserInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"]; + }; + list: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams"]["response"]; + }; + listChildInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/teams"]["response"]; + }; + listDiscussionCommentsInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"]["response"]; + }; + listDiscussionsInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/discussions"]["response"]; + }; + listForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/teams"]["response"]; + }; + listMembersInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/members"]["response"]; + }; + listPendingInvitationsInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["response"]; + }; + listProjectsInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["response"]; + }; + listReposInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["response"]; + }; + removeMembershipForUserInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"]; + }; + removeProjectInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"]; + }; + removeRepoInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"]; + }; + updateDiscussionCommentInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"]["response"]; + }; + updateDiscussionInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"]["response"]; + }; + updateInOrg: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /orgs/{org}/teams/{team_slug}"]["response"]; + }; + }; + users: { + addEmailForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/emails"]["response"]; + }; + addEmailForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/emails"]["response"]; + }; + block: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/blocks/{username}"]["response"]; + }; + checkBlocked: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/blocks/{username}"]["response"]; + }; + checkFollowingForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/following/{target_user}"]["response"]; + }; + checkPersonIsFollowedByAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/following/{username}"]["response"]; + }; + createGpgKeyForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/gpg_keys"]["response"]; + }; + createGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/gpg_keys"]["response"]; + }; + createPublicSshKeyForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/keys"]["response"]; + }; + createPublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["POST /user/keys"]["response"]; + }; + deleteEmailForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/emails"]["response"]; + }; + deleteEmailForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/emails"]["response"]; + }; + deleteGpgKeyForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + deleteGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + deletePublicSshKeyForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/keys/{key_id}"]["response"]; + }; + deletePublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/keys/{key_id}"]["response"]; + }; + follow: { + parameters: RequestParameters & Omit; + response: Endpoints["PUT /user/following/{username}"]["response"]; + }; + getAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user"]["response"]; + }; + getByUsername: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}"]["response"]; + }; + getContextForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/hovercard"]["response"]; + }; + getGpgKeyForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + getGpgKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/gpg_keys/{gpg_key_id}"]["response"]; + }; + getPublicSshKeyForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/keys/{key_id}"]["response"]; + }; + getPublicSshKeyForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/keys/{key_id}"]["response"]; + }; + list: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users"]["response"]; + }; + listBlockedByAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/blocks"]["response"]; + }; + listBlockedByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/blocks"]["response"]; + }; + listEmailsForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/emails"]["response"]; + }; + listEmailsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/emails"]["response"]; + }; + listFollowedByAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/following"]["response"]; + }; + listFollowedByAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/following"]["response"]; + }; + listFollowersForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/followers"]["response"]; + }; + listFollowersForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/followers"]["response"]; + }; + listFollowingForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/following"]["response"]; + }; + listGpgKeysForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; + listGpgKeysForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/gpg_keys"]["response"]; + }; + listGpgKeysForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/gpg_keys"]["response"]; + }; + listPublicEmailsForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/public_emails"]["response"]; + }; + listPublicEmailsForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/public_emails"]["response"]; + }; + listPublicKeysForUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /users/{username}/keys"]["response"]; + }; + listPublicSshKeysForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/keys"]["response"]; + }; + listPublicSshKeysForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["GET /user/keys"]["response"]; + }; + setPrimaryEmailVisibilityForAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/email/visibility"]["response"]; + }; + setPrimaryEmailVisibilityForAuthenticatedUser: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user/email/visibility"]["response"]; + }; + unblock: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/blocks/{username}"]["response"]; + }; + unfollow: { + parameters: RequestParameters & Omit; + response: Endpoints["DELETE /user/following/{username}"]["response"]; + }; + updateAuthenticated: { + parameters: RequestParameters & Omit; + response: Endpoints["PATCH /user"]["response"]; + }; + }; +}; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts new file mode 100644 index 0000000..a81f3b0 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/index.d.ts @@ -0,0 +1,11 @@ +import { Octokit } from "@octokit/core"; +export { RestEndpointMethodTypes } from "./generated/parameters-and-response-types"; +import { Api } from "./types"; +export declare function restEndpointMethods(octokit: Octokit): Api; +export declare namespace restEndpointMethods { + var VERSION: string; +} +export declare function legacyRestEndpointMethods(octokit: Octokit): Api["rest"] & Api; +export declare namespace legacyRestEndpointMethods { + var VERSION: string; +} diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts new file mode 100644 index 0000000..3628f02 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/types.d.ts @@ -0,0 +1,18 @@ +import { Route, RequestParameters } from "@octokit/types"; +import { RestEndpointMethods } from "./generated/method-types"; +export declare type Api = { + rest: RestEndpointMethods; +}; +export declare type EndpointDecorations = { + mapToData?: string; + deprecated?: string; + renamed?: [string, string]; + renamedParameters?: { + [name: string]: string; + }; +}; +export declare type EndpointsDefaultsAndDecorations = { + [scope: string]: { + [methodName: string]: [Route, RequestParameters?, EndpointDecorations?]; + }; +}; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts new file mode 100644 index 0000000..04c17e0 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.16.2"; diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js new file mode 100644 index 0000000..e35644d --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js @@ -0,0 +1,1745 @@ +const Endpoints = { + actions: { + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels", + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve", + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel", + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}", + ], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token", + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token", + ], + createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token", + ], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}", + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}", + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}", + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}", + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}", + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}", + ], + deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs", + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}", + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}", + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository", + ], + getActionsCacheUsageForEnterprise: [ + "GET /enterprises/{enterprise}/actions/cache/usage", + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions", + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions", + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key", + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", + ], + getGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow", + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow", + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions", + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions", + ], + getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], + getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] }, + ], + getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], + getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals", + ], + getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}", + ], + getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access", + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing", + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels", + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], + listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads", + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories", + ], + listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], + listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + ], + listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels", + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}", + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions", + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions", + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels", + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels", + ], + setGithubActionsDefaultWorkflowPermissionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow", + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow", + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions", + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions", + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories", + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories", + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access", + ], + }, + activity: { + checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], + deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription", + ], + getFeeds: ["GET /feeds"], + getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], + getThread: ["GET /notifications/threads/{thread_id}"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription", + ], + listEventsForAuthenticatedUser: ["GET /users/{username}/events"], + listNotificationsForAuthenticatedUser: ["GET /notifications"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}", + ], + listPublicEvents: ["GET /events"], + listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], + listPublicEventsForUser: ["GET /users/{username}/events/public"], + listPublicOrgEvents: ["GET /orgs/{org}/events"], + listReceivedEventsForUser: ["GET /users/{username}/received_events"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public", + ], + listRepoEvents: ["GET /repos/{owner}/{repo}/events"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications", + ], + listReposStarredByAuthenticatedUser: ["GET /user/starred"], + listReposStarredByUser: ["GET /users/{username}/starred"], + listReposWatchedByUser: ["GET /users/{username}/subscriptions"], + listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"], + listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"], + listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"], + markNotificationsAsRead: ["PUT /notifications"], + markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], + markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], + setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription", + ], + starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], + unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"], + }, + apps: { + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }, + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + ], + checkToken: ["POST /applications/{client_id}/token"], + createFromManifest: ["POST /app-manifests/{code}/conversions"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens", + ], + deleteAuthorization: ["DELETE /applications/{client_id}/grant"], + deleteInstallation: ["DELETE /app/installations/{installation_id}"], + deleteToken: ["DELETE /applications/{client_id}/token"], + getAuthenticated: ["GET /app"], + getBySlug: ["GET /apps/{app_slug}"], + getInstallation: ["GET /app/installations/{installation_id}"], + getOrgInstallation: ["GET /orgs/{org}/installation"], + getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}", + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}", + ], + getUserInstallation: ["GET /users/{username}/installation"], + getWebhookConfigForApp: ["GET /app/hook/config"], + getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], + listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories", + ], + listInstallations: ["GET /app/installations"], + listInstallationsForAuthenticatedUser: ["GET /user/installations"], + listPlans: ["GET /marketplace_listing/plans"], + listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], + listReposAccessibleToInstallation: ["GET /installation/repositories"], + listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed", + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts", + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }, + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + ], + resetToken: ["PATCH /applications/{client_id}/token"], + revokeInstallationAccessToken: ["DELETE /installation/token"], + scopeToken: ["POST /applications/{client_id}/token/scoped"], + suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended", + ], + updateWebhookConfigForApp: ["PATCH /app/hook/config"], + }, + billing: { + getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions", + ], + getGithubAdvancedSecurityBillingGhe: [ + "GET /enterprises/{enterprise}/settings/billing/advanced-security", + ], + getGithubAdvancedSecurityBillingOrg: [ + "GET /orgs/{org}/settings/billing/advanced-security", + ], + getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages", + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage", + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage", + ], + }, + checks: { + create: ["POST /repos/{owner}/{repo}/check-runs"], + createSuite: ["POST /repos/{owner}/{repo}/check-suites"], + get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], + getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + ], + listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + ], + listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences", + ], + update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"], + }, + codeScanning: { + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}", + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } }, + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", + ], + getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + ], + listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] }, + ], + listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + ], + uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"], + }, + codesOfConduct: { + getAllCodesOfConduct: ["GET /codes_of_conduct"], + getConductCode: ["GET /codes_of_conduct/{key}"], + }, + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines", + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}", + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces", + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces", + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}", + ], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}", + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports", + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}", + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key", + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}", + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}", + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } }, + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces", + ], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories", + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}", + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines", + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories", + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"], + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}", + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key", + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}", + ], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + ], + }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots", + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}", + ], + }, + emojis: { get: ["GET /emojis"] }, + enterpriseAdmin: { + addCustomLabelsToSelfHostedRunnerForEnterprise: [ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + disableSelectedOrganizationGithubActionsEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}", + ], + enableSelectedOrganizationGithubActionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}", + ], + getAllowedActionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/selected-actions", + ], + getGithubActionsPermissionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions", + ], + getServerStatistics: [ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics", + ], + listLabelsForSelfHostedRunnerForEnterprise: [ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + listSelectedOrganizationsEnabledGithubActionsEnterprise: [ + "GET /enterprises/{enterprise}/actions/permissions/organizations", + ], + removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + removeCustomLabelFromSelfHostedRunnerForEnterprise: [ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", + ], + setAllowedActionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/selected-actions", + ], + setCustomLabelsForSelfHostedRunnerForEnterprise: [ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels", + ], + setGithubActionsPermissionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions", + ], + setSelectedOrganizationsEnabledGithubActionsEnterprise: [ + "PUT /enterprises/{enterprise}/actions/permissions/organizations", + ], + }, + gists: { + checkIsStarred: ["GET /gists/{gist_id}/star"], + create: ["POST /gists"], + createComment: ["POST /gists/{gist_id}/comments"], + delete: ["DELETE /gists/{gist_id}"], + deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"], + fork: ["POST /gists/{gist_id}/forks"], + get: ["GET /gists/{gist_id}"], + getComment: ["GET /gists/{gist_id}/comments/{comment_id}"], + getRevision: ["GET /gists/{gist_id}/{sha}"], + list: ["GET /gists"], + listComments: ["GET /gists/{gist_id}/comments"], + listCommits: ["GET /gists/{gist_id}/commits"], + listForUser: ["GET /users/{username}/gists"], + listForks: ["GET /gists/{gist_id}/forks"], + listPublic: ["GET /gists/public"], + listStarred: ["GET /gists/starred"], + star: ["PUT /gists/{gist_id}/star"], + unstar: ["DELETE /gists/{gist_id}/star"], + update: ["PATCH /gists/{gist_id}"], + updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"], + }, + git: { + createBlob: ["POST /repos/{owner}/{repo}/git/blobs"], + createCommit: ["POST /repos/{owner}/{repo}/git/commits"], + createRef: ["POST /repos/{owner}/{repo}/git/refs"], + createTag: ["POST /repos/{owner}/{repo}/git/tags"], + createTree: ["POST /repos/{owner}/{repo}/git/trees"], + deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"], + getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"], + getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"], + getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"], + getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"], + getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"], + listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"], + updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"], + }, + gitignore: { + getAllTemplates: ["GET /gitignore/templates"], + getTemplate: ["GET /gitignore/templates/{name}"], + }, + interactions: { + getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], + getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], + getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] }, + ], + removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], + removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits", + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] }, + ], + setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], + setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], + setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] }, + ], + }, + issues: { + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees", + ], + addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], + checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + create: ["POST /repos/{owner}/{repo}/issues"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments", + ], + createLabel: ["POST /repos/{owner}/{repo}/labels"], + createMilestone: ["POST /repos/{owner}/{repo}/milestones"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}", + ], + deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}", + ], + get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], + getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], + getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], + getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"], + getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"], + list: ["GET /issues"], + listAssignees: ["GET /repos/{owner}/{repo}/assignees"], + listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"], + listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], + listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], + listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + ], + listForAuthenticatedUser: ["GET /user/issues"], + listForOrg: ["GET /orgs/{org}/issues"], + listForRepo: ["GET /repos/{owner}/{repo}/issues"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + ], + listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + ], + listMilestones: ["GET /repos/{owner}/{repo}/milestones"], + lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels", + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees", + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", + ], + setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], + unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], + update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], + updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], + updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}", + ], + }, + licenses: { + get: ["GET /licenses/{license}"], + getAllCommonlyUsed: ["GET /licenses"], + getForRepo: ["GET /repos/{owner}/{repo}/license"], + }, + markdown: { + render: ["POST /markdown"], + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } }, + ], + }, + meta: { + get: ["GET /meta"], + getOctocat: ["GET /octocat"], + getZen: ["GET /zen"], + root: ["GET /"], + }, + migrations: { + cancelImport: ["DELETE /repos/{owner}/{repo}/import"], + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive", + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive", + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive", + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive", + ], + getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], + getImportStatus: ["GET /repos/{owner}/{repo}/import"], + getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], + getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], + getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], + listForAuthenticatedUser: ["GET /user/migrations"], + listForOrg: ["GET /orgs/{org}/migrations"], + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories", + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] }, + ], + mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"], + setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: ["PUT /repos/{owner}/{repo}/import"], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", + ], + updateImport: ["PATCH /repos/{owner}/{repo}/import"], + }, + orgs: { + blockUser: ["PUT /orgs/{org}/blocks/{username}"], + cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], + checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], + checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], + checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}", + ], + createInvitation: ["POST /orgs/{org}/invitations"], + createWebhook: ["POST /orgs/{org}/hooks"], + deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + get: ["GET /orgs/{org}"], + getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], + getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], + getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], + getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], + listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], + listForAuthenticatedUser: ["GET /user/orgs"], + listForUser: ["GET /users/{username}/orgs"], + listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"], + listMembers: ["GET /orgs/{org}/members"], + listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], + listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPendingInvitations: ["GET /orgs/{org}/invitations"], + listPublicMembers: ["GET /orgs/{org}/public_members"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], + removeMember: ["DELETE /orgs/{org}/members/{username}"], + removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}", + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}", + ], + setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}", + ], + unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], + update: ["PATCH /orgs/{org}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}", + ], + updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], + updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"], + }, + packages: { + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}", + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}", + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}", + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }, + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser", + ], + }, + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions", + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}", + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}", + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}", + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}", + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", + ], + }, + projects: { + addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], + createCard: ["POST /projects/columns/{column_id}/cards"], + createColumn: ["POST /projects/{project_id}/columns"], + createForAuthenticatedUser: ["POST /user/projects"], + createForOrg: ["POST /orgs/{org}/projects"], + createForRepo: ["POST /repos/{owner}/{repo}/projects"], + delete: ["DELETE /projects/{project_id}"], + deleteCard: ["DELETE /projects/columns/cards/{card_id}"], + deleteColumn: ["DELETE /projects/columns/{column_id}"], + get: ["GET /projects/{project_id}"], + getCard: ["GET /projects/columns/cards/{card_id}"], + getColumn: ["GET /projects/columns/{column_id}"], + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission", + ], + listCards: ["GET /projects/columns/{column_id}/cards"], + listCollaborators: ["GET /projects/{project_id}/collaborators"], + listColumns: ["GET /projects/{project_id}/columns"], + listForOrg: ["GET /orgs/{org}/projects"], + listForRepo: ["GET /repos/{owner}/{repo}/projects"], + listForUser: ["GET /users/{username}/projects"], + moveCard: ["POST /projects/columns/cards/{card_id}/moves"], + moveColumn: ["POST /projects/columns/{column_id}/moves"], + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}", + ], + update: ["PATCH /projects/{project_id}"], + updateCard: ["PATCH /projects/columns/cards/{card_id}"], + updateColumn: ["PATCH /projects/columns/{column_id}"], + }, + pulls: { + checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + create: ["POST /repos/{owner}/{repo}/pulls"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", + ], + createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments", + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}", + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", + ], + get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + ], + getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], + list: ["GET /repos/{owner}/{repo}/pulls"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + ], + listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], + listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + ], + listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], + listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], + merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", + ], + update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}", + ], + }, + rateLimit: { get: ["GET /rate_limit"] }, + reactions: { + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions", + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + ], + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }, + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}", + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" }, + ], + addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" }, + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" }, + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" }, + ], + checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts", + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}", + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments", + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + ], + createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], + createDeployKey: ["POST /repos/{owner}/{repo}/keys"], + createDeployment: ["POST /repos/{owner}/{repo}/deployments"], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + ], + createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], + createForAuthenticatedUser: ["POST /user/repos"], + createFork: ["POST /repos/{owner}/{repo}/forks"], + createInOrg: ["POST /orgs/{org}/repos"], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}", + ], + createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate", + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] }, + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}", + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions", + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}", + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection", + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + ], + deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}", + ], + deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}", + ], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}", + ], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}", + ], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes", + ], + disableLfsForRepo: ["DELETE /repos/{owner}/{repo}/lfs"], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts", + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] }, + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes", + ], + enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts", + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes", + ], + get: ["GET /repos/{owner}/{repo}"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions", + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + ], + getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + ], + getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], + getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection", + ], + getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], + getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission", + ], + getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], + getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], + getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], + getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", + ], + getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], + getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], + getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], + getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}", + ], + getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], + getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getPages: ["GET /repos/{owner}/{repo}/pages"], + getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], + getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], + getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + ], + getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], + getReadme: ["GET /repos/{owner}/{repo}/readme"], + getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], + getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], + getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], + getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + ], + getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], + getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + ], + getViews: ["GET /repos/{owner}/{repo}/traffic/views"], + getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config", + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", + ], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", + ], + listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + ], + listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + ], + listCommits: ["GET /repos/{owner}/{repo}/commits"], + listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + ], + listDeployments: ["GET /repos/{owner}/{repo}/deployments"], + listForAuthenticatedUser: ["GET /user/repos"], + listForOrg: ["GET /orgs/{org}/repos"], + listForUser: ["GET /users/{username}/repos"], + listForks: ["GET /repos/{owner}/{repo}/forks"], + listInvitations: ["GET /repos/{owner}/{repo}/invitations"], + listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"], + listLanguages: ["GET /repos/{owner}/{repo}/languages"], + listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], + listPublic: ["GET /repositories"], + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + ], + listReleases: ["GET /repos/{owner}/{repo}/releases"], + listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], + listTags: ["GET /repos/{owner}/{repo}/tags"], + listTeams: ["GET /repos/{owner}/{repo}/teams"], + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + ], + listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], + merge: ["POST /repos/{owner}/{repo}/merges"], + mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], + pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" }, + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}", + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" }, + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" }, + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" }, + ], + renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], + replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], + requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" }, + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" }, + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" }, + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" }, + ], + testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], + transfer: ["POST /repos/{owner}/{repo}/transfer"], + update: ["PATCH /repos/{owner}/{repo}"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection", + ], + updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}", + ], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", + ], + updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}", + ], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] }, + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + ], + updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config", + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" }, + ], + }, + search: { + code: ["GET /search/code"], + commits: ["GET /search/commits"], + issuesAndPullRequests: ["GET /search/issues"], + labels: ["GET /search/labels"], + repos: ["GET /search/repositories"], + topics: ["GET /search/topics"], + users: ["GET /search/users"], + }, + secretScanning: { + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts", + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", + ], + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}", + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", + ], + create: ["POST /orgs/{org}/teams"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + ], + createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", + ], + deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], + getByName: ["GET /orgs/{org}/teams/{team_slug}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}", + ], + list: ["GET /orgs/{org}/teams"], + listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + ], + listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], + listForAuthenticatedUser: ["GET /user/teams"], + listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations", + ], + listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], + listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}", + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}", + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", + ], + updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"], + }, + users: { + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] }, + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + block: ["PUT /user/blocks/{username}"], + checkBlocked: ["GET /user/blocks/{username}"], + checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], + checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] }, + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }, + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] }, + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }, + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }, + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + follow: ["PUT /user/following/{username}"], + getAuthenticated: ["GET /user"], + getByUsername: ["GET /users/{username}"], + getContextForUser: ["GET /users/{username}/hovercard"], + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] }, + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }, + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + list: ["GET /users"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] }, + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] }, + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] }, + ], + listFollowedByAuthenticatedUser: ["GET /user/following"], + listFollowersForAuthenticatedUser: ["GET /user/followers"], + listFollowersForUser: ["GET /users/{username}/followers"], + listFollowingForUser: ["GET /users/{username}/following"], + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] }, + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }, + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }, + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }, + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility", + ], + unblock: ["DELETE /user/blocks/{username}"], + unfollow: ["DELETE /user/following/{username}"], + updateAuthenticated: ["PATCH /user"], + }, +}; + +const VERSION = "5.16.2"; + +function endpointsToMethods(octokit, endpointsMap) { + const newMethods = {}; + for (const [scope, endpoints] of Object.entries(endpointsMap)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign({ method, url }, defaults); + if (!newMethods[scope]) { + newMethods[scope] = {}; + } + const scopeMethods = newMethods[scope]; + if (decorations) { + scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); + continue; + } + scopeMethods[methodName] = octokit.request.defaults(endpointDefaults); + } + } + return newMethods; +} +function decorate(octokit, scope, methodName, defaults, decorations) { + const requestWithDefaults = octokit.request.defaults(defaults); + /* istanbul ignore next */ + function withDecorations(...args) { + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + let options = requestWithDefaults.endpoint.merge(...args); + // There are currently no other decorations than `.mapToData` + if (decorations.mapToData) { + options = Object.assign({}, options, { + data: options[decorations.mapToData], + [decorations.mapToData]: undefined, + }); + return requestWithDefaults(options); + } + if (decorations.renamed) { + const [newScope, newMethodName] = decorations.renamed; + octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); + } + if (decorations.deprecated) { + octokit.log.warn(decorations.deprecated); + } + if (decorations.renamedParameters) { + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + const options = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries(decorations.renamedParameters)) { + if (name in options) { + octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); + if (!(alias in options)) { + options[alias] = options[name]; + } + delete options[name]; + } + } + return requestWithDefaults(options); + } + // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 + return requestWithDefaults(...args); + } + return Object.assign(withDecorations, requestWithDefaults); +} + +function restEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, Endpoints); + return { + rest: api, + }; +} +restEndpointMethods.VERSION = VERSION; +function legacyRestEndpointMethods(octokit) { + const api = endpointsToMethods(octokit, Endpoints); + return { + ...api, + rest: api, + }; +} +legacyRestEndpointMethods.VERSION = VERSION; + +export { legacyRestEndpointMethods, restEndpointMethods }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map new file mode 100644 index 0000000..d33402a --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/generated/endpoints.js","../dist-src/version.js","../dist-src/endpoints-to-methods.js","../dist-src/index.js"],"sourcesContent":["const Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\",\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\",\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\",\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\",\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\",\n ],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\",\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\",\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\",\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\",\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\",\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\",\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\",\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\",\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\",\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\",\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\",\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\",\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\",\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n ],\n getActionsCacheUsageForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/cache/usage\",\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\",\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\",\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\",\n ],\n getGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\",\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\",\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] },\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\",\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\",\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\",\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\",\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\",\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\",\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\",\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\",\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\",\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\",\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\",\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsDefaultWorkflowPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\",\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\",\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\",\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\",\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\",\n ],\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\",\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\",\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\",\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\",\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\",\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\",\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"],\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] },\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\",\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\",\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\",\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\",\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\",\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\",\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] },\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\",\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"],\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\",\n ],\n getGithubAdvancedSecurityBillingGhe: [\n \"GET /enterprises/{enterprise}/settings/billing/advanced-security\",\n ],\n getGithubAdvancedSecurityBillingOrg: [\n \"GET /orgs/{org}/settings/billing/advanced-security\",\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\",\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\",\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\",\n ],\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\",\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\",\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\",\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } },\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\",\n ],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] },\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"],\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"],\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\",\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\",\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\",\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\",\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\",\n ],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\",\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\",\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\",\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\",\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\",\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\",\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } },\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\",\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\",\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\",\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\",\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"],\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\",\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\",\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\",\n ],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\",\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n ],\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\",\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\",\n ],\n },\n emojis: { get: [\"GET /emojis\"] },\n enterpriseAdmin: {\n addCustomLabelsToSelfHostedRunnerForEnterprise: [\n \"POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n disableSelectedOrganizationGithubActionsEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n enableSelectedOrganizationGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}\",\n ],\n getAllowedActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n getGithubActionsPermissionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions\",\n ],\n getServerStatistics: [\n \"GET /enterprise-installation/{enterprise_or_org}/server-statistics\",\n ],\n listLabelsForSelfHostedRunnerForEnterprise: [\n \"GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n listSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"GET /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n removeCustomLabelFromSelfHostedRunnerForEnterprise: [\n \"DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}\",\n ],\n setAllowedActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/selected-actions\",\n ],\n setCustomLabelsForSelfHostedRunnerForEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels\",\n ],\n setGithubActionsPermissionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions\",\n ],\n setSelectedOrganizationsEnabledGithubActionsEnterprise: [\n \"PUT /enterprises/{enterprise}/actions/permissions/organizations\",\n ],\n },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"],\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"],\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"],\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] },\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\",\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] },\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] },\n ],\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\",\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\",\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\",\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\",\n ],\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"],\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } },\n ],\n },\n meta: {\n get: [\"GET /meta\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"],\n },\n migrations: {\n cancelImport: [\"DELETE /repos/{owner}/{repo}/import\"],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\",\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\",\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\",\n ],\n getCommitAuthors: [\"GET /repos/{owner}/{repo}/import/authors\"],\n getImportStatus: [\"GET /repos/{owner}/{repo}/import\"],\n getLargeFiles: [\"GET /repos/{owner}/{repo}/import/large_files\"],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] },\n ],\n mapCommitAuthor: [\"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\"],\n setLfsPreference: [\"PATCH /repos/{owner}/{repo}/import/lfs\"],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\"PUT /repos/{owner}/{repo}/import\"],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\",\n ],\n updateImport: [\"PATCH /repos/{owner}/{repo}/import\"],\n },\n orgs: {\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\",\n ],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n get: [\"GET /orgs/{org}\"],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomRoles: [\"GET /organizations/{organization_id}/custom_roles\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\",\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\",\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\",\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\",\n ],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"],\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\",\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\",\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] },\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\",\n ],\n },\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\",\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\",\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\",\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\",\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\",\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\",\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\",\n ],\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\",\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\",\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"],\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\",\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\",\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\",\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\",\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\",\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\",\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\",\n ],\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\",\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\",\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\",\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\",\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n ],\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] },\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\",\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\",\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] },\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\",\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\",\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n disableLfsForRepo: [\"DELETE /repos/{owner}/{repo}/lfs\"],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] },\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\",\n ],\n enableLfsForRepo: [\"PUT /repos/{owner}/{repo}/lfs\"],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\",\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\",\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\",\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\",\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\",\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\",\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\",\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\",\n ],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\",\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\",\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\",\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\",\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" },\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" },\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" },\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" },\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\",\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\",\n ],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\",\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\",\n ],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] },\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\",\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" },\n ],\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"],\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\",\n ],\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\",\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\",\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\",\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\",\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\",\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"],\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] },\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] },\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] },\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] },\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] },\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] },\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] },\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] },\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] },\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] },\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] },\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] },\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] },\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] },\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] },\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\",\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"],\n },\n};\nexport default Endpoints;\n","export const VERSION = \"5.16.2\";\n","export function endpointsToMethods(octokit, endpointsMap) {\n const newMethods = {};\n for (const [scope, endpoints] of Object.entries(endpointsMap)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign({ method, url }, defaults);\n if (!newMethods[scope]) {\n newMethods[scope] = {};\n }\n const scopeMethods = newMethods[scope];\n if (decorations) {\n scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);\n continue;\n }\n scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);\n }\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n /* istanbul ignore next */\n function withDecorations(...args) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n let options = requestWithDefaults.endpoint.merge(...args);\n // There are currently no other decorations than `.mapToData`\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: undefined,\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n const options = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(decorations.renamedParameters)) {\n if (name in options) {\n octokit.log.warn(`\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`);\n if (!(alias in options)) {\n options[alias] = options[name];\n }\n delete options[name];\n }\n }\n return requestWithDefaults(options);\n }\n // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n","import ENDPOINTS from \"./generated/endpoints\";\nimport { VERSION } from \"./version\";\nimport { endpointsToMethods } from \"./endpoints-to-methods\";\nexport function restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n rest: api,\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nexport function legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit, ENDPOINTS);\n return {\n ...api,\n rest: api,\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n"],"names":["ENDPOINTS"],"mappings":"AAAA,MAAM,SAAS,GAAG;AAClB,IAAI,OAAO,EAAE;AACb,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,+CAA+C,CAAC;AAClF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,+CAA+C,CAAC;AAClF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,4FAA4F;AACxG,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,kDAAkD,CAAC;AAC7E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,oDAAoD,CAAC;AACjF,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,0CAA0C,CAAC;AACzE,QAAQ,oBAAoB,EAAE,CAAC,+CAA+C,CAAC;AAC/E,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,qCAAqC,CAAC;AAC3E,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,2DAA2D,CAAC;AAClF,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qCAAqC;AACjD,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,iDAAiD,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,4CAA4C,CAAC;AACvE,QAAQ,YAAY,EAAE,CAAC,+CAA+C,CAAC;AACvE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,+CAA+C;AAC3D,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,SAAS,EAAE,uCAAuC,CAAC,EAAE;AAC7E,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sDAAsD,CAAC;AAClF,QAAQ,aAAa,EAAE,CAAC,yDAAyD,CAAC;AAClF,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,6CAA6C,CAAC;AAClF,QAAQ,0BAA0B,EAAE;AACpC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,2DAA2D,CAAC;AAClF,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,iDAAiD,CAAC;AAC3E,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,6CAA6C,CAAC;AAC7E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,iCAAiC,CAAC;AAC3D,QAAQ,eAAe,EAAE,CAAC,2CAA2C,CAAC;AACtE,QAAQ,iBAAiB,EAAE,CAAC,6CAA6C,CAAC;AAC1E,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,6BAA6B,EAAE;AACvC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,wDAAwD,EAAE;AAClE,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,2BAA2B,EAAE,CAAC,iCAAiC,CAAC;AACxE,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,wCAAwC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,wDAAwD,CAAC;AACjF,QAAQ,uBAAuB,EAAE;AACjC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,+CAA+C,EAAE;AACzD,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,gDAAgD,EAAE;AAC1D,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,2CAA2C,EAAE;AACrD,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oDAAoD,EAAE;AAC9D,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,uCAAuC,EAAE;AACjD,YAAY,qCAAqC;AACjD,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,sDAAsD;AAClE,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,qCAAqC,EAAE,CAAC,kCAAkC,CAAC;AACnF,QAAQ,sBAAsB,EAAE,CAAC,2CAA2C,CAAC;AAC7E,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,YAAY,CAAC;AAChC,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,SAAS,EAAE,CAAC,wCAAwC,CAAC;AAC7D,QAAQ,yCAAyC,EAAE;AACnD,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,8BAA8B,CAAC;AACxE,QAAQ,qCAAqC,EAAE,CAAC,oBAAoB,CAAC;AACrE,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,aAAa,CAAC;AACzC,QAAQ,8BAA8B,EAAE,CAAC,qCAAqC,CAAC;AAC/E,QAAQ,uBAAuB,EAAE,CAAC,qCAAqC,CAAC;AACxE,QAAQ,mBAAmB,EAAE,CAAC,wBAAwB,CAAC;AACvD,QAAQ,yBAAyB,EAAE,CAAC,uCAAuC,CAAC;AAC5E,QAAQ,+BAA+B,EAAE;AACzC,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,kCAAkC,CAAC;AAC5D,QAAQ,yCAAyC,EAAE;AACnD,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,mBAAmB,CAAC;AAClE,QAAQ,sBAAsB,EAAE,CAAC,+BAA+B,CAAC;AACjE,QAAQ,sBAAsB,EAAE,CAAC,qCAAqC,CAAC;AACvE,QAAQ,qBAAqB,EAAE,CAAC,sCAAsC,CAAC;AACvE,QAAQ,oCAAoC,EAAE,CAAC,yBAAyB,CAAC;AACzE,QAAQ,mBAAmB,EAAE,CAAC,uCAAuC,CAAC;AACtE,QAAQ,uBAAuB,EAAE,CAAC,oBAAoB,CAAC;AACvD,QAAQ,2BAA2B,EAAE,CAAC,yCAAyC,CAAC;AAChF,QAAQ,gBAAgB,EAAE,CAAC,0CAA0C,CAAC;AACtE,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,4BAA4B,EAAE,CAAC,kCAAkC,CAAC;AAC1E,QAAQ,8BAA8B,EAAE,CAAC,qCAAqC,CAAC;AAC/E,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,wEAAwE;AACpF,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,2CAA2C,CAAC,EAAE;AAC9E,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,kBAAkB,EAAE,CAAC,6CAA6C,CAAC;AAC3E,QAAQ,WAAW,EAAE,CAAC,wCAAwC,CAAC;AAC/D,QAAQ,gBAAgB,EAAE,CAAC,UAAU,CAAC;AACtC,QAAQ,SAAS,EAAE,CAAC,sBAAsB,CAAC;AAC3C,QAAQ,eAAe,EAAE,CAAC,0CAA0C,CAAC;AACrE,QAAQ,kBAAkB,EAAE,CAAC,8BAA8B,CAAC;AAC5D,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,oCAAoC,CAAC;AACnE,QAAQ,sBAAsB,EAAE,CAAC,sBAAsB,CAAC;AACxD,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,0BAA0B,EAAE;AACpC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,wBAAwB,CAAC;AACrD,QAAQ,qCAAqC,EAAE,CAAC,yBAAyB,CAAC;AAC1E,QAAQ,SAAS,EAAE,CAAC,gCAAgC,CAAC;AACrD,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,iCAAiC,EAAE,CAAC,gCAAgC,CAAC;AAC7E,QAAQ,qCAAqC,EAAE,CAAC,iCAAiC,CAAC;AAClF,QAAQ,4CAA4C,EAAE;AACtD,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,qBAAqB,EAAE,CAAC,0BAA0B,CAAC;AAC3D,QAAQ,wBAAwB,EAAE;AAClC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,gDAAgD,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,8CAA8C,EAAE;AACxD,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,uCAAuC,CAAC;AAC7D,QAAQ,6BAA6B,EAAE,CAAC,4BAA4B,CAAC;AACrE,QAAQ,UAAU,EAAE,CAAC,6CAA6C,CAAC;AACnE,QAAQ,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;AACnF,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,wBAAwB,CAAC;AAC7D,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,0BAA0B,EAAE,CAAC,0CAA0C,CAAC;AAChF,QAAQ,2BAA2B,EAAE;AACrC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,2BAA2B,EAAE,CAAC,2CAA2C,CAAC;AAClF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,uDAAuD;AACnE,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,MAAM,EAAE,CAAC,uCAAuC,CAAC;AACzD,QAAQ,WAAW,EAAE,CAAC,yCAAyC,CAAC;AAChE,QAAQ,GAAG,EAAE,CAAC,qDAAqD,CAAC;AACpE,QAAQ,QAAQ,EAAE,CAAC,yDAAyD,CAAC;AAC7E,QAAQ,eAAe,EAAE;AACzB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,oDAAoD,CAAC;AAC1E,QAAQ,YAAY,EAAE;AACtB,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sDAAsD,CAAC;AAClF,QAAQ,YAAY,EAAE;AACtB,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,uDAAuD,CAAC;AACzE,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,cAAc,EAAE;AACxB,YAAY,oFAAoF;AAChG,SAAS;AACT,QAAQ,QAAQ,EAAE;AAClB,YAAY,+DAA+D;AAC3E,YAAY,EAAE;AACd,YAAY,EAAE,iBAAiB,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,EAAE;AAC/D,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,2DAA2D,CAAC;AAC/E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,sCAAsC,CAAC;AAClE,QAAQ,iBAAiB,EAAE,CAAC,gDAAgD,CAAC;AAC7E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yEAAyE;AACrF,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,oBAAoB,CAAC,EAAE;AAC/D,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,kDAAkD,CAAC;AAChF,QAAQ,WAAW,EAAE;AACrB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,iDAAiD,CAAC;AACxE,KAAK;AACL,IAAI,cAAc,EAAE;AACpB,QAAQ,oBAAoB,EAAE,CAAC,uBAAuB,CAAC;AACvD,QAAQ,cAAc,EAAE,CAAC,6BAA6B,CAAC;AACvD,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,0CAA0C,EAAE;AACpD,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,uBAAuB,CAAC;AAC7D,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,4CAA4C;AACxD,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,uCAAuC;AACnD,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,0CAA0C,CAAC;AAChF,QAAQ,sBAAsB,EAAE;AAChC,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,uCAAuC,CAAC;AAC1E,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,yCAAyC;AACrD,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,6BAA6B,EAAE;AACvC,YAAY,4CAA4C;AACxD,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;AAC1D,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,4BAA4B;AACxC,YAAY,EAAE;AACd,YAAY,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE;AACpD,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,sCAAsC;AAClD,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,8CAA8C,CAAC;AACzE,QAAQ,6CAA6C,EAAE;AACvD,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,8BAA8B,CAAC;AACzE,QAAQ,6CAA6C,EAAE;AACvD,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,8CAA8C,CAAC;AACnF,QAAQ,wBAAwB,EAAE,CAAC,6CAA6C,CAAC;AACjF,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,yCAAyC,CAAC;AAC/E,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,0BAA0B,EAAE;AACpC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,+CAA+C,CAAC;AAC1E,QAAQ,YAAY,EAAE,CAAC,kDAAkD,CAAC;AAC1E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,oCAAoC,CAAC;AAC9D,QAAQ,eAAe,EAAE,CAAC,8CAA8C,CAAC;AACzE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,+DAA+D;AAC3E,SAAS;AACT,KAAK;AACL,IAAI,eAAe,EAAE;AACrB,QAAQ,wBAAwB,EAAE;AAClC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,SAAS,EAAE;AACnB,YAAY,+DAA+D;AAC3E,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,EAAE;AACpC,IAAI,eAAe,EAAE;AACrB,QAAQ,8CAA8C,EAAE;AACxD,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,iDAAiD,EAAE;AAC3D,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,kDAAkD,EAAE;AAC5D,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,+CAA+C,EAAE;AACzD,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,sDAAsD,EAAE;AAChE,YAAY,iEAAiE;AAC7E,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,cAAc,EAAE,CAAC,2BAA2B,CAAC;AACrD,QAAQ,MAAM,EAAE,CAAC,aAAa,CAAC;AAC/B,QAAQ,aAAa,EAAE,CAAC,gCAAgC,CAAC;AACzD,QAAQ,MAAM,EAAE,CAAC,yBAAyB,CAAC;AAC3C,QAAQ,aAAa,EAAE,CAAC,+CAA+C,CAAC;AACxE,QAAQ,IAAI,EAAE,CAAC,6BAA6B,CAAC;AAC7C,QAAQ,GAAG,EAAE,CAAC,sBAAsB,CAAC;AACrC,QAAQ,UAAU,EAAE,CAAC,4CAA4C,CAAC;AAClE,QAAQ,WAAW,EAAE,CAAC,4BAA4B,CAAC;AACnD,QAAQ,IAAI,EAAE,CAAC,YAAY,CAAC;AAC5B,QAAQ,YAAY,EAAE,CAAC,+BAA+B,CAAC;AACvD,QAAQ,WAAW,EAAE,CAAC,8BAA8B,CAAC;AACrD,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,4BAA4B,CAAC;AACjD,QAAQ,UAAU,EAAE,CAAC,mBAAmB,CAAC;AACzC,QAAQ,WAAW,EAAE,CAAC,oBAAoB,CAAC;AAC3C,QAAQ,IAAI,EAAE,CAAC,2BAA2B,CAAC;AAC3C,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,MAAM,EAAE,CAAC,wBAAwB,CAAC;AAC1C,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,KAAK;AACL,IAAI,GAAG,EAAE;AACT,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,YAAY,EAAE,CAAC,wCAAwC,CAAC;AAChE,QAAQ,SAAS,EAAE,CAAC,qCAAqC,CAAC;AAC1D,QAAQ,SAAS,EAAE,CAAC,qCAAqC,CAAC;AAC1D,QAAQ,UAAU,EAAE,CAAC,sCAAsC,CAAC;AAC5D,QAAQ,SAAS,EAAE,CAAC,6CAA6C,CAAC;AAClE,QAAQ,OAAO,EAAE,CAAC,gDAAgD,CAAC;AACnE,QAAQ,SAAS,EAAE,CAAC,oDAAoD,CAAC;AACzE,QAAQ,MAAM,EAAE,CAAC,yCAAyC,CAAC;AAC3D,QAAQ,MAAM,EAAE,CAAC,8CAA8C,CAAC;AAChE,QAAQ,OAAO,EAAE,CAAC,gDAAgD,CAAC;AACnE,QAAQ,gBAAgB,EAAE,CAAC,mDAAmD,CAAC;AAC/E,QAAQ,SAAS,EAAE,CAAC,4CAA4C,CAAC;AACjE,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,eAAe,EAAE,CAAC,0BAA0B,CAAC;AACrD,QAAQ,WAAW,EAAE,CAAC,iCAAiC,CAAC;AACxD,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,mCAAmC,EAAE,CAAC,8BAA8B,CAAC;AAC7E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,sBAAsB,EAAE,CAAC,8CAA8C,CAAC;AAChF,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,qCAAqC,CAAC,EAAE;AAChF,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,iCAAiC,CAAC;AACnF,QAAQ,wBAAwB,EAAE,CAAC,uCAAuC,CAAC;AAC3E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,iDAAiD;AAC7D,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,iCAAiC;AAC7C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,wCAAwC,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,8BAA8B,CAAC;AAC7E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,sBAAsB,EAAE,CAAC,8CAA8C,CAAC;AAChF,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,qCAAqC,CAAC,EAAE;AAChF,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,YAAY,EAAE;AACtB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,yDAAyD,CAAC;AAC9E,QAAQ,sBAAsB,EAAE,CAAC,gDAAgD,CAAC;AAClF,QAAQ,MAAM,EAAE,CAAC,mCAAmC,CAAC;AACrD,QAAQ,aAAa,EAAE;AACvB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mCAAmC,CAAC;AAC1D,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,aAAa,EAAE;AACvB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,4CAA4C,CAAC;AACnE,QAAQ,eAAe,EAAE;AACzB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,iDAAiD,CAAC;AAChE,QAAQ,UAAU,EAAE,CAAC,wDAAwD,CAAC;AAC9E,QAAQ,QAAQ,EAAE,CAAC,oDAAoD,CAAC;AACxE,QAAQ,QAAQ,EAAE,CAAC,yCAAyC,CAAC;AAC7D,QAAQ,YAAY,EAAE,CAAC,yDAAyD,CAAC;AACjF,QAAQ,IAAI,EAAE,CAAC,aAAa,CAAC;AAC7B,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,YAAY,EAAE,CAAC,0DAA0D,CAAC;AAClF,QAAQ,mBAAmB,EAAE,CAAC,2CAA2C,CAAC;AAC1E,QAAQ,UAAU,EAAE,CAAC,wDAAwD,CAAC;AAC9E,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,wBAAwB,EAAE,CAAC,kBAAkB,CAAC;AACtD,QAAQ,UAAU,EAAE,CAAC,wBAAwB,CAAC;AAC9C,QAAQ,WAAW,EAAE,CAAC,kCAAkC,CAAC;AACzD,QAAQ,sBAAsB,EAAE;AAChC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,kCAAkC,CAAC;AAC/D,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sCAAsC,CAAC;AAChE,QAAQ,IAAI,EAAE,CAAC,sDAAsD,CAAC;AACtE,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,wDAAwD,CAAC;AAC7E,QAAQ,MAAM,EAAE,CAAC,yDAAyD,CAAC;AAC3E,QAAQ,MAAM,EAAE,CAAC,mDAAmD,CAAC;AACrE,QAAQ,aAAa,EAAE,CAAC,0DAA0D,CAAC;AACnF,QAAQ,WAAW,EAAE,CAAC,2CAA2C,CAAC;AAClE,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,GAAG,EAAE,CAAC,yBAAyB,CAAC;AACxC,QAAQ,kBAAkB,EAAE,CAAC,eAAe,CAAC;AAC7C,QAAQ,UAAU,EAAE,CAAC,mCAAmC,CAAC;AACzD,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,MAAM,EAAE,CAAC,gBAAgB,CAAC;AAClC,QAAQ,SAAS,EAAE;AACnB,YAAY,oBAAoB;AAChC,YAAY,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,2BAA2B,EAAE,EAAE;AACxE,SAAS;AACT,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,GAAG,EAAE,CAAC,WAAW,CAAC;AAC1B,QAAQ,UAAU,EAAE,CAAC,cAAc,CAAC;AACpC,QAAQ,MAAM,EAAE,CAAC,UAAU,CAAC;AAC5B,QAAQ,IAAI,EAAE,CAAC,OAAO,CAAC;AACvB,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,6CAA6C;AACzD,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,0CAA0C,CAAC;AACtE,QAAQ,eAAe,EAAE,CAAC,kCAAkC,CAAC;AAC7D,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,QAAQ,6BAA6B,EAAE,CAAC,qCAAqC,CAAC;AAC9E,QAAQ,eAAe,EAAE,CAAC,2CAA2C,CAAC;AACtE,QAAQ,wBAAwB,EAAE,CAAC,sBAAsB,CAAC;AAC1D,QAAQ,UAAU,EAAE,CAAC,4BAA4B,CAAC;AAClD,QAAQ,6BAA6B,EAAE;AACvC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,wDAAwD,CAAC;AACnF,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,kDAAkD;AAC9D,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,YAAY,EAAE,+BAA+B,CAAC,EAAE;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,wDAAwD,CAAC;AACnF,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,yBAAyB,EAAE,CAAC,uBAAuB,CAAC;AAC5D,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,kCAAkC,CAAC;AACzD,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,gBAAgB,EAAE,CAAC,gDAAgD,CAAC;AAC5E,QAAQ,gBAAgB,EAAE,CAAC,mCAAmC,CAAC;AAC/D,QAAQ,sBAAsB,EAAE,CAAC,oCAAoC,CAAC;AACtE,QAAQ,4BAA4B,EAAE,CAAC,2CAA2C,CAAC;AACnF,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,8BAA8B,CAAC;AAC1D,QAAQ,aAAa,EAAE,CAAC,wBAAwB,CAAC;AACjD,QAAQ,aAAa,EAAE,CAAC,oCAAoC,CAAC;AAC7D,QAAQ,GAAG,EAAE,CAAC,iBAAiB,CAAC;AAChC,QAAQ,iCAAiC,EAAE,CAAC,kCAAkC,CAAC;AAC/E,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,UAAU,EAAE,CAAC,iCAAiC,CAAC;AACvD,QAAQ,sBAAsB,EAAE,CAAC,wCAAwC,CAAC;AAC1E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,IAAI,EAAE,CAAC,oBAAoB,CAAC;AACpC,QAAQ,oBAAoB,EAAE,CAAC,+BAA+B,CAAC;AAC/D,QAAQ,gBAAgB,EAAE,CAAC,wBAAwB,CAAC;AACpD,QAAQ,eAAe,EAAE,CAAC,mDAAmD,CAAC;AAC9E,QAAQ,qBAAqB,EAAE,CAAC,oCAAoC,CAAC;AACrE,QAAQ,wBAAwB,EAAE,CAAC,gBAAgB,CAAC;AACpD,QAAQ,WAAW,EAAE,CAAC,4BAA4B,CAAC;AACnD,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,WAAW,EAAE,CAAC,yBAAyB,CAAC;AAChD,QAAQ,mCAAmC,EAAE,CAAC,4BAA4B,CAAC;AAC3E,QAAQ,wBAAwB,EAAE,CAAC,uCAAuC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE,CAAC,6BAA6B,CAAC;AAC/D,QAAQ,iBAAiB,EAAE,CAAC,gCAAgC,CAAC;AAC7D,QAAQ,qBAAqB,EAAE,CAAC,4CAA4C,CAAC;AAC7E,QAAQ,YAAY,EAAE,CAAC,uBAAuB,CAAC;AAC/C,QAAQ,WAAW,EAAE,CAAC,wCAAwC,CAAC;AAC/D,QAAQ,wBAAwB,EAAE;AAClC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,uCAAuC,CAAC;AAC/D,QAAQ,uBAAuB,EAAE,CAAC,2CAA2C,CAAC;AAC9E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,uCAAuC,EAAE;AACjD,YAAY,2CAA2C;AACvD,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,sCAAsC,CAAC;AAC7D,QAAQ,MAAM,EAAE,CAAC,mBAAmB,CAAC;AACrC,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,oCAAoC;AAChD,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,mCAAmC,CAAC;AAC5D,QAAQ,yBAAyB,EAAE,CAAC,0CAA0C,CAAC;AAC/E,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,wCAAwC,EAAE;AAClD,YAAY,mFAAmF;AAC/F,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,4CAA4C,EAAE;AACtD,YAAY,iEAAiE;AAC7E,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,2CAA2C,CAAC,EAAE;AAClF,SAAS;AACT,QAAQ,2DAA2D,EAAE;AACrE,YAAY,2DAA2D;AACvE,YAAY,EAAE;AACd,YAAY;AACZ,gBAAgB,OAAO,EAAE;AACzB,oBAAoB,UAAU;AAC9B,oBAAoB,yDAAyD;AAC7E,iBAAiB;AACjB,aAAa;AACb,SAAS;AACT,QAAQ,uDAAuD,EAAE;AACjE,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,0CAA0C,EAAE;AACpD,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,gFAAgF;AAC5F,SAAS;AACT,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,4FAA4F;AACxG,SAAS;AACT,QAAQ,gCAAgC,EAAE,CAAC,oBAAoB,CAAC;AAChE,QAAQ,2BAA2B,EAAE,CAAC,0BAA0B,CAAC;AACjE,QAAQ,mBAAmB,EAAE,CAAC,gCAAgC,CAAC;AAC/D,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,yEAAyE;AACrF,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,yCAAyC,EAAE;AACnD,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,qGAAqG;AACjH,SAAS;AACT,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,UAAU,EAAE,CAAC,0CAA0C,CAAC;AAChE,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,QAAQ,0BAA0B,EAAE,CAAC,qBAAqB,CAAC;AAC3D,QAAQ,YAAY,EAAE,CAAC,2BAA2B,CAAC;AACnD,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,MAAM,EAAE,CAAC,+BAA+B,CAAC;AACjD,QAAQ,UAAU,EAAE,CAAC,0CAA0C,CAAC;AAChE,QAAQ,YAAY,EAAE,CAAC,sCAAsC,CAAC;AAC9D,QAAQ,GAAG,EAAE,CAAC,4BAA4B,CAAC;AAC3C,QAAQ,OAAO,EAAE,CAAC,uCAAuC,CAAC;AAC1D,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,yCAAyC,CAAC;AAC9D,QAAQ,iBAAiB,EAAE,CAAC,0CAA0C,CAAC;AACvE,QAAQ,WAAW,EAAE,CAAC,oCAAoC,CAAC;AAC3D,QAAQ,UAAU,EAAE,CAAC,0BAA0B,CAAC;AAChD,QAAQ,WAAW,EAAE,CAAC,oCAAoC,CAAC;AAC3D,QAAQ,WAAW,EAAE,CAAC,gCAAgC,CAAC;AACvD,QAAQ,QAAQ,EAAE,CAAC,8CAA8C,CAAC;AAClE,QAAQ,UAAU,EAAE,CAAC,0CAA0C,CAAC;AAChE,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,UAAU,EAAE,CAAC,yCAAyC,CAAC;AAC/D,QAAQ,YAAY,EAAE,CAAC,qCAAqC,CAAC;AAC7D,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,aAAa,EAAE,CAAC,qDAAqD,CAAC;AAC9E,QAAQ,MAAM,EAAE,CAAC,kCAAkC,CAAC;AACpD,QAAQ,2BAA2B,EAAE;AACrC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,wDAAwD,CAAC;AAChF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,aAAa,EAAE;AACvB,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,+CAA+C,CAAC;AAC9D,QAAQ,SAAS,EAAE;AACnB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,uDAAuD,CAAC;AACnF,QAAQ,IAAI,EAAE,CAAC,iCAAiC,CAAC;AACjD,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,uDAAuD,CAAC;AAC9E,QAAQ,SAAS,EAAE,CAAC,qDAAqD,CAAC;AAC1E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,0CAA0C,CAAC;AAC/E,QAAQ,WAAW,EAAE,CAAC,uDAAuD,CAAC;AAC9E,QAAQ,KAAK,EAAE,CAAC,qDAAqD,CAAC;AACtE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,iDAAiD,CAAC;AACnE,QAAQ,YAAY,EAAE;AACtB,YAAY,6DAA6D;AACzE,SAAS;AACT,QAAQ,YAAY,EAAE;AACtB,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,yDAAyD;AACrE,SAAS;AACT,KAAK;AACL,IAAI,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE;AAC3C,IAAI,SAAS,EAAE;AACf,QAAQ,sBAAsB,EAAE;AAChC,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,wGAAwG;AACpH,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,mFAAmF;AAC/F,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,8FAA8F;AAC1G,SAAS;AACT,QAAQ,8BAA8B,EAAE;AACxC,YAAY,wHAAwH;AACpI,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,2DAA2D,CAAC;AACnF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,uGAAuG;AACnH,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,6EAA6E;AACzF,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,oDAAoD;AAChE,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,sCAAsC,CAAC,EAAE;AAC1E,SAAS;AACT,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,oDAAoD,CAAC;AAC/E,QAAQ,sBAAsB,EAAE;AAChC,YAAY,yFAAyF;AACrG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,4EAA4E;AACxF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,4EAA4E;AACxF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,oDAAoD,CAAC;AACjF,QAAQ,wBAAwB,EAAE;AAClC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,6CAA6C,CAAC;AACzE,QAAQ,cAAc,EAAE,CAAC,mDAAmD,CAAC;AAC7E,QAAQ,0BAA0B,EAAE;AACpC,YAAY,8CAA8C;AAC1D,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sCAAsC,CAAC;AAChE,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,2CAA2C,CAAC;AACzE,QAAQ,eAAe,EAAE,CAAC,iCAAiC,CAAC;AAC5D,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,sBAAsB,EAAE;AAChC,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,uCAAuC,CAAC;AACtE,QAAQ,0BAA0B,EAAE,CAAC,kBAAkB,CAAC;AACxD,QAAQ,UAAU,EAAE,CAAC,kCAAkC,CAAC;AACxD,QAAQ,WAAW,EAAE,CAAC,wBAAwB,CAAC;AAC/C,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,2CAA2C,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,kCAAkC,CAAC;AAC7D,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,mBAAmB,EAAE,CAAC,4CAA4C,CAAC;AAC3E,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,kCAAkC,CAAC;AAC3D,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,qDAAqD;AACjE,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,uCAAuC,CAAC,EAAE;AAC3E,SAAS;AACT,QAAQ,qCAAqC,EAAE;AAC/C,YAAY,qDAAqD;AACjE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,8BAA8B,CAAC;AAChD,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,8DAA8D;AAC1E,SAAS;AACT,QAAQ,cAAc,EAAE,CAAC,sDAAsD,CAAC;AAChF,QAAQ,sBAAsB,EAAE;AAChC,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,oDAAoD,CAAC;AACnF,QAAQ,+BAA+B,EAAE;AACzC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,4CAA4C,CAAC;AACvE,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,UAAU,EAAE,CAAC,8CAA8C,CAAC;AACpE,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,oCAAoC,CAAC;AAC/D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,yFAAyF;AACrG,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,oDAAoD,CAAC;AAC7E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,kEAAkE;AAC9E,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,8CAA8C,CAAC;AACvE,QAAQ,6BAA6B,EAAE;AACvC,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,kCAAkC,CAAC;AAC/D,QAAQ,0BAA0B,EAAE;AACpC,YAAY,mDAAmD;AAC/D,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,yCAAyC;AACrD,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wBAAwB,CAAC,EAAE;AAC5D,SAAS;AACT,QAAQ,sBAAsB,EAAE,CAAC,yCAAyC,CAAC;AAC3E,QAAQ,sBAAsB,EAAE,CAAC,yCAAyC,CAAC;AAC3E,QAAQ,4BAA4B,EAAE;AACtC,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,+BAA+B,CAAC;AAC3D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,gDAAgD;AAC5D,SAAS;AACT,QAAQ,oBAAoB,EAAE;AAC9B,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,GAAG,EAAE,CAAC,2BAA2B,CAAC;AAC1C,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,uEAAuE;AACnF,SAAS;AACT,QAAQ,kBAAkB,EAAE,CAAC,wCAAwC,CAAC;AACtE,QAAQ,yBAAyB,EAAE;AACnC,YAAY,wFAAwF;AACpG,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,kCAAkC,CAAC;AAC1D,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,0EAA0E;AACtF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mDAAmD,CAAC;AAC1E,QAAQ,SAAS,EAAE,CAAC,6CAA6C,CAAC;AAClE,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,SAAS,EAAE,CAAC,0CAA0C,CAAC;AAC/D,QAAQ,qBAAqB,EAAE,CAAC,gDAAgD,CAAC;AACjF,QAAQ,8BAA8B,EAAE;AACxC,YAAY,+DAA+D;AAC3E,SAAS;AACT,QAAQ,uBAAuB,EAAE,CAAC,gDAAgD,CAAC;AACnF,QAAQ,SAAS,EAAE,CAAC,yCAAyC,CAAC;AAC9D,QAAQ,sBAAsB,EAAE,CAAC,iDAAiD,CAAC;AACnF,QAAQ,gBAAgB,EAAE,CAAC,iDAAiD,CAAC;AAC7E,QAAQ,4BAA4B,EAAE;AACtC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,0BAA0B,EAAE,CAAC,6CAA6C,CAAC;AACnF,QAAQ,UAAU,EAAE,CAAC,2CAA2C,CAAC;AACjE,QAAQ,oBAAoB,EAAE,CAAC,8CAA8C,CAAC;AAC9E,QAAQ,YAAY,EAAE,CAAC,yCAAyC,CAAC;AACjE,QAAQ,aAAa,EAAE,CAAC,uDAAuD,CAAC;AAChF,QAAQ,mBAAmB,EAAE;AAC7B,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,cAAc,EAAE;AACxB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,+CAA+C,CAAC;AAC9E,QAAQ,gBAAgB,EAAE,CAAC,2CAA2C,CAAC;AACvE,QAAQ,QAAQ,EAAE,CAAC,iCAAiC,CAAC;AACrD,QAAQ,aAAa,EAAE,CAAC,mDAAmD,CAAC;AAC5E,QAAQ,mBAAmB,EAAE,CAAC,wCAAwC,CAAC;AACvE,QAAQ,qBAAqB,EAAE,CAAC,+CAA+C,CAAC;AAChF,QAAQ,8BAA8B,EAAE;AACxC,YAAY,sFAAsF;AAClG,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,4CAA4C,CAAC;AACzE,QAAQ,SAAS,EAAE,CAAC,kCAAkC,CAAC;AACvD,QAAQ,oBAAoB,EAAE,CAAC,wCAAwC,CAAC;AACxE,QAAQ,UAAU,EAAE,CAAC,iDAAiD,CAAC;AACvE,QAAQ,eAAe,EAAE,CAAC,sDAAsD,CAAC;AACjF,QAAQ,eAAe,EAAE,CAAC,+CAA+C,CAAC;AAC1E,QAAQ,yBAAyB,EAAE;AACnC,YAAY,+EAA+E;AAC3F,SAAS;AACT,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,iDAAiD,CAAC;AACxE,QAAQ,eAAe,EAAE,CAAC,qDAAqD,CAAC;AAChF,QAAQ,mCAAmC,EAAE;AAC7C,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,QAAQ,EAAE,CAAC,yCAAyC,CAAC;AAC7D,QAAQ,UAAU,EAAE,CAAC,2CAA2C,CAAC;AACjE,QAAQ,uBAAuB,EAAE;AACjC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,oEAAoE;AAChF,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,yBAAyB,EAAE,CAAC,oCAAoC,CAAC;AACzE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,kDAAkD;AAC9D,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,mCAAmC,CAAC;AAC1D,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,cAAc,EAAE,CAAC,gCAAgC,CAAC;AAC1D,QAAQ,sBAAsB,EAAE;AAChC,YAAY,gEAAgE;AAC5E,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACrD,QAAQ,UAAU,EAAE,CAAC,uBAAuB,CAAC;AAC7C,QAAQ,WAAW,EAAE,CAAC,6BAA6B,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,iCAAiC,CAAC;AACtD,QAAQ,eAAe,EAAE,CAAC,uCAAuC,CAAC;AAClE,QAAQ,mCAAmC,EAAE,CAAC,kCAAkC,CAAC;AACjF,QAAQ,aAAa,EAAE,CAAC,qCAAqC,CAAC;AAC9D,QAAQ,eAAe,EAAE,CAAC,wCAAwC,CAAC;AACnE,QAAQ,UAAU,EAAE,CAAC,mBAAmB,CAAC;AACzC,QAAQ,oCAAoC,EAAE;AAC9C,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,iBAAiB,EAAE;AAC3B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,oCAAoC,CAAC;AAC5D,QAAQ,iBAAiB,EAAE,CAAC,2CAA2C,CAAC;AACxE,QAAQ,QAAQ,EAAE,CAAC,gCAAgC,CAAC;AACpD,QAAQ,SAAS,EAAE,CAAC,iCAAiC,CAAC;AACtD,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,iCAAiC,CAAC;AACzD,QAAQ,KAAK,EAAE,CAAC,mCAAmC,CAAC;AACpD,QAAQ,aAAa,EAAE,CAAC,2CAA2C,CAAC;AACpE,QAAQ,WAAW,EAAE,CAAC,kDAAkD,CAAC;AACzE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,8EAA8E;AAC1F,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,6EAA6E;AACzF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,uDAAuD;AACnE,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2FAA2F;AACvG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,kFAAkF;AAC9F,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,8EAA8E;AAC1F,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,YAAY,EAAE,CAAC,qDAAqD,CAAC;AAC7E,QAAQ,gBAAgB,EAAE,CAAC,kCAAkC,CAAC;AAC9D,QAAQ,iBAAiB,EAAE,CAAC,yCAAyC,CAAC;AACtE,QAAQ,wBAAwB,EAAE;AAClC,YAAY,wEAAwE;AACpF,SAAS;AACT,QAAQ,wBAAwB,EAAE;AAClC,YAAY,0EAA0E;AACtF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE;AACjC,SAAS;AACT,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wFAAwF;AACpG,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE;AACrC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,2EAA2E;AACvF,YAAY,EAAE;AACd,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE;AAClC,SAAS;AACT,QAAQ,eAAe,EAAE,CAAC,kDAAkD,CAAC;AAC7E,QAAQ,QAAQ,EAAE,CAAC,qCAAqC,CAAC;AACzD,QAAQ,MAAM,EAAE,CAAC,6BAA6B,CAAC;AAC/C,QAAQ,sBAAsB,EAAE;AAChC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,mBAAmB,EAAE,CAAC,mDAAmD,CAAC;AAClF,QAAQ,+BAA+B,EAAE,CAAC,iCAAiC,CAAC;AAC5E,QAAQ,gBAAgB,EAAE;AAC1B,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,wFAAwF;AACpG,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,mDAAmD,CAAC;AAC5E,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,0BAA0B,EAAE;AACpC,YAAY,iFAAiF;AAC7F,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,6BAA6B,CAAC,EAAE;AACjE,SAAS;AACT,QAAQ,2BAA2B,EAAE;AACrC,YAAY,iFAAiF;AAC7F,SAAS;AACT,QAAQ,aAAa,EAAE,CAAC,6CAA6C,CAAC;AACtE,QAAQ,0BAA0B,EAAE;AACpC,YAAY,oDAAoD;AAChE,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,sEAAsE;AAClF,YAAY,EAAE,OAAO,EAAE,4BAA4B,EAAE;AACrD,SAAS;AACT,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,IAAI,EAAE,CAAC,kBAAkB,CAAC;AAClC,QAAQ,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACxC,QAAQ,qBAAqB,EAAE,CAAC,oBAAoB,CAAC;AACrD,QAAQ,MAAM,EAAE,CAAC,oBAAoB,CAAC;AACtC,QAAQ,KAAK,EAAE,CAAC,0BAA0B,CAAC;AAC3C,QAAQ,MAAM,EAAE,CAAC,oBAAoB,CAAC;AACtC,QAAQ,KAAK,EAAE,CAAC,mBAAmB,CAAC;AACpC,KAAK;AACL,IAAI,cAAc,EAAE;AACpB,QAAQ,QAAQ,EAAE;AAClB,YAAY,iEAAiE;AAC7E,SAAS;AACT,QAAQ,uBAAuB,EAAE;AACjC,YAAY,sDAAsD;AAClE,SAAS;AACT,QAAQ,gBAAgB,EAAE,CAAC,wCAAwC,CAAC;AACpE,QAAQ,iBAAiB,EAAE,CAAC,kDAAkD,CAAC;AAC/E,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,2EAA2E;AACvF,SAAS;AACT,QAAQ,WAAW,EAAE;AACrB,YAAY,mEAAmE;AAC/E,SAAS;AACT,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yDAAyD;AACrE,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,wDAAwD;AACpE,SAAS;AACT,QAAQ,MAAM,EAAE,CAAC,wBAAwB,CAAC;AAC1C,QAAQ,4BAA4B,EAAE;AACtC,YAAY,6EAA6E;AACzF,SAAS;AACT,QAAQ,qBAAqB,EAAE,CAAC,gDAAgD,CAAC;AACjF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,gGAAgG;AAC5G,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,sEAAsE;AAClF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,sCAAsC,CAAC;AAC7D,QAAQ,SAAS,EAAE,CAAC,mCAAmC,CAAC;AACxD,QAAQ,yBAAyB,EAAE;AACnC,YAAY,6FAA6F;AACzG,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,mEAAmE;AAC/E,SAAS;AACT,QAAQ,yBAAyB,EAAE;AACnC,YAAY,0DAA0D;AACtE,SAAS;AACT,QAAQ,IAAI,EAAE,CAAC,uBAAuB,CAAC;AACvC,QAAQ,cAAc,EAAE,CAAC,yCAAyC,CAAC;AACnE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,4EAA4E;AACxF,SAAS;AACT,QAAQ,oBAAoB,EAAE,CAAC,+CAA+C,CAAC;AAC/E,QAAQ,wBAAwB,EAAE,CAAC,iBAAiB,CAAC;AACrD,QAAQ,gBAAgB,EAAE,CAAC,2CAA2C,CAAC;AACvE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,+CAA+C;AAC3D,SAAS;AACT,QAAQ,iBAAiB,EAAE,CAAC,4CAA4C,CAAC;AACzE,QAAQ,cAAc,EAAE,CAAC,yCAAyC,CAAC;AACnE,QAAQ,4BAA4B,EAAE;AACtC,YAAY,6DAA6D;AACzE,SAAS;AACT,QAAQ,kBAAkB,EAAE;AAC5B,YAAY,4DAA4D;AACxE,SAAS;AACT,QAAQ,eAAe,EAAE;AACzB,YAAY,2DAA2D;AACvE,SAAS;AACT,QAAQ,4BAA4B,EAAE;AACtC,YAAY,+FAA+F;AAC3G,SAAS;AACT,QAAQ,qBAAqB,EAAE;AAC/B,YAAY,qEAAqE;AACjF,SAAS;AACT,QAAQ,WAAW,EAAE,CAAC,qCAAqC,CAAC;AAC5D,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,wBAAwB,EAAE;AAClC,YAAY,mBAAmB;AAC/B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,8BAA8B,CAAC,EAAE;AAClE,SAAS;AACT,QAAQ,4BAA4B,EAAE,CAAC,mBAAmB,CAAC;AAC3D,QAAQ,KAAK,EAAE,CAAC,6BAA6B,CAAC;AAC9C,QAAQ,YAAY,EAAE,CAAC,6BAA6B,CAAC;AACrD,QAAQ,qBAAqB,EAAE,CAAC,+CAA+C,CAAC;AAChF,QAAQ,oCAAoC,EAAE,CAAC,gCAAgC,CAAC;AAChF,QAAQ,4BAA4B,EAAE;AACtC,YAAY,qBAAqB;AACjC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,kCAAkC,CAAC,EAAE;AACtE,SAAS;AACT,QAAQ,gCAAgC,EAAE,CAAC,qBAAqB,CAAC;AACjE,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,iBAAiB;AAC7B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wCAAwC,CAAC,EAAE;AAC5E,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,iBAAiB,CAAC;AACnE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,qBAAqB;AACjC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,EAAE;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,qBAAqB,CAAC;AAChE,QAAQ,4BAA4B,EAAE;AACtC,YAAY,oCAAoC;AAChD,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,kCAAkC,CAAC,EAAE;AACtE,SAAS;AACT,QAAQ,gCAAgC,EAAE,CAAC,oCAAoC,CAAC;AAChF,QAAQ,kCAAkC,EAAE;AAC5C,YAAY,4BAA4B;AACxC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,wCAAwC,CAAC,EAAE;AAC5E,SAAS;AACT,QAAQ,sCAAsC,EAAE,CAAC,4BAA4B,CAAC;AAC9E,QAAQ,MAAM,EAAE,CAAC,gCAAgC,CAAC;AAClD,QAAQ,gBAAgB,EAAE,CAAC,WAAW,CAAC;AACvC,QAAQ,aAAa,EAAE,CAAC,uBAAuB,CAAC;AAChD,QAAQ,iBAAiB,EAAE,CAAC,iCAAiC,CAAC;AAC9D,QAAQ,yBAAyB,EAAE;AACnC,YAAY,iCAAiC;AAC7C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,+BAA+B,CAAC,EAAE;AACnE,SAAS;AACT,QAAQ,6BAA6B,EAAE,CAAC,iCAAiC,CAAC;AAC1E,QAAQ,+BAA+B,EAAE;AACzC,YAAY,yBAAyB;AACrC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,qCAAqC,CAAC,EAAE;AACzE,SAAS;AACT,QAAQ,mCAAmC,EAAE,CAAC,yBAAyB,CAAC;AACxE,QAAQ,IAAI,EAAE,CAAC,YAAY,CAAC;AAC5B,QAAQ,0BAA0B,EAAE;AACpC,YAAY,kBAAkB;AAC9B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,gCAAgC,CAAC,EAAE;AACpE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,kBAAkB,CAAC;AAC5D,QAAQ,0BAA0B,EAAE;AACpC,YAAY,kBAAkB;AAC9B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,gCAAgC,CAAC,EAAE;AACpE,SAAS;AACT,QAAQ,8BAA8B,EAAE,CAAC,kBAAkB,CAAC;AAC5D,QAAQ,2BAA2B,EAAE;AACrC,YAAY,qBAAqB;AACjC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,EAAE;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,qBAAqB,CAAC;AAChE,QAAQ,iCAAiC,EAAE,CAAC,qBAAqB,CAAC;AAClE,QAAQ,oBAAoB,EAAE,CAAC,iCAAiC,CAAC;AACjE,QAAQ,oBAAoB,EAAE,CAAC,iCAAiC,CAAC;AACjE,QAAQ,2BAA2B,EAAE;AACrC,YAAY,oBAAoB;AAChC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,EAAE;AACrE,SAAS;AACT,QAAQ,+BAA+B,EAAE,CAAC,oBAAoB,CAAC;AAC/D,QAAQ,kBAAkB,EAAE,CAAC,gCAAgC,CAAC;AAC9D,QAAQ,gCAAgC,EAAE;AAC1C,YAAY,yBAAyB;AACrC,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,sCAAsC,CAAC,EAAE;AAC1E,SAAS;AACT,QAAQ,oCAAoC,EAAE,CAAC,yBAAyB,CAAC;AACzE,QAAQ,qBAAqB,EAAE,CAAC,4BAA4B,CAAC;AAC7D,QAAQ,iCAAiC,EAAE;AAC3C,YAAY,gBAAgB;AAC5B,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,uCAAuC,CAAC,EAAE;AAC3E,SAAS;AACT,QAAQ,qCAAqC,EAAE,CAAC,gBAAgB,CAAC;AACjE,QAAQ,yCAAyC,EAAE;AACnD,YAAY,8BAA8B;AAC1C,YAAY,EAAE;AACd,YAAY,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,+CAA+C,CAAC,EAAE;AACnF,SAAS;AACT,QAAQ,6CAA6C,EAAE;AACvD,YAAY,8BAA8B;AAC1C,SAAS;AACT,QAAQ,OAAO,EAAE,CAAC,gCAAgC,CAAC;AACnD,QAAQ,QAAQ,EAAE,CAAC,mCAAmC,CAAC;AACvD,QAAQ,mBAAmB,EAAE,CAAC,aAAa,CAAC;AAC5C,KAAK;AACL,CAAC;;AC9nDM,MAAM,OAAO,GAAG,mBAAmB,CAAC;;ACApC,SAAS,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE;AAC1D,IAAI,MAAM,UAAU,GAAG,EAAE,CAAC;AAC1B,IAAI,KAAK,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACnE,QAAQ,KAAK,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;AACxE,YAAY,MAAM,CAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC;AAC5D,YAAY,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AACnD,YAAY,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;AAC9E,YAAY,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;AACpC,gBAAgB,UAAU,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;AACvC,aAAa;AACb,YAAY,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AACnD,YAAY,IAAI,WAAW,EAAE;AAC7B,gBAAgB,YAAY,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,CAAC,CAAC;AAC/G,gBAAgB,SAAS;AACzB,aAAa;AACb,YAAY,YAAY,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAClF,SAAS;AACT,KAAK;AACL,IAAI,OAAO,UAAU,CAAC;AACtB,CAAC;AACD,SAAS,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE;AACrE,IAAI,MAAM,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnE;AACA,IAAI,SAAS,eAAe,CAAC,GAAG,IAAI,EAAE;AACtC;AACA,QAAQ,IAAI,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AAClE;AACA,QAAQ,IAAI,WAAW,CAAC,SAAS,EAAE;AACnC,YAAY,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE;AACjD,gBAAgB,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC;AACpD,gBAAgB,CAAC,WAAW,CAAC,SAAS,GAAG,SAAS;AAClD,aAAa,CAAC,CAAC;AACf,YAAY,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAChD,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,OAAO,EAAE;AACjC,YAAY,MAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC;AAClE,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,+BAA+B,EAAE,QAAQ,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;AAC5H,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,UAAU,EAAE;AACpC,YAAY,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,WAAW,CAAC,iBAAiB,EAAE;AAC3C;AACA,YAAY,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;AACxE,YAAY,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,EAAE;AACvF,gBAAgB,IAAI,IAAI,IAAI,OAAO,EAAE;AACrC,oBAAoB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;AACzI,oBAAoB,IAAI,EAAE,KAAK,IAAI,OAAO,CAAC,EAAE;AAC7C,wBAAwB,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACvD,qBAAqB;AACrB,oBAAoB,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,iBAAiB;AACjB,aAAa;AACb,YAAY,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAChD,SAAS;AACT;AACA,QAAQ,OAAO,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5C,KAAK;AACL,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;AAC/D,CAAC;;ACxDM,SAAS,mBAAmB,CAAC,OAAO,EAAE;AAC7C,IAAI,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,EAAEA,SAAS,CAAC,CAAC;AACvD,IAAI,OAAO;AACX,QAAQ,IAAI,EAAE,GAAG;AACjB,KAAK,CAAC;AACN,CAAC;AACD,mBAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;AACtC,AAAO,SAAS,yBAAyB,CAAC,OAAO,EAAE;AACnD,IAAI,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,EAAEA,SAAS,CAAC,CAAC;AACvD,IAAI,OAAO;AACX,QAAQ,GAAG,GAAG;AACd,QAAQ,IAAI,EAAE,GAAG;AACjB,KAAK,CAAC;AACN,CAAC;AACD,yBAAyB,CAAC,OAAO,GAAG,OAAO,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/plugin-rest-endpoint-methods/package.json b/node_modules/@octokit/plugin-rest-endpoint-methods/package.json new file mode 100644 index 0000000..42c5ce3 --- /dev/null +++ b/node_modules/@octokit/plugin-rest-endpoint-methods/package.json @@ -0,0 +1,59 @@ +{ + "name": "@octokit/plugin-rest-endpoint-methods", + "description": "Octokit plugin adding one method for all of api.github.com REST API endpoints", + "version": "5.16.2", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit" + ], + "repository": "github:octokit/plugin-rest-endpoint-methods.js", + "dependencies": { + "@octokit/types": "^6.39.0", + "deprecation": "^2.3.1" + }, + "peerDependencies": { + "@octokit/core": ">=3" + }, + "devDependencies": { + "@gimenete/type-writer": "^0.1.5", + "@octokit/core": "^3.0.0", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.3.1", + "@types/jest": "^27.0.0", + "@types/node": "^16.0.0", + "fetch-mock": "^9.0.0", + "fs-extra": "^10.0.0", + "github-openapi-graphql-query": "^2.0.0", + "jest": "^27.0.0", + "lodash.camelcase": "^4.3.0", + "lodash.set": "^4.3.2", + "lodash.upperfirst": "^4.3.1", + "mustache": "^4.0.0", + "npm-run-all": "^4.1.5", + "prettier": "2.7.1", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/request-error/LICENSE b/node_modules/@octokit/request-error/LICENSE new file mode 100644 index 0000000..ef2c18e --- /dev/null +++ b/node_modules/@octokit/request-error/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/request-error/README.md b/node_modules/@octokit/request-error/README.md new file mode 100644 index 0000000..1bf5384 --- /dev/null +++ b/node_modules/@octokit/request-error/README.md @@ -0,0 +1,67 @@ +# http-error.js + +> Error class for Octokit request errors + +[![@latest](https://img.shields.io/npm/v/@octokit/request-error.svg)](https://www.npmjs.com/package/@octokit/request-error) +[![Build Status](https://github.com/octokit/request-error.js/workflows/Test/badge.svg)](https://github.com/octokit/request-error.js/actions?query=workflow%3ATest) + +## Usage + + + + + + +
+Browsers + +Load @octokit/request-error directly from cdn.skypack.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/request-error + +```js +const { RequestError } = require("@octokit/request-error"); +// or: import { RequestError } from "@octokit/request-error"; +``` + +
+ +```js +const error = new RequestError("Oops", 500, { + headers: { + "x-github-request-id": "1:2:3:4", + }, // response headers + request: { + method: "POST", + url: "https://api.github.com/foo", + body: { + bar: "baz", + }, + headers: { + authorization: "token secret123", + }, + }, +}); + +error.message; // Oops +error.status; // 500 +error.request.method; // POST +error.request.url; // https://api.github.com/foo +error.request.body; // { bar: 'baz' } +error.request.headers; // { authorization: 'token [REDACTED]' } +error.response; // { url, status, headers, data } +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/request-error/dist-node/index.js b/node_modules/@octokit/request-error/dist-node/index.js new file mode 100644 index 0000000..619f462 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-node/index.js @@ -0,0 +1,74 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var deprecation = require('deprecation'); +var once = _interopDefault(require('once')); + +const logOnceCode = once(deprecation => console.warn(deprecation)); +const logOnceHeaders = once(deprecation => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ + +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = "HttpError"; + this.status = statusCode; + let headers; + + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } // redact request credentials without mutating original request options + + + const requestCopy = Object.assign({}, options.request); + + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + }); + } + + requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; // deprecations + + Object.defineProperty(this, "code", { + get() { + logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + } + + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + } + + }); + } + +} + +exports.RequestError = RequestError; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request-error/dist-node/index.js.map b/node_modules/@octokit/request-error/dist-node/index.js.map new file mode 100644 index 0000000..9134ddb --- /dev/null +++ b/node_modules/@octokit/request-error/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":["logOnceCode","once","deprecation","console","warn","logOnceHeaders","RequestError","Error","constructor","message","statusCode","options","captureStackTrace","name","status","headers","response","requestCopy","Object","assign","request","authorization","replace","url","defineProperty","get","Deprecation"],"mappings":";;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAAxB;AACA,MAAMG,cAAc,GAAGJ,IAAI,CAAEC,WAAD,IAAiBC,OAAO,CAACC,IAAR,CAAaF,WAAb,CAAlB,CAA3B;AACA;AACA;AACA;;AACO,MAAMI,YAAN,SAA2BC,KAA3B,CAAiC;AACpCC,EAAAA,WAAW,CAACC,OAAD,EAAUC,UAAV,EAAsBC,OAAtB,EAA+B;AACtC,UAAMF,OAAN,EADsC;;AAGtC;;AACA,QAAIF,KAAK,CAACK,iBAAV,EAA6B;AACzBL,MAAAA,KAAK,CAACK,iBAAN,CAAwB,IAAxB,EAA8B,KAAKJ,WAAnC;AACH;;AACD,SAAKK,IAAL,GAAY,WAAZ;AACA,SAAKC,MAAL,GAAcJ,UAAd;AACA,QAAIK,OAAJ;;AACA,QAAI,aAAaJ,OAAb,IAAwB,OAAOA,OAAO,CAACI,OAAf,KAA2B,WAAvD,EAAoE;AAChEA,MAAAA,OAAO,GAAGJ,OAAO,CAACI,OAAlB;AACH;;AACD,QAAI,cAAcJ,OAAlB,EAA2B;AACvB,WAAKK,QAAL,GAAgBL,OAAO,CAACK,QAAxB;AACAD,MAAAA,OAAO,GAAGJ,OAAO,CAACK,QAAR,CAAiBD,OAA3B;AACH,KAhBqC;;;AAkBtC,UAAME,WAAW,GAAGC,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBR,OAAO,CAACS,OAA1B,CAApB;;AACA,QAAIT,OAAO,CAACS,OAAR,CAAgBL,OAAhB,CAAwBM,aAA5B,EAA2C;AACvCJ,MAAAA,WAAW,CAACF,OAAZ,GAAsBG,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkBR,OAAO,CAACS,OAAR,CAAgBL,OAAlC,EAA2C;AAC7DM,QAAAA,aAAa,EAAEV,OAAO,CAACS,OAAR,CAAgBL,OAAhB,CAAwBM,aAAxB,CAAsCC,OAAtC,CAA8C,MAA9C,EAAsD,aAAtD;AAD8C,OAA3C,CAAtB;AAGH;;AACDL,IAAAA,WAAW,CAACM,GAAZ,GAAkBN,WAAW,CAACM,GAAZ;AAEd;AAFc,KAGbD,OAHa,CAGL,sBAHK,EAGmB,0BAHnB;AAKd;AALc,KAMbA,OANa,CAML,qBANK,EAMkB,yBANlB,CAAlB;AAOA,SAAKF,OAAL,GAAeH,WAAf,CA/BsC;;AAiCtCC,IAAAA,MAAM,CAACM,cAAP,CAAsB,IAAtB,EAA4B,MAA5B,EAAoC;AAChCC,MAAAA,GAAG,GAAG;AACFzB,QAAAA,WAAW,CAAC,IAAI0B,uBAAJ,CAAgB,0EAAhB,CAAD,CAAX;AACA,eAAOhB,UAAP;AACH;;AAJ+B,KAApC;AAMAQ,IAAAA,MAAM,CAACM,cAAP,CAAsB,IAAtB,EAA4B,SAA5B,EAAuC;AACnCC,MAAAA,GAAG,GAAG;AACFpB,QAAAA,cAAc,CAAC,IAAIqB,uBAAJ,CAAgB,uFAAhB,CAAD,CAAd;AACA,eAAOX,OAAO,IAAI,EAAlB;AACH;;AAJkC,KAAvC;AAMH;;AA9CmC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request-error/dist-src/index.js b/node_modules/@octokit/request-error/dist-src/index.js new file mode 100644 index 0000000..5eb1927 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-src/index.js @@ -0,0 +1,55 @@ +import { Deprecation } from "deprecation"; +import once from "once"; +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = once((deprecation) => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ +export class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + // redact request credentials without mutating original request options + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]"), + }); + } + requestCopy.url = requestCopy.url + // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") + // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} diff --git a/node_modules/@octokit/request-error/dist-src/types.js b/node_modules/@octokit/request-error/dist-src/types.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/request-error/dist-src/types.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/request-error/dist-types/index.d.ts b/node_modules/@octokit/request-error/dist-types/index.d.ts new file mode 100644 index 0000000..d6e089c --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/index.d.ts @@ -0,0 +1,33 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +import { RequestErrorOptions } from "./types"; +/** + * Error with extra properties to help with debugging + */ +export declare class RequestError extends Error { + name: "HttpError"; + /** + * http status code + */ + status: number; + /** + * http status code + * + * @deprecated `error.code` is deprecated in favor of `error.status` + */ + code: number; + /** + * Request options that lead to the error. + */ + request: RequestOptions; + /** + * error response headers + * + * @deprecated `error.headers` is deprecated in favor of `error.response.headers` + */ + headers: ResponseHeaders; + /** + * Response object if a response was received + */ + response?: OctokitResponse; + constructor(message: string, statusCode: number, options: RequestErrorOptions); +} diff --git a/node_modules/@octokit/request-error/dist-types/types.d.ts b/node_modules/@octokit/request-error/dist-types/types.d.ts new file mode 100644 index 0000000..7785231 --- /dev/null +++ b/node_modules/@octokit/request-error/dist-types/types.d.ts @@ -0,0 +1,9 @@ +import { RequestOptions, ResponseHeaders, OctokitResponse } from "@octokit/types"; +export declare type RequestErrorOptions = { + /** @deprecated set `response` instead */ + headers?: ResponseHeaders; + request: RequestOptions; +} | { + response: OctokitResponse; + request: RequestOptions; +}; diff --git a/node_modules/@octokit/request-error/dist-web/index.js b/node_modules/@octokit/request-error/dist-web/index.js new file mode 100644 index 0000000..0fb64be --- /dev/null +++ b/node_modules/@octokit/request-error/dist-web/index.js @@ -0,0 +1,59 @@ +import { Deprecation } from 'deprecation'; +import once from 'once'; + +const logOnceCode = once((deprecation) => console.warn(deprecation)); +const logOnceHeaders = once((deprecation) => console.warn(deprecation)); +/** + * Error with extra properties to help with debugging + */ +class RequestError extends Error { + constructor(message, statusCode, options) { + super(message); + // Maintains proper stack trace (only available on V8) + /* istanbul ignore next */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + // redact request credentials without mutating original request options + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]"), + }); + } + requestCopy.url = requestCopy.url + // client_id & client_secret can be passed as URL query parameters to increase rate limit + // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications + .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") + // OAuth tokens can be passed as URL query parameters, although it is not recommended + // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header + .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + // deprecations + Object.defineProperty(this, "code", { + get() { + logOnceCode(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + return statusCode; + }, + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders(new Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + return headers || {}; + }, + }); + } +} + +export { RequestError }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request-error/dist-web/index.js.map b/node_modules/@octokit/request-error/dist-web/index.js.map new file mode 100644 index 0000000..78f677f --- /dev/null +++ b/node_modules/@octokit/request-error/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/index.js"],"sourcesContent":["import { Deprecation } from \"deprecation\";\nimport once from \"once\";\nconst logOnceCode = once((deprecation) => console.warn(deprecation));\nconst logOnceHeaders = once((deprecation) => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\nexport class RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message);\n // Maintains proper stack trace (only available on V8)\n /* istanbul ignore next */\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n // redact request credentials without mutating original request options\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\"),\n });\n }\n requestCopy.url = requestCopy.url\n // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\")\n // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy;\n // deprecations\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n },\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n },\n });\n }\n}\n"],"names":[],"mappings":";;;AAEA,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACrE,MAAM,cAAc,GAAG,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AACxE;AACA;AACA;AACO,MAAM,YAAY,SAAS,KAAK,CAAC;AACxC,IAAI,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE;AAC9C,QAAQ,KAAK,CAAC,OAAO,CAAC,CAAC;AACvB;AACA;AACA,QAAQ,IAAI,KAAK,CAAC,iBAAiB,EAAE;AACrC,YAAY,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AAC5D,SAAS;AACT,QAAQ,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;AAChC,QAAQ,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;AACjC,QAAQ,IAAI,OAAO,CAAC;AACpB,QAAQ,IAAI,SAAS,IAAI,OAAO,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,WAAW,EAAE;AAC5E,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;AACtC,SAAS;AACT,QAAQ,IAAI,UAAU,IAAI,OAAO,EAAE;AACnC,YAAY,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAC7C,YAAY,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;AAC/C,SAAS;AACT;AACA,QAAQ,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/D,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE;AACnD,YAAY,WAAW,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE;AAC7E,gBAAgB,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC;AACnG,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,WAAW,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG;AACzC;AACA;AACA,aAAa,OAAO,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AACxE;AACA;AACA,aAAa,OAAO,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC;AACvE,QAAQ,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;AACnC;AACA,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE;AAC5C,YAAY,GAAG,GAAG;AAClB,gBAAgB,WAAW,CAAC,IAAI,WAAW,CAAC,0EAA0E,CAAC,CAAC,CAAC;AACzH,gBAAgB,OAAO,UAAU,CAAC;AAClC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE;AAC/C,YAAY,GAAG,GAAG;AAClB,gBAAgB,cAAc,CAAC,IAAI,WAAW,CAAC,uFAAuF,CAAC,CAAC,CAAC;AACzI,gBAAgB,OAAO,OAAO,IAAI,EAAE,CAAC;AACrC,aAAa;AACb,SAAS,CAAC,CAAC;AACX,KAAK;AACL;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request-error/package.json b/node_modules/@octokit/request-error/package.json new file mode 100644 index 0000000..2f5b239 --- /dev/null +++ b/node_modules/@octokit/request-error/package.json @@ -0,0 +1,47 @@ +{ + "name": "@octokit/request-error", + "description": "Error class for Octokit request errors", + "version": "2.1.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "error" + ], + "repository": "github:octokit/request-error.js", + "dependencies": { + "@octokit/types": "^6.0.3", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "devDependencies": { + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-bundle-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/jest": "^26.0.0", + "@types/node": "^14.0.4", + "@types/once": "^1.4.0", + "jest": "^27.0.0", + "pika-plugin-unpkg-field": "^1.1.0", + "prettier": "2.3.1", + "semantic-release": "^17.0.0", + "ts-jest": "^27.0.0-next.12", + "typescript": "^4.0.0" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/request/LICENSE b/node_modules/@octokit/request/LICENSE new file mode 100644 index 0000000..af5366d --- /dev/null +++ b/node_modules/@octokit/request/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2018 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/@octokit/request/README.md b/node_modules/@octokit/request/README.md new file mode 100644 index 0000000..747a670 --- /dev/null +++ b/node_modules/@octokit/request/README.md @@ -0,0 +1,551 @@ +# request.js + +> Send parameterized requests to GitHub’s APIs with sensible defaults in browsers and Node + +[![@latest](https://img.shields.io/npm/v/@octokit/request.svg)](https://www.npmjs.com/package/@octokit/request) +[![Build Status](https://github.com/octokit/request.js/workflows/Test/badge.svg)](https://github.com/octokit/request.js/actions?query=workflow%3ATest+branch%3Amaster) + +`@octokit/request` is a request library for browsers & node that makes it easier +to interact with [GitHub’s REST API](https://developer.github.com/v3/) and +[GitHub’s GraphQL API](https://developer.github.com/v4/guides/forming-calls/#the-graphql-endpoint). + +It uses [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) to parse +the passed options and sends the request using [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +([node-fetch](https://github.com/bitinn/node-fetch) in Node). + + + + + +- [Features](#features) +- [Usage](#usage) + - [REST API example](#rest-api-example) + - [GraphQL example](#graphql-example) + - [Alternative: pass `method` & `url` as part of options](#alternative-pass-method--url-as-part-of-options) +- [Authentication](#authentication) +- [request()](#request) +- [`request.defaults()`](#requestdefaults) +- [`request.endpoint`](#requestendpoint) +- [Special cases](#special-cases) + - [The `data` parameter – set request body directly](#the-data-parameter-%E2%80%93-set-request-body-directly) + - [Set parameters for both the URL/query and the request body](#set-parameters-for-both-the-urlquery-and-the-request-body) +- [LICENSE](#license) + + + +## Features + +🤩 1:1 mapping of REST API endpoint documentation, e.g. [Add labels to an issue](https://developer.github.com/v3/issues/labels/#add-labels-to-an-issue) becomes + +```js +request("POST /repos/{owner}/{repo}/issues/{number}/labels", { + mediaType: { + previews: ["symmetra"], + }, + owner: "octokit", + repo: "request.js", + number: 1, + labels: ["🐛 bug"], +}); +``` + +👶 [Small bundle size](https://bundlephobia.com/result?p=@octokit/request@5.0.3) (\<4kb minified + gzipped) + +😎 [Authenticate](#authentication) with any of [GitHubs Authentication Strategies](https://github.com/octokit/auth.js). + +👍 Sensible defaults + +- `baseUrl`: `https://api.github.com` +- `headers.accept`: `application/vnd.github.v3+json` +- `headers.agent`: `octokit-request.js/ `, e.g. `octokit-request.js/1.2.3 Node.js/10.15.0 (macOS Mojave; x64)` + +👌 Simple to test: mock requests by passing a custom fetch method. + +🧐 Simple to debug: Sets `error.request` to request options causing the error (with redacted credentials). + +## Usage + + + + + + +
+Browsers + +Load @octokit/request directly from cdn.skypack.dev + +```html + +``` + +
+Node + + +Install with npm install @octokit/request + +```js +const { request } = require("@octokit/request"); +// or: import { request } from "@octokit/request"; +``` + +
+ +### REST API example + +```js +// Following GitHub docs formatting: +// https://developer.github.com/v3/repos/#list-organization-repositories +const result = await request("GET /orgs/{org}/repos", { + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + org: "octokit", + type: "private", +}); + +console.log(`${result.data.length} repos found.`); +``` + +### GraphQL example + +For GraphQL request we recommend using [`@octokit/graphql`](https://github.com/octokit/graphql.js#readme) + +```js +const result = await request("POST /graphql", { + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + query: `query ($login: String!) { + organization(login: $login) { + repositories(privacy: PRIVATE) { + totalCount + } + } + }`, + variables: { + login: "octokit", + }, +}); +``` + +### Alternative: pass `method` & `url` as part of options + +Alternatively, pass in a method and a url + +```js +const result = await request({ + method: "GET", + url: "/orgs/{org}/repos", + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, + org: "octokit", + type: "private", +}); +``` + +## Authentication + +The simplest way to authenticate a request is to set the `Authorization` header directly, e.g. to a [personal access token](https://github.com/settings/tokens/). + +```js +const requestWithAuth = request.defaults({ + headers: { + authorization: "token 0000000000000000000000000000000000000001", + }, +}); +const result = await requestWithAuth("GET /user"); +``` + +For more complex authentication strategies such as GitHub Apps or Basic, we recommend the according authentication library exported by [`@octokit/auth`](https://github.com/octokit/auth.js). + +```js +const { createAppAuth } = require("@octokit/auth-app"); +const auth = createAppAuth({ + appId: process.env.APP_ID, + privateKey: process.env.PRIVATE_KEY, + installationId: 123, +}); +const requestWithAuth = request.defaults({ + request: { + hook: auth.hook, + }, + mediaType: { + previews: ["machine-man"], + }, +}); + +const { data: app } = await requestWithAuth("GET /app"); +const { data: app } = await requestWithAuth( + "POST /repos/{owner}/{repo}/issues", + { + owner: "octocat", + repo: "hello-world", + title: "Hello from the engine room", + } +); +``` + +## request() + +`request(route, options)` or `request(options)`. + +**Options** + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + type + + description +
+ route + + String + + **Required**. If route is set it has to be a string consisting of the request method and URL, e.g. GET /orgs/{org} +
+ options.baseUrl + + String + + The base URL that route or url will be prefixed with, if they use relative paths. Defaults to https://api.github.com. +
+ options.headers + + Object + + Custom headers. Passed headers are merged with defaults:
+ headers['user-agent'] defaults to octokit-rest.js/1.2.3 (where 1.2.3 is the released version).
+ headers['accept'] defaults to application/vnd.github.v3+json.
Use options.mediaType.{format,previews} to request API previews and custom media types. +
+ options.mediaType.format + + String + + Media type param, such as `raw`, `html`, or `full`. See Media Types. +
+ options.mediaType.previews + + Array of strings + + Name of previews, such as `mercy`, `symmetra`, or `scarlet-witch`. See API Previews. +
+ options.method + + String + + Any supported http verb, case insensitive. Defaults to Get. +
+ options.url + + String + + **Required**. A path or full URL which may contain :variable or {variable} placeholders, + e.g. /orgs/{org}/repos. The url is parsed using url-template. +
+ options.data + + Any + + Set request body directly instead of setting it to JSON based on additional parameters. See "The `data` parameter" below. +
+ options.request.agent + + http(s).Agent instance + + Node only. Useful for custom proxy, certificate, or dns lookup. +
+ options.request.fetch + + Function + + Custom replacement for built-in fetch method. Useful for testing or request hooks. +
+ options.request.hook + + Function + + Function with the signature hook(request, endpointOptions), where endpointOptions are the parsed options as returned by endpoint.merge(), and request is request(). This option works great in conjuction with before-after-hook. +
+ options.request.signal + + new AbortController().signal + + Use an AbortController instance to cancel a request. In node you can only cancel streamed requests. +
+ options.request.log + + object + + Used for internal logging. Defaults to console. +
+ options.request.timeout + + Number + + Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). options.request.signal is recommended instead. +
+ +All other options except `options.request.*` will be passed depending on the `method` and `url` options. + +1. If the option key is a placeholder in the `url`, it will be used as replacement. For example, if the passed options are `{url: '/orgs/{org}/repos', org: 'foo'}` the returned `options.url` is `https://api.github.com/orgs/foo/repos` +2. If the `method` is `GET` or `HEAD`, the option is passed as query parameter +3. Otherwise the parameter is passed in the request body as JSON key. + +**Result** + +`request` returns a promise and resolves with 4 keys + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ key + + type + + description +
statusIntegerResponse status status
urlStringURL of response. If a request results in redirects, this is the final URL. You can send a HEAD request to retrieve it without loading the full response body.
headersObjectAll response headers
dataAnyThe response body as returned from server. If the response is JSON then it will be parsed into an object
+ +If an error occurs, the `error` instance has additional properties to help with debugging + +- `error.status` The http response status code +- `error.request` The request options such as `method`, `url` and `data` +- `error.response` The http response object with `url`, `headers`, and `data` + +## `request.defaults()` + +Override or set default options. Example: + +```js +const myrequest = require("@octokit/request").defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + authorization: `token 0000000000000000000000000000000000000001`, + }, + org: "my-project", + per_page: 100, +}); + +myrequest(`GET /orgs/{org}/repos`); +``` + +You can call `.defaults()` again on the returned method, the defaults will cascade. + +```js +const myProjectRequest = request.defaults({ + baseUrl: "https://github-enterprise.acme-inc.com/api/v3", + headers: { + "user-agent": "myApp/1.2.3", + }, + org: "my-project", +}); +const myProjectRequestWithAuth = myProjectRequest.defaults({ + headers: { + authorization: `token 0000000000000000000000000000000000000001`, + }, +}); +``` + +`myProjectRequest` now defaults the `baseUrl`, `headers['user-agent']`, +`org` and `headers['authorization']` on top of `headers['accept']` that is set +by the global default. + +## `request.endpoint` + +See https://github.com/octokit/endpoint.js. Example + +```js +const options = request.endpoint("GET /orgs/{org}/repos", { + org: "my-project", + type: "private", +}); + +// { +// method: 'GET', +// url: 'https://api.github.com/orgs/my-project/repos?type=private', +// headers: { +// accept: 'application/vnd.github.v3+json', +// authorization: 'token 0000000000000000000000000000000000000001', +// 'user-agent': 'octokit/endpoint.js v1.2.3' +// } +// } +``` + +All of the [`@octokit/endpoint`](https://github.com/octokit/endpoint.js) API can be used: + +- [`octokitRequest.endpoint()`](#endpoint) +- [`octokitRequest.endpoint.defaults()`](#endpointdefaults) +- [`octokitRequest.endpoint.merge()`](#endpointdefaults) +- [`octokitRequest.endpoint.parse()`](#endpointmerge) + +## Special cases + + + +### The `data` parameter – set request body directly + +Some endpoints such as [Render a Markdown document in raw mode](https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode) don’t have parameters that are sent as request body keys, instead the request body needs to be set directly. In these cases, set the `data` parameter. + +```js +const response = await request("POST /markdown/raw", { + data: "Hello world github/linguist#1 **cool**, and #1!", + headers: { + accept: "text/html;charset=utf-8", + "content-type": "text/plain", + }, +}); + +// Request is sent as +// +// { +// method: 'post', +// url: 'https://api.github.com/markdown/raw', +// headers: { +// accept: 'text/html;charset=utf-8', +// 'content-type': 'text/plain', +// 'user-agent': userAgent +// }, +// body: 'Hello world github/linguist#1 **cool**, and #1!' +// } +// +// not as +// +// { +// ... +// body: '{"data": "Hello world github/linguist#1 **cool**, and #1!"}' +// } +``` + +### Set parameters for both the URL/query and the request body + +There are API endpoints that accept both query parameters as well as a body. In that case you need to add the query parameters as templates to `options.url`, as defined in the [RFC 6570 URI Template specification](https://tools.ietf.org/html/rfc6570). + +Example + +```js +request( + "POST https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}", + { + name: "example.zip", + label: "short description", + headers: { + "content-type": "text/plain", + "content-length": 14, + authorization: `token 0000000000000000000000000000000000000001`, + }, + data: "Hello, world!", + } +); +``` + +## LICENSE + +[MIT](LICENSE) diff --git a/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/request/dist-node/index.js new file mode 100644 index 0000000..685e2f5 --- /dev/null +++ b/node_modules/@octokit/request/dist-node/index.js @@ -0,0 +1,177 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var endpoint = require('@octokit/endpoint'); +var universalUserAgent = require('universal-user-agent'); +var isPlainObject = require('is-plain-object'); +var nodeFetch = _interopDefault(require('node-fetch')); +var requestError = require('@octokit/request-error'); + +const VERSION = "5.6.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + + if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + + let headers = {}; + let status; + let url; + const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect + }, // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)).then(async response => { + url = response.url; + status = response.status; + + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + + if (status === 204 || status === 205) { + return; + } // GitHub API returns 200 for HEAD requests + + + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + + throw new requestError.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined + }, + request: requestOptions + }); + } + + if (status === 304) { + throw new requestError.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + + if (status >= 400) { + const data = await getResponseData(response); + const error = new requestError.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + + return getResponseData(response); + }).then(data => { + return { + status, + url, + headers, + data + }; + }).catch(error => { + if (error instanceof requestError.RequestError) throw error; + throw new requestError.RequestError(error.message, 500, { + request: requestOptions + }); + }); +} + +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + + if (/application\/json/.test(contentType)) { + return response.json(); + } + + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + + return getBufferResponse(response); +} + +function toErrorMessage(data) { + if (typeof data === "string") return data; // istanbul ignore else - just in case + + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + + return data.message; + } // istanbul ignore next - just in case + + + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint) + }); +} + +const request = withDefaults(endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + } +}); + +exports.request = request; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/dist-node/index.js.map b/node_modules/@octokit/request/dist-node/index.js.map new file mode 100644 index 0000000..9a51ed1 --- /dev/null +++ b/node_modules/@octokit/request/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.6.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["VERSION","getBufferResponse","response","arrayBuffer","fetchWrapper","requestOptions","log","request","console","isPlainObject","body","Array","isArray","JSON","stringify","headers","status","url","fetch","nodeFetch","Object","assign","method","redirect","then","keyAndValue","matches","link","match","deprecationLink","pop","warn","sunset","RequestError","statusText","data","undefined","getResponseData","error","toErrorMessage","catch","message","contentType","get","test","json","text","getBuffer","errors","map","join","withDefaults","oldEndpoint","newDefaults","endpoint","defaults","newApi","route","parameters","endpointOptions","merge","hook","parse","bind","getUserAgent"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,OAAO,GAAG,mBAAhB;;ACAQ,SAASC,iBAAT,CAA2BC,QAA3B,EAAqC;AAChD,SAAOA,QAAQ,CAACC,WAAT,EAAP;AACH;;ACEc,SAASC,YAAT,CAAsBC,cAAtB,EAAsC;AACjD,QAAMC,GAAG,GAAGD,cAAc,CAACE,OAAf,IAA0BF,cAAc,CAACE,OAAf,CAAuBD,GAAjD,GACND,cAAc,CAACE,OAAf,CAAuBD,GADjB,GAENE,OAFN;;AAGA,MAAIC,2BAAa,CAACJ,cAAc,CAACK,IAAhB,CAAb,IACAC,KAAK,CAACC,OAAN,CAAcP,cAAc,CAACK,IAA7B,CADJ,EACwC;AACpCL,IAAAA,cAAc,CAACK,IAAf,GAAsBG,IAAI,CAACC,SAAL,CAAeT,cAAc,CAACK,IAA9B,CAAtB;AACH;;AACD,MAAIK,OAAO,GAAG,EAAd;AACA,MAAIC,MAAJ;AACA,MAAIC,GAAJ;AACA,QAAMC,KAAK,GAAIb,cAAc,CAACE,OAAf,IAA0BF,cAAc,CAACE,OAAf,CAAuBW,KAAlD,IAA4DC,SAA1E;AACA,SAAOD,KAAK,CAACb,cAAc,CAACY,GAAhB,EAAqBG,MAAM,CAACC,MAAP,CAAc;AAC3CC,IAAAA,MAAM,EAAEjB,cAAc,CAACiB,MADoB;AAE3CZ,IAAAA,IAAI,EAAEL,cAAc,CAACK,IAFsB;AAG3CK,IAAAA,OAAO,EAAEV,cAAc,CAACU,OAHmB;AAI3CQ,IAAAA,QAAQ,EAAElB,cAAc,CAACkB;AAJkB,GAAd;AAOjC;AACAlB,EAAAA,cAAc,CAACE,OARkB,CAArB,CAAL,CASFiB,IATE,CASG,MAAOtB,QAAP,IAAoB;AAC1Be,IAAAA,GAAG,GAAGf,QAAQ,CAACe,GAAf;AACAD,IAAAA,MAAM,GAAGd,QAAQ,CAACc,MAAlB;;AACA,SAAK,MAAMS,WAAX,IAA0BvB,QAAQ,CAACa,OAAnC,EAA4C;AACxCA,MAAAA,OAAO,CAACU,WAAW,CAAC,CAAD,CAAZ,CAAP,GAA0BA,WAAW,CAAC,CAAD,CAArC;AACH;;AACD,QAAI,iBAAiBV,OAArB,EAA8B;AAC1B,YAAMW,OAAO,GAAGX,OAAO,CAACY,IAAR,IAAgBZ,OAAO,CAACY,IAAR,CAAaC,KAAb,CAAmB,8BAAnB,CAAhC;AACA,YAAMC,eAAe,GAAGH,OAAO,IAAIA,OAAO,CAACI,GAAR,EAAnC;AACAxB,MAAAA,GAAG,CAACyB,IAAJ,CAAU,uBAAsB1B,cAAc,CAACiB,MAAO,IAAGjB,cAAc,CAACY,GAAI,qDAAoDF,OAAO,CAACiB,MAAO,GAAEH,eAAe,GAAI,SAAQA,eAAgB,EAA5B,GAAgC,EAAG,EAAnM;AACH;;AACD,QAAIb,MAAM,KAAK,GAAX,IAAkBA,MAAM,KAAK,GAAjC,EAAsC;AAClC;AACH,KAbyB;;;AAe1B,QAAIX,cAAc,CAACiB,MAAf,KAA0B,MAA9B,EAAsC;AAClC,UAAIN,MAAM,GAAG,GAAb,EAAkB;AACd;AACH;;AACD,YAAM,IAAIiB,yBAAJ,CAAiB/B,QAAQ,CAACgC,UAA1B,EAAsClB,MAAtC,EAA8C;AAChDd,QAAAA,QAAQ,EAAE;AACNe,UAAAA,GADM;AAEND,UAAAA,MAFM;AAGND,UAAAA,OAHM;AAINoB,UAAAA,IAAI,EAAEC;AAJA,SADsC;AAOhD7B,QAAAA,OAAO,EAAEF;AAPuC,OAA9C,CAAN;AASH;;AACD,QAAIW,MAAM,KAAK,GAAf,EAAoB;AAChB,YAAM,IAAIiB,yBAAJ,CAAiB,cAAjB,EAAiCjB,MAAjC,EAAyC;AAC3Cd,QAAAA,QAAQ,EAAE;AACNe,UAAAA,GADM;AAEND,UAAAA,MAFM;AAGND,UAAAA,OAHM;AAINoB,UAAAA,IAAI,EAAE,MAAME,eAAe,CAACnC,QAAD;AAJrB,SADiC;AAO3CK,QAAAA,OAAO,EAAEF;AAPkC,OAAzC,CAAN;AASH;;AACD,QAAIW,MAAM,IAAI,GAAd,EAAmB;AACf,YAAMmB,IAAI,GAAG,MAAME,eAAe,CAACnC,QAAD,CAAlC;AACA,YAAMoC,KAAK,GAAG,IAAIL,yBAAJ,CAAiBM,cAAc,CAACJ,IAAD,CAA/B,EAAuCnB,MAAvC,EAA+C;AACzDd,QAAAA,QAAQ,EAAE;AACNe,UAAAA,GADM;AAEND,UAAAA,MAFM;AAGND,UAAAA,OAHM;AAINoB,UAAAA;AAJM,SAD+C;AAOzD5B,QAAAA,OAAO,EAAEF;AAPgD,OAA/C,CAAd;AASA,YAAMiC,KAAN;AACH;;AACD,WAAOD,eAAe,CAACnC,QAAD,CAAtB;AACH,GA/DM,EAgEFsB,IAhEE,CAgEIW,IAAD,IAAU;AAChB,WAAO;AACHnB,MAAAA,MADG;AAEHC,MAAAA,GAFG;AAGHF,MAAAA,OAHG;AAIHoB,MAAAA;AAJG,KAAP;AAMH,GAvEM,EAwEFK,KAxEE,CAwEKF,KAAD,IAAW;AAClB,QAAIA,KAAK,YAAYL,yBAArB,EACI,MAAMK,KAAN;AACJ,UAAM,IAAIL,yBAAJ,CAAiBK,KAAK,CAACG,OAAvB,EAAgC,GAAhC,EAAqC;AACvClC,MAAAA,OAAO,EAAEF;AAD8B,KAArC,CAAN;AAGH,GA9EM,CAAP;AA+EH;;AACD,eAAegC,eAAf,CAA+BnC,QAA/B,EAAyC;AACrC,QAAMwC,WAAW,GAAGxC,QAAQ,CAACa,OAAT,CAAiB4B,GAAjB,CAAqB,cAArB,CAApB;;AACA,MAAI,oBAAoBC,IAApB,CAAyBF,WAAzB,CAAJ,EAA2C;AACvC,WAAOxC,QAAQ,CAAC2C,IAAT,EAAP;AACH;;AACD,MAAI,CAACH,WAAD,IAAgB,yBAAyBE,IAAzB,CAA8BF,WAA9B,CAApB,EAAgE;AAC5D,WAAOxC,QAAQ,CAAC4C,IAAT,EAAP;AACH;;AACD,SAAOC,iBAAS,CAAC7C,QAAD,CAAhB;AACH;;AACD,SAASqC,cAAT,CAAwBJ,IAAxB,EAA8B;AAC1B,MAAI,OAAOA,IAAP,KAAgB,QAApB,EACI,OAAOA,IAAP,CAFsB;;AAI1B,MAAI,aAAaA,IAAjB,EAAuB;AACnB,QAAIxB,KAAK,CAACC,OAAN,CAAcuB,IAAI,CAACa,MAAnB,CAAJ,EAAgC;AAC5B,aAAQ,GAAEb,IAAI,CAACM,OAAQ,KAAIN,IAAI,CAACa,MAAL,CAAYC,GAAZ,CAAgBpC,IAAI,CAACC,SAArB,EAAgCoC,IAAhC,CAAqC,IAArC,CAA2C,EAAtE;AACH;;AACD,WAAOf,IAAI,CAACM,OAAZ;AACH,GATyB;;;AAW1B,SAAQ,kBAAiB5B,IAAI,CAACC,SAAL,CAAeqB,IAAf,CAAqB,EAA9C;AACH;;ACrHc,SAASgB,YAAT,CAAsBC,WAAtB,EAAmCC,WAAnC,EAAgD;AAC3D,QAAMC,QAAQ,GAAGF,WAAW,CAACG,QAAZ,CAAqBF,WAArB,CAAjB;;AACA,QAAMG,MAAM,GAAG,UAAUC,KAAV,EAAiBC,UAAjB,EAA6B;AACxC,UAAMC,eAAe,GAAGL,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAxB;;AACA,QAAI,CAACC,eAAe,CAACpD,OAAjB,IAA4B,CAACoD,eAAe,CAACpD,OAAhB,CAAwBsD,IAAzD,EAA+D;AAC3D,aAAOzD,YAAY,CAACkD,QAAQ,CAACQ,KAAT,CAAeH,eAAf,CAAD,CAAnB;AACH;;AACD,UAAMpD,OAAO,GAAG,CAACkD,KAAD,EAAQC,UAAR,KAAuB;AACnC,aAAOtD,YAAY,CAACkD,QAAQ,CAACQ,KAAT,CAAeR,QAAQ,CAACM,KAAT,CAAeH,KAAf,EAAsBC,UAAtB,CAAf,CAAD,CAAnB;AACH,KAFD;;AAGAtC,IAAAA,MAAM,CAACC,MAAP,CAAcd,OAAd,EAAuB;AACnB+C,MAAAA,QADmB;AAEnBC,MAAAA,QAAQ,EAAEJ,YAAY,CAACY,IAAb,CAAkB,IAAlB,EAAwBT,QAAxB;AAFS,KAAvB;AAIA,WAAOK,eAAe,CAACpD,OAAhB,CAAwBsD,IAAxB,CAA6BtD,OAA7B,EAAsCoD,eAAtC,CAAP;AACH,GAbD;;AAcA,SAAOvC,MAAM,CAACC,MAAP,CAAcmC,MAAd,EAAsB;AACzBF,IAAAA,QADyB;AAEzBC,IAAAA,QAAQ,EAAEJ,YAAY,CAACY,IAAb,CAAkB,IAAlB,EAAwBT,QAAxB;AAFe,GAAtB,CAAP;AAIH;;MCjBY/C,OAAO,GAAG4C,YAAY,CAACG,iBAAD,EAAW;AAC1CvC,EAAAA,OAAO,EAAE;AACL,kBAAe,sBAAqBf,OAAQ,IAAGgE,+BAAY,EAAG;AADzD;AADiC,CAAX,CAA5B;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/request/dist-src/fetch-wrapper.js new file mode 100644 index 0000000..79653c4 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/fetch-wrapper.js @@ -0,0 +1,119 @@ +import { isPlainObject } from "is-plain-object"; +import nodeFetch from "node-fetch"; +import { RequestError } from "@octokit/request-error"; +import getBuffer from "./get-buffer-response"; +export default function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + if (isPlainObject(requestOptions.body) || + Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json(); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBuffer(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} diff --git a/node_modules/@octokit/request/dist-src/get-buffer-response.js b/node_modules/@octokit/request/dist-src/get-buffer-response.js new file mode 100644 index 0000000..845a394 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/get-buffer-response.js @@ -0,0 +1,3 @@ +export default function getBufferResponse(response) { + return response.arrayBuffer(); +} diff --git a/node_modules/@octokit/request/dist-src/index.js b/node_modules/@octokit/request/dist-src/index.js new file mode 100644 index 0000000..2460e99 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/index.js @@ -0,0 +1,9 @@ +import { endpoint } from "@octokit/endpoint"; +import { getUserAgent } from "universal-user-agent"; +import { VERSION } from "./version"; +import withDefaults from "./with-defaults"; +export const request = withDefaults(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}`, + }, +}); diff --git a/node_modules/@octokit/request/dist-src/version.js b/node_modules/@octokit/request/dist-src/version.js new file mode 100644 index 0000000..a068c68 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/version.js @@ -0,0 +1 @@ +export const VERSION = "5.6.3"; diff --git a/node_modules/@octokit/request/dist-src/with-defaults.js b/node_modules/@octokit/request/dist-src/with-defaults.js new file mode 100644 index 0000000..e206429 --- /dev/null +++ b/node_modules/@octokit/request/dist-src/with-defaults.js @@ -0,0 +1,22 @@ +import fetchWrapper from "./fetch-wrapper"; +export default function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint), + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint), + }); +} diff --git a/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts new file mode 100644 index 0000000..4901c79 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/fetch-wrapper.d.ts @@ -0,0 +1,11 @@ +import { EndpointInterface } from "@octokit/types"; +export default function fetchWrapper(requestOptions: ReturnType & { + redirect?: "error" | "follow" | "manual"; +}): Promise<{ + status: number; + url: string; + headers: { + [header: string]: string; + }; + data: any; +}>; diff --git a/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts new file mode 100644 index 0000000..915b705 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/get-buffer-response.d.ts @@ -0,0 +1,2 @@ +import { Response } from "node-fetch"; +export default function getBufferResponse(response: Response): Promise; diff --git a/node_modules/@octokit/request/dist-types/index.d.ts b/node_modules/@octokit/request/dist-types/index.d.ts new file mode 100644 index 0000000..1030809 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/index.d.ts @@ -0,0 +1 @@ +export declare const request: import("@octokit/types").RequestInterface; diff --git a/node_modules/@octokit/request/dist-types/version.d.ts b/node_modules/@octokit/request/dist-types/version.d.ts new file mode 100644 index 0000000..5629807 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/version.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "5.6.3"; diff --git a/node_modules/@octokit/request/dist-types/with-defaults.d.ts b/node_modules/@octokit/request/dist-types/with-defaults.d.ts new file mode 100644 index 0000000..0080469 --- /dev/null +++ b/node_modules/@octokit/request/dist-types/with-defaults.d.ts @@ -0,0 +1,2 @@ +import { EndpointInterface, RequestInterface, RequestParameters } from "@octokit/types"; +export default function withDefaults(oldEndpoint: EndpointInterface, newDefaults: RequestParameters): RequestInterface; diff --git a/node_modules/@octokit/request/dist-web/index.js b/node_modules/@octokit/request/dist-web/index.js new file mode 100644 index 0000000..44359f8 --- /dev/null +++ b/node_modules/@octokit/request/dist-web/index.js @@ -0,0 +1,158 @@ +import { endpoint } from '@octokit/endpoint'; +import { getUserAgent } from 'universal-user-agent'; +import { isPlainObject } from 'is-plain-object'; +import nodeFetch from 'node-fetch'; +import { RequestError } from '@octokit/request-error'; + +const VERSION = "5.6.3"; + +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +function fetchWrapper(requestOptions) { + const log = requestOptions.request && requestOptions.request.log + ? requestOptions.request.log + : console; + if (isPlainObject(requestOptions.body) || + Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch; + return fetch(requestOptions.url, Object.assign({ + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + redirect: requestOptions.redirect, + }, + // `requestOptions.request.agent` type is incompatible + // see https://github.com/octokit/types.ts/pull/264 + requestOptions.request)) + .then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + } + if (status === 204 || status === 205) { + return; + } + // GitHub API returns 200 for HEAD requests + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: undefined, + }, + request: requestOptions, + }); + } + if (status === 304) { + throw new RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response), + }, + request: requestOptions, + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data, + }, + request: requestOptions, + }); + throw error; + } + return getResponseData(response); + }) + .then((data) => { + return { + status, + url, + headers, + data, + }; + }) + .catch((error) => { + if (error instanceof RequestError) + throw error; + throw new RequestError(error.message, 500, { + request: requestOptions, + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json(); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + // istanbul ignore else - just in case + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + // istanbul ignore next - just in case + return `Unknown error: ${JSON.stringify(data)}`; +} + +function withDefaults(oldEndpoint, newDefaults) { + const endpoint = oldEndpoint.defaults(newDefaults); + const newApi = function (route, parameters) { + const endpointOptions = endpoint.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint.parse(endpointOptions)); + } + const request = (route, parameters) => { + return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + }; + Object.assign(request, { + endpoint, + defaults: withDefaults.bind(null, endpoint), + }); + return endpointOptions.request.hook(request, endpointOptions); + }; + return Object.assign(newApi, { + endpoint, + defaults: withDefaults.bind(null, endpoint), + }); +} + +const request = withDefaults(endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${getUserAgent()}`, + }, +}); + +export { request }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/request/dist-web/index.js.map b/node_modules/@octokit/request/dist-web/index.js.map new file mode 100644 index 0000000..b3cda51 --- /dev/null +++ b/node_modules/@octokit/request/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/version.js","../dist-src/get-buffer-response.js","../dist-src/fetch-wrapper.js","../dist-src/with-defaults.js","../dist-src/index.js"],"sourcesContent":["export const VERSION = \"5.6.3\";\n","export default function getBufferResponse(response) {\n return response.arrayBuffer();\n}\n","import { isPlainObject } from \"is-plain-object\";\nimport nodeFetch from \"node-fetch\";\nimport { RequestError } from \"@octokit/request-error\";\nimport getBuffer from \"./get-buffer-response\";\nexport default function fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log\n ? requestOptions.request.log\n : console;\n if (isPlainObject(requestOptions.body) ||\n Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n const fetch = (requestOptions.request && requestOptions.request.fetch) || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect,\n }, \n // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request))\n .then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n if (status === 204 || status === 205) {\n return;\n }\n // GitHub API returns 200 for HEAD requests\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined,\n },\n request: requestOptions,\n });\n }\n if (status === 304) {\n throw new RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response),\n },\n request: requestOptions,\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data,\n },\n request: requestOptions,\n });\n throw error;\n }\n return getResponseData(response);\n })\n .then((data) => {\n return {\n status,\n url,\n headers,\n data,\n };\n })\n .catch((error) => {\n if (error instanceof RequestError)\n throw error;\n throw new RequestError(error.message, 500, {\n request: requestOptions,\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBuffer(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n // istanbul ignore else - just in case\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n return data.message;\n }\n // istanbul ignore next - just in case\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n","import fetchWrapper from \"./fetch-wrapper\";\nexport default function withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint),\n });\n}\n","import { endpoint } from \"@octokit/endpoint\";\nimport { getUserAgent } from \"universal-user-agent\";\nimport { VERSION } from \"./version\";\nimport withDefaults from \"./with-defaults\";\nexport const request = withDefaults(endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${getUserAgent()}`,\n },\n});\n"],"names":["getBuffer"],"mappings":";;;;;;AAAO,MAAM,OAAO,GAAG,mBAAmB;;ACA3B,SAAS,iBAAiB,CAAC,QAAQ,EAAE;AACpD,IAAI,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC;;ACEc,SAAS,YAAY,CAAC,cAAc,EAAE;AACrD,IAAI,MAAM,GAAG,GAAG,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,GAAG;AACpE,UAAU,cAAc,CAAC,OAAO,CAAC,GAAG;AACpC,UAAU,OAAO,CAAC;AAClB,IAAI,IAAI,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC;AAC1C,QAAQ,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;AAC5C,QAAQ,cAAc,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK;AACL,IAAI,IAAI,OAAO,GAAG,EAAE,CAAC;AACrB,IAAI,IAAI,MAAM,CAAC;AACf,IAAI,IAAI,GAAG,CAAC;AACZ,IAAI,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;AACxF,IAAI,OAAO,KAAK,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC;AACnD,QAAQ,MAAM,EAAE,cAAc,CAAC,MAAM;AACrC,QAAQ,IAAI,EAAE,cAAc,CAAC,IAAI;AACjC,QAAQ,OAAO,EAAE,cAAc,CAAC,OAAO;AACvC,QAAQ,QAAQ,EAAE,cAAc,CAAC,QAAQ;AACzC,KAAK;AACL;AACA;AACA,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AAC5B,SAAS,IAAI,CAAC,OAAO,QAAQ,KAAK;AAClC,QAAQ,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;AAC3B,QAAQ,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AACjC,QAAQ,KAAK,MAAM,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE;AACpD,YAAY,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACrD,SAAS;AACT,QAAQ,IAAI,aAAa,IAAI,OAAO,EAAE;AACtC,YAAY,MAAM,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC/F,YAAY,MAAM,eAAe,GAAG,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AAC7D,YAAY,GAAG,CAAC,IAAI,CAAC,CAAC,oBAAoB,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,kDAAkD,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AAClN,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE;AAC9C,YAAY,OAAO;AACnB,SAAS;AACT;AACA,QAAQ,IAAI,cAAc,CAAC,MAAM,KAAK,MAAM,EAAE;AAC9C,YAAY,IAAI,MAAM,GAAG,GAAG,EAAE;AAC9B,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,MAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;AAChE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,SAAS;AACnC,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B,YAAY,MAAM,IAAI,YAAY,CAAC,cAAc,EAAE,MAAM,EAAE;AAC3D,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI,EAAE,MAAM,eAAe,CAAC,QAAQ,CAAC;AACzD,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,SAAS;AACT,QAAQ,IAAI,MAAM,IAAI,GAAG,EAAE;AAC3B,YAAY,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzD,YAAY,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;AACzE,gBAAgB,QAAQ,EAAE;AAC1B,oBAAoB,GAAG;AACvB,oBAAoB,MAAM;AAC1B,oBAAoB,OAAO;AAC3B,oBAAoB,IAAI;AACxB,iBAAiB;AACjB,gBAAgB,OAAO,EAAE,cAAc;AACvC,aAAa,CAAC,CAAC;AACf,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,QAAQ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACzC,KAAK,CAAC;AACN,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK;AACxB,QAAQ,OAAO;AACf,YAAY,MAAM;AAClB,YAAY,GAAG;AACf,YAAY,OAAO;AACnB,YAAY,IAAI;AAChB,SAAS,CAAC;AACV,KAAK,CAAC;AACN,SAAS,KAAK,CAAC,CAAC,KAAK,KAAK;AAC1B,QAAQ,IAAI,KAAK,YAAY,YAAY;AACzC,YAAY,MAAM,KAAK,CAAC;AACxB,QAAQ,MAAM,IAAI,YAAY,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE;AACnD,YAAY,OAAO,EAAE,cAAc;AACnC,SAAS,CAAC,CAAC;AACX,KAAK,CAAC,CAAC;AACP,CAAC;AACD,eAAe,eAAe,CAAC,QAAQ,EAAE;AACzC,IAAI,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;AAC7D,IAAI,IAAI,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AAC/C,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,IAAI,CAAC,WAAW,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;AACpE,QAAQ,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC/B,KAAK;AACL,IAAI,OAAOA,iBAAS,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC;AACD,SAAS,cAAc,CAAC,IAAI,EAAE;AAC9B,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;AAChC,QAAQ,OAAO,IAAI,CAAC;AACpB;AACA,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE;AAC3B,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;AACxC,YAAY,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpF,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC,OAAO,CAAC;AAC5B,KAAK;AACL;AACA,IAAI,OAAO,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpD,CAAC;;ACrHc,SAAS,YAAY,CAAC,WAAW,EAAE,WAAW,EAAE;AAC/D,IAAI,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AACvD,IAAI,MAAM,MAAM,GAAG,UAAU,KAAK,EAAE,UAAU,EAAE;AAChD,QAAQ,MAAM,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AAClE,QAAQ,IAAI,CAAC,eAAe,CAAC,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE;AACvE,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AACjE,SAAS;AACT,QAAQ,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK;AAC/C,YAAY,OAAO,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,CAAC;AACV,QAAQ,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;AAC/B,YAAY,QAAQ;AACpB,YAAY,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACvD,SAAS,CAAC,CAAC;AACX,QAAQ,OAAO,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;AACtE,KAAK,CAAC;AACN,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;AACjC,QAAQ,QAAQ;AAChB,QAAQ,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,CAAC;;ACjBW,MAAC,OAAO,GAAG,YAAY,CAAC,QAAQ,EAAE;AAC9C,IAAI,OAAO,EAAE;AACb,QAAQ,YAAY,EAAE,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;AACvE,KAAK;AACL,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/request/package.json b/node_modules/@octokit/request/package.json new file mode 100644 index 0000000..e38c955 --- /dev/null +++ b/node_modules/@octokit/request/package.json @@ -0,0 +1,56 @@ +{ + "name": "@octokit/request", + "description": "Send parameterized requests to GitHub's APIs with sensible defaults in browsers and Node", + "version": "5.6.3", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "pika": true, + "sideEffects": false, + "keywords": [ + "octokit", + "github", + "api", + "request" + ], + "repository": "github:octokit/request.js", + "dependencies": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.1.0", + "@octokit/types": "^6.16.1", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.7", + "universal-user-agent": "^6.0.0" + }, + "devDependencies": { + "@octokit/auth-app": "^3.0.0", + "@pika/pack": "^0.5.0", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/fetch-mock": "^7.2.4", + "@types/jest": "^27.0.0", + "@types/lolex": "^5.1.0", + "@types/node": "^14.0.0", + "@types/node-fetch": "^2.3.3", + "@types/once": "^1.4.0", + "fetch-mock": "^9.3.1", + "jest": "^27.0.0", + "lolex": "^6.0.0", + "prettier": "2.4.1", + "semantic-release": "^18.0.0", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "string-to-arraybuffer": "^1.0.2", + "ts-jest": "^27.0.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + }, + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "main": "dist-node/index.js", + "module": "dist-web/index.js" +} diff --git a/node_modules/@octokit/types/LICENSE b/node_modules/@octokit/types/LICENSE new file mode 100644 index 0000000..57bee5f --- /dev/null +++ b/node_modules/@octokit/types/LICENSE @@ -0,0 +1,7 @@ +MIT License Copyright (c) 2019 Octokit contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@octokit/types/README.md b/node_modules/@octokit/types/README.md new file mode 100644 index 0000000..c48ce42 --- /dev/null +++ b/node_modules/@octokit/types/README.md @@ -0,0 +1,65 @@ +# types.ts + +> Shared TypeScript definitions for Octokit projects + +[![@latest](https://img.shields.io/npm/v/@octokit/types.svg)](https://www.npmjs.com/package/@octokit/types) +[![Build Status](https://github.com/octokit/types.ts/workflows/Test/badge.svg)](https://github.com/octokit/types.ts/actions?workflow=Test) + + + +- [Usage](#usage) +- [Examples](#examples) + - [Get parameter and response data types for a REST API endpoint](#get-parameter-and-response-data-types-for-a-rest-api-endpoint) + - [Get response types from endpoint methods](#get-response-types-from-endpoint-methods) +- [Contributing](#contributing) +- [License](#license) + + + +## Usage + +See all exported types at https://octokit.github.io/types.ts + +## Examples + +### Get parameter and response data types for a REST API endpoint + +```ts +import { Endpoints } from "@octokit/types"; + +type listUserReposParameters = + Endpoints["GET /repos/{owner}/{repo}"]["parameters"]; +type listUserReposResponse = Endpoints["GET /repos/{owner}/{repo}"]["response"]; + +async function listRepos( + options: listUserReposParameters +): listUserReposResponse["data"] { + // ... +} +``` + +### Get response types from endpoint methods + +```ts +import { + GetResponseTypeFromEndpointMethod, + GetResponseDataTypeFromEndpointMethod, +} from "@octokit/types"; +import { Octokit } from "@octokit/rest"; + +const octokit = new Octokit(); +type CreateLabelResponseType = GetResponseTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +type CreateLabelResponseDataType = GetResponseDataTypeFromEndpointMethod< + typeof octokit.issues.createLabel +>; +``` + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) + +## License + +[MIT](LICENSE) diff --git a/node_modules/@octokit/types/dist-node/index.js b/node_modules/@octokit/types/dist-node/index.js new file mode 100644 index 0000000..b3c252b --- /dev/null +++ b/node_modules/@octokit/types/dist-node/index.js @@ -0,0 +1,8 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +const VERSION = "6.41.0"; + +exports.VERSION = VERSION; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/types/dist-node/index.js.map b/node_modules/@octokit/types/dist-node/index.js.map new file mode 100644 index 0000000..2d148d3 --- /dev/null +++ b/node_modules/@octokit/types/dist-node/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":["VERSION"],"mappings":";;;;MAAaA,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/types/dist-src/AuthInterface.js b/node_modules/@octokit/types/dist-src/AuthInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/AuthInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/EndpointDefaults.js b/node_modules/@octokit/types/dist-src/EndpointDefaults.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/EndpointDefaults.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/EndpointInterface.js b/node_modules/@octokit/types/dist-src/EndpointInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/EndpointInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/EndpointOptions.js b/node_modules/@octokit/types/dist-src/EndpointOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/EndpointOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/Fetch.js b/node_modules/@octokit/types/dist-src/Fetch.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/Fetch.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js b/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/GetResponseTypeFromEndpointMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/OctokitResponse.js b/node_modules/@octokit/types/dist-src/OctokitResponse.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/OctokitResponse.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestError.js b/node_modules/@octokit/types/dist-src/RequestError.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestError.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestHeaders.js b/node_modules/@octokit/types/dist-src/RequestHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestInterface.js b/node_modules/@octokit/types/dist-src/RequestInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestMethod.js b/node_modules/@octokit/types/dist-src/RequestMethod.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestMethod.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestOptions.js b/node_modules/@octokit/types/dist-src/RequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestParameters.js b/node_modules/@octokit/types/dist-src/RequestParameters.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestParameters.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/RequestRequestOptions.js b/node_modules/@octokit/types/dist-src/RequestRequestOptions.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/RequestRequestOptions.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/ResponseHeaders.js b/node_modules/@octokit/types/dist-src/ResponseHeaders.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/ResponseHeaders.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/Route.js b/node_modules/@octokit/types/dist-src/Route.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/Route.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/Signal.js b/node_modules/@octokit/types/dist-src/Signal.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/Signal.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/StrategyInterface.js b/node_modules/@octokit/types/dist-src/StrategyInterface.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/StrategyInterface.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/Url.js b/node_modules/@octokit/types/dist-src/Url.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/Url.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/VERSION.js b/node_modules/@octokit/types/dist-src/VERSION.js new file mode 100644 index 0000000..45a11b8 --- /dev/null +++ b/node_modules/@octokit/types/dist-src/VERSION.js @@ -0,0 +1 @@ +export const VERSION = "6.41.0"; diff --git a/node_modules/@octokit/types/dist-src/generated/Endpoints.js b/node_modules/@octokit/types/dist-src/generated/Endpoints.js new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/node_modules/@octokit/types/dist-src/generated/Endpoints.js @@ -0,0 +1 @@ +export {}; diff --git a/node_modules/@octokit/types/dist-src/index.js b/node_modules/@octokit/types/dist-src/index.js new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/types/dist-src/index.js @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/types/dist-types/AuthInterface.d.ts b/node_modules/@octokit/types/dist-types/AuthInterface.d.ts new file mode 100644 index 0000000..8b39d61 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/AuthInterface.d.ts @@ -0,0 +1,31 @@ +import { EndpointOptions } from "./EndpointOptions"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestInterface } from "./RequestInterface"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +/** + * Interface to implement complex authentication strategies for Octokit. + * An object Implementing the AuthInterface can directly be passed as the + * `auth` option in the Octokit constructor. + * + * For the official implementations of the most common authentication + * strategies, see https://github.com/octokit/auth.js + */ +export interface AuthInterface { + (...args: AuthOptions): Promise; + hook: { + /** + * Sends a request using the passed `request` instance + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, options: EndpointOptions): Promise>; + /** + * Sends a request using the passed `request` instance + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (request: RequestInterface, route: Route, parameters?: RequestParameters): Promise>; + }; +} diff --git a/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts b/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts new file mode 100644 index 0000000..a2c2307 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/EndpointDefaults.d.ts @@ -0,0 +1,21 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestParameters } from "./RequestParameters"; +import { Url } from "./Url"; +/** + * The `.endpoint()` method is guaranteed to set all keys defined by RequestParameters + * as well as the method property. + */ +export declare type EndpointDefaults = RequestParameters & { + baseUrl: Url; + method: RequestMethod; + url?: Url; + headers: RequestHeaders & { + accept: string; + "user-agent": string; + }; + mediaType: { + format: string; + previews: string[]; + }; +}; diff --git a/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts b/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts new file mode 100644 index 0000000..d7b4009 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/EndpointInterface.d.ts @@ -0,0 +1,65 @@ +import { EndpointDefaults } from "./EndpointDefaults"; +import { RequestOptions } from "./RequestOptions"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface EndpointInterface { + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {object} endpoint Must set `url` unless it's set defaults. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): RequestOptions & Pick; + /** + * Transforms a GitHub REST API endpoint into generic request options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: keyof Endpoints | R, parameters?: P): (R extends keyof Endpoints ? Endpoints[R]["request"] : RequestOptions) & Pick; + /** + * Object with current default route and parameters + */ + DEFAULTS: D & EndpointDefaults; + /** + * Returns a new `endpoint` interface with new defaults + */ + defaults: (newDefaults: O) => EndpointInterface; + merge: { + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + * + */ + (route: keyof Endpoints | R, parameters?: P): D & (R extends keyof Endpoints ? Endpoints[R]["request"] & Endpoints[R]["parameters"] : EndpointDefaults) & P; + /** + * Merges current endpoint defaults with passed route and parameters, + * without transforming them into request options. + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ +

(options: P): EndpointDefaults & D & P; + /** + * Returns current default options. + * + * @deprecated use endpoint.DEFAULTS instead + */ + (): D & EndpointDefaults; + }; + /** + * Stateless method to turn endpoint options into request options. + * Calling `endpoint(options)` is the same as calling `endpoint.parse(endpoint.merge(options))`. + * + * @param {object} options `method`, `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + parse: (options: O) => RequestOptions & Pick; +} diff --git a/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts b/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts new file mode 100644 index 0000000..b1b91f1 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/EndpointOptions.d.ts @@ -0,0 +1,7 @@ +import { RequestMethod } from "./RequestMethod"; +import { Url } from "./Url"; +import { RequestParameters } from "./RequestParameters"; +export declare type EndpointOptions = RequestParameters & { + method: RequestMethod; + url: Url; +}; diff --git a/node_modules/@octokit/types/dist-types/Fetch.d.ts b/node_modules/@octokit/types/dist-types/Fetch.d.ts new file mode 100644 index 0000000..cbbd5e8 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/Fetch.d.ts @@ -0,0 +1,4 @@ +/** + * Browser's fetch method (or compatible such as fetch-mock) + */ +export declare type Fetch = any; diff --git a/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts b/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts new file mode 100644 index 0000000..70e1a8d --- /dev/null +++ b/node_modules/@octokit/types/dist-types/GetResponseTypeFromEndpointMethod.d.ts @@ -0,0 +1,5 @@ +declare type Unwrap = T extends Promise ? U : T; +declare type AnyFunction = (...args: any[]) => any; +export declare type GetResponseTypeFromEndpointMethod = Unwrap>; +export declare type GetResponseDataTypeFromEndpointMethod = Unwrap>["data"]; +export {}; diff --git a/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts b/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts new file mode 100644 index 0000000..28fdfb8 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/OctokitResponse.d.ts @@ -0,0 +1,17 @@ +import { ResponseHeaders } from "./ResponseHeaders"; +import { Url } from "./Url"; +export declare type OctokitResponse = { + headers: ResponseHeaders; + /** + * http response code + */ + status: S; + /** + * URL of response after all redirects + */ + url: Url; + /** + * Response data as documented in the REST API reference documentation at https://docs.github.com/rest/reference + */ + data: T; +}; diff --git a/node_modules/@octokit/types/dist-types/RequestError.d.ts b/node_modules/@octokit/types/dist-types/RequestError.d.ts new file mode 100644 index 0000000..89174e6 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestError.d.ts @@ -0,0 +1,11 @@ +export declare type RequestError = { + name: string; + status: number; + documentation_url: string; + errors?: Array<{ + resource: string; + code: string; + field: string; + message?: string; + }>; +}; diff --git a/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts b/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts new file mode 100644 index 0000000..ac5aae0 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestHeaders.d.ts @@ -0,0 +1,15 @@ +export declare type RequestHeaders = { + /** + * Avoid setting `headers.accept`, use `mediaType.{format|previews}` option instead. + */ + accept?: string; + /** + * Use `authorization` to send authenticated request, remember `token ` / `bearer ` prefixes. Example: `token 1234567890abcdef1234567890abcdef12345678` + */ + authorization?: string; + /** + * `user-agent` is set do a default and can be overwritten as needed. + */ + "user-agent"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/types/dist-types/RequestInterface.d.ts b/node_modules/@octokit/types/dist-types/RequestInterface.d.ts new file mode 100644 index 0000000..851811f --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestInterface.d.ts @@ -0,0 +1,34 @@ +import { EndpointInterface } from "./EndpointInterface"; +import { OctokitResponse } from "./OctokitResponse"; +import { RequestParameters } from "./RequestParameters"; +import { Route } from "./Route"; +import { Endpoints } from "./generated/Endpoints"; +export interface RequestInterface { + /** + * Sends a request based on endpoint options + * + * @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (options: O & { + method?: string; + } & ("url" extends keyof D ? { + url?: string; + } : { + url: string; + })): Promise>; + /** + * Sends a request based on endpoint options + * + * @param {string} route Request method + URL. Example: `'GET /orgs/{org}'` + * @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`. + */ + (route: keyof Endpoints | R, options?: R extends keyof Endpoints ? Endpoints[R]["parameters"] & RequestParameters : RequestParameters): R extends keyof Endpoints ? Promise : Promise>; + /** + * Returns a new `request` with updated route and parameters + */ + defaults: (newDefaults: O) => RequestInterface; + /** + * Octokit endpoint API, see {@link https://github.com/octokit/endpoint.js|@octokit/endpoint} + */ + endpoint: EndpointInterface; +} diff --git a/node_modules/@octokit/types/dist-types/RequestMethod.d.ts b/node_modules/@octokit/types/dist-types/RequestMethod.d.ts new file mode 100644 index 0000000..e999c8d --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestMethod.d.ts @@ -0,0 +1,4 @@ +/** + * HTTP Verb supported by GitHub's REST API + */ +export declare type RequestMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT"; diff --git a/node_modules/@octokit/types/dist-types/RequestOptions.d.ts b/node_modules/@octokit/types/dist-types/RequestOptions.d.ts new file mode 100644 index 0000000..97e2181 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestOptions.d.ts @@ -0,0 +1,14 @@ +import { RequestHeaders } from "./RequestHeaders"; +import { RequestMethod } from "./RequestMethod"; +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { Url } from "./Url"; +/** + * Generic request options as they are returned by the `endpoint()` method + */ +export declare type RequestOptions = { + method: RequestMethod; + url: Url; + headers: RequestHeaders; + body?: any; + request?: RequestRequestOptions; +}; diff --git a/node_modules/@octokit/types/dist-types/RequestParameters.d.ts b/node_modules/@octokit/types/dist-types/RequestParameters.d.ts new file mode 100644 index 0000000..b056a0e --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestParameters.d.ts @@ -0,0 +1,45 @@ +import { RequestRequestOptions } from "./RequestRequestOptions"; +import { RequestHeaders } from "./RequestHeaders"; +import { Url } from "./Url"; +/** + * Parameters that can be passed into `request(route, parameters)` or `endpoint(route, parameters)` methods + */ +export declare type RequestParameters = { + /** + * Base URL to be used when a relative URL is passed, such as `/orgs/{org}`. + * If `baseUrl` is `https://enterprise.acme-inc.com/api/v3`, then the request + * will be sent to `https://enterprise.acme-inc.com/api/v3/orgs/{org}`. + */ + baseUrl?: Url; + /** + * HTTP headers. Use lowercase keys. + */ + headers?: RequestHeaders; + /** + * Media type options, see {@link https://developer.github.com/v3/media/|GitHub Developer Guide} + */ + mediaType?: { + /** + * `json` by default. Can be `raw`, `text`, `html`, `full`, `diff`, `patch`, `sha`, `base64`. Depending on endpoint + */ + format?: string; + /** + * Custom media type names of {@link https://developer.github.com/v3/media/|API Previews} without the `-preview` suffix. + * Example for single preview: `['squirrel-girl']`. + * Example for multiple previews: `['squirrel-girl', 'mister-fantastic']`. + */ + previews?: string[]; + }; + /** + * Pass custom meta information for the request. The `request` object will be returned as is. + */ + request?: RequestRequestOptions; + /** + * Any additional parameter will be passed as follows + * 1. URL parameter if `':parameter'` or `{parameter}` is part of `url` + * 2. Query parameter if `method` is `'GET'` or `'HEAD'` + * 3. Request body if `parameter` is `'data'` + * 4. JSON in the request body in the form of `body[parameter]` unless `parameter` key is `'data'` + */ + [parameter: string]: unknown; +}; diff --git a/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts b/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts new file mode 100644 index 0000000..8f5c43a --- /dev/null +++ b/node_modules/@octokit/types/dist-types/RequestRequestOptions.d.ts @@ -0,0 +1,26 @@ +import { Fetch } from "./Fetch"; +import { Signal } from "./Signal"; +/** + * Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled + */ +export declare type RequestRequestOptions = { + /** + * Node only. Useful for custom proxy, certificate, or dns lookup. + * + * @see https://nodejs.org/api/http.html#http_class_http_agent + */ + agent?: unknown; + /** + * Custom replacement for built-in fetch method. Useful for testing or request hooks. + */ + fetch?: Fetch; + /** + * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. + */ + signal?: Signal; + /** + * Node only. Request/response timeout in ms, it resets on redirect. 0 to disable (OS limit applies). `options.request.signal` is recommended instead. + */ + timeout?: number; + [option: string]: any; +}; diff --git a/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts b/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts new file mode 100644 index 0000000..c8fbe43 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/ResponseHeaders.d.ts @@ -0,0 +1,20 @@ +export declare type ResponseHeaders = { + "cache-control"?: string; + "content-length"?: number; + "content-type"?: string; + date?: string; + etag?: string; + "last-modified"?: string; + link?: string; + location?: string; + server?: string; + status?: string; + vary?: string; + "x-github-mediatype"?: string; + "x-github-request-id"?: string; + "x-oauth-scopes"?: string; + "x-ratelimit-limit"?: string; + "x-ratelimit-remaining"?: string; + "x-ratelimit-reset"?: string; + [header: string]: string | number | undefined; +}; diff --git a/node_modules/@octokit/types/dist-types/Route.d.ts b/node_modules/@octokit/types/dist-types/Route.d.ts new file mode 100644 index 0000000..dcaac75 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/Route.d.ts @@ -0,0 +1,4 @@ +/** + * String consisting of an optional HTTP method and relative path or absolute URL. Examples: `'/orgs/{org}'`, `'PUT /orgs/{org}'`, `GET https://example.com/foo/bar` + */ +export declare type Route = string; diff --git a/node_modules/@octokit/types/dist-types/Signal.d.ts b/node_modules/@octokit/types/dist-types/Signal.d.ts new file mode 100644 index 0000000..4ebcf24 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/Signal.d.ts @@ -0,0 +1,6 @@ +/** + * Abort signal + * + * @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal + */ +export declare type Signal = any; diff --git a/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts b/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts new file mode 100644 index 0000000..405cbd2 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/StrategyInterface.d.ts @@ -0,0 +1,4 @@ +import { AuthInterface } from "./AuthInterface"; +export interface StrategyInterface { + (...args: StrategyOptions): AuthInterface; +} diff --git a/node_modules/@octokit/types/dist-types/Url.d.ts b/node_modules/@octokit/types/dist-types/Url.d.ts new file mode 100644 index 0000000..3e69916 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/Url.d.ts @@ -0,0 +1,4 @@ +/** + * Relative or absolute URL. Examples: `'/orgs/{org}'`, `https://example.com/foo/bar` + */ +export declare type Url = string; diff --git a/node_modules/@octokit/types/dist-types/VERSION.d.ts b/node_modules/@octokit/types/dist-types/VERSION.d.ts new file mode 100644 index 0000000..dc24575 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/VERSION.d.ts @@ -0,0 +1 @@ +export declare const VERSION = "6.41.0"; diff --git a/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts b/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts new file mode 100644 index 0000000..3fe7cf8 --- /dev/null +++ b/node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts @@ -0,0 +1,3571 @@ +import { paths } from "@octokit/openapi-types"; +import { OctokitResponse } from "../OctokitResponse"; +import { RequestHeaders } from "../RequestHeaders"; +import { RequestRequestOptions } from "../RequestRequestOptions"; +declare type UnionToIntersection = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never; +declare type ExtractParameters = "parameters" extends keyof T ? UnionToIntersection<{ + [K in keyof T["parameters"]]: T["parameters"][K]; +}[keyof T["parameters"]]> : {}; +declare type ExtractRequestBody = "requestBody" extends keyof T ? "content" extends keyof T["requestBody"] ? "application/json" extends keyof T["requestBody"]["content"] ? T["requestBody"]["content"]["application/json"] : { + data: { + [K in keyof T["requestBody"]["content"]]: T["requestBody"]["content"][K]; + }[keyof T["requestBody"]["content"]]; +} : "application/json" extends keyof T["requestBody"] ? T["requestBody"]["application/json"] : { + data: { + [K in keyof T["requestBody"]]: T["requestBody"][K]; + }[keyof T["requestBody"]]; +} : {}; +declare type ToOctokitParameters = ExtractParameters & ExtractRequestBody; +declare type RequiredPreview = T extends string ? { + mediaType: { + previews: [T, ...string[]]; + }; +} : {}; +declare type Operation = { + parameters: ToOctokitParameters & RequiredPreview; + request: { + method: Method extends keyof MethodsMap ? MethodsMap[Method] : never; + url: Url; + headers: RequestHeaders; + request: RequestRequestOptions; + }; + response: ExtractOctokitResponse; +}; +declare type MethodsMap = { + delete: "DELETE"; + get: "GET"; + patch: "PATCH"; + post: "POST"; + put: "PUT"; +}; +declare type SuccessStatuses = 200 | 201 | 202 | 204; +declare type RedirectStatuses = 301 | 302; +declare type EmptyResponseStatuses = 201 | 204; +declare type KnownJsonResponseTypes = "application/json" | "application/scim+json" | "text/html"; +declare type SuccessResponseDataType = { + [K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent extends never ? never : OctokitResponse, K>; +}[SuccessStatuses & keyof Responses]; +declare type RedirectResponseDataType = { + [K in RedirectStatuses & keyof Responses]: OctokitResponse; +}[RedirectStatuses & keyof Responses]; +declare type EmptyResponseDataType = { + [K in EmptyResponseStatuses & keyof Responses]: OctokitResponse; +}[EmptyResponseStatuses & keyof Responses]; +declare type GetContentKeyIfPresent = "content" extends keyof T ? DataType : DataType; +declare type DataType = { + [K in KnownJsonResponseTypes & keyof T]: T[K]; +}[KnownJsonResponseTypes & keyof T]; +declare type ExtractOctokitResponse = "responses" extends keyof R ? SuccessResponseDataType extends never ? RedirectResponseDataType extends never ? EmptyResponseDataType : RedirectResponseDataType : SuccessResponseDataType : unknown; +export interface Endpoints { + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + */ + "DELETE /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + */ + "DELETE /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "delete">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#delete-a-grant + */ + "DELETE /applications/grants/{grant_id}": Operation<"/applications/grants/{grant_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-authorization + */ + "DELETE /applications/{client_id}/grant": Operation<"/applications/{client_id}/grant", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#delete-an-app-token + */ + "DELETE /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#delete-an-authorization + */ + "DELETE /authorizations/{authorization_id}": Operation<"/authorizations/{authorization_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise + */ + "DELETE /enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist + */ + "DELETE /gists/{gist_id}": Operation<"/gists/{gist_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#delete-a-gist-comment + */ + "DELETE /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/gists#unstar-a-gist + */ + "DELETE /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token + */ + "DELETE /installation/token": Operation<"/installation/token", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + */ + "DELETE /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + */ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + */ + "DELETE /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization + */ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + */ + "DELETE /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-a-saml-sso-authorization-for-an-organization + */ + "DELETE /orgs/{org}/credential-authorizations/{credential_id}": Operation<"/orgs/{org}/credential-authorizations/{credential_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + */ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + */ + "DELETE /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + */ + "DELETE /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + */ + "DELETE /orgs/{org}/invitations/{invitation_id}": Operation<"/orgs/{org}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-an-organization-member + */ + "DELETE /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + */ + "DELETE /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive + */ + "DELETE /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + */ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + */ + "DELETE /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + */ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user + */ + "DELETE /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + */ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#unlink-external-idp-group-team-connection + */ + "DELETE /orgs/{org}/teams/{team_slug}/external-groups": Operation<"/orgs/{org}/teams/{team_slug}/external-groups", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + */ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + */ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-card + */ + "DELETE /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project-column + */ + "DELETE /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#delete-a-project + */ + "DELETE /projects/{project_id}": Operation<"/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/projects#remove-project-collaborator + */ + "DELETE /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository + */ + "DELETE /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-artifact + */ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-a-github-actions-cache-for-a-repository-using-a-cache-id + */ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}": Operation<"/repos/{owner}/{repo}/actions/caches/{cache_id}", "delete">; + /** + * @see https://docs.github.com/rest/actions/cache#delete-github-actions-caches-for-a-repository-using-a-cache-key + */ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}": Operation<"/repos/{owner}/{repo}/actions/caches", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-workflow-run + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + */ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/v3/repos#delete-autolink + */ + "DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + */ + "DELETE /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-admin-branch-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-pull-request-review-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-commit-signature-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-status-check-protection + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-status-check-contexts + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-app-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-team-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-user-access-restrictions + */ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "delete">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + */ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#remove-a-repository-collaborator + */ + "DELETE /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-commit-comment + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-file + */ + "DELETE /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "delete">; + /** + * @see https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + */ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-deployment + */ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-an-environment + */ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/git#delete-a-reference + */ + "DELETE /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository-webhook + */ + "DELETE /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#cancel-an-import + */ + "DELETE /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-repository-invitation + */ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-an-issue-comment + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#unlock-an-issue + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + */ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-deploy-key + */ + "DELETE /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-label + */ + "DELETE /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "delete">; + /** + * @see https://docs.github.com/rest/reference/issues#delete-a-milestone + */ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-github-pages-site + */ + "DELETE /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + */ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "delete">; + /** + * @see https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + */ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release-asset + */ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-a-release + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/reactions/#delete-a-release-reaction + */ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + */ + "DELETE /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#delete-tag-protection-state-for-a-repository + */ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}": Operation<"/repos/{owner}/{repo}/tags/protection/{tag_protection_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + */ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "delete">; + /** + * @see https://docs.github.com/rest/reference/actions#delete-an-environment-secret + */ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-group-from-an-enterprise + */ + "DELETE /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": Operation<"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-user-from-an-enterprise + */ + "DELETE /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/scim#delete-a-scim-user-from-an-organization + */ + "DELETE /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + */ + "DELETE /teams/{team_id}": Operation<"/teams/{team_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + */ + "DELETE /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-member-legacy + */ + "DELETE /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy + */ + "DELETE /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + */ + "DELETE /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + */ + "DELETE /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unblock-a-user + */ + "DELETE /user/blocks/{username}": Operation<"/user/blocks/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user + */ + "DELETE /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret + */ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + */ + "DELETE /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user + */ + "DELETE /user/emails": Operation<"/user/emails", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#unfollow-a-user + */ + "DELETE /user/following/{username}": Operation<"/user/following/{username}", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user + */ + "DELETE /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + */ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + */ + "DELETE /user/interaction-limits": Operation<"/user/interaction-limits", "delete">; + /** + * @see https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user + */ + "DELETE /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + */ + "DELETE /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "delete">; + /** + * @see https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + */ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock": Operation<"/user/migrations/{migration_id}/repos/{repo_name}/lock", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user + */ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/repos#decline-a-repository-invitation + */ + "DELETE /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "delete">; + /** + * @see https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + */ + "DELETE /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "delete">; + /** + * @see https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user + */ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "delete">; + /** + * @see https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint + */ + "GET /": Operation<"/", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-the-authenticated-app + */ + "GET /app": Operation<"/app", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + */ + "GET /app/hook/config": Operation<"/app/hook/config", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + */ + "GET /app/hook/deliveries": Operation<"/app/hook/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + */ + "GET /app/hook/deliveries/{delivery_id}": Operation<"/app/hook/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + */ + "GET /app/installations": Operation<"/app/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + */ + "GET /app/installations/{installation_id}": Operation<"/app/installations/{installation_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#list-your-grants + */ + "GET /applications/grants": Operation<"/applications/grants", "get">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-grant + */ + "GET /applications/grants/{grant_id}": Operation<"/applications/grants/{grant_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps/#get-an-app + */ + "GET /apps/{app_slug}": Operation<"/apps/{app_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations + */ + "GET /authorizations": Operation<"/authorizations", "get">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-authorization + */ + "GET /authorizations/{authorization_id}": Operation<"/authorizations/{authorization_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + */ + "GET /codes_of_conduct": Operation<"/codes_of_conduct", "get">; + /** + * @see https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + */ + "GET /codes_of_conduct/{key}": Operation<"/codes_of_conduct/{key}", "get">; + /** + * @see https://docs.github.com/rest/reference/emojis#get-emojis + */ + "GET /emojis": Operation<"/emojis", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-github-enterprise-server-statistics + */ + "GET /enterprise-installation/{enterprise_or_org}/server-statistics": Operation<"/enterprise-installation/{enterprise_or_org}/server-statistics", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/cache/usage": Operation<"/enterprises/{enterprise}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners": Operation<"/enterprises/{enterprise}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/downloads": Operation<"/enterprises/{enterprise}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "GET /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise + */ + "GET /enterprises/{enterprise}/audit-log": Operation<"/enterprises/{enterprise}/audit-log", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/code-scanning/alerts": Operation<"/enterprises/{enterprise}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise + */ + "GET /enterprises/{enterprise}/secret-scanning/alerts": Operation<"/enterprises/{enterprise}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/actions": Operation<"/enterprises/{enterprise}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/advanced-security": Operation<"/enterprises/{enterprise}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/packages": Operation<"/enterprises/{enterprise}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-enterprise + */ + "GET /enterprises/{enterprise}/settings/billing/shared-storage": Operation<"/enterprises/{enterprise}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events + */ + "GET /events": Operation<"/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-feeds + */ + "GET /feeds": Operation<"/feeds", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user + */ + "GET /gists": Operation<"/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-public-gists + */ + "GET /gists/public": Operation<"/gists/public", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-starred-gists + */ + "GET /gists/starred": Operation<"/gists/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist + */ + "GET /gists/{gist_id}": Operation<"/gists/{gist_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-comments + */ + "GET /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-comment + */ + "GET /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-commits + */ + "GET /gists/{gist_id}/commits": Operation<"/gists/{gist_id}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gist-forks + */ + "GET /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + */ + "GET /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#get-a-gist-revision + */ + "GET /gists/{gist_id}/{sha}": Operation<"/gists/{gist_id}/{sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates + */ + "GET /gitignore/templates": Operation<"/gitignore/templates", "get">; + /** + * @see https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + */ + "GET /gitignore/templates/{name}": Operation<"/gitignore/templates/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + */ + "GET /installation/repositories": Operation<"/installation/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + */ + "GET /issues": Operation<"/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + */ + "GET /licenses": Operation<"/licenses", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses#get-a-license + */ + "GET /licenses/{license}": Operation<"/licenses/{license}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + */ + "GET /marketplace_listing/accounts/{account_id}": Operation<"/marketplace_listing/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans + */ + "GET /marketplace_listing/plans": Operation<"/marketplace_listing/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + */ + "GET /marketplace_listing/plans/{plan_id}/accounts": Operation<"/marketplace_listing/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + */ + "GET /marketplace_listing/stubbed/accounts/{account_id}": Operation<"/marketplace_listing/stubbed/accounts/{account_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-plans-stubbed + */ + "GET /marketplace_listing/stubbed/plans": Operation<"/marketplace_listing/stubbed/plans", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + */ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts": Operation<"/marketplace_listing/stubbed/plans/{plan_id}/accounts", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-github-meta-information + */ + "GET /meta": Operation<"/meta", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + */ + "GET /networks/{owner}/{repo}/events": Operation<"/networks/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + */ + "GET /notifications": Operation<"/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread + */ + "GET /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + */ + "GET /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/meta#get-octocat + */ + "GET /octocat": Operation<"/octocat", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations + */ + "GET /organizations": Operation<"/organizations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-custom-repository-roles-in-an-organization + */ + "GET /organizations/{organization_id}/custom_roles": Operation<"/organizations/{organization_id}/custom_roles", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + * @deprecated "org_id" is now "org" + */ + "GET /orgs/{org_id}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization + */ + "GET /orgs/{org}": Operation<"/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage": Operation<"/orgs/{org}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization + */ + "GET /orgs/{org}/actions/cache/usage-by-repository": Operation<"/orgs/{org}/actions/cache/usage-by-repository", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "GET /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "GET /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization + */ + "GET /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + */ + "GET /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + */ + "GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + */ + "GET /orgs/{org}/actions/runners": Operation<"/orgs/{org}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + */ + "GET /orgs/{org}/actions/runners/downloads": Operation<"/orgs/{org}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}": Operation<"/orgs/{org}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + */ + "GET /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-organization-secrets + */ + "GET /orgs/{org}/actions/secrets": Operation<"/orgs/{org}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-public-key + */ + "GET /orgs/{org}/actions/secrets/public-key": Operation<"/orgs/{org}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-audit-log + */ + "GET /orgs/{org}/audit-log": Operation<"/orgs/{org}/audit-log", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks": Operation<"/orgs/{org}/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization + */ + "GET /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + */ + "GET /orgs/{org}/code-scanning/alerts": Operation<"/orgs/{org}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-in-organization + */ + "GET /orgs/{org}/codespaces": Operation<"/orgs/{org}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization + */ + "GET /orgs/{org}/credential-authorizations": Operation<"/orgs/{org}/credential-authorizations", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-organization-secrets + */ + "GET /orgs/{org}/dependabot/secrets": Operation<"/orgs/{org}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + */ + "GET /orgs/{org}/dependabot/secrets/public-key": Operation<"/orgs/{org}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + */ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-organization-events + */ + "GET /orgs/{org}/events": Operation<"/orgs/{org}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#external-idp-group-info-for-an-organization + */ + "GET /orgs/{org}/external-group/{group_id}": Operation<"/orgs/{org}/external-group/{group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization + */ + "GET /orgs/{org}/external-groups": Operation<"/orgs/{org}/external-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + */ + "GET /orgs/{org}/failed_invitations": Operation<"/orgs/{org}/failed_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-webhooks + */ + "GET /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + */ + "GET /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + */ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + */ + "GET /orgs/{org}/installation": Operation<"/orgs/{org}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + */ + "GET /orgs/{org}/installations": Operation<"/orgs/{org}/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + */ + "GET /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + */ + "GET /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + */ + "GET /orgs/{org}/invitations/{invitation_id}/teams": Operation<"/orgs/{org}/invitations/{invitation_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + */ + "GET /orgs/{org}/issues": Operation<"/orgs/{org}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-members + */ + "GET /orgs/{org}/members": Operation<"/orgs/{org}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user + */ + "GET /orgs/{org}/members/{username}": Operation<"/orgs/{org}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + */ + "GET /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-organization-migrations + */ + "GET /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + */ + "GET /orgs/{org}/migrations/{migration_id}": Operation<"/orgs/{org}/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive + */ + "GET /orgs/{org}/migrations/{migration_id}/archive": Operation<"/orgs/{org}/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + */ + "GET /orgs/{org}/migrations/{migration_id}/repositories": Operation<"/orgs/{org}/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + */ + "GET /orgs/{org}/outside_collaborators": Operation<"/orgs/{org}/outside_collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + */ + "GET /orgs/{org}/packages": Operation<"/orgs/{org}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + */ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-organization-projects + */ + "GET /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-public-organization-members + */ + "GET /orgs/{org}/public_members": Operation<"/orgs/{org}/public_members", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + */ + "GET /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-organization-repositories + */ + "GET /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + */ + "GET /orgs/{org}/secret-scanning/alerts": Operation<"/orgs/{org}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/actions": Operation<"/orgs/{org}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + */ + "GET /orgs/{org}/settings/billing/advanced-security": Operation<"/orgs/{org}/settings/billing/advanced-security", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/packages": Operation<"/orgs/{org}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + */ + "GET /orgs/{org}/settings/billing/shared-storage": Operation<"/orgs/{org}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-an-organization + */ + "GET /orgs/{org}/team-sync/groups": Operation<"/orgs/{org}/team-sync/groups", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams + */ + "GET /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-team-by-name + */ + "GET /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions + */ + "GET /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + */ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-external-idp-group-team-connection + */ + "GET /orgs/{org}/teams/{team_slug}/external-groups": Operation<"/orgs/{org}/teams/{team_slug}/external-groups", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations + */ + "GET /orgs/{org}/teams/{team_slug}/invitations": Operation<"/orgs/{org}/teams/{team_slug}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members + */ + "GET /orgs/{org}/teams/{team_slug}/members": Operation<"/orgs/{org}/teams/{team_slug}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user + */ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-projects + */ + "GET /orgs/{org}/teams/{team_slug}/projects": Operation<"/orgs/{org}/teams/{team_slug}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + */ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-repositories + */ + "GET /orgs/{org}/teams/{team_slug}/repos": Operation<"/orgs/{org}/teams/{team_slug}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + */ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team + */ + "GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings": Operation<"/orgs/{org}/teams/{team_slug}/team-sync/group-mappings", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-child-teams + */ + "GET /orgs/{org}/teams/{team_slug}/teams": Operation<"/orgs/{org}/teams/{team_slug}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-card + */ + "GET /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project-column + */ + "GET /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-cards + */ + "GET /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-a-project + */ + "GET /projects/{project_id}": Operation<"/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-collaborators + */ + "GET /projects/{project_id}/collaborators": Operation<"/projects/{project_id}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + */ + "GET /projects/{project_id}/collaborators/{username}/permission": Operation<"/projects/{project_id}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-project-columns + */ + "GET /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "get">; + /** + * @see https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + */ + "GET /rate_limit": Operation<"/rate_limit", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository + */ + "GET /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/artifacts": Operation<"/repos/{owner}/{repo}/actions/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-an-artifact + */ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": Operation<"/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-cache-usage-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/cache/usage": Operation<"/repos/{owner}/{repo}/actions/cache/usage", "get">; + /** + * @see https://docs.github.com/rest/actions/cache#list-github-actions-caches-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/caches": Operation<"/repos/{owner}/{repo}/actions/caches", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/actions/oidc#get-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-access-level-to-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-default-workflow-permissions-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners": Operation<"/repos/{owner}/{repo}/actions/runners", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/downloads": Operation<"/repos/{owner}/{repo}/actions/runners/downloads", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + */ + "GET /repos/{owner}/{repo}/actions/runs": Operation<"/repos/{owner}/{repo}/actions/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approvals", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/jobs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#download-workflow-run-logs + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/logs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-run-usage + */ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/actions/secrets": Operation<"/repos/{owner}/{repo}/actions/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/actions/secrets/public-key": Operation<"/repos/{owner}/{repo}/actions/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-repository-workflows + */ + "GET /repos/{owner}/{repo}/actions/workflows": Operation<"/repos/{owner}/{repo}/actions/workflows", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-a-workflow + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-workflow-runs + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-workflow-usage + */ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-assignees + */ + "GET /repos/{owner}/{repo}/assignees": Operation<"/repos/{owner}/{repo}/assignees", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + */ + "GET /repos/{owner}/{repo}/assignees/{assignee}": Operation<"/repos/{owner}/{repo}/assignees/{assignee}", "get">; + /** + * @see https://docs.github.com/v3/repos#list-autolinks + */ + "GET /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "get">; + /** + * @see https://docs.github.com/v3/repos#get-autolink + */ + "GET /repos/{owner}/{repo}/autolinks/{autolink_id}": Operation<"/repos/{owner}/{repo}/autolinks/{autolink_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-branches + */ + "GET /repos/{owner}/{repo}/branches": Operation<"/repos/{owner}/{repo}/branches", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}": Operation<"/repos/{owner}/{repo}/branches/{branch}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-admin-branch-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-pull-request-review-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-commit-signature-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-status-checks-protection + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-status-check-contexts + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-access-restrictions + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-apps-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-teams-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-users-with-access-to-the-protected-branch + */ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-run + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-run-annotations + */ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#get-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + */ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts": Operation<"/repos/{owner}/{repo}/code-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + * @deprecated "alert_id" is now "alert_number" + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + */ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses": Operation<"/repos/{owner}/{repo}/code-scanning/analyses", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": Operation<"/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository + */ + "GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-codeowners-errors + */ + "GET /repos/{owner}/{repo}/codeowners/errors": Operation<"/repos/{owner}/{repo}/codeowners/errors", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-devcontainers-in-a-repository-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/codespaces/devcontainers": Operation<"/repos/{owner}/{repo}/codespaces/devcontainers", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository + */ + "GET /repos/{owner}/{repo}/codespaces/machines": Operation<"/repos/{owner}/{repo}/codespaces/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#preview-attributes-for-a-new-codespace + */ + "GET /repos/{owner}/{repo}/codespaces/new": Operation<"/repos/{owner}/{repo}/codespaces/new", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/codespaces/secrets": Operation<"/repos/{owner}/{repo}/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key": Operation<"/repos/{owner}/{repo}/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-collaborators + */ + "GET /repos/{owner}/{repo}/collaborators": Operation<"/repos/{owner}/{repo}/collaborators", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-a-user-is-a-repository-collaborator + */ + "GET /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-permissions-for-a-user + */ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission": Operation<"/repos/{owner}/{repo}/collaborators/{username}/permission", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-commit-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/comments": Operation<"/repos/{owner}/{repo}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment + */ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-commits + */ + "GET /repos/{owner}/{repo}/commits": Operation<"/repos/{owner}/{repo}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-branches-for-head-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-commit-comments + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-pull-requests-associated-with-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-commit + */ + "GET /repos/{owner}/{repo}/commits/{ref}": Operation<"/repos/{owner}/{repo}/commits/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-runs", "get">; + /** + * @see https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites": Operation<"/repos/{owner}/{repo}/commits/{ref}/check-suites", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-combined-status-for-a-specific-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/status": Operation<"/repos/{owner}/{repo}/commits/{ref}/status", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference + */ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses": Operation<"/repos/{owner}/{repo}/commits/{ref}/statuses", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-community-profile-metrics + */ + "GET /repos/{owner}/{repo}/community/profile": Operation<"/repos/{owner}/{repo}/community/profile", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{basehead}": Operation<"/repos/{owner}/{repo}/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#compare-two-commits + */ + "GET /repos/{owner}/{repo}/compare/{base}...{head}": Operation<"/repos/{owner}/{repo}/compare/{base}...{head}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-content + */ + "GET /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-contributors + */ + "GET /repos/{owner}/{repo}/contributors": Operation<"/repos/{owner}/{repo}/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#list-repository-secrets + */ + "GET /repos/{owner}/{repo}/dependabot/secrets": Operation<"/repos/{owner}/{repo}/dependabot/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key": Operation<"/repos/{owner}/{repo}/dependabot/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + */ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + */ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}": Operation<"/repos/{owner}/{repo}/dependency-graph/compare/{basehead}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployments + */ + "GET /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deployment + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deployment-statuses + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deployment-status + */ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-environments + */ + "GET /repos/{owner}/{repo}/environments": Operation<"/repos/{owner}/{repo}/environments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-an-environment + */ + "GET /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-events + */ + "GET /repos/{owner}/{repo}/events": Operation<"/repos/{owner}/{repo}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-forks + */ + "GET /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-blob + */ + "GET /repos/{owner}/{repo}/git/blobs/{file_sha}": Operation<"/repos/{owner}/{repo}/git/blobs/{file_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-commit + */ + "GET /repos/{owner}/{repo}/git/commits/{commit_sha}": Operation<"/repos/{owner}/{repo}/git/commits/{commit_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#list-matching-references + */ + "GET /repos/{owner}/{repo}/git/matching-refs/{ref}": Operation<"/repos/{owner}/{repo}/git/matching-refs/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-reference + */ + "GET /repos/{owner}/{repo}/git/ref/{ref}": Operation<"/repos/{owner}/{repo}/git/ref/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tag + */ + "GET /repos/{owner}/{repo}/git/tags/{tag_sha}": Operation<"/repos/{owner}/{repo}/git/tags/{tag_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/git#get-a-tree + */ + "GET /repos/{owner}/{repo}/git/trees/{tree_sha}": Operation<"/repos/{owner}/{repo}/git/trees/{tree_sha}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-webhooks + */ + "GET /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-webhook-configuration-for-a-repository + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-delivery-for-a-repository-webhook + */ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-an-import-status + */ + "GET /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-commit-authors + */ + "GET /repos/{owner}/{repo}/import/authors": Operation<"/repos/{owner}/{repo}/import/authors", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-large-files + */ + "GET /repos/{owner}/{repo}/import/large_files": Operation<"/repos/{owner}/{repo}/import/large_files", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app + */ + "GET /repos/{owner}/{repo}/installation": Operation<"/repos/{owner}/{repo}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + */ + "GET /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-invitations + */ + "GET /repos/{owner}/{repo}/invitations": Operation<"/repos/{owner}/{repo}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-repository-issues + */ + "GET /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/comments": Operation<"/repos/{owner}/{repo}/issues/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + */ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + */ + "GET /repos/{owner}/{repo}/issues/events": Operation<"/repos/{owner}/{repo}/issues/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue-event + */ + "GET /repos/{owner}/{repo}/issues/events/{event_id}": Operation<"/repos/{owner}/{repo}/issues/events/{event_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-comments + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-issue-events + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/events": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + */ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/timeline", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-deploy-keys + */ + "GET /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-deploy-key + */ + "GET /repos/{owner}/{repo}/keys/{key_id}": Operation<"/repos/{owner}/{repo}/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + */ + "GET /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-label + */ + "GET /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-languages + */ + "GET /repos/{owner}/{repo}/languages": Operation<"/repos/{owner}/{repo}/languages", "get">; + /** + * @see https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + */ + "GET /repos/{owner}/{repo}/license": Operation<"/repos/{owner}/{repo}/license", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-milestones + */ + "GET /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#get-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + */ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + */ + "GET /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-github-pages-site + */ + "GET /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-github-pages-builds + */ + "GET /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-latest-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/latest": Operation<"/repos/{owner}/{repo}/pages/builds/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-github-pages-build + */ + "GET /repos/{owner}/{repo}/pages/builds/{build_id}": Operation<"/repos/{owner}/{repo}/pages/builds/{build_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages + */ + "GET /repos/{owner}/{repo}/pages/health": Operation<"/repos/{owner}/{repo}/pages/health", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-repository-projects + */ + "GET /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests + */ + "GET /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + */ + "GET /repos/{owner}/{repo}/pulls/comments": Operation<"/repos/{owner}/{repo}/pulls/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + */ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-pull-requests-files + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/files", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-requested-reviewers-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review + */ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-readme + */ + "GET /repos/{owner}/{repo}/readme": Operation<"/repos/{owner}/{repo}/readme", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + */ + "GET /repos/{owner}/{repo}/readme/{dir}": Operation<"/repos/{owner}/{repo}/readme/{dir}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-releases + */ + "GET /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-asset + */ + "GET /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-latest-release + */ + "GET /repos/{owner}/{repo}/releases/latest": Operation<"/repos/{owner}/{repo}/releases/latest", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name + */ + "GET /repos/{owner}/{repo}/releases/tags/{tag}": Operation<"/repos/{owner}/{repo}/releases/tags/{tag}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-release-assets + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-release + */ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + */ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-stargazers + */ + "GET /repos/{owner}/{repo}/stargazers": Operation<"/repos/{owner}/{repo}/stargazers", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-weekly-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/code_frequency": Operation<"/repos/{owner}/{repo}/stats/code_frequency", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-last-year-of-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/commit_activity": Operation<"/repos/{owner}/{repo}/stats/commit_activity", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-contributor-commit-activity + */ + "GET /repos/{owner}/{repo}/stats/contributors": Operation<"/repos/{owner}/{repo}/stats/contributors", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-weekly-commit-count + */ + "GET /repos/{owner}/{repo}/stats/participation": Operation<"/repos/{owner}/{repo}/stats/participation", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-the-hourly-commit-count-for-each-day + */ + "GET /repos/{owner}/{repo}/stats/punch_card": Operation<"/repos/{owner}/{repo}/stats/punch_card", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-watchers + */ + "GET /repos/{owner}/{repo}/subscribers": Operation<"/repos/{owner}/{repo}/subscribers", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#get-a-repository-subscription + */ + "GET /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-tags + */ + "GET /repos/{owner}/{repo}/tags": Operation<"/repos/{owner}/{repo}/tags", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-tag-protection-state-of-a-repository + */ + "GET /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/tarball/{ref}": Operation<"/repos/{owner}/{repo}/tarball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-teams + */ + "GET /repos/{owner}/{repo}/teams": Operation<"/repos/{owner}/{repo}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-all-repository-topics + */ + "GET /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-repository-clones + */ + "GET /repos/{owner}/{repo}/traffic/clones": Operation<"/repos/{owner}/{repo}/traffic/clones", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-top-referral-paths + */ + "GET /repos/{owner}/{repo}/traffic/popular/paths": Operation<"/repos/{owner}/{repo}/traffic/popular/paths", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-top-referral-sources + */ + "GET /repos/{owner}/{repo}/traffic/popular/referrers": Operation<"/repos/{owner}/{repo}/traffic/popular/referrers", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#get-page-views + */ + "GET /repos/{owner}/{repo}/traffic/views": Operation<"/repos/{owner}/{repo}/traffic/views", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository + */ + "GET /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#download-a-repository-archive + */ + "GET /repos/{owner}/{repo}/zipball/{ref}": Operation<"/repos/{owner}/{repo}/zipball/{ref}", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-public-repositories + */ + "GET /repositories": Operation<"/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#list-environment-secrets + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-public-key + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/actions#get-an-environment-secret + */ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise + */ + "GET /scim/v2/enterprises/{enterprise}/Groups": Operation<"/scim/v2/enterprises/{enterprise}/Groups", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-group + */ + "GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": Operation<"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#list-scim-provisioned-identities-for-an-enterprise + */ + "GET /scim/v2/enterprises/{enterprise}/Users": Operation<"/scim/v2/enterprises/{enterprise}/Users", "get">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-user + */ + "GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/scim#list-scim-provisioned-identities + */ + "GET /scim/v2/organizations/{org}/Users": Operation<"/scim/v2/organizations/{org}/Users", "get">; + /** + * @see https://docs.github.com/rest/reference/scim#get-scim-provisioning-information-for-a-user + */ + "GET /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-code + */ + "GET /search/code": Operation<"/search/code", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-commits + */ + "GET /search/commits": Operation<"/search/commits", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + */ + "GET /search/issues": Operation<"/search/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-labels + */ + "GET /search/labels": Operation<"/search/labels", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-repositories + */ + "GET /search/repositories": Operation<"/search/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-topics + */ + "GET /search/topics": Operation<"/search/topics", "get">; + /** + * @see https://docs.github.com/rest/reference/search#search-users + */ + "GET /search/users": Operation<"/search/users", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#get-a-team-legacy + */ + "GET /teams/{team_id}": Operation<"/teams/{team_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussions-legacy + */ + "GET /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + */ + "GET /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + */ + "GET /teams/{team_id}/invitations": Operation<"/teams/{team_id}/invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-team-members-legacy + */ + "GET /teams/{team_id}/members": Operation<"/teams/{team_id}/members", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-member-legacy + */ + "GET /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + */ + "GET /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + */ + "GET /teams/{team_id}/projects": Operation<"/teams/{team_id}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + */ + "GET /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + */ + "GET /teams/{team_id}/repos": Operation<"/teams/{team_id}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + */ + "GET /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team-legacy + */ + "GET /teams/{team_id}/team-sync/group-mappings": Operation<"/teams/{team_id}/team-sync/group-mappings", "get">; + /** + * @see https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + */ + "GET /teams/{team_id}/teams": Operation<"/teams/{team_id}/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-the-authenticated-user + */ + "GET /user": Operation<"/user", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user + */ + "GET /user/blocks": Operation<"/user/blocks", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user + */ + "GET /user/blocks/{username}": Operation<"/user/blocks/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user + */ + "GET /user/codespaces": Operation<"/user/codespaces", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user + */ + "GET /user/codespaces/secrets": Operation<"/user/codespaces/secrets", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/public-key": Operation<"/user/codespaces/secrets/public-key", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user + */ + "GET /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + */ + "GET /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + */ + "GET /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "get">; + /** + * @see + */ + "GET /user/codespaces/{codespace_name}/exports/{export_id}": Operation<"/user/codespaces/{codespace_name}/exports/{export_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + */ + "GET /user/codespaces/{codespace_name}/machines": Operation<"/user/codespaces/{codespace_name}/machines", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + */ + "GET /user/emails": Operation<"/user/emails", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + */ + "GET /user/followers": Operation<"/user/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + */ + "GET /user/following": Operation<"/user/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + */ + "GET /user/following/{username}": Operation<"/user/following/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + */ + "GET /user/gpg_keys": Operation<"/user/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + */ + "GET /user/gpg_keys/{gpg_key_id}": Operation<"/user/gpg_keys/{gpg_key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + */ + "GET /user/installations": Operation<"/user/installations", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + */ + "GET /user/installations/{installation_id}/repositories": Operation<"/user/installations/{installation_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + */ + "GET /user/interaction-limits": Operation<"/user/interaction-limits", "get">; + /** + * @see https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + */ + "GET /user/issues": Operation<"/user/issues", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user + */ + "GET /user/keys": Operation<"/user/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + */ + "GET /user/keys/{key_id}": Operation<"/user/keys/{key_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user + */ + "GET /user/marketplace_purchases": Operation<"/user/marketplace_purchases", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + */ + "GET /user/marketplace_purchases/stubbed": Operation<"/user/marketplace_purchases/stubbed", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + */ + "GET /user/memberships/orgs": Operation<"/user/memberships/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + */ + "GET /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-user-migrations + */ + "GET /user/migrations": Operation<"/user/migrations", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + */ + "GET /user/migrations/{migration_id}": Operation<"/user/migrations/{migration_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive + */ + "GET /user/migrations/{migration_id}/archive": Operation<"/user/migrations/{migration_id}/archive", "get">; + /** + * @see https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + */ + "GET /user/migrations/{migration_id}/repositories": Operation<"/user/migrations/{migration_id}/repositories", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + */ + "GET /user/orgs": Operation<"/user/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + */ + "GET /user/packages": Operation<"/user/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}": Operation<"/user/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions": Operation<"/user/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + */ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + */ + "GET /user/public_emails": Operation<"/user/public_emails", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user + */ + "GET /user/repos": Operation<"/user/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repository-invitations-for-the-authenticated-user + */ + "GET /user/repository_invitations": Operation<"/user/repository_invitations", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + */ + "GET /user/starred": Operation<"/user/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + */ + "GET /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + */ + "GET /user/subscriptions": Operation<"/user/subscriptions", "get">; + /** + * @see https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + */ + "GET /user/teams": Operation<"/user/teams", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-users + */ + "GET /users": Operation<"/users", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-a-user + */ + "GET /users/{username}": Operation<"/users/{username}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + */ + "GET /users/{username}/events": Operation<"/users/{username}/events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + */ + "GET /users/{username}/events/orgs/{org}": Operation<"/users/{username}/events/orgs/{org}", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + */ + "GET /users/{username}/events/public": Operation<"/users/{username}/events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-followers-of-a-user + */ + "GET /users/{username}/followers": Operation<"/users/{username}/followers", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + */ + "GET /users/{username}/following": Operation<"/users/{username}/following", "get">; + /** + * @see https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + */ + "GET /users/{username}/following/{target_user}": Operation<"/users/{username}/following/{target_user}", "get">; + /** + * @see https://docs.github.com/rest/reference/gists#list-gists-for-a-user + */ + "GET /users/{username}/gists": Operation<"/users/{username}/gists", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + */ + "GET /users/{username}/gpg_keys": Operation<"/users/{username}/gpg_keys", "get">; + /** + * @see https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + */ + "GET /users/{username}/hovercard": Operation<"/users/{username}/hovercard", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + */ + "GET /users/{username}/installation": Operation<"/users/{username}/installation", "get">; + /** + * @see https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + */ + "GET /users/{username}/keys": Operation<"/users/{username}/keys", "get">; + /** + * @see https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + */ + "GET /users/{username}/orgs": Operation<"/users/{username}/orgs", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#list-packages-for-user + */ + "GET /users/{username}/packages": Operation<"/users/{username}/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}": Operation<"/users/{username}/packages/{package_type}/{package_name}", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions", "get">; + /** + * @see https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user + */ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}", "get">; + /** + * @see https://docs.github.com/rest/reference/projects#list-user-projects + */ + "GET /users/{username}/projects": Operation<"/users/{username}/projects", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + */ + "GET /users/{username}/received_events": Operation<"/users/{username}/received_events", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + */ + "GET /users/{username}/received_events/public": Operation<"/users/{username}/received_events/public", "get">; + /** + * @see https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + */ + "GET /users/{username}/repos": Operation<"/users/{username}/repos", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user + */ + "GET /users/{username}/settings/billing/actions": Operation<"/users/{username}/settings/billing/actions", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + */ + "GET /users/{username}/settings/billing/packages": Operation<"/users/{username}/settings/billing/packages", "get">; + /** + * @see https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + */ + "GET /users/{username}/settings/billing/shared-storage": Operation<"/users/{username}/settings/billing/shared-storage", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + */ + "GET /users/{username}/starred": Operation<"/users/{username}/starred", "get">; + /** + * @see https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + */ + "GET /users/{username}/subscriptions": Operation<"/users/{username}/subscriptions", "get">; + /** + * @see + */ + "GET /zen": Operation<"/zen", "get">; + /** + * @see https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app + */ + "PATCH /app/hook/config": Operation<"/app/hook/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#reset-a-token + */ + "PATCH /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "patch">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#update-an-existing-authorization + */ + "PATCH /authorizations/{authorization_id}": Operation<"/authorizations/{authorization_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise + */ + "PATCH /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists/#update-a-gist + */ + "PATCH /gists/{gist_id}": Operation<"/gists/{gist_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/gists#update-a-gist-comment + */ + "PATCH /gists/{gist_id}/comments/{comment_id}": Operation<"/gists/{gist_id}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-a-thread-as-read + */ + "PATCH /notifications/threads/{thread_id}": Operation<"/notifications/threads/{thread_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs/#update-an-organization + */ + "PATCH /orgs/{org}": Operation<"/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + */ + "PATCH /orgs/{org}/actions/runner-groups/{runner_group_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + */ + "PATCH /orgs/{org}/hooks/{hook_id}": Operation<"/orgs/{org}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + */ + "PATCH /orgs/{org}/hooks/{hook_id}/config": Operation<"/orgs/{org}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-team + */ + "PATCH /orgs/{org}/teams/{team_slug}": Operation<"/orgs/{org}/teams/{team_slug}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment + */ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#link-external-idp-group-team-connection + */ + "PATCH /orgs/{org}/teams/{team_slug}/external-groups": Operation<"/orgs/{org}/teams/{team_slug}/external-groups", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections + */ + "PATCH /orgs/{org}/teams/{team_slug}/team-sync/group-mappings": Operation<"/orgs/{org}/teams/{team_slug}/team-sync/group-mappings", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-card + */ + "PATCH /projects/columns/cards/{card_id}": Operation<"/projects/columns/cards/{card_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project-column + */ + "PATCH /projects/columns/{column_id}": Operation<"/projects/columns/{column_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/projects#update-a-project + */ + "PATCH /projects/{project_id}": Operation<"/projects/{project_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos/#update-a-repository + */ + "PATCH /repos/{owner}/{repo}": Operation<"/repos/{owner}/{repo}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-pull-request-review-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-status-check-protection + */ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-a-check-run + */ + "PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + */ + "PATCH /repos/{owner}/{repo}/check-suites/preferences": Operation<"/repos/{owner}/{repo}/check-suites/preferences", "patch">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-commit-comment + */ + "PATCH /repos/{owner}/{repo}/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/git#update-a-reference + */ + "PATCH /repos/{owner}/{repo}/git/refs/{ref}": Operation<"/repos/{owner}/{repo}/git/refs/{ref}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-repository-webhook + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-webhook-configuration-for-a-repository + */ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/config", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-an-import + */ + "PATCH /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#map-a-commit-author + */ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}": Operation<"/repos/{owner}/{repo}/import/authors/{author_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + */ + "PATCH /repos/{owner}/{repo}/import/lfs": Operation<"/repos/{owner}/{repo}/import/lfs", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-repository-invitation + */ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}": Operation<"/repos/{owner}/{repo}/invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-an-issue-comment + */ + "PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues/#update-an-issue + */ + "PATCH /repos/{owner}/{repo}/issues/{issue_number}": Operation<"/repos/{owner}/{repo}/issues/{issue_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-label + */ + "PATCH /repos/{owner}/{repo}/labels/{name}": Operation<"/repos/{owner}/{repo}/labels/{name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/issues#update-a-milestone + */ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}": Operation<"/repos/{owner}/{repo}/milestones/{milestone_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/pulls/#update-a-pull-request + */ + "PATCH /repos/{owner}/{repo}/pulls/{pull_number}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release-asset + */ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}": Operation<"/repos/{owner}/{repo}/releases/assets/{asset_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#update-a-release + */ + "PATCH /repos/{owner}/{repo}/releases/{release_id}": Operation<"/repos/{owner}/{repo}/releases/{release_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + */ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": Operation<"/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-group + */ + "PATCH /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": Operation<"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-user + */ + "PATCH /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user + */ + "PATCH /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams/#update-a-team-legacy + */ + "PATCH /teams/{team_id}": Operation<"/teams/{team_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + */ + "PATCH /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}", "patch">; + /** + * @see https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections-legacy + */ + "PATCH /teams/{team_id}/team-sync/group-mappings": Operation<"/teams/{team_id}/team-sync/group-mappings", "patch">; + /** + * @see https://docs.github.com/rest/reference/users/#update-the-authenticated-user + */ + "PATCH /user": Operation<"/user", "patch">; + /** + * @see https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + */ + "PATCH /user/codespaces/{codespace_name}": Operation<"/user/codespaces/{codespace_name}", "patch">; + /** + * @see https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user + */ + "PATCH /user/email/visibility": Operation<"/user/email/visibility", "patch">; + /** + * @see https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + */ + "PATCH /user/memberships/orgs/{org}": Operation<"/user/memberships/orgs/{org}", "patch">; + /** + * @see https://docs.github.com/rest/reference/repos#accept-a-repository-invitation + */ + "PATCH /user/repository_invitations/{invitation_id}": Operation<"/user/repository_invitations/{invitation_id}", "patch">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest + */ + "POST /app-manifests/{code}/conversions": Operation<"/app-manifests/{code}/conversions", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + */ + "POST /app/hook/deliveries/{delivery_id}/attempts": Operation<"/app/hook/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + */ + "POST /app/installations/{installation_id}/access_tokens": Operation<"/app/installations/{installation_id}/access_tokens", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#check-a-token + */ + "POST /applications/{client_id}/token": Operation<"/applications/{client_id}/token", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + */ + "POST /applications/{client_id}/token/scoped": Operation<"/applications/{client_id}/token/scoped", "post">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization + */ + "POST /authorizations": Operation<"/authorizations", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runner-groups": Operation<"/enterprises/{enterprise}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/registration-token": Operation<"/enterprises/{enterprise}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/remove-token": Operation<"/enterprises/{enterprise}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + */ + "POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist + */ + "POST /gists": Operation<"/gists", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#create-a-gist-comment + */ + "POST /gists/{gist_id}/comments": Operation<"/gists/{gist_id}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/gists#fork-a-gist + */ + "POST /gists/{gist_id}/forks": Operation<"/gists/{gist_id}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document + */ + "POST /markdown": Operation<"/markdown", "post">; + /** + * @see https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode + */ + "POST /markdown/raw": Operation<"/markdown/raw", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + */ + "POST /orgs/{org}/actions/runner-groups": Operation<"/orgs/{org}/actions/runner-groups", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/registration-token": Operation<"/orgs/{org}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + */ + "POST /orgs/{org}/actions/runners/remove-token": Operation<"/orgs/{org}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization + */ + "POST /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + */ + "POST /orgs/{org}/hooks": Operation<"/orgs/{org}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + */ + "POST /orgs/{org}/hooks/{hook_id}/pings": Operation<"/orgs/{org}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + */ + "POST /orgs/{org}/invitations": Operation<"/orgs/{org}/invitations", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces + */ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop": Operation<"/orgs/{org}/members/{username}/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-organization-migration + */ + "POST /orgs/{org}/migrations": Operation<"/orgs/{org}/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + */ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-an-organization-project + */ + "POST /orgs/{org}/projects": Operation<"/orgs/{org}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-an-organization-repository + */ + "POST /orgs/{org}/repos": Operation<"/orgs/{org}/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-team + */ + "POST /orgs/{org}/teams": Operation<"/orgs/{org}/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions": Operation<"/orgs/{org}/teams/{team_slug}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + */ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": Operation<"/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-card + */ + "POST /projects/columns/cards/{card_id}/moves": Operation<"/projects/columns/cards/{card_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-card + */ + "POST /projects/columns/{column_id}/cards": Operation<"/projects/columns/{column_id}/cards", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#move-a-project-column + */ + "POST /projects/columns/{column_id}/moves": Operation<"/projects/columns/{column_id}/moves", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-project-column + */ + "POST /projects/{project_id}/columns": Operation<"/projects/{project_id}/columns", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-job-for-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/registration-token": Operation<"/repos/{owner}/{repo}/actions/runners/registration-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/remove-token": Operation<"/repos/{owner}/{repo}/actions/runners/remove-token", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + */ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/approve", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/cancel", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-a-workflow + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#re-run-workflow-failed-jobs + */ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": Operation<"/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs", "post">; + /** + * @see https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + */ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", "post">; + /** + * @see https://docs.github.com/v3/repos#create-an-autolink + */ + "POST /repos/{owner}/{repo}/autolinks": Operation<"/repos/{owner}/{repo}/autolinks", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#set-admin-branch-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-commit-signature-protection + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-status-check-contexts + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-app-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-team-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#add-user-access-restrictions + */ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#rename-a-branch + */ + "POST /repos/{owner}/{repo}/branches/{branch}/rename": Operation<"/repos/{owner}/{repo}/branches/{branch}/rename", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs": Operation<"/repos/{owner}/{repo}/check-runs", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-run + */ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#create-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites": Operation<"/repos/{owner}/{repo}/check-suites", "post">; + /** + * @see https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + */ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": Operation<"/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", "post">; + /** + * @see https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + */ + "POST /repos/{owner}/{repo}/code-scanning/sarifs": Operation<"/repos/{owner}/{repo}/code-scanning/sarifs", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + */ + "POST /repos/{owner}/{repo}/codespaces": Operation<"/repos/{owner}/{repo}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + */ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-commit-comment + */ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments": Operation<"/repos/{owner}/{repo}/commits/{commit_sha}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/dependency-graph#create-a-snapshot-of-dependencies-for-a-repository + */ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots": Operation<"/repos/{owner}/{repo}/dependency-graph/snapshots", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deployment + */ + "POST /repos/{owner}/{repo}/deployments": Operation<"/repos/{owner}/{repo}/deployments", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deployment-status + */ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses": Operation<"/repos/{owner}/{repo}/deployments/{deployment_id}/statuses", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + */ + "POST /repos/{owner}/{repo}/dispatches": Operation<"/repos/{owner}/{repo}/dispatches", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-fork + */ + "POST /repos/{owner}/{repo}/forks": Operation<"/repos/{owner}/{repo}/forks", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-blob + */ + "POST /repos/{owner}/{repo}/git/blobs": Operation<"/repos/{owner}/{repo}/git/blobs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-commit + */ + "POST /repos/{owner}/{repo}/git/commits": Operation<"/repos/{owner}/{repo}/git/commits", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-reference + */ + "POST /repos/{owner}/{repo}/git/refs": Operation<"/repos/{owner}/{repo}/git/refs", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tag-object + */ + "POST /repos/{owner}/{repo}/git/tags": Operation<"/repos/{owner}/{repo}/git/tags", "post">; + /** + * @see https://docs.github.com/rest/reference/git#create-a-tree + */ + "POST /repos/{owner}/{repo}/git/trees": Operation<"/repos/{owner}/{repo}/git/trees", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks": Operation<"/repos/{owner}/{repo}/hooks", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#ping-a-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/pings": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/pings", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#test-the-push-repository-webhook + */ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/tests": Operation<"/repos/{owner}/{repo}/hooks/{hook_id}/tests", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue + */ + "POST /repos/{owner}/{repo}/issues": Operation<"/repos/{owner}/{repo}/issues", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/assignees", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-an-issue-comment + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#add-labels-to-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + */ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-deploy-key + */ + "POST /repos/{owner}/{repo}/keys": Operation<"/repos/{owner}/{repo}/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-label + */ + "POST /repos/{owner}/{repo}/labels": Operation<"/repos/{owner}/{repo}/labels", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository + */ + "POST /repos/{owner}/{repo}/merge-upstream": Operation<"/repos/{owner}/{repo}/merge-upstream", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#merge-a-branch + */ + "POST /repos/{owner}/{repo}/merges": Operation<"/repos/{owner}/{repo}/merges", "post">; + /** + * @see https://docs.github.com/rest/reference/issues#create-a-milestone + */ + "POST /repos/{owner}/{repo}/milestones": Operation<"/repos/{owner}/{repo}/milestones", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-github-pages-site + */ + "POST /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#request-a-github-pages-build + */ + "POST /repos/{owner}/{repo}/pages/builds": Operation<"/repos/{owner}/{repo}/pages/builds", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-repository-project + */ + "POST /repos/{owner}/{repo}/projects": Operation<"/repos/{owner}/{repo}/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls": Operation<"/repos/{owner}/{repo}/pulls", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": Operation<"/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/codespaces", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews", "post">; + /** + * @see https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + */ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-release + */ + "POST /repos/{owner}/{repo}/releases": Operation<"/repos/{owner}/{repo}/releases", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#generate-release-notes + */ + "POST /repos/{owner}/{repo}/releases/generate-notes": Operation<"/repos/{owner}/{repo}/releases/generate-notes", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + */ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions": Operation<"/repos/{owner}/{repo}/releases/{release_id}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-commit-status + */ + "POST /repos/{owner}/{repo}/statuses/{sha}": Operation<"/repos/{owner}/{repo}/statuses/{sha}", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-tag-protection-state-for-a-repository + */ + "POST /repos/{owner}/{repo}/tags/protection": Operation<"/repos/{owner}/{repo}/tags/protection", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#transfer-a-repository + */ + "POST /repos/{owner}/{repo}/transfer": Operation<"/repos/{owner}/{repo}/transfer", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + */ + "POST /repos/{template_owner}/{template_repo}/generate": Operation<"/repos/{template_owner}/{template_repo}/generate", "post">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#provision-a-scim-enterprise-group-and-invite-users + */ + "POST /scim/v2/enterprises/{enterprise}/Groups": Operation<"/scim/v2/enterprises/{enterprise}/Groups", "post">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#provision-and-invite-a-scim-enterprise-user + */ + "POST /scim/v2/enterprises/{enterprise}/Users": Operation<"/scim/v2/enterprises/{enterprise}/Users", "post">; + /** + * @see https://docs.github.com/rest/reference/scim#provision-and-invite-a-scim-user + */ + "POST /scim/v2/organizations/{org}/Users": Operation<"/scim/v2/organizations/{org}/Users", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + */ + "POST /teams/{team_id}/discussions": Operation<"/teams/{team_id}/discussions", "post">; + /** + * @see https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + */ + "POST /teams/{team_id}/discussions/{discussion_number}/reactions": Operation<"/teams/{team_id}/discussions/{discussion_number}/reactions", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces": Operation<"/user/codespaces", "post">; + /** + * @see + */ + "POST /user/codespaces/{codespace_name}/exports": Operation<"/user/codespaces/{codespace_name}/exports", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/start": Operation<"/user/codespaces/{codespace_name}/start", "post">; + /** + * @see https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + */ + "POST /user/codespaces/{codespace_name}/stop": Operation<"/user/codespaces/{codespace_name}/stop", "post">; + /** + * @see https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user + */ + "POST /user/emails": Operation<"/user/emails", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user + */ + "POST /user/gpg_keys": Operation<"/user/gpg_keys", "post">; + /** + * @see https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + */ + "POST /user/keys": Operation<"/user/keys", "post">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-a-user-migration + */ + "POST /user/migrations": Operation<"/user/migrations", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/restore{?token}": Operation<"/user/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user + */ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/projects#create-a-user-project + */ + "POST /user/projects": Operation<"/user/projects", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + */ + "POST /user/repos": Operation<"/user/repos", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}": Operation<"/users/{username}/packages/{package_type}/{package_name}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user + */ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": Operation<"/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore", "post">; + /** + * @see https://docs.github.com/rest/reference/repos#upload-a-release-asset + */ + "POST {origin}/repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}": Operation<"/repos/{owner}/{repo}/releases/{release_id}/assets", "post">; + /** + * @see https://docs.github.com/rest/reference/apps#suspend-an-app-installation + */ + "PUT /app/installations/{installation_id}/suspended": Operation<"/app/installations/{installation_id}/suspended", "put">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app + */ + "PUT /authorizations/clients/{client_id}": Operation<"/authorizations/clients/{client_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + */ + "PUT /authorizations/clients/{client_id}/{fingerprint}": Operation<"/authorizations/clients/{client_id}/{fingerprint}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions/oidc#set-actions-oidc-custom-issuer-policy-for-enterprise + */ + "PUT /enterprises/{enterprise}/actions/oidc/customization/issuer": Operation<"/enterprises/{enterprise}/actions/oidc/customization/issuer", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions": Operation<"/enterprises/{enterprise}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations": Operation<"/enterprises/{enterprise}/actions/permissions/organizations", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/permissions/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/selected-actions": Operation<"/enterprises/{enterprise}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/permissions/workflow": Operation<"/enterprises/{enterprise}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise + */ + "PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels": Operation<"/enterprises/{enterprise}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/gists#star-a-gist + */ + "PUT /gists/{gist_id}/star": Operation<"/gists/{gist_id}/star", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-notifications-as-read + */ + "PUT /notifications": Operation<"/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-thread-subscription + */ + "PUT /notifications/threads/{thread_id}/subscription": Operation<"/notifications/threads/{thread_id}/subscription", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-customization-template-for-an-oidc-subject-claim-for-an-organization + */ + "PUT /orgs/{org}/actions/oidc/customization/sub": Operation<"/orgs/{org}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions": Operation<"/orgs/{org}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories": Operation<"/orgs/{org}/actions/permissions/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization + */ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}": Operation<"/orgs/{org}/actions/permissions/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization + */ + "PUT /orgs/{org}/actions/permissions/selected-actions": Operation<"/orgs/{org}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions + */ + "PUT /orgs/{org}/actions/permissions/workflow": Operation<"/orgs/{org}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-repository-acess-to-a-self-hosted-runner-group-in-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization + */ + "PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": Operation<"/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + */ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels": Operation<"/orgs/{org}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}": Operation<"/orgs/{org}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + */ + "PUT /orgs/{org}/blocks/{username}": Operation<"/orgs/{org}/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + */ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": Operation<"/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + */ + "PUT /orgs/{org}/interaction-limits": Operation<"/orgs/{org}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + */ + "PUT /orgs/{org}/memberships/{username}": Operation<"/orgs/{org}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator + */ + "PUT /orgs/{org}/outside_collaborators/{username}": Operation<"/orgs/{org}/outside_collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user + */ + "PUT /orgs/{org}/public_members/{username}": Operation<"/orgs/{org}/public_members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + */ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}": Operation<"/orgs/{org}/teams/{team_slug}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}": Operation<"/orgs/{org}/teams/{team_slug}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + */ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": Operation<"/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/projects#add-project-collaborator + */ + "PUT /projects/{project_id}/collaborators/{username}": Operation<"/projects/{project_id}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/actions/oidc#set-the-opt-out-flag-of-an-oidc-subject-claim-customization-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/oidc/customization/sub": Operation<"/repos/{owner}/{repo}/actions/oidc/customization/sub", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions": Operation<"/repos/{owner}/{repo}/actions/permissions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-workflow-access-to-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/access": Operation<"/repos/{owner}/{repo}/actions/permissions/access", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions": Operation<"/repos/{owner}/{repo}/actions/permissions/selected-actions", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-default-workflow-permissions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow": Operation<"/repos/{owner}/{repo}/actions/permissions/workflow", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + */ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels": Operation<"/repos/{owner}/{repo}/actions/runners/{runner_id}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/actions/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#disable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#enable-a-workflow + */ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": Operation<"/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + */ + "PUT /repos/{owner}/{repo}/automated-security-fixes": Operation<"/repos/{owner}/{repo}/automated-security-fixes", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#update-branch-protection + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-status-check-contexts + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-app-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-team-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#set-user-access-restrictions + */ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": Operation<"/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#add-a-repository-collaborator + */ + "PUT /repos/{owner}/{repo}/collaborators/{username}": Operation<"/repos/{owner}/{repo}/collaborators/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-file-contents + */ + "PUT /repos/{owner}/{repo}/contents/{path}": Operation<"/repos/{owner}/{repo}/contents/{path}", "put">; + /** + * @see https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + */ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}": Operation<"/repos/{owner}/{repo}/dependabot/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#create-or-update-an-environment + */ + "PUT /repos/{owner}/{repo}/environments/{environment_name}": Operation<"/repos/{owner}/{repo}/environments/{environment_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/migrations#start-an-import + */ + "PUT /repos/{owner}/{repo}/import": Operation<"/repos/{owner}/{repo}/import", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + */ + "PUT /repos/{owner}/{repo}/interaction-limits": Operation<"/repos/{owner}/{repo}/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#set-labels-for-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/labels": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/labels", "put">; + /** + * @see https://docs.github.com/rest/reference/issues#lock-an-issue + */ + "PUT /repos/{owner}/{repo}/issues/{issue_number}/lock": Operation<"/repos/{owner}/{repo}/issues/{issue_number}/lock", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository + */ + "PUT /repos/{owner}/{repo}/lfs": Operation<"/repos/{owner}/{repo}/lfs", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + */ + "PUT /repos/{owner}/{repo}/notifications": Operation<"/repos/{owner}/{repo}/notifications", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#update-information-about-a-github-pages-site + */ + "PUT /repos/{owner}/{repo}/pages": Operation<"/repos/{owner}/{repo}/pages", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#merge-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/merge", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals", "put">; + /** + * @see https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + */ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch": Operation<"/repos/{owner}/{repo}/pulls/{pull_number}/update-branch", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#set-a-repository-subscription + */ + "PUT /repos/{owner}/{repo}/subscription": Operation<"/repos/{owner}/{repo}/subscription", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#replace-all-repository-topics + */ + "PUT /repos/{owner}/{repo}/topics": Operation<"/repos/{owner}/{repo}/topics", "put">; + /** + * @see https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + */ + "PUT /repos/{owner}/{repo}/vulnerability-alerts": Operation<"/repos/{owner}/{repo}/vulnerability-alerts", "put">; + /** + * @see https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + */ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": Operation<"/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-group + */ + "PUT /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": Operation<"/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-user + */ + "PUT /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": Operation<"/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/scim#set-scim-information-for-a-provisioned-user + */ + "PUT /scim/v2/organizations/{org}/Users/{scim_user_id}": Operation<"/scim/v2/organizations/{org}/Users/{scim_user_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-team-member-legacy + */ + "PUT /teams/{team_id}/members/{username}": Operation<"/teams/{team_id}/members/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + */ + "PUT /teams/{team_id}/memberships/{username}": Operation<"/teams/{team_id}/memberships/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + */ + "PUT /teams/{team_id}/projects/{project_id}": Operation<"/teams/{team_id}/projects/{project_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy + */ + "PUT /teams/{team_id}/repos/{owner}/{repo}": Operation<"/teams/{team_id}/repos/{owner}/{repo}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#block-a-user + */ + "PUT /user/blocks/{username}": Operation<"/user/blocks/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user + */ + "PUT /user/codespaces/secrets/{secret_name}": Operation<"/user/codespaces/secrets/{secret_name}", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories": Operation<"/user/codespaces/secrets/{secret_name}/repositories", "put">; + /** + * @see https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + */ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}": Operation<"/user/codespaces/secrets/{secret_name}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/users#follow-a-user + */ + "PUT /user/following/{username}": Operation<"/user/following/{username}", "put">; + /** + * @see https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + */ + "PUT /user/installations/{installation_id}/repositories/{repository_id}": Operation<"/user/installations/{installation_id}/repositories/{repository_id}", "put">; + /** + * @see https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + */ + "PUT /user/interaction-limits": Operation<"/user/interaction-limits", "put">; + /** + * @see https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + */ + "PUT /user/starred/{owner}/{repo}": Operation<"/user/starred/{owner}/{repo}", "put">; +} +export {}; diff --git a/node_modules/@octokit/types/dist-types/index.d.ts b/node_modules/@octokit/types/dist-types/index.d.ts new file mode 100644 index 0000000..004ae9b --- /dev/null +++ b/node_modules/@octokit/types/dist-types/index.d.ts @@ -0,0 +1,21 @@ +export * from "./AuthInterface"; +export * from "./EndpointDefaults"; +export * from "./EndpointInterface"; +export * from "./EndpointOptions"; +export * from "./Fetch"; +export * from "./OctokitResponse"; +export * from "./RequestError"; +export * from "./RequestHeaders"; +export * from "./RequestInterface"; +export * from "./RequestMethod"; +export * from "./RequestOptions"; +export * from "./RequestParameters"; +export * from "./RequestRequestOptions"; +export * from "./ResponseHeaders"; +export * from "./Route"; +export * from "./Signal"; +export * from "./StrategyInterface"; +export * from "./Url"; +export * from "./VERSION"; +export * from "./GetResponseTypeFromEndpointMethod"; +export * from "./generated/Endpoints"; diff --git a/node_modules/@octokit/types/dist-web/index.js b/node_modules/@octokit/types/dist-web/index.js new file mode 100644 index 0000000..b1b47d5 --- /dev/null +++ b/node_modules/@octokit/types/dist-web/index.js @@ -0,0 +1,4 @@ +const VERSION = "6.41.0"; + +export { VERSION }; +//# sourceMappingURL=index.js.map diff --git a/node_modules/@octokit/types/dist-web/index.js.map b/node_modules/@octokit/types/dist-web/index.js.map new file mode 100644 index 0000000..cd0e254 --- /dev/null +++ b/node_modules/@octokit/types/dist-web/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../dist-src/VERSION.js"],"sourcesContent":["export const VERSION = \"0.0.0-development\";\n"],"names":[],"mappings":"AAAY,MAAC,OAAO,GAAG;;;;"} \ No newline at end of file diff --git a/node_modules/@octokit/types/package.json b/node_modules/@octokit/types/package.json new file mode 100644 index 0000000..960747f --- /dev/null +++ b/node_modules/@octokit/types/package.json @@ -0,0 +1,54 @@ +{ + "name": "@octokit/types", + "description": "Shared TypeScript definitions for Octokit projects", + "version": "6.41.0", + "license": "MIT", + "files": [ + "dist-*/", + "bin/" + ], + "source": "dist-src/index.js", + "types": "dist-types/index.d.ts", + "octokit": { + "openapi-version": "6.8.0" + }, + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "pika": true, + "sideEffects": false, + "keywords": [ + "github", + "api", + "sdk", + "toolkit", + "typescript" + ], + "repository": "github:octokit/types.ts", + "dependencies": { + "@octokit/openapi-types": "^12.11.0" + }, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.9.0", + "@pika/plugin-build-web": "^0.9.0", + "@pika/plugin-ts-standard-pkg": "^0.9.0", + "@types/node": ">= 8", + "github-openapi-graphql-query": "^2.0.0", + "handlebars": "^4.7.6", + "json-schema-to-typescript": "^11.0.0", + "lodash.set": "^4.3.2", + "npm-run-all": "^4.1.5", + "pascal-case": "^3.1.1", + "pika-plugin-merge-properties": "^1.0.6", + "prettier": "^2.0.0", + "semantic-release": "^19.0.3", + "semantic-release-plugin-update-version-in-files": "^1.0.0", + "sort-keys": "^4.2.0", + "string-to-jsdoc-comment": "^1.0.0", + "typedoc": "^0.23.0", + "typescript": "^4.0.2" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/node_modules/azure-devops-node-api/BuildApi.d.ts b/node_modules/azure-devops-node-api/BuildApi.d.ts new file mode 100644 index 0000000..6ab825c --- /dev/null +++ b/node_modules/azure-devops-node-api/BuildApi.d.ts @@ -0,0 +1,920 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import BuildInterfaces = require("./interfaces/BuildInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface IBuildApi extends basem.ClientApiBase { + createArtifact(artifact: BuildInterfaces.BuildArtifact, project: string, buildId: number): Promise; + getArtifact(project: string, buildId: number, artifactName: string): Promise; + getArtifactContentZip(project: string, buildId: number, artifactName: string): Promise; + getArtifacts(project: string, buildId: number): Promise; + getFile(project: string, buildId: number, artifactName: string, fileId: string, fileName: string): Promise; + getAttachments(project: string, buildId: number, type: string): Promise; + getAttachment(project: string, buildId: number, timelineId: string, recordId: string, type: string, name: string): Promise; + authorizeProjectResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string): Promise; + getProjectResources(project: string, type?: string, id?: string): Promise; + getBadge(project: string, definitionId: number, branchName?: string): Promise; + listBranches(project: string, providerName: string, serviceEndpointId?: string, repository?: string, branchName?: string): Promise; + getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + getRetentionLeasesForBuild(project: string, buildId: number): Promise; + deleteBuild(project: string, buildId: number): Promise; + getBuild(project: string, buildId: number, propertyFilters?: string): Promise; + getBuilds(project: string, definitions?: number[], queues?: number[], buildNumber?: string, minTime?: Date, maxTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): Promise; + queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings?: boolean, checkInTicket?: string, sourceBuildId?: number, definitionId?: number): Promise; + updateBuild(build: BuildInterfaces.Build, project: string, buildId: number, retry?: boolean): Promise; + updateBuilds(builds: BuildInterfaces.Build[], project: string): Promise; + getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; + getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; + getBuildController(controllerId: number): Promise; + getBuildControllers(name?: string): Promise; + createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; + deleteDefinition(project: string, definitionId: number): Promise; + getDefinition(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise; + getDefinitions(project: string, name?: string, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string, minMetricsTime?: Date, definitionIds?: number[], path?: string, builtAfter?: Date, notBuiltAfter?: Date, includeAllProperties?: boolean, includeLatestBuilds?: boolean, taskIdFilter?: string, processType?: number, yamlFilename?: string): Promise; + restoreDefinition(project: string, definitionId: number, deleted: boolean): Promise; + updateDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionId: number, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; + getFileContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise; + createFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise; + deleteFolder(project: string, path: string): Promise; + getFolders(project: string, path?: string, queryOrder?: BuildInterfaces.FolderQueryOrder): Promise; + updateFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise; + getBuildGeneralSettings(project: string): Promise; + updateBuildGeneralSettings(newSettings: BuildInterfaces.PipelineGeneralSettings, project: string): Promise; + getRetentionHistory(daysToLookback?: number): Promise; + getLatestBuild(project: string, definition: string, branchName?: string): Promise; + addRetentionLeases(newLeases: BuildInterfaces.NewRetentionLease[], project: string): Promise; + deleteRetentionLeasesById(project: string, ids: number[]): Promise; + getRetentionLease(project: string, leaseId: number): Promise; + getRetentionLeasesByMinimalRetentionLeases(project: string, leasesToFetch: BuildInterfaces.MinimalRetentionLease[]): Promise; + getRetentionLeasesByOwnerId(project: string, ownerId?: string, definitionId?: number, runId?: number): Promise; + getRetentionLeasesByUserId(project: string, userOwnerId: string, definitionId?: number, runId?: number): Promise; + updateRetentionLease(leaseUpdate: BuildInterfaces.RetentionLeaseUpdate, project: string, leaseId: number): Promise; + getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + getBuildLogLines(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + getBuildLogs(project: string, buildId: number): Promise; + getBuildLogsZip(project: string, buildId: number): Promise; + getBuildLogZip(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + getProjectMetrics(project: string, metricAggregationType?: string, minMetricsTime?: Date): Promise; + getDefinitionMetrics(project: string, definitionId: number, minMetricsTime?: Date): Promise; + getBuildOptionDefinitions(project?: string): Promise; + getPathContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise; + getBuildProperties(project: string, buildId: number, filter?: string[]): Promise; + updateBuildProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, buildId: number): Promise; + getDefinitionProperties(project: string, definitionId: number, filter?: string[]): Promise; + updateDefinitionProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, definitionId: number): Promise; + getPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string): Promise; + getBuildReport(project: string, buildId: number, type?: string): Promise; + getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; + listRepositories(project: string, providerName: string, serviceEndpointId?: string, repository?: string, resultSet?: BuildInterfaces.ResultSet, pageResults?: boolean, continuationToken?: string): Promise; + authorizeDefinitionResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string, definitionId: number): Promise; + getDefinitionResources(project: string, definitionId: number): Promise; + getResourceUsage(): Promise; + getRetentionSettings(project: string): Promise; + updateRetentionSettings(updateModel: BuildInterfaces.UpdateProjectRetentionSettingModel, project: string): Promise; + getDefinitionRevisions(project: string, definitionId: number): Promise; + getBuildSettings(project?: string): Promise; + updateBuildSettings(settings: BuildInterfaces.BuildSettings, project?: string): Promise; + listSourceProviders(project: string): Promise; + updateStage(updateParameters: BuildInterfaces.UpdateStageParameters, buildId: number, stageRefName: string, project?: string): Promise; + getStatusBadge(project: string, definition: string, branchName?: string, stageName?: string, jobName?: string, configuration?: string, label?: string): Promise; + addBuildTag(project: string, buildId: number, tag: string): Promise; + addBuildTags(tags: string[], project: string, buildId: number): Promise; + deleteBuildTag(project: string, buildId: number, tag: string): Promise; + getBuildTags(project: string, buildId: number): Promise; + updateBuildTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, buildId: number): Promise; + addDefinitionTag(project: string, definitionId: number, tag: string): Promise; + addDefinitionTags(tags: string[], project: string, definitionId: number): Promise; + deleteDefinitionTag(project: string, definitionId: number, tag: string): Promise; + getDefinitionTags(project: string, definitionId: number, revision?: number): Promise; + updateDefinitionTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, definitionId: number): Promise; + deleteTag(project: string, tag: string): Promise; + getTags(project: string): Promise; + deleteTemplate(project: string, templateId: string): Promise; + getTemplate(project: string, templateId: string): Promise; + getTemplates(project: string): Promise; + saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; + getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number, planId?: string): Promise; + restoreWebhooks(triggerTypes: BuildInterfaces.DefinitionTriggerType[], project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise; + listWebhooks(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise; + getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; + getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; + getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; + getDefinitionYaml(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise; +} +export declare class BuildApi extends basem.ClientApiBase implements IBuildApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4"; + /** + * Associates an artifact with a build. + * + * @param {BuildInterfaces.BuildArtifact} artifact - The artifact. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + createArtifact(artifact: BuildInterfaces.BuildArtifact, project: string, buildId: number): Promise; + /** + * Gets a specific artifact for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + */ + getArtifact(project: string, buildId: number, artifactName: string): Promise; + /** + * Gets a specific artifact for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + */ + getArtifactContentZip(project: string, buildId: number, artifactName: string): Promise; + /** + * Gets all artifacts for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getArtifacts(project: string, buildId: number): Promise; + /** + * Gets a file from the build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + * @param {string} fileId - The primary key for the file. + * @param {string} fileName - The name that the file will be set to. + */ + getFile(project: string, buildId: number, artifactName: string, fileId: string, fileName: string): Promise; + /** + * Gets the list of attachments of a specific type that are associated with a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type - The type of attachment. + */ + getAttachments(project: string, buildId: number, type: string): Promise; + /** + * Gets a specific attachment. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} timelineId - The ID of the timeline. + * @param {string} recordId - The ID of the timeline record. + * @param {string} type - The type of the attachment. + * @param {string} name - The name of the attachment. + */ + getAttachment(project: string, buildId: number, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * @param {string} project - Project ID or project name + */ + authorizeProjectResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} id + */ + getProjectResources(project: string, type?: string, id?: string): Promise; + /** + * Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge. + * + * @param {string} project - The project ID or name. + * @param {number} definitionId - The ID of the definition. + * @param {string} branchName - The name of the branch. + */ + getBadge(project: string, definitionId: number, branchName?: string): Promise; + /** + * Gets a list of branches for the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} branchName - If supplied, the name of the branch to check for specifically. + */ + listBranches(project: string, providerName: string, serviceEndpointId?: string, repository?: string, branchName?: string): Promise; + /** + * Gets a badge that indicates the status of the most recent build for the specified branch. + * + * @param {string} project - Project ID or project name + * @param {string} repoType - The repository type. + * @param {string} repoId - The repository ID. + * @param {string} branchName - The branch name. + */ + getBuildBadge(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + /** + * Gets a badge that indicates the status of the most recent build for the specified branch. + * + * @param {string} project - Project ID or project name + * @param {string} repoType - The repository type. + * @param {string} repoId - The repository ID. + * @param {string} branchName - The branch name. + */ + getBuildBadgeData(project: string, repoType: string, repoId?: string, branchName?: string): Promise; + /** + * Gets all retention leases that apply to a specific build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getRetentionLeasesForBuild(project: string, buildId: number): Promise; + /** + * Deletes a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + deleteBuild(project: string, buildId: number): Promise; + /** + * Gets a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} propertyFilters + */ + getBuild(project: string, buildId: number, propertyFilters?: string): Promise; + /** + * Gets a list of builds. + * + * @param {string} project - Project ID or project name + * @param {number[]} definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. + * @param {number[]} queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. + * @param {string} buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search. + * @param {Date} minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified. + * @param {Date} maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified. + * @param {string} requestedFor - If specified, filters to builds requested for the specified user. + * @param {BuildInterfaces.BuildReason} reasonFilter - If specified, filters to builds that match this reason. + * @param {BuildInterfaces.BuildStatus} statusFilter - If specified, filters to builds that match this status. + * @param {BuildInterfaces.BuildResult} resultFilter - If specified, filters to builds that match this result. + * @param {string[]} tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags. + * @param {string[]} properties - A comma-delimited list of properties to retrieve. + * @param {number} top - The maximum number of builds to return. + * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds. + * @param {number} maxBuildsPerDefinition - The maximum number of builds to return per definition. + * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - Indicates whether to exclude, include, or only return deleted builds. + * @param {BuildInterfaces.BuildQueryOrder} queryOrder - The order in which builds should be returned. + * @param {string} branchName - If specified, filters to builds that built branches that built this branch. + * @param {number[]} buildIds - A comma-delimited list that specifies the IDs of builds to retrieve. + * @param {string} repositoryId - If specified, filters to builds that built from this repository. + * @param {string} repositoryType - If specified, filters to builds that built from repositories of this type. + */ + getBuilds(project: string, definitions?: number[], queues?: number[], buildNumber?: string, minTime?: Date, maxTime?: Date, requestedFor?: string, reasonFilter?: BuildInterfaces.BuildReason, statusFilter?: BuildInterfaces.BuildStatus, resultFilter?: BuildInterfaces.BuildResult, tagFilters?: string[], properties?: string[], top?: number, continuationToken?: string, maxBuildsPerDefinition?: number, deletedFilter?: BuildInterfaces.QueryDeletedOption, queryOrder?: BuildInterfaces.BuildQueryOrder, branchName?: string, buildIds?: number[], repositoryId?: string, repositoryType?: string): Promise; + /** + * Queues a build + * + * @param {BuildInterfaces.Build} build + * @param {string} project - Project ID or project name + * @param {boolean} ignoreWarnings + * @param {string} checkInTicket + * @param {number} sourceBuildId + * @param {number} definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body + */ + queueBuild(build: BuildInterfaces.Build, project: string, ignoreWarnings?: boolean, checkInTicket?: string, sourceBuildId?: number, definitionId?: number): Promise; + /** + * Updates a build. + * + * @param {BuildInterfaces.Build} build - The build. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {boolean} retry + */ + updateBuild(build: BuildInterfaces.Build, project: string, buildId: number, retry?: boolean): Promise; + /** + * Updates multiple builds. + * + * @param {BuildInterfaces.Build[]} builds - The builds to update. + * @param {string} project - Project ID or project name + */ + updateBuilds(builds: BuildInterfaces.Build[], project: string): Promise; + /** + * Gets the changes associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} continuationToken + * @param {number} top - The maximum number of changes to return + * @param {boolean} includeSourceChange + */ + getBuildChanges(project: string, buildId: number, continuationToken?: string, top?: number, includeSourceChange?: boolean): Promise; + /** + * Gets the changes made to the repository between two given builds. + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId - The ID of the first build. + * @param {number} toBuildId - The ID of the last build. + * @param {number} top - The maximum number of changes to return. + */ + getChangesBetweenBuilds(project: string, fromBuildId?: number, toBuildId?: number, top?: number): Promise; + /** + * Gets a controller + * + * @param {number} controllerId + */ + getBuildController(controllerId: number): Promise; + /** + * Gets controller, optionally filtered by name + * + * @param {string} name + */ + getBuildControllers(name?: string): Promise; + /** + * Creates a new definition. + * + * @param {BuildInterfaces.BuildDefinition} definition - The definition. + * @param {string} project - Project ID or project name + * @param {number} definitionToCloneId + * @param {number} definitionToCloneRevision + */ + createDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionToCloneId?: number, definitionToCloneRevision?: number): Promise; + /** + * Deletes a definition and all associated builds. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + deleteDefinition(project: string, definitionId: number): Promise; + /** + * Gets a definition, optionally at a specific revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. + * @param {boolean} includeLatestBuilds + */ + getDefinition(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise; + /** + * Gets a list of definitions. + * + * @param {string} project - Project ID or project name + * @param {string} name - If specified, filters to definitions whose names match this pattern. + * @param {string} repositoryId - A repository ID. If specified, filters to definitions that use this repository. + * @param {string} repositoryType - If specified, filters to definitions that have a repository of this type. + * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - Indicates the order in which definitions should be returned. + * @param {number} top - The maximum number of definitions to return. + * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {number[]} definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve. + * @param {string} path - If specified, filters to definitions under this folder. + * @param {Date} builtAfter - If specified, filters to definitions that have builds after this date. + * @param {Date} notBuiltAfter - If specified, filters to definitions that do not have builds after this date. + * @param {boolean} includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned. + * @param {boolean} includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition. + * @param {string} taskIdFilter - If specified, filters to definitions that use the specified task. + * @param {number} processType - If specified, filters to definitions with the given process type. + * @param {string} yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true + */ + getDefinitions(project: string, name?: string, repositoryId?: string, repositoryType?: string, queryOrder?: BuildInterfaces.DefinitionQueryOrder, top?: number, continuationToken?: string, minMetricsTime?: Date, definitionIds?: number[], path?: string, builtAfter?: Date, notBuiltAfter?: Date, includeAllProperties?: boolean, includeLatestBuilds?: boolean, taskIdFilter?: string, processType?: number, yamlFilename?: string): Promise; + /** + * Restores a deleted definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The identifier of the definition to restore. + * @param {boolean} deleted - When false, restores a deleted definition. + */ + restoreDefinition(project: string, definitionId: number, deleted: boolean): Promise; + /** + * Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT. + * + * @param {BuildInterfaces.BuildDefinition} definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} secretsSourceDefinitionId + * @param {number} secretsSourceDefinitionRevision + */ + updateDefinition(definition: BuildInterfaces.BuildDefinition, project: string, definitionId: number, secretsSourceDefinitionId?: number, secretsSourceDefinitionRevision?: number): Promise; + /** + * Gets the contents of a file in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. + * @param {string} path - The path to the file to retrieve, relative to the root of the repository. + */ + getFileContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise; + /** + * Creates a new folder. + * + * @param {BuildInterfaces.Folder} folder - The folder. + * @param {string} project - Project ID or project name + * @param {string} path - The full path of the folder. + */ + createFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise; + /** + * Deletes a definition folder. Definitions and their corresponding builds will also be deleted. + * + * @param {string} project - Project ID or project name + * @param {string} path - The full path to the folder. + */ + deleteFolder(project: string, path: string): Promise; + /** + * Gets a list of build definition folders. + * + * @param {string} project - Project ID or project name + * @param {string} path - The path to start with. + * @param {BuildInterfaces.FolderQueryOrder} queryOrder - The order in which folders should be returned. + */ + getFolders(project: string, path?: string, queryOrder?: BuildInterfaces.FolderQueryOrder): Promise; + /** + * Updates an existing folder at given existing path + * + * @param {BuildInterfaces.Folder} folder - The new version of the folder. + * @param {string} project - Project ID or project name + * @param {string} path - The full path to the folder. + */ + updateFolder(folder: BuildInterfaces.Folder, project: string, path: string): Promise; + /** + * Gets pipeline general settings. + * + * @param {string} project - Project ID or project name + */ + getBuildGeneralSettings(project: string): Promise; + /** + * Updates pipeline general settings. + * + * @param {BuildInterfaces.PipelineGeneralSettings} newSettings + * @param {string} project - Project ID or project name + */ + updateBuildGeneralSettings(newSettings: BuildInterfaces.PipelineGeneralSettings, project: string): Promise; + /** + * Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline. + * + * @param {number} daysToLookback + */ + getRetentionHistory(daysToLookback?: number): Promise; + /** + * Gets the latest build for a definition, optionally scoped to a specific branch. + * + * @param {string} project - Project ID or project name + * @param {string} definition - definition name with optional leading folder path, or the definition id + * @param {string} branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used. + */ + getLatestBuild(project: string, definition: string, branchName?: string): Promise; + /** + * Adds new leases for pipeline runs. + * + * @param {BuildInterfaces.NewRetentionLease[]} newLeases + * @param {string} project - Project ID or project name + */ + addRetentionLeases(newLeases: BuildInterfaces.NewRetentionLease[], project: string): Promise; + /** + * Removes specific retention leases. + * + * @param {string} project - Project ID or project name + * @param {number[]} ids + */ + deleteRetentionLeasesById(project: string, ids: number[]): Promise; + /** + * Returns the details of the retention lease given a lease id. + * + * @param {string} project - Project ID or project name + * @param {number} leaseId + */ + getRetentionLease(project: string, leaseId: number): Promise; + /** + * Returns any leases matching the specified MinimalRetentionLeases + * + * @param {string} project - Project ID or project name + * @param {BuildInterfaces.MinimalRetentionLease[]} leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|' + */ + getRetentionLeasesByMinimalRetentionLeases(project: string, leasesToFetch: BuildInterfaces.MinimalRetentionLease[]): Promise; + /** + * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. + * + * @param {string} project - Project ID or project name + * @param {string} ownerId + * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. + * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. + */ + getRetentionLeasesByOwnerId(project: string, ownerId?: string, definitionId?: number, runId?: number): Promise; + /** + * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run. + * + * @param {string} project - Project ID or project name + * @param {string} userOwnerId - The user id to search for. + * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. + * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. + */ + getRetentionLeasesByUserId(project: string, userOwnerId: string, definitionId?: number, runId?: number): Promise; + /** + * Updates the duration or pipeline protection status of a retention lease. + * + * @param {BuildInterfaces.RetentionLeaseUpdate} leaseUpdate - The new data for the retention lease. + * @param {string} project - Project ID or project name + * @param {number} leaseId - The ID of the lease to update. + */ + updateRetentionLease(leaseUpdate: BuildInterfaces.RetentionLeaseUpdate, project: string, leaseId: number): Promise; + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLog(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLogLines(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + /** + * Gets the logs for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildLogs(project: string, buildId: number): Promise; + /** + * Gets the logs for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildLogsZip(project: string, buildId: number): Promise; + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLogZip(project: string, buildId: number, logId: number, startLine?: number, endLine?: number): Promise; + /** + * Gets build metrics for a project. + * + * @param {string} project - Project ID or project name + * @param {string} metricAggregationType - The aggregation type to use (hourly, daily). + * @param {Date} minMetricsTime - The date from which to calculate metrics. + */ + getProjectMetrics(project: string, metricAggregationType?: string, minMetricsTime?: Date): Promise; + /** + * Gets build metrics for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {Date} minMetricsTime - The date from which to calculate metrics. + */ + getDefinitionMetrics(project: string, definitionId: number, minMetricsTime?: Date): Promise; + /** + * Gets all build definition options supported by the system. + * + * @param {string} project - Project ID or project name + */ + getBuildOptionDefinitions(project?: string): Promise; + /** + * Gets the contents of a directory in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. + * @param {string} path - The path contents to list, relative to the root of the repository. + */ + getPathContents(project: string, providerName: string, serviceEndpointId?: string, repository?: string, commitOrBranch?: string, path?: string): Promise; + /** + * Gets properties for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. + */ + getBuildProperties(project: string, buildId: number, filter?: string[]): Promise; + /** + * Updates properties for a build. + * + * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + updateBuildProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, buildId: number): Promise; + /** + * Gets properties for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. + */ + getDefinitionProperties(project: string, definitionId: number, filter?: string[]): Promise; + /** + * Updates properties for a definition. + * + * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + updateDefinitionProperties(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, definitionId: number): Promise; + /** + * Gets a pull request object from source provider. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} pullRequestId - Vendor-specific id of the pull request. + * @param {string} repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + */ + getPullRequest(project: string, providerName: string, pullRequestId: string, repositoryId?: string, serviceEndpointId?: string): Promise; + /** + * Gets a build report. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type + */ + getBuildReport(project: string, buildId: number, type?: string): Promise; + /** + * Gets a build report. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type + */ + getBuildReportHtmlContent(project: string, buildId: number, type?: string): Promise; + /** + * Gets a list of source code repositories. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of a single repository to get. + * @param {BuildInterfaces.ResultSet} resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set. + * @param {boolean} pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query. + * @param {string} continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories. + */ + listRepositories(project: string, providerName: string, serviceEndpointId?: string, repository?: string, resultSet?: BuildInterfaces.ResultSet, pageResults?: boolean, continuationToken?: string): Promise; + /** + * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + authorizeDefinitionResources(resources: BuildInterfaces.DefinitionResourceReference[], project: string, definitionId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getDefinitionResources(project: string, definitionId: number): Promise; + /** + * Gets information about build resources in the system. + * + */ + getResourceUsage(): Promise; + /** + * Gets the project's retention settings. + * + * @param {string} project - Project ID or project name + */ + getRetentionSettings(project: string): Promise; + /** + * Updates the project's retention settings. + * + * @param {BuildInterfaces.UpdateProjectRetentionSettingModel} updateModel + * @param {string} project - Project ID or project name + */ + updateRetentionSettings(updateModel: BuildInterfaces.UpdateProjectRetentionSettingModel, project: string): Promise; + /** + * Gets all revisions of a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + getDefinitionRevisions(project: string, definitionId: number): Promise; + /** + * Gets the build settings. + * + * @param {string} project - Project ID or project name + */ + getBuildSettings(project?: string): Promise; + /** + * Updates the build settings. + * + * @param {BuildInterfaces.BuildSettings} settings - The new settings. + * @param {string} project - Project ID or project name + */ + updateBuildSettings(settings: BuildInterfaces.BuildSettings, project?: string): Promise; + /** + * Get a list of source providers and their capabilities. + * + * @param {string} project - Project ID or project name + */ + listSourceProviders(project: string): Promise; + /** + * Update a build stage + * + * @param {BuildInterfaces.UpdateStageParameters} updateParameters + * @param {number} buildId + * @param {string} stageRefName + * @param {string} project - Project ID or project name + */ + updateStage(updateParameters: BuildInterfaces.UpdateStageParameters, buildId: number, stageRefName: string, project?: string): Promise; + /** + *

Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.

If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.

+ * + * @param {string} project - Project ID or project name + * @param {string} definition - Either the definition name with optional leading folder path, or the definition id. + * @param {string} branchName - Only consider the most recent build for this branch. If not specified, the default branch is used. + * @param {string} stageName - Use this stage within the pipeline to render the status. + * @param {string} jobName - Use this job within a stage of the pipeline to render the status. + * @param {string} configuration - Use this job configuration to render the status + * @param {string} label - Replaces the default text on the left side of the badge. + */ + getStatusBadge(project: string, definition: string, branchName?: string, stageName?: string, jobName?: string, configuration?: string, label?: string): Promise; + /** + * Adds a tag to a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} tag - The tag to add. + */ + addBuildTag(project: string, buildId: number, tag: string): Promise; + /** + * Adds tags to a build. + * + * @param {string[]} tags - The tags to add. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + addBuildTags(tags: string[], project: string, buildId: number): Promise; + /** + * Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} tag - The tag to remove. + */ + deleteBuildTag(project: string, buildId: number, tag: string): Promise; + /** + * Gets the tags for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildTags(project: string, buildId: number): Promise; + /** + * Adds/Removes tags from a build. + * + * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + updateBuildTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, buildId: number): Promise; + /** + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string} tag - The tag to add. + */ + addDefinitionTag(project: string, definitionId: number, tag: string): Promise; + /** + * Adds multiple tags to a definition. + * + * @param {string[]} tags - The tags to add. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + addDefinitionTags(tags: string[], project: string, definitionId: number): Promise; + /** + * Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string} tag - The tag to remove. + */ + deleteDefinitionTag(project: string, definitionId: number, tag: string): Promise; + /** + * Gets the tags for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The definition revision number. If not specified, uses the latest revision of the definition. + */ + getDefinitionTags(project: string, definitionId: number, revision?: number): Promise; + /** + * Adds/Removes tags from a definition. + * + * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + updateDefinitionTags(updateParameters: BuildInterfaces.UpdateTagParameters, project: string, definitionId: number): Promise; + /** + * Removes a tag from builds, definitions, and from the tag store + * + * @param {string} project - Project ID or project name + * @param {string} tag - The tag to remove. + */ + deleteTag(project: string, tag: string): Promise; + /** + * Gets a list of all build tags in the project. + * + * @param {string} project - Project ID or project name + */ + getTags(project: string): Promise; + /** + * Deletes a build definition template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the template. + */ + deleteTemplate(project: string, templateId: string): Promise; + /** + * Gets a specific build definition template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the requested template. + */ + getTemplate(project: string, templateId: string): Promise; + /** + * Gets all definition templates. + * + * @param {string} project - Project ID or project name + */ + getTemplates(project: string): Promise; + /** + * Updates an existing build definition template. + * + * @param {BuildInterfaces.BuildDefinitionTemplate} template - The new version of the template. + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the template. + */ + saveTemplate(template: BuildInterfaces.BuildDefinitionTemplate, project: string, templateId: string): Promise; + /** + * Gets details for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} timelineId + * @param {number} changeId + * @param {string} planId + */ + getBuildTimeline(project: string, buildId: number, timelineId?: string, changeId?: number, planId?: string): Promise; + /** + * Recreates the webhooks for the specified triggers in the given source code repository. + * + * @param {BuildInterfaces.DefinitionTriggerType[]} triggerTypes - The types of triggers to restore webhooks for. + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + */ + restoreWebhooks(triggerTypes: BuildInterfaces.DefinitionTriggerType[], project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise; + /** + * Gets a list of webhooks installed in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + */ + listWebhooks(project: string, providerName: string, serviceEndpointId?: string, repository?: string): Promise; + /** + * Gets the work items associated with a build. Only work items in the same project are returned. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} top - The maximum number of work items to return. + */ + getBuildWorkItemsRefs(project: string, buildId: number, top?: number): Promise; + /** + * Gets the work items associated with a build, filtered to specific commits. + * + * @param {string[]} commitIds - A comma-delimited list of commit IDs. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified. + */ + getBuildWorkItemsRefsFromCommits(commitIds: string[], project: string, buildId: number, top?: number): Promise; + /** + * Gets all the work items between two builds. + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId - The ID of the first build. + * @param {number} toBuildId - The ID of the last build. + * @param {number} top - The maximum number of work items to return. + */ + getWorkItemsBetweenBuilds(project: string, fromBuildId: number, toBuildId: number, top?: number): Promise; + /** + * Converts a definition to YAML, optionally at a specific revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. + * @param {boolean} includeLatestBuilds + */ + getDefinitionYaml(project: string, definitionId: number, revision?: number, minMetricsTime?: Date, propertyFilters?: string[], includeLatestBuilds?: boolean): Promise; +} diff --git a/node_modules/azure-devops-node-api/BuildApi.js b/node_modules/azure-devops-node-api/BuildApi.js new file mode 100644 index 0000000..9126d0f --- /dev/null +++ b/node_modules/azure-devops-node-api/BuildApi.js @@ -0,0 +1,3126 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const BuildInterfaces = require("./interfaces/BuildInterfaces"); +class BuildApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Build-api', options); + } + /** + * Associates an artifact with a build. + * + * @param {BuildInterfaces.BuildArtifact} artifact - The artifact. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + createArtifact(artifact, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, artifact, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific artifact for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + */ + getArtifact(project, buildId, artifactName) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactName == null) { + throw new TypeError('artifactName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + artifactName: artifactName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific artifact for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + */ + getArtifactContentZip(project, buildId, artifactName) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactName == null) { + throw new TypeError('artifactName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + artifactName: artifactName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all artifacts for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getArtifacts(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a file from the build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} artifactName - The name of the artifact. + * @param {string} fileId - The primary key for the file. + * @param {string} fileName - The name that the file will be set to. + */ + getFile(project, buildId, artifactName, fileId, fileName) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactName == null) { + throw new TypeError('artifactName can not be null or undefined'); + } + if (fileId == null) { + throw new TypeError('fileId can not be null or undefined'); + } + if (fileName == null) { + throw new TypeError('fileName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + artifactName: artifactName, + fileId: fileId, + fileName: fileName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.5", "build", "1db06c96-014e-44e1-ac91-90b2d4b3e984", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the list of attachments of a specific type that are associated with a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type - The type of attachment. + */ + getAttachments(project, buildId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "f2192269-89fa-4f94-baf6-8fb128c55159", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific attachment. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} timelineId - The ID of the timeline. + * @param {string} recordId - The ID of the timeline record. + * @param {string} type - The type of the attachment. + * @param {string} name - The name of the attachment. + */ + getAttachment(project, buildId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "af5122d3-3438-485e-a25a-2dbbfde84ee6", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * @param {string} project - Project ID or project name + */ + authorizeProjectResources(resources, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "398c85bc-81aa-4822-947c-a194a05f0fef", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, resources, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} type + * @param {string} id + */ + getProjectResources(project, type, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + type: type, + id: id, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "398c85bc-81aa-4822-947c-a194a05f0fef", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent build for a definition. Note that this API is deprecated. Prefer StatusBadgeController.GetStatusBadge. + * + * @param {string} project - The project ID or name. + * @param {number} definitionId - The ID of the definition. + * @param {string} branchName - The name of the branch. + */ + getBadge(project, definitionId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "de6a4df8-22cd-44ee-af2d-39f6aa7a4261", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of branches for the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - The vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} branchName - If supplied, the name of the branch to check for specifically. + */ + listBranches(project, providerName, serviceEndpointId, repository, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "e05d4403-9b81-4244-8763-20fde28d1976", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent build for the specified branch. + * + * @param {string} project - Project ID or project name + * @param {string} repoType - The repository type. + * @param {string} repoId - The repository ID. + * @param {string} branchName - The branch name. + */ + getBuildBadge(project, repoType, repoId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repoType: repoType + }; + let queryValues = { + repoId: repoId, + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "21b3b9ce-fad5-4567-9ad0-80679794e003", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent build for the specified branch. + * + * @param {string} project - Project ID or project name + * @param {string} repoType - The repository type. + * @param {string} repoId - The repository ID. + * @param {string} branchName - The branch name. + */ + getBuildBadgeData(project, repoType, repoId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repoType: repoType + }; + let queryValues = { + repoId: repoId, + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "21b3b9ce-fad5-4567-9ad0-80679794e003", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all retention leases that apply to a specific build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getRetentionLeasesForBuild(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "3da19a6a-f088-45c4-83ce-2ad3a87be6c4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + deleteBuild(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} propertyFilters + */ + getBuild(project, buildId, propertyFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + propertyFilters: propertyFilters, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of builds. + * + * @param {string} project - Project ID or project name + * @param {number[]} definitions - A comma-delimited list of definition IDs. If specified, filters to builds for these definitions. + * @param {number[]} queues - A comma-delimited list of queue IDs. If specified, filters to builds that ran against these queues. + * @param {string} buildNumber - If specified, filters to builds that match this build number. Append * to do a prefix search. + * @param {Date} minTime - If specified, filters to builds that finished/started/queued after this date based on the queryOrder specified. + * @param {Date} maxTime - If specified, filters to builds that finished/started/queued before this date based on the queryOrder specified. + * @param {string} requestedFor - If specified, filters to builds requested for the specified user. + * @param {BuildInterfaces.BuildReason} reasonFilter - If specified, filters to builds that match this reason. + * @param {BuildInterfaces.BuildStatus} statusFilter - If specified, filters to builds that match this status. + * @param {BuildInterfaces.BuildResult} resultFilter - If specified, filters to builds that match this result. + * @param {string[]} tagFilters - A comma-delimited list of tags. If specified, filters to builds that have the specified tags. + * @param {string[]} properties - A comma-delimited list of properties to retrieve. + * @param {number} top - The maximum number of builds to return. + * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of builds. + * @param {number} maxBuildsPerDefinition - The maximum number of builds to return per definition. + * @param {BuildInterfaces.QueryDeletedOption} deletedFilter - Indicates whether to exclude, include, or only return deleted builds. + * @param {BuildInterfaces.BuildQueryOrder} queryOrder - The order in which builds should be returned. + * @param {string} branchName - If specified, filters to builds that built branches that built this branch. + * @param {number[]} buildIds - A comma-delimited list that specifies the IDs of builds to retrieve. + * @param {string} repositoryId - If specified, filters to builds that built from this repository. + * @param {string} repositoryType - If specified, filters to builds that built from repositories of this type. + */ + getBuilds(project, definitions, queues, buildNumber, minTime, maxTime, requestedFor, reasonFilter, statusFilter, resultFilter, tagFilters, properties, top, continuationToken, maxBuildsPerDefinition, deletedFilter, queryOrder, branchName, buildIds, repositoryId, repositoryType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitions: definitions && definitions.join(","), + queues: queues && queues.join(","), + buildNumber: buildNumber, + minTime: minTime, + maxTime: maxTime, + requestedFor: requestedFor, + reasonFilter: reasonFilter, + statusFilter: statusFilter, + resultFilter: resultFilter, + tagFilters: tagFilters && tagFilters.join(","), + properties: properties && properties.join(","), + '$top': top, + continuationToken: continuationToken, + maxBuildsPerDefinition: maxBuildsPerDefinition, + deletedFilter: deletedFilter, + queryOrder: queryOrder, + branchName: branchName, + buildIds: buildIds && buildIds.join(","), + repositoryId: repositoryId, + repositoryType: repositoryType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a build + * + * @param {BuildInterfaces.Build} build + * @param {string} project - Project ID or project name + * @param {boolean} ignoreWarnings + * @param {string} checkInTicket + * @param {number} sourceBuildId + * @param {number} definitionId - Optional definition id to queue a build without a body. Ignored if there's a valid body + */ + queueBuild(build, project, ignoreWarnings, checkInTicket, sourceBuildId, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ignoreWarnings: ignoreWarnings, + checkInTicket: checkInTicket, + sourceBuildId: sourceBuildId, + definitionId: definitionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, build, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a build. + * + * @param {BuildInterfaces.Build} build - The build. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {boolean} retry + */ + updateBuild(build, project, buildId, retry) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + retry: retry, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, build, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates multiple builds. + * + * @param {BuildInterfaces.Build[]} builds - The builds to update. + * @param {string} project - Project ID or project name + */ + updateBuilds(builds, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "0cd358e1-9217-4d94-8269-1c1ee6f93dcf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, builds, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the changes associated with a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} continuationToken + * @param {number} top - The maximum number of changes to return + * @param {boolean} includeSourceChange + */ + getBuildChanges(project, buildId, continuationToken, top, includeSourceChange) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + includeSourceChange: includeSourceChange, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "54572c7b-bbd3-45d4-80dc-28be08941620", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Change, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the changes made to the repository between two given builds. + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId - The ID of the first build. + * @param {number} toBuildId - The ID of the last build. + * @param {number} top - The maximum number of changes to return. + */ + getChangesBetweenBuilds(project, fromBuildId, toBuildId, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fromBuildId: fromBuildId, + toBuildId: toBuildId, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "f10f0ea5-18a1-43ec-a8fb-2042c7be9b43", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Change, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a controller + * + * @param {number} controllerId + */ + getBuildController(controllerId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + controllerId: controllerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildController, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets controller, optionally filtered by name + * + * @param {string} name + */ + getBuildControllers(name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + name: name, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "fcac1932-2ee1-437f-9b6f-7f696be858f6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildController, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new definition. + * + * @param {BuildInterfaces.BuildDefinition} definition - The definition. + * @param {string} project - Project ID or project name + * @param {number} definitionToCloneId + * @param {number} definitionToCloneRevision + */ + createDefinition(definition, project, definitionToCloneId, definitionToCloneRevision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitionToCloneId: definitionToCloneId, + definitionToCloneRevision: definitionToCloneRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, definition, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a definition and all associated builds. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + deleteDefinition(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a definition, optionally at a specific revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. + * @param {boolean} includeLatestBuilds + */ + getDefinition(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + minMetricsTime: minMetricsTime, + propertyFilters: propertyFilters && propertyFilters.join(","), + includeLatestBuilds: includeLatestBuilds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of definitions. + * + * @param {string} project - Project ID or project name + * @param {string} name - If specified, filters to definitions whose names match this pattern. + * @param {string} repositoryId - A repository ID. If specified, filters to definitions that use this repository. + * @param {string} repositoryType - If specified, filters to definitions that have a repository of this type. + * @param {BuildInterfaces.DefinitionQueryOrder} queryOrder - Indicates the order in which definitions should be returned. + * @param {number} top - The maximum number of definitions to return. + * @param {string} continuationToken - A continuation token, returned by a previous call to this method, that can be used to return the next set of definitions. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {number[]} definitionIds - A comma-delimited list that specifies the IDs of definitions to retrieve. + * @param {string} path - If specified, filters to definitions under this folder. + * @param {Date} builtAfter - If specified, filters to definitions that have builds after this date. + * @param {Date} notBuiltAfter - If specified, filters to definitions that do not have builds after this date. + * @param {boolean} includeAllProperties - Indicates whether the full definitions should be returned. By default, shallow representations of the definitions are returned. + * @param {boolean} includeLatestBuilds - Indicates whether to return the latest and latest completed builds for this definition. + * @param {string} taskIdFilter - If specified, filters to definitions that use the specified task. + * @param {number} processType - If specified, filters to definitions with the given process type. + * @param {string} yamlFilename - If specified, filters to YAML definitions that match the given filename. To use this filter includeAllProperties should be set to true + */ + getDefinitions(project, name, repositoryId, repositoryType, queryOrder, top, continuationToken, minMetricsTime, definitionIds, path, builtAfter, notBuiltAfter, includeAllProperties, includeLatestBuilds, taskIdFilter, processType, yamlFilename) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + name: name, + repositoryId: repositoryId, + repositoryType: repositoryType, + queryOrder: queryOrder, + '$top': top, + continuationToken: continuationToken, + minMetricsTime: minMetricsTime, + definitionIds: definitionIds && definitionIds.join(","), + path: path, + builtAfter: builtAfter, + notBuiltAfter: notBuiltAfter, + includeAllProperties: includeAllProperties, + includeLatestBuilds: includeLatestBuilds, + taskIdFilter: taskIdFilter, + processType: processType, + yamlFilename: yamlFilename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionReference, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Restores a deleted definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The identifier of the definition to restore. + * @param {boolean} deleted - When false, restores a deleted definition. + */ + restoreDefinition(project, definitionId, deleted) { + return __awaiter(this, void 0, void 0, function* () { + if (deleted == null) { + throw new TypeError('deleted can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + deleted: deleted, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT. + * + * @param {BuildInterfaces.BuildDefinition} definition - The new version of the definition. Its "Revision" property must match the existing definition for the update to be accepted. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} secretsSourceDefinitionId + * @param {number} secretsSourceDefinitionRevision + */ + updateDefinition(definition, project, definitionId, secretsSourceDefinitionId, secretsSourceDefinitionRevision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + secretsSourceDefinitionId: secretsSourceDefinitionId, + secretsSourceDefinitionRevision: secretsSourceDefinitionRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "build", "dbeaf647-6167-421a-bda9-c9327b25e2e6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, definition, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the contents of a file in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. + * @param {string} path - The path to the file to retrieve, relative to the root of the repository. + */ + getFileContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + commitOrBranch: commitOrBranch, + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "29d12225-b1d9-425f-b668-6c594a981313", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new folder. + * + * @param {BuildInterfaces.Folder} folder - The folder. + * @param {string} project - Project ID or project name + * @param {string} path - The full path of the folder. + */ + createFolder(folder, project, path) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, folder, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a definition folder. Definitions and their corresponding builds will also be deleted. + * + * @param {string} project - Project ID or project name + * @param {string} path - The full path to the folder. + */ + deleteFolder(project, path) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of build definition folders. + * + * @param {string} project - Project ID or project name + * @param {string} path - The path to start with. + * @param {BuildInterfaces.FolderQueryOrder} queryOrder - The order in which folders should be returned. + */ + getFolders(project, path, queryOrder) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + path: path + }; + let queryValues = { + queryOrder: queryOrder, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing folder at given existing path + * + * @param {BuildInterfaces.Folder} folder - The new version of the folder. + * @param {string} project - Project ID or project name + * @param {string} path - The full path to the folder. + */ + updateFolder(folder, project, path) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "a906531b-d2da-4f55-bda7-f3e676cc50d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, folder, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets pipeline general settings. + * + * @param {string} project - Project ID or project name + */ + getBuildGeneralSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "c4aefd19-30ff-405b-80ad-aca021e7242a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates pipeline general settings. + * + * @param {BuildInterfaces.PipelineGeneralSettings} newSettings + * @param {string} project - Project ID or project name + */ + updateBuildGeneralSettings(newSettings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "c4aefd19-30ff-405b-80ad-aca021e7242a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the retention history for the project collection. This includes pipelines that have custom retention rules that may prevent the retention job from cleaning them up, runs per pipeline with retention type, files associated with pipelines owned by the collection with retention type, and the number of files per pipeline. + * + * @param {number} daysToLookback + */ + getRetentionHistory(daysToLookback) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + daysToLookback: daysToLookback, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "1a9c48be-0ef5-4ec2-b94f-f053bdd2d3bf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildRetentionHistory, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the latest build for a definition, optionally scoped to a specific branch. + * + * @param {string} project - Project ID or project name + * @param {string} definition - definition name with optional leading folder path, or the definition id + * @param {string} branchName - optional parameter that indicates the specific branch to use. If not specified, the default branch is used. + */ + getLatestBuild(project, definition, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definition: definition + }; + let queryValues = { + branchName: branchName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "54481611-01f4-47f3-998f-160da0f0c229", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Build, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds new leases for pipeline runs. + * + * @param {BuildInterfaces.NewRetentionLease[]} newLeases + * @param {string} project - Project ID or project name + */ + addRetentionLeases(newLeases, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, newLeases, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes specific retention leases. + * + * @param {string} project - Project ID or project name + * @param {number[]} ids + */ + deleteRetentionLeasesById(project, ids) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the details of the retention lease given a lease id. + * + * @param {string} project - Project ID or project name + * @param {number} leaseId + */ + getRetentionLease(project, leaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + leaseId: leaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns any leases matching the specified MinimalRetentionLeases + * + * @param {string} project - Project ID or project name + * @param {BuildInterfaces.MinimalRetentionLease[]} leasesToFetch - List of JSON-serialized MinimalRetentionLeases separated by '|' + */ + getRetentionLeasesByMinimalRetentionLeases(project, leasesToFetch) { + return __awaiter(this, void 0, void 0, function* () { + if (leasesToFetch == null) { + throw new TypeError('leasesToFetch can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + leasesToFetch: leasesToFetch && leasesToFetch.join("|"), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns any leases owned by the specified entity, optionally scoped to a single pipeline definition and run. + * + * @param {string} project - Project ID or project name + * @param {string} ownerId + * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. + * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. + */ + getRetentionLeasesByOwnerId(project, ownerId, definitionId, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ownerId: ownerId, + definitionId: definitionId, + runId: runId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns any leases owned by the specified user, optionally scoped to a single pipeline definition and run. + * + * @param {string} project - Project ID or project name + * @param {string} userOwnerId - The user id to search for. + * @param {number} definitionId - An optional parameter to limit the search to a specific pipeline definition. + * @param {number} runId - An optional parameter to limit the search to a single pipeline run. Requires definitionId. + */ + getRetentionLeasesByUserId(project, userOwnerId, definitionId, runId) { + return __awaiter(this, void 0, void 0, function* () { + if (userOwnerId == null) { + throw new TypeError('userOwnerId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + userOwnerId: userOwnerId, + definitionId: definitionId, + runId: runId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the duration or pipeline protection status of a retention lease. + * + * @param {BuildInterfaces.RetentionLeaseUpdate} leaseUpdate - The new data for the retention lease. + * @param {string} project - Project ID or project name + * @param {number} leaseId - The ID of the lease to update. + */ + updateRetentionLease(leaseUpdate, project, leaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + leaseId: leaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "272051e4-9af1-45b5-ae22-8d960a5539d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, leaseUpdate, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RetentionLease, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLog(project, buildId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLogLines(project, buildId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the logs for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildLogs(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the logs for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildLogsZip(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets an individual log file for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} logId - The ID of the log file. + * @param {number} startLine - The start line. + * @param {number} endLine - The end line. + */ + getBuildLogZip(project, buildId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "35a80daf-7f30-45fc-86e8-6b813d9c90df", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets build metrics for a project. + * + * @param {string} project - Project ID or project name + * @param {string} metricAggregationType - The aggregation type to use (hourly, daily). + * @param {Date} minMetricsTime - The date from which to calculate metrics. + */ + getProjectMetrics(project, metricAggregationType, minMetricsTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + metricAggregationType: metricAggregationType + }; + let queryValues = { + minMetricsTime: minMetricsTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7433fae7-a6bc-41dc-a6e2-eef9005ce41a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildMetric, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets build metrics for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {Date} minMetricsTime - The date from which to calculate metrics. + */ + getDefinitionMetrics(project, definitionId, minMetricsTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + minMetricsTime: minMetricsTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d973b939-0ce0-4fec-91d8-da3940fa1827", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildMetric, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all build definition options supported by the system. + * + * @param {string} project - Project ID or project name + */ + getBuildOptionDefinitions(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "591cb5a4-2d46-4f3a-a697-5cd42b6bd332", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildOptionDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the contents of a directory in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get branches. Can only be omitted for providers that do not support multiple repositories. + * @param {string} commitOrBranch - The identifier of the commit or branch from which a file's contents are retrieved. + * @param {string} path - The path contents to list, relative to the root of the repository. + */ + getPathContents(project, providerName, serviceEndpointId, repository, commitOrBranch, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + commitOrBranch: commitOrBranch, + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7944d6fb-df01-4709-920a-7a189aa34037", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets properties for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. + */ + getBuildProperties(project, buildId, filter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + filter: filter && filter.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "0a6312e9-0627-49b7-8083-7d74a64849c9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates properties for a build. + * + * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + updateBuildProperties(customHeaders, document, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "0a6312e9-0627-49b7-8083-7d74a64849c9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets properties for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string[]} filter - A comma-delimited list of properties. If specified, filters to these specific properties. + */ + getDefinitionProperties(project, definitionId, filter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + filter: filter && filter.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d9826ad7-2a68-46a9-a6e9-677698777895", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates properties for a definition. + * + * @param {VSSInterfaces.JsonPatchDocument} document - A json-patch document describing the properties to update. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + updateDefinitionProperties(customHeaders, document, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d9826ad7-2a68-46a9-a6e9-677698777895", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a pull request object from source provider. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} pullRequestId - Vendor-specific id of the pull request. + * @param {string} repositoryId - Vendor-specific identifier or the name of the repository that contains the pull request. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + */ + getPullRequest(project, providerName, pullRequestId, repositoryId, serviceEndpointId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName, + pullRequestId: pullRequestId + }; + let queryValues = { + repositoryId: repositoryId, + serviceEndpointId: serviceEndpointId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d8763ec7-9ff0-4fb4-b2b2-9d757906ff14", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a build report. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type + */ + getBuildReport(project, buildId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + type: type, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "45bcaa88-67e1-4042-a035-56d3b4a7d44c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a build report. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} type + */ + getBuildReportHtmlContent(project, buildId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + type: type, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "45bcaa88-67e1-4042-a035-56d3b4a7d44c", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/html", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of source code repositories. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of a single repository to get. + * @param {BuildInterfaces.ResultSet} resultSet - 'top' for the repositories most relevant for the endpoint. If not set, all repositories are returned. Ignored if 'repository' is set. + * @param {boolean} pageResults - If set to true, this will limit the set of results and will return a continuation token to continue the query. + * @param {string} continuationToken - When paging results, this is a continuation token, returned by a previous call to this method, that can be used to return the next set of repositories. + */ + listRepositories(project, providerName, serviceEndpointId, repository, resultSet, pageResults, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + resultSet: resultSet, + pageResults: pageResults, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "d44d1680-f978-4834-9b93-8c6e132329c9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {BuildInterfaces.DefinitionResourceReference[]} resources + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + authorizeDefinitionResources(resources, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "ea623316-1967-45eb-89ab-e9e6110cf2d6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, resources, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getDefinitionResources(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "ea623316-1967-45eb-89ab-e9e6110cf2d6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets information about build resources in the system. + * + */ + getResourceUsage() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "3813d06c-9e36-4ea1-aac3-61a485d60e3d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the project's retention settings. + * + * @param {string} project - Project ID or project name + */ + getRetentionSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "dadb46e7-5851-4c72-820e-ae8abb82f59f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the project's retention settings. + * + * @param {BuildInterfaces.UpdateProjectRetentionSettingModel} updateModel + * @param {string} project - Project ID or project name + */ + updateRetentionSettings(updateModel, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "dadb46e7-5851-4c72-820e-ae8abb82f59f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all revisions of a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + getDefinitionRevisions(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "7c116775-52e5-453e-8c5d-914d9762d8c4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the build settings. + * + * @param {string} project - Project ID or project name + */ + getBuildSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the build settings. + * + * @param {BuildInterfaces.BuildSettings} settings - The new settings. + * @param {string} project - Project ID or project name + */ + updateBuildSettings(settings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "aa8c1c9c-ef8b-474a-b8c4-785c7b191d0d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, settings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of source providers and their capabilities. + * + * @param {string} project - Project ID or project name + */ + listSourceProviders(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "3ce81729-954f-423d-a581-9fea01d25186", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.SourceProviderAttributes, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a build stage + * + * @param {BuildInterfaces.UpdateStageParameters} updateParameters + * @param {number} buildId + * @param {string} stageRefName + * @param {string} project - Project ID or project name + */ + updateStage(updateParameters, buildId, stageRefName, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + stageRefName: stageRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "b8aac6c9-744b-46e1-88fc-3550969f9313", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + *

Gets the build status for a definition, optionally scoped to a specific branch, stage, job, and configuration.

If there are more than one, then it is required to pass in a stageName value when specifying a jobName, and the same rule then applies for both if passing a configuration parameter.

+ * + * @param {string} project - Project ID or project name + * @param {string} definition - Either the definition name with optional leading folder path, or the definition id. + * @param {string} branchName - Only consider the most recent build for this branch. If not specified, the default branch is used. + * @param {string} stageName - Use this stage within the pipeline to render the status. + * @param {string} jobName - Use this job within a stage of the pipeline to render the status. + * @param {string} configuration - Use this job configuration to render the status + * @param {string} label - Replaces the default text on the left side of the badge. + */ + getStatusBadge(project, definition, branchName, stageName, jobName, configuration, label) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definition: definition + }; + let queryValues = { + branchName: branchName, + stageName: stageName, + jobName: jobName, + configuration: configuration, + label: label, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "07acfdce-4757-4439-b422-ddd13a2fcc10", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} tag - The tag to add. + */ + addBuildTag(project, buildId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds tags to a build. + * + * @param {string[]} tags - The tags to add. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + addBuildTags(tags, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a tag from a build. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {string} tag - The tag to remove. + */ + deleteBuildTag(project, buildId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + getBuildTags(project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds/Removes tags from a build. + * + * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + */ + updateBuildTags(updateParameters, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "6e6114b2-8161-44c8-8f6c-c5505782427f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string} tag - The tag to add. + */ + addDefinitionTag(project, definitionId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds multiple tags to a definition. + * + * @param {string[]} tags - The tags to add. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + addDefinitionTags(tags, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a tag from a definition. NOTE: This API will not work for tags with special characters. To remove tags with special characters, use the PATCH method instead (in 6.0+) + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {string} tag - The tag to remove. + */ + deleteDefinitionTag(project, definitionId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The definition revision number. If not specified, uses the latest revision of the definition. + */ + getDefinitionTags(project, definitionId, revision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds/Removes tags from a definition. + * + * @param {BuildInterfaces.UpdateTagParameters} updateParameters - The tags to add/remove. + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + */ + updateDefinitionTags(updateParameters, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "cb894432-134a-4d31-a839-83beceaace4b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a tag from builds, definitions, and from the tag store + * + * @param {string} project - Project ID or project name + * @param {string} tag - The tag to remove. + */ + deleteTag(project, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of all build tags in the project. + * + * @param {string} project - Project ID or project name + */ + getTags(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "d84ac5c6-edc7-43d5-adc9-1b34be5dea09", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a build definition template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the template. + */ + deleteTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a specific build definition template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the requested template. + */ + getTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all definition templates. + * + * @param {string} project - Project ID or project name + */ + getTemplates(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing build definition template. + * + * @param {BuildInterfaces.BuildDefinitionTemplate} template - The new version of the template. + * @param {string} project - Project ID or project name + * @param {string} templateId - The ID of the template. + */ + saveTemplate(template, project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "build", "e884571e-7f92-4d6a-9274-3f5649900835", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, template, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.BuildDefinitionTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets details for a build + * + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} timelineId + * @param {number} changeId + * @param {string} planId + */ + getBuildTimeline(project, buildId, timelineId, changeId, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId, + timelineId: timelineId + }; + let queryValues = { + changeId: changeId, + planId: planId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "8baac422-4c6e-4de5-8532-db96d92acffa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.Timeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Recreates the webhooks for the specified triggers in the given source code repository. + * + * @param {BuildInterfaces.DefinitionTriggerType[]} triggerTypes - The types of triggers to restore webhooks for. + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + */ + restoreWebhooks(triggerTypes, project, providerName, serviceEndpointId, repository) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "793bceb8-9736-4030-bd2f-fb3ce6d6b478", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, triggerTypes, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of webhooks installed in the given source code repository. + * + * @param {string} project - Project ID or project name + * @param {string} providerName - The name of the source provider. + * @param {string} serviceEndpointId - If specified, the ID of the service endpoint to query. Can only be omitted for providers that do not use service endpoints, e.g. TFVC or TFGit. + * @param {string} repository - If specified, the vendor-specific identifier or the name of the repository to get webhooks. Can only be omitted for providers that do not support multiple repositories. + */ + listWebhooks(project, providerName, serviceEndpointId, repository) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + providerName: providerName + }; + let queryValues = { + serviceEndpointId: serviceEndpointId, + repository: repository, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "8f20ff82-9498-4812-9f6e-9c01bdc50e99", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, BuildInterfaces.TypeInfo.RepositoryWebhook, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work items associated with a build. Only work items in the same project are returned. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} top - The maximum number of work items to return. + */ + getBuildWorkItemsRefs(project, buildId, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work items associated with a build, filtered to specific commits. + * + * @param {string[]} commitIds - A comma-delimited list of commit IDs. + * @param {string} project - Project ID or project name + * @param {number} buildId - The ID of the build. + * @param {number} top - The maximum number of work items to return, or the number of commits to consider if no commit IDs are specified. + */ + getBuildWorkItemsRefsFromCommits(commitIds, project, buildId, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "5a21f5d2-5642-47e4-a0bd-1356e6731bee", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, commitIds, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all the work items between two builds. + * + * @param {string} project - Project ID or project name + * @param {number} fromBuildId - The ID of the first build. + * @param {number} toBuildId - The ID of the last build. + * @param {number} top - The maximum number of work items to return. + */ + getWorkItemsBetweenBuilds(project, fromBuildId, toBuildId, top) { + return __awaiter(this, void 0, void 0, function* () { + if (fromBuildId == null) { + throw new TypeError('fromBuildId can not be null or undefined'); + } + if (toBuildId == null) { + throw new TypeError('toBuildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fromBuildId: fromBuildId, + toBuildId: toBuildId, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "build", "52ba8915-5518-42e3-a4bb-b0182d159e2d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Converts a definition to YAML, optionally at a specific revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - The ID of the definition. + * @param {number} revision - The revision number to retrieve. If this is not specified, the latest version will be returned. + * @param {Date} minMetricsTime - If specified, indicates the date from which metrics should be included. + * @param {string[]} propertyFilters - A comma-delimited list of properties to include in the results. + * @param {boolean} includeLatestBuilds + */ + getDefinitionYaml(project, definitionId, revision, minMetricsTime, propertyFilters, includeLatestBuilds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + minMetricsTime: minMetricsTime, + propertyFilters: propertyFilters && propertyFilters.join(","), + includeLatestBuilds: includeLatestBuilds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "build", "7c3df3a1-7e51-4150-8cf7-540347f8697f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +BuildApi.RESOURCE_AREA_ID = "965220d5-5bb9-42cf-8d67-9b146df2a5a4"; +exports.BuildApi = BuildApi; diff --git a/node_modules/azure-devops-node-api/ClientApiBases.d.ts b/node_modules/azure-devops-node-api/ClientApiBases.d.ts new file mode 100644 index 0000000..393c7f3 --- /dev/null +++ b/node_modules/azure-devops-node-api/ClientApiBases.d.ts @@ -0,0 +1,15 @@ +import vsom = require('./VsoClient'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import * as rm from 'typed-rest-client/RestClient'; +import * as hm from 'typed-rest-client/HttpClient'; +export declare class ClientApiBase { + baseUrl: string; + userAgent: string; + http: hm.HttpClient; + rest: rm.RestClient; + vsoClient: vsom.VsoClient; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string, options?: VsoBaseInterfaces.IRequestOptions); + createAcceptHeader(type: string, apiVersion?: string): string; + createRequestOptions(type: string, apiVersion?: string): rm.IRequestOptions; + formatResponse(data: any, responseTypeMetadata: any, isCollection: boolean): any; +} diff --git a/node_modules/azure-devops-node-api/ClientApiBases.js b/node_modules/azure-devops-node-api/ClientApiBases.js new file mode 100644 index 0000000..3eefab9 --- /dev/null +++ b/node_modules/azure-devops-node-api/ClientApiBases.js @@ -0,0 +1,34 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const vsom = require("./VsoClient"); +const serm = require("./Serialization"); +const rm = require("typed-rest-client/RestClient"); +const hm = require("typed-rest-client/HttpClient"); +class ClientApiBase { + constructor(baseUrl, handlers, userAgent, options) { + this.baseUrl = baseUrl; + this.http = new hm.HttpClient(userAgent, handlers, options); + this.rest = new rm.RestClient(userAgent, null, handlers, options); + this.vsoClient = new vsom.VsoClient(baseUrl, this.rest); + this.userAgent = userAgent; + } + createAcceptHeader(type, apiVersion) { + return type + (apiVersion ? (';api-version=' + apiVersion) : ''); + } + createRequestOptions(type, apiVersion) { + let options = {}; + options.acceptHeader = this.createAcceptHeader(type, apiVersion); + return options; + } + formatResponse(data, responseTypeMetadata, isCollection) { + let serializationData = { + responseTypeMetadata: responseTypeMetadata, + responseIsCollection: isCollection + }; + let deserializedResult = serm.ContractSerializer.deserialize(data, serializationData.responseTypeMetadata, false, serializationData.responseIsCollection); + return deserializedResult; + } +} +exports.ClientApiBase = ClientApiBase; diff --git a/node_modules/azure-devops-node-api/CoreApi.d.ts b/node_modules/azure-devops-node-api/CoreApi.d.ts new file mode 100644 index 0000000..15d2c8f --- /dev/null +++ b/node_modules/azure-devops-node-api/CoreApi.d.ts @@ -0,0 +1,249 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import CoreInterfaces = require("./interfaces/CoreInterfaces"); +import OperationsInterfaces = require("./interfaces/common/OperationsInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface ICoreApi extends basem.ClientApiBase { + removeProjectAvatar(projectId: string): Promise; + setProjectAvatar(avatarBlob: CoreInterfaces.ProjectAvatar, projectId: string): Promise; + createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; + getConnectedServiceDetails(projectId: string, name: string): Promise; + getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; + createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + getIdentityMru(mruName: string): Promise; + updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + getTeamMembersWithExtendedProperties(projectId: string, teamId: string, top?: number, skip?: number): Promise; + getProcessById(processId: string): Promise; + getProcesses(): Promise; + getProjectCollection(collectionId: string): Promise; + getProjectCollections(top?: number, skip?: number): Promise; + getProjectHistoryEntries(minRevision?: number): Promise; + getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; + getProjects(stateFilter?: any, top?: number, skip?: number, continuationToken?: string, getDefaultTeamImageUrl?: boolean): Promise; + queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; + queueDeleteProject(projectId: string): Promise; + updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; + getProjectsProperties(projectIds: string[], properties?: string[]): Promise; + getProjectProperties(projectId: string, keys?: string[]): Promise; + setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise; + createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise; + deleteProxy(proxyUrl: string, site?: string): Promise; + getProxies(proxyUrl?: string): Promise; + getAllTeams(mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise; + createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; + deleteTeam(projectId: string, teamId: string): Promise; + getTeam(projectId: string, teamId: string, expandIdentity?: boolean): Promise; + getTeams(projectId: string, mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise; + updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; +} +export declare class CoreApi extends basem.ClientApiBase implements ICoreApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf"; + /** + * Removes the avatar for the project. + * + * @param {string} projectId - The ID or name of the project. + */ + removeProjectAvatar(projectId: string): Promise; + /** + * Sets the avatar for the project. + * + * @param {CoreInterfaces.ProjectAvatar} avatarBlob - The avatar blob data object to upload. + * @param {string} projectId - The ID or name of the project. + */ + setProjectAvatar(avatarBlob: CoreInterfaces.ProjectAvatar, projectId: string): Promise; + /** + * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData + * @param {string} projectId + */ + createConnectedService(connectedServiceCreationData: CoreInterfaces.WebApiConnectedServiceDetails, projectId: string): Promise; + /** + * @param {string} projectId + * @param {string} name + */ + getConnectedServiceDetails(projectId: string, name: string): Promise; + /** + * @param {string} projectId + * @param {CoreInterfaces.ConnectedServiceKind} kind + */ + getConnectedServices(projectId: string, kind?: CoreInterfaces.ConnectedServiceKind): Promise; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + createIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + deleteIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + /** + * @param {string} mruName + */ + getIdentityMru(mruName: string): Promise; + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + updateIdentityMru(mruData: CoreInterfaces.IdentityData, mruName: string): Promise; + /** + * Get a list of members for a specific team. + * + * @param {string} projectId - The name or ID (GUID) of the team project the team belongs to. + * @param {string} teamId - The name or ID (GUID) of the team . + * @param {number} top + * @param {number} skip + */ + getTeamMembersWithExtendedProperties(projectId: string, teamId: string, top?: number, skip?: number): Promise; + /** + * Get a process by ID. + * + * @param {string} processId - ID for a process. + */ + getProcessById(processId: string): Promise; + /** + * Get a list of processes. + * + */ + getProcesses(): Promise; + /** + * Get project collection with the specified id or name. + * + * @param {string} collectionId + */ + getProjectCollection(collectionId: string): Promise; + /** + * Get project collection references for this application. + * + * @param {number} top + * @param {number} skip + */ + getProjectCollections(top?: number, skip?: number): Promise; + /** + * Gets the history of changes to the project. + * + * @param {number} minRevision - The minimum revision number to return in the history. + */ + getProjectHistoryEntries(minRevision?: number): Promise; + /** + * Get project with the specified id or name, optionally including capabilities. + * + * @param {string} projectId + * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). + * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). + */ + getProject(projectId: string, includeCapabilities?: boolean, includeHistory?: boolean): Promise; + /** + * Get all projects in the organization that the authenticated user has access to. + * + * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). + * @param {number} top + * @param {number} skip + * @param {string} continuationToken + * @param {boolean} getDefaultTeamImageUrl + */ + getProjects(stateFilter?: any, top?: number, skip?: number, continuationToken?: string, getDefaultTeamImageUrl?: boolean): Promise; + /** + * Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. + * + * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. + */ + queueCreateProject(projectToCreate: CoreInterfaces.TeamProject): Promise; + /** + * Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. + * + * @param {string} projectId - The project id of the project to delete. + */ + queueDeleteProject(projectId: string): Promise; + /** + * Update an existing project's name, abbreviation, description, or restore a project. + * + * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. The state must be set to wellFormed to restore the project. + * @param {string} projectId - The project id of the project to update. + */ + updateProject(projectUpdate: CoreInterfaces.TeamProject, projectId: string): Promise; + /** + * Get a collection of team project properties for multiple projects. + * + * @param {string[]} projectIds - A comma-delimited string of team project IDs + * @param {string[]} properties + */ + getProjectsProperties(projectIds: string[], properties?: string[]): Promise; + /** + * Get a collection of team project properties. + * + * @param {string} projectId - The team project ID. + * @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned. + */ + getProjectProperties(projectId: string, keys?: string[]): Promise; + /** + * Create, update, and delete team project properties. + * + * @param {string} projectId - The team project ID. + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + */ + setProjectProperties(customHeaders: any, projectId: string, patchDocument: VSSInterfaces.JsonPatchDocument): Promise; + /** + * @param {CoreInterfaces.Proxy} proxy + */ + createOrUpdateProxy(proxy: CoreInterfaces.Proxy): Promise; + /** + * @param {string} proxyUrl + * @param {string} site + */ + deleteProxy(proxyUrl: string, site?: string): Promise; + /** + * @param {string} proxyUrl + */ + getProxies(proxyUrl?: string): Promise; + /** + * Get a list of all teams. + * + * @param {boolean} mine - If true, then return all teams requesting user is member. Otherwise return all teams user has read access. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getAllTeams(mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise; + /** + * Create a team in a team project. + * + * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. + * @param {string} projectId - The name or ID (GUID) of the team project in which to create the team. + */ + createTeam(team: CoreInterfaces.WebApiTeam, projectId: string): Promise; + /** + * Delete a team. + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete. + * @param {string} teamId - The name or ID of the team to delete. + */ + deleteTeam(projectId: string, teamId: string): Promise; + /** + * Get a specific team. + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the team. + * @param {string} teamId - The name or ID (GUID) of the team. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getTeam(projectId: string, teamId: string, expandIdentity?: boolean): Promise; + /** + * Get a list of teams. + * + * @param {string} projectId + * @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getTeams(projectId: string, mine?: boolean, top?: number, skip?: number, expandIdentity?: boolean): Promise; + /** + * Update a team's name and/or description. + * + * @param {CoreInterfaces.WebApiTeam} teamData + * @param {string} projectId - The name or ID (GUID) of the team project containing the team to update. + * @param {string} teamId - The name of ID of the team to update. + */ + updateTeam(teamData: CoreInterfaces.WebApiTeam, projectId: string, teamId: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/CoreApi.js b/node_modules/azure-devops-node-api/CoreApi.js new file mode 100644 index 0000000..625a212 --- /dev/null +++ b/node_modules/azure-devops-node-api/CoreApi.js @@ -0,0 +1,923 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const CoreInterfaces = require("./interfaces/CoreInterfaces"); +const OperationsInterfaces = require("./interfaces/common/OperationsInterfaces"); +class CoreApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Core-api', options); + } + /** + * Removes the avatar for the project. + * + * @param {string} projectId - The ID or name of the project. + */ + removeProjectAvatar(projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "54b2a2a0-859b-4d05-827c-ec4c862f641a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Sets the avatar for the project. + * + * @param {CoreInterfaces.ProjectAvatar} avatarBlob - The avatar blob data object to upload. + * @param {string} projectId - The ID or name of the project. + */ + setProjectAvatar(avatarBlob, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "54b2a2a0-859b-4d05-827c-ec4c862f641a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, avatarBlob, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.WebApiConnectedServiceDetails} connectedServiceCreationData + * @param {string} projectId + */ + createConnectedService(connectedServiceCreationData, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, connectedServiceCreationData, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} projectId + * @param {string} name + */ + getConnectedServiceDetails(projectId, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedServiceDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} projectId + * @param {CoreInterfaces.ConnectedServiceKind} kind + */ + getConnectedServices(projectId, kind) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + kind: kind, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "b4f70219-e18b-42c5-abe3-98b07d35525e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.WebApiConnectedService, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + createIdentityMru(mruData, mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, mruData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + deleteIdentityMru(mruData, mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} mruName + */ + getIdentityMru(mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.IdentityData} mruData + * @param {string} mruName + */ + updateIdentityMru(mruData, mruName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + mruName: mruName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "5ead0b70-2572-4697-97e9-f341069a783a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, mruData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of members for a specific team. + * + * @param {string} projectId - The name or ID (GUID) of the team project the team belongs to. + * @param {string} teamId - The name or ID (GUID) of the team . + * @param {number} top + * @param {number} skip + */ + getTeamMembersWithExtendedProperties(projectId, teamId, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "294c494c-2600-4d7e-b76c-3dd50c3c95be", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a process by ID. + * + * @param {string} processId - ID for a process. + */ + getProcessById(processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of processes. + * + */ + getProcesses() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "93878975-88c5-4e6a-8abb-7ddd77a8a7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.Process, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get project collection with the specified id or name. + * + * @param {string} collectionId + */ + getProjectCollection(collectionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + collectionId: collectionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectCollection, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get project collection references for this application. + * + * @param {number} top + * @param {number} skip + */ + getProjectCollections(top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "8031090f-ef1d-4af6-85fc-698cd75d42bf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the history of changes to the project. + * + * @param {number} minRevision - The minimum revision number to return in the history. + */ + getProjectHistoryEntries(minRevision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + minRevision: minRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "6488a877-4749-4954-82ea-7340d36be9f2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.ProjectInfo, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get project with the specified id or name, optionally including capabilities. + * + * @param {string} projectId + * @param {boolean} includeCapabilities - Include capabilities (such as source control) in the team project result (default: false). + * @param {boolean} includeHistory - Search within renamed projects (that had such name in the past). + */ + getProject(projectId, includeCapabilities, includeHistory) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + includeCapabilities: includeCapabilities, + includeHistory: includeHistory, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProject, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all projects in the organization that the authenticated user has access to. + * + * @param {any} stateFilter - Filter on team projects in a specific team project state (default: WellFormed). + * @param {number} top + * @param {number} skip + * @param {string} continuationToken + * @param {boolean} getDefaultTeamImageUrl + */ + getProjects(stateFilter, top, skip, continuationToken, getDefaultTeamImageUrl) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + stateFilter: stateFilter, + '$top': top, + '$skip': skip, + continuationToken: continuationToken, + getDefaultTeamImageUrl: getDefaultTeamImageUrl, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, CoreInterfaces.TypeInfo.TeamProjectReference, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a project to be created. Use the [GetOperation](../../operations/operations/get) to periodically check for create project status. + * + * @param {CoreInterfaces.TeamProject} projectToCreate - The project to create. + */ + queueCreateProject(projectToCreate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, projectToCreate, options); + let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queues a project to be deleted. Use the [GetOperation](../../operations/operations/get) to periodically check for delete project status. + * + * @param {string} projectId - The project id of the project to delete. + */ + queueDeleteProject(projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update an existing project's name, abbreviation, description, or restore a project. + * + * @param {CoreInterfaces.TeamProject} projectUpdate - The updates for the project. The state must be set to wellFormed to restore the project. + * @param {string} projectId - The project id of the project to update. + */ + updateProject(projectUpdate, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "core", "603fe2ac-9723-48b9-88ad-09305aa6c6e1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, projectUpdate, options); + let ret = this.formatResponse(res.result, OperationsInterfaces.TypeInfo.OperationReference, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of team project properties for multiple projects. + * + * @param {string[]} projectIds - A comma-delimited string of team project IDs + * @param {string[]} properties + */ + getProjectsProperties(projectIds, properties) { + return __awaiter(this, void 0, void 0, function* () { + if (projectIds == null) { + throw new TypeError('projectIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + projectIds: projectIds && projectIds.join(","), + properties: properties && properties.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "0a3ffdfc-fe94-47a6-bb27-79bf3f762eac", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of team project properties. + * + * @param {string} projectId - The team project ID. + * @param {string[]} keys - A comma-delimited string of team project property names. Wildcard characters ("?" and "*") are supported. If no key is specified, all properties will be returned. + */ + getProjectProperties(projectId, keys) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + keys: keys && keys.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create, update, and delete team project properties. + * + * @param {string} projectId - The team project ID. + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - A JSON Patch document that represents an array of property operations. See RFC 6902 for more details on JSON Patch. The accepted operation verbs are Add and Remove, where Add is used for both creating and updating properties. The path consists of a forward slash and a property name. + */ + setProjectProperties(customHeaders, projectId, patchDocument) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "core", "4976a71a-4487-49aa-8aab-a1eda469037a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {CoreInterfaces.Proxy} proxy + */ + createOrUpdateProxy(proxy) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, proxy, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} proxyUrl + * @param {string} site + */ + deleteProxy(proxyUrl, site) { + return __awaiter(this, void 0, void 0, function* () { + if (proxyUrl == null) { + throw new TypeError('proxyUrl can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + proxyUrl: proxyUrl, + site: site, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} proxyUrl + */ + getProxies(proxyUrl) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + proxyUrl: proxyUrl, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "core", "ec1f4311-f2b4-4c15-b2b8-8990b80d2908", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of all teams. + * + * @param {boolean} mine - If true, then return all teams requesting user is member. Otherwise return all teams user has read access. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getAllTeams(mine, top, skip, expandIdentity) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$mine': mine, + '$top': top, + '$skip': skip, + '$expandIdentity': expandIdentity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "7a4d9ee9-3433-4347-b47a-7a80f1cf307e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a team in a team project. + * + * @param {CoreInterfaces.WebApiTeam} team - The team data used to create the team. + * @param {string} projectId - The name or ID (GUID) of the team project in which to create the team. + */ + createTeam(team, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, team, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a team. + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the team to delete. + * @param {string} teamId - The name or ID of the team to delete. + */ + deleteTeam(projectId, teamId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific team. + * + * @param {string} projectId - The name or ID (GUID) of the team project containing the team. + * @param {string} teamId - The name or ID (GUID) of the team. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getTeam(projectId, teamId, expandIdentity) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + let queryValues = { + '$expandIdentity': expandIdentity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of teams. + * + * @param {string} projectId + * @param {boolean} mine - If true return all the teams requesting user is member, otherwise return all the teams user has read access. + * @param {number} top - Maximum number of teams to return. + * @param {number} skip - Number of teams to skip. + * @param {boolean} expandIdentity - A value indicating whether or not to expand Identity information in the result WebApiTeam object. + */ + getTeams(projectId, mine, top, skip, expandIdentity) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId + }; + let queryValues = { + '$mine': mine, + '$top': top, + '$skip': skip, + '$expandIdentity': expandIdentity, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a team's name and/or description. + * + * @param {CoreInterfaces.WebApiTeam} teamData + * @param {string} projectId - The name or ID (GUID) of the team project containing the team to update. + * @param {string} teamId - The name of ID of the team to update. + */ + updateTeam(teamData, projectId, teamId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + teamId: teamId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "core", "d30a3dd1-f8ba-442a-b86a-bd0c0c383e59", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, teamData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +CoreApi.RESOURCE_AREA_ID = "79134c72-4a58-4b42-976c-04e7115f32bf"; +exports.CoreApi = CoreApi; diff --git a/node_modules/azure-devops-node-api/DashboardApi.d.ts b/node_modules/azure-devops-node-api/DashboardApi.d.ts new file mode 100644 index 0000000..b2dca94 --- /dev/null +++ b/node_modules/azure-devops-node-api/DashboardApi.d.ts @@ -0,0 +1,121 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import DashboardInterfaces = require("./interfaces/DashboardInterfaces"); +import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); +export interface IDashboardApi extends basem.ClientApiBase { + createDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext): Promise; + deleteDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + getDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + getDashboardsByProject(teamContext: TfsCoreInterfaces.TeamContext): Promise; + replaceDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + replaceDashboards(group: DashboardInterfaces.DashboardGroup, teamContext: TfsCoreInterfaces.TeamContext): Promise; + createWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + deleteWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + getWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + replaceWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + updateWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + getWidgetMetadata(contributionId: string, project?: string): Promise; + getWidgetTypes(scope: DashboardInterfaces.WidgetScope, project?: string): Promise; +} +export declare class DashboardApi extends basem.ClientApiBase implements IDashboardApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba"; + /** + * Create the supplied dashboard. + * + * @param {DashboardInterfaces.Dashboard} dashboard - The initial state of the dashboard + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard to delete. + */ + deleteDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + /** + * Get a dashboard by its ID. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId + */ + getDashboard(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + /** + * Get a list of dashboards under a project. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getDashboardsByProject(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied. + * + * @param {DashboardInterfaces.Dashboard} dashboard - The Configuration of the dashboard to replace. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard to replace. + */ + replaceDashboard(dashboard: DashboardInterfaces.Dashboard, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + /** + * Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. + * + * @param {DashboardInterfaces.DashboardGroup} group + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + replaceDashboards(group: DashboardInterfaces.DashboardGroup, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Create a widget on the specified dashboard. + * + * @param {DashboardInterfaces.Widget} widget - State of the widget to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of dashboard the widget will be added to. + */ + createWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string): Promise; + /** + * Delete the specified widget. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + deleteWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + /** + * Get the current state of the specified widget. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to read. + */ + getWidget(teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + /** + * Override the state of the specified widget. + * + * @param {DashboardInterfaces.Widget} widget - State to be written for the widget. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + replaceWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + /** + * Perform a partial update of the specified widget. + * + * @param {DashboardInterfaces.Widget} widget - Description of the widget changes to apply. All non-null fields will be replaced. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + updateWidget(widget: DashboardInterfaces.Widget, teamContext: TfsCoreInterfaces.TeamContext, dashboardId: string, widgetId: string): Promise; + /** + * Get the widget metadata satisfying the specified contribution ID. + * + * @param {string} contributionId - The ID of Contribution for the Widget + * @param {string} project - Project ID or project name + */ + getWidgetMetadata(contributionId: string, project?: string): Promise; + /** + * Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false. + * + * @param {DashboardInterfaces.WidgetScope} scope + * @param {string} project - Project ID or project name + */ + getWidgetTypes(scope: DashboardInterfaces.WidgetScope, project?: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/DashboardApi.js b/node_modules/azure-devops-node-api/DashboardApi.js new file mode 100644 index 0000000..bf33926 --- /dev/null +++ b/node_modules/azure-devops-node-api/DashboardApi.js @@ -0,0 +1,482 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const DashboardInterfaces = require("./interfaces/DashboardInterfaces"); +class DashboardApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Dashboard-api', options); + } + /** + * Create the supplied dashboard. + * + * @param {DashboardInterfaces.Dashboard} dashboard - The initial state of the dashboard + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createDashboard(dashboard, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, dashboard, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a dashboard given its ID. This also deletes the widgets associated with this dashboard. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard to delete. + */ + deleteDashboard(teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a dashboard by its ID. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId + */ + getDashboard(teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of dashboards under a project. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getDashboardsByProject(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replace configuration for the specified dashboard. Replaces Widget list on Dashboard, only if property is supplied. + * + * @param {DashboardInterfaces.Dashboard} dashboard - The Configuration of the dashboard to replace. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard to replace. + */ + replaceDashboard(dashboard, teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, dashboard, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the name and position of dashboards in the supplied group, and remove omitted dashboards. Does not modify dashboard content. + * + * @param {DashboardInterfaces.DashboardGroup} group + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + replaceDashboards(group, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Dashboard", "454b3e51-2e6e-48d4-ad81-978154089351", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.DashboardGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a widget on the specified dashboard. + * + * @param {DashboardInterfaces.Widget} widget - State of the widget to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of dashboard the widget will be added to. + */ + createWidget(widget, teamContext, dashboardId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, widget, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete the specified widget. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + deleteWidget(teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Dashboard, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the current state of the specified widget. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to read. + */ + getWidget(teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Override the state of the specified widget. + * + * @param {DashboardInterfaces.Widget} widget - State to be written for the widget. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + replaceWidget(widget, teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, widget, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Perform a partial update of the specified widget. + * + * @param {DashboardInterfaces.Widget} widget - Description of the widget changes to apply. All non-null fields will be replaced. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} dashboardId - ID of the dashboard containing the widget. + * @param {string} widgetId - ID of the widget to update. + */ + updateWidget(widget, teamContext, dashboardId, widgetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + dashboardId: dashboardId, + widgetId: widgetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Dashboard", "bdcff53a-8355-4172-a00a-40497ea23afc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, widget, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.Widget, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the widget metadata satisfying the specified contribution ID. + * + * @param {string} contributionId - The ID of Contribution for the Widget + * @param {string} project - Project ID or project name + */ + getWidgetMetadata(contributionId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + contributionId: contributionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetMetadataResponse, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all available widget metadata in alphabetical order, including widgets marked with isVisibleFromCatalog == false. + * + * @param {DashboardInterfaces.WidgetScope} scope + * @param {string} project - Project ID or project name + */ + getWidgetTypes(scope, project) { + return __awaiter(this, void 0, void 0, function* () { + if (scope == null) { + throw new TypeError('scope can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$scope': scope, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Dashboard", "6b3628d3-e96f-4fc7-b176-50240b03b515", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, DashboardInterfaces.TypeInfo.WidgetTypesResponse, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +DashboardApi.RESOURCE_AREA_ID = "31c84e0a-3ece-48fd-a29d-100849af99ba"; +exports.DashboardApi = DashboardApi; diff --git a/node_modules/azure-devops-node-api/ExtensionManagementApi.d.ts b/node_modules/azure-devops-node-api/ExtensionManagementApi.d.ts new file mode 100644 index 0000000..d7cf023 --- /dev/null +++ b/node_modules/azure-devops-node-api/ExtensionManagementApi.d.ts @@ -0,0 +1,210 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import ExtensionManagementInterfaces = require("./interfaces/ExtensionManagementInterfaces"); +import GalleryInterfaces = require("./interfaces/GalleryInterfaces"); +export interface IExtensionManagementApi extends basem.ClientApiBase { + getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise; + requestAcquisition(acquisitionRequest: ExtensionManagementInterfaces.ExtensionAcquisitionRequest): Promise; + getAuditLog(publisherName: string, extensionName: string): Promise; + registerAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise; + createDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + deleteDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; + getDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; + getDocumentsByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise; + getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean, forceRefresh?: boolean): Promise; + queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise; + getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise; + updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise; + getInstalledExtensionByName(publisherName: string, extensionName: string, assetTypes?: string[]): Promise; + installExtensionByName(publisherName: string, extensionName: string, version?: string): Promise; + uninstallExtensionByName(publisherName: string, extensionName: string, reason?: string, reasonCode?: string): Promise; + getPolicies(userId: string): Promise; + resolveRequest(rejectMessage: string, publisherName: string, extensionName: string, requesterId: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; + getRequests(): Promise; + resolveAllRequests(rejectMessage: string, publisherName: string, extensionName: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; + deleteRequest(publisherName: string, extensionName: string): Promise; + requestExtension(publisherName: string, extensionName: string, requestMessage: string): Promise; + getToken(): Promise; +} +export declare class ExtensionManagementApi extends basem.ClientApiBase implements IExtensionManagementApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594"; + /** + * @param {string} itemId + * @param {boolean} testCommerce + * @param {boolean} isFreeOrTrialInstall + * @param {boolean} isAccountOwner + * @param {boolean} isLinked + * @param {boolean} isConnectedServer + * @param {boolean} isBuyOperationValid + */ + getAcquisitionOptions(itemId: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean, isAccountOwner?: boolean, isLinked?: boolean, isConnectedServer?: boolean, isBuyOperationValid?: boolean): Promise; + /** + * @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest: ExtensionManagementInterfaces.ExtensionAcquisitionRequest): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + */ + getAuditLog(publisherName: string, extensionName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} registrationId + */ + registerAuthorization(publisherName: string, extensionName: string, registrationId: string): Promise; + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + createDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + * @param {string} documentId + */ + deleteDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + * @param {string} documentId + */ + getDocumentByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string, documentId: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + getDocumentsByName(publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + setDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + updateDocumentByName(doc: any, publisherName: string, extensionName: string, scopeType: string, scopeValue: string, collectionName: string): Promise; + /** + * Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension. + * + * @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + */ + queryCollectionsByName(collectionQuery: ExtensionManagementInterfaces.ExtensionDataCollectionQuery, publisherName: string, extensionName: string): Promise; + /** + * List state and version information for all installed extensions. + * + * @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results. + * @param {boolean} includeErrors - If true, include installed extensions in an error state in the results. + * @param {boolean} includeInstallationIssues + * @param {boolean} forceRefresh + */ + getStates(includeDisabled?: boolean, includeErrors?: boolean, includeInstallationIssues?: boolean, forceRefresh?: boolean): Promise; + /** + * @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query + */ + queryExtensions(query: ExtensionManagementInterfaces.InstalledExtensionQuery): Promise; + /** + * List the installed extensions in the account / project collection. + * + * @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results. + * @param {boolean} includeErrors - If true, include installed extensions with errors. + * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. + * @param {boolean} includeInstallationIssues + */ + getInstalledExtensions(includeDisabledExtensions?: boolean, includeErrors?: boolean, assetTypes?: string[], includeInstallationIssues?: boolean): Promise; + /** + * Update an installed extension. Typically this API is used to enable or disable an extension. + * + * @param {ExtensionManagementInterfaces.InstalledExtension} extension + */ + updateInstalledExtension(extension: ExtensionManagementInterfaces.InstalledExtension): Promise; + /** + * Get an installed extension by its publisher and extension name. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. + */ + getInstalledExtensionByName(publisherName: string, extensionName: string, assetTypes?: string[]): Promise; + /** + * Install the specified extension into the account / project collection. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string} version + */ + installExtensionByName(publisherName: string, extensionName: string, version?: string): Promise; + /** + * Uninstall the specified extension from the account / project collection. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string} reason + * @param {string} reasonCode + */ + uninstallExtensionByName(publisherName: string, extensionName: string, reason?: string, reasonCode?: string): Promise; + /** + * @param {string} userId + */ + getPolicies(userId: string): Promise; + /** + * @param {string} rejectMessage + * @param {string} publisherName + * @param {string} extensionName + * @param {string} requesterId + * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + */ + resolveRequest(rejectMessage: string, publisherName: string, extensionName: string, requesterId: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; + /** + */ + getRequests(): Promise; + /** + * @param {string} rejectMessage + * @param {string} publisherName + * @param {string} extensionName + * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + */ + resolveAllRequests(rejectMessage: string, publisherName: string, extensionName: string, state: ExtensionManagementInterfaces.ExtensionRequestState): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + */ + deleteRequest(publisherName: string, extensionName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} requestMessage + */ + requestExtension(publisherName: string, extensionName: string, requestMessage: string): Promise; + /** + */ + getToken(): Promise; +} diff --git a/node_modules/azure-devops-node-api/ExtensionManagementApi.js b/node_modules/azure-devops-node-api/ExtensionManagementApi.js new file mode 100644 index 0000000..4165345 --- /dev/null +++ b/node_modules/azure-devops-node-api/ExtensionManagementApi.js @@ -0,0 +1,770 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const ExtensionManagementInterfaces = require("./interfaces/ExtensionManagementInterfaces"); +const GalleryInterfaces = require("./interfaces/GalleryInterfaces"); +class ExtensionManagementApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-ExtensionManagement-api', options); + } + /** + * @param {string} itemId + * @param {boolean} testCommerce + * @param {boolean} isFreeOrTrialInstall + * @param {boolean} isAccountOwner + * @param {boolean} isLinked + * @param {boolean} isConnectedServer + * @param {boolean} isBuyOperationValid + */ + getAcquisitionOptions(itemId, testCommerce, isFreeOrTrialInstall, isAccountOwner, isLinked, isConnectedServer, isBuyOperationValid) { + return __awaiter(this, void 0, void 0, function* () { + if (itemId == null) { + throw new TypeError('itemId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + itemId: itemId, + testCommerce: testCommerce, + isFreeOrTrialInstall: isFreeOrTrialInstall, + isAccountOwner: isAccountOwner, + isLinked: isLinked, + isConnectedServer: isConnectedServer, + isBuyOperationValid: isBuyOperationValid, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "288dff58-d13b-468e-9671-0fb754e9398c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.AcquisitionOptions, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ExtensionManagementInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "da616457-eed3-4672-92d7-18d21f5c1658", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, acquisitionRequest, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAcquisitionRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + getAuditLog(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "23a312e0-562d-42fb-a505-5a046b5635db", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionAuditLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} registrationId + */ + registerAuthorization(publisherName, extensionName, registrationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + registrationId: registrationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f21cfc80-d2d2-4248-98bb-7820c74c4606", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + createDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, doc, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + * @param {string} documentId + */ + deleteDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName, + documentId: documentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + * @param {string} documentId + */ + getDocumentByName(publisherName, extensionName, scopeType, scopeValue, collectionName, documentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName, + documentId: documentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + getDocumentsByName(publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + setDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, doc, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} doc + * @param {string} publisherName + * @param {string} extensionName + * @param {string} scopeType + * @param {string} scopeValue + * @param {string} collectionName + */ + updateDocumentByName(doc, publisherName, extensionName, scopeType, scopeValue, collectionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + scopeType: scopeType, + scopeValue: scopeValue, + collectionName: collectionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "bbe06c18-1c8b-4fcd-b9c6-1535aaab8749", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, doc, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query for one or more data collections for the specified extension. Note: the token used for authorization must have been issued on behalf of the specified extension. + * + * @param {ExtensionManagementInterfaces.ExtensionDataCollectionQuery} collectionQuery + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + */ + queryCollectionsByName(collectionQuery, publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "56c331f1-ce53-4318-adfd-4db5c52a7a2e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, collectionQuery, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List state and version information for all installed extensions. + * + * @param {boolean} includeDisabled - If true (the default), include disabled extensions in the results. + * @param {boolean} includeErrors - If true, include installed extensions in an error state in the results. + * @param {boolean} includeInstallationIssues + * @param {boolean} forceRefresh + */ + getStates(includeDisabled, includeErrors, includeInstallationIssues, forceRefresh) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeDisabled: includeDisabled, + includeErrors: includeErrors, + includeInstallationIssues: includeInstallationIssues, + forceRefresh: forceRefresh, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "92755d3d-9a8a-42b3-8a4d-87359fe5aa93", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.ExtensionState, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ExtensionManagementInterfaces.InstalledExtensionQuery} query + */ + queryExtensions(query) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "046c980f-1345-4ce2-bf85-b46d10ff4cfd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List the installed extensions in the account / project collection. + * + * @param {boolean} includeDisabledExtensions - If true (the default), include disabled extensions in the results. + * @param {boolean} includeErrors - If true, include installed extensions with errors. + * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. + * @param {boolean} includeInstallationIssues + */ + getInstalledExtensions(includeDisabledExtensions, includeErrors, assetTypes, includeInstallationIssues) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeDisabledExtensions: includeDisabledExtensions, + includeErrors: includeErrors, + assetTypes: assetTypes && assetTypes.join(":"), + includeInstallationIssues: includeInstallationIssues, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update an installed extension. Typically this API is used to enable or disable an extension. + * + * @param {ExtensionManagementInterfaces.InstalledExtension} extension + */ + updateInstalledExtension(extension) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "275424d0-c844-4fe2-bda6-04933a1357d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, extension, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an installed extension by its publisher and extension name. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string[]} assetTypes - Determines which files are returned in the files array. Provide the wildcard '*' to return all files, or a colon separated list to retrieve files with specific asset types. + */ + getInstalledExtensionByName(publisherName, extensionName, assetTypes) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + assetTypes: assetTypes && assetTypes.join(":"), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Install the specified extension into the account / project collection. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string} version + */ + installExtensionByName(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.InstalledExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Uninstall the specified extension from the account / project collection. + * + * @param {string} publisherName - Name of the publisher. Example: "fabrikam". + * @param {string} extensionName - Name of the extension. Example: "ops-tools". + * @param {string} reason + * @param {string} reasonCode + */ + uninstallExtensionByName(publisherName, extensionName, reason, reasonCode) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + reason: reason, + reasonCode: reasonCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "fb0da285-f23e-4b56-8b53-3ef5f9f6de66", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} userId + */ + getPolicies(userId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userId: userId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "e5cc8c09-407b-4867-8319-2ae3338cbf6f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.UserExtensionPolicy, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} rejectMessage + * @param {string} publisherName + * @param {string} extensionName + * @param {string} requesterId + * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + */ + resolveRequest(rejectMessage, publisherName, extensionName, requesterId, state) { + return __awaiter(this, void 0, void 0, function* () { + if (state == null) { + throw new TypeError('state can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + requesterId: requesterId + }; + let queryValues = { + state: state, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "aa93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, rejectMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getRequests() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "216b978f-b164-424e-ada2-b77561e842b7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} rejectMessage + * @param {string} publisherName + * @param {string} extensionName + * @param {ExtensionManagementInterfaces.ExtensionRequestState} state + */ + resolveAllRequests(rejectMessage, publisherName, extensionName, state) { + return __awaiter(this, void 0, void 0, function* () { + if (state == null) { + throw new TypeError('state can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + state: state, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "ba93e1f3-511c-4364-8b9c-eb98818f2e0b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, rejectMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + deleteRequest(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} requestMessage + */ + requestExtension(publisherName, extensionName, requestMessage) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "f5afca1e-a728-4294-aa2d-4af0173431b5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, requestMessage, options); + let ret = this.formatResponse(res.result, ExtensionManagementInterfaces.TypeInfo.RequestedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getToken() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "ExtensionManagement", "3a2e24ed-1d6f-4cb2-9f3b-45a96bbfaf50", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +ExtensionManagementApi.RESOURCE_AREA_ID = "6c2b0933-3600-42ae-bf8b-93d4f7e83594"; +exports.ExtensionManagementApi = ExtensionManagementApi; diff --git a/node_modules/azure-devops-node-api/FeatureManagementApi.d.ts b/node_modules/azure-devops-node-api/FeatureManagementApi.d.ts new file mode 100644 index 0000000..4a077d8 --- /dev/null +++ b/node_modules/azure-devops-node-api/FeatureManagementApi.d.ts @@ -0,0 +1,89 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import FeatureManagementInterfaces = require("./interfaces/FeatureManagementInterfaces"); +export interface IFeatureManagementApi extends basem.ClientApiBase { + getFeature(featureId: string): Promise; + getFeatures(targetContributionId?: string): Promise; + getFeatureState(featureId: string, userScope: string): Promise; + setFeatureState(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, reason?: string, reasonCode?: string): Promise; + getFeatureStateForScope(featureId: string, userScope: string, scopeName: string, scopeValue: string): Promise; + setFeatureStateForScope(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, scopeName: string, scopeValue: string, reason?: string, reasonCode?: string): Promise; + queryFeatureStates(query: FeatureManagementInterfaces.ContributedFeatureStateQuery): Promise; + queryFeatureStatesForDefaultScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string): Promise; + queryFeatureStatesForNamedScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string, scopeName: string, scopeValue: string): Promise; +} +export declare class FeatureManagementApi extends basem.ClientApiBase implements IFeatureManagementApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * Get a specific feature by its id + * + * @param {string} featureId - The contribution id of the feature + */ + getFeature(featureId: string): Promise; + /** + * Get a list of all defined features + * + * @param {string} targetContributionId - Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution. + */ + getFeatures(targetContributionId?: string): Promise; + /** + * Get the state of the specified feature for the given user/all-users scope + * + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + */ + getFeatureState(featureId: string, userScope: string): Promise; + /** + * Set the state of a feature + * + * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + * @param {string} reason - Reason for changing the state + * @param {string} reasonCode - Short reason code + */ + setFeatureState(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, reason?: string, reasonCode?: string): Promise; + /** + * Get the state of the specified feature for the given named scope + * + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") + * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + */ + getFeatureStateForScope(featureId: string, userScope: string, scopeName: string, scopeValue: string): Promise; + /** + * Set the state of a feature at a specific scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") + * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + * @param {string} reason - Reason for changing the state + * @param {string} reasonCode - Short reason code + */ + setFeatureStateForScope(feature: FeatureManagementInterfaces.ContributedFeatureState, featureId: string, userScope: string, scopeName: string, scopeValue: string, reason?: string, reasonCode?: string): Promise; + /** + * Get the effective state for a list of feature ids + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Features to query along with current scope values + */ + queryFeatureStates(query: FeatureManagementInterfaces.ContributedFeatureStateQuery): Promise; + /** + * Get the states of the specified features for the default scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. + * @param {string} userScope + */ + queryFeatureStatesForDefaultScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string): Promise; + /** + * Get the states of the specified features for the specific named scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. + * @param {string} userScope + * @param {string} scopeName + * @param {string} scopeValue + */ + queryFeatureStatesForNamedScope(query: FeatureManagementInterfaces.ContributedFeatureStateQuery, userScope: string, scopeName: string, scopeValue: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/FeatureManagementApi.js b/node_modules/azure-devops-node-api/FeatureManagementApi.js new file mode 100644 index 0000000..c0f1648 --- /dev/null +++ b/node_modules/azure-devops-node-api/FeatureManagementApi.js @@ -0,0 +1,296 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const FeatureManagementInterfaces = require("./interfaces/FeatureManagementInterfaces"); +class FeatureManagementApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-FeatureManagement-api', options); + } + /** + * Get a specific feature by its id + * + * @param {string} featureId - The contribution id of the feature + */ + getFeature(featureId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of all defined features + * + * @param {string} targetContributionId - Optional target contribution. If null/empty, return all features. If specified include the features that target the specified contribution. + */ + getFeatures(targetContributionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + targetContributionId: targetContributionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "c4209f25-7a27-41dd-9f04-06080c7b6afd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the state of the specified feature for the given user/all-users scope + * + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + */ + getFeatureState(featureId, userScope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set the state of a feature + * + * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + * @param {string} reason - Reason for changing the state + * @param {string} reasonCode - Short reason code + */ + setFeatureState(feature, featureId, userScope, reason, reasonCode) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope + }; + let queryValues = { + reason: reason, + reasonCode: reasonCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "98911314-3f9b-4eaf-80e8-83900d8e85d9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, feature, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the state of the specified feature for the given named scope + * + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") + * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + */ + getFeatureStateForScope(featureId, userScope, scopeName, scopeValue) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope, + scopeName: scopeName, + scopeValue: scopeValue + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set the state of a feature at a specific scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureState} feature - Posted feature state object. Should specify the effective value. + * @param {string} featureId - Contribution id of the feature + * @param {string} userScope - User-Scope at which to set the value. Should be "me" for the current user or "host" for all users. + * @param {string} scopeName - Scope at which to get the feature setting for (e.g. "project" or "team") + * @param {string} scopeValue - Value of the scope (e.g. the project or team id) + * @param {string} reason - Reason for changing the state + * @param {string} reasonCode - Short reason code + */ + setFeatureStateForScope(feature, featureId, userScope, scopeName, scopeValue, reason, reasonCode) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + featureId: featureId, + userScope: userScope, + scopeName: scopeName, + scopeValue: scopeValue + }; + let queryValues = { + reason: reason, + reasonCode: reasonCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "dd291e43-aa9f-4cee-8465-a93c78e414a4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, feature, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureState, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the effective state for a list of feature ids + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Features to query along with current scope values + */ + queryFeatureStates(query) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "2b4486ad-122b-400c-ae65-17b6672c1f9d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the states of the specified features for the default scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. + * @param {string} userScope + */ + queryFeatureStatesForDefaultScope(query, userScope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "3f810f28-03e2-4239-b0bc-788add3005e5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the states of the specified features for the specific named scope + * + * @param {FeatureManagementInterfaces.ContributedFeatureStateQuery} query - Query describing the features to query. + * @param {string} userScope + * @param {string} scopeName + * @param {string} scopeValue + */ + queryFeatureStatesForNamedScope(query, userScope, scopeName, scopeValue) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope, + scopeName: scopeName, + scopeValue: scopeValue + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "FeatureManagement", "f29e997b-c2da-4d15-8380-765788a1a74c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, FeatureManagementInterfaces.TypeInfo.ContributedFeatureStateQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.FeatureManagementApi = FeatureManagementApi; diff --git a/node_modules/azure-devops-node-api/FileContainerApi.d.ts b/node_modules/azure-devops-node-api/FileContainerApi.d.ts new file mode 100644 index 0000000..f948435 --- /dev/null +++ b/node_modules/azure-devops-node-api/FileContainerApi.d.ts @@ -0,0 +1,21 @@ +/// +import * as restm from 'typed-rest-client/RestClient'; +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import FileContainerApiBase = require("./FileContainerApiBase"); +import FileContainerInterfaces = require("./interfaces/FileContainerInterfaces"); +export interface IFileContainerApi extends FileContainerApiBase.IFileContainerApiBase { + createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; + getItem(containerId: number, scope?: string, itemPath?: string, downloadFileName?: string): Promise>; +} +export declare class FileContainerApi extends FileContainerApiBase.FileContainerApiBase implements IFileContainerApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {string} downloadFileName + */ + getItem(containerId: number, scope?: string, itemPath?: string, downloadFileName?: string): Promise>; + createItem(contentStream: NodeJS.ReadableStream, uncompressedLength: number, containerId: number, itemPath: string, scope: string, options: any): Promise; + _createItem(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, containerId: number, itemPath: string, scope: string, onResult: (err: any, statusCode: number, Container: FileContainerInterfaces.FileContainerItem) => void): void; +} diff --git a/node_modules/azure-devops-node-api/FileContainerApi.js b/node_modules/azure-devops-node-api/FileContainerApi.js new file mode 100644 index 0000000..908aa17 --- /dev/null +++ b/node_modules/azure-devops-node-api/FileContainerApi.js @@ -0,0 +1,235 @@ +"use strict"; +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +const stream = require("stream"); +const zlib = require("zlib"); +const httpm = require("typed-rest-client/HttpClient"); +const FileContainerApiBase = require("./FileContainerApiBase"); +const FileContainerInterfaces = require("./interfaces/FileContainerInterfaces"); +class FileContainerApi extends FileContainerApiBase.FileContainerApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, options); + } + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {string} downloadFileName + */ + getItem(containerId, scope, itemPath, downloadFileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + scope: scope, + itemPath: itemPath, + '$format': "OctetStream", + downloadFileName: downloadFileName + }; + try { + let verData = yield this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/octet-stream', verData.apiVersion); + let res = yield this.http.get(url); + let rres = {}; + let statusCode = res.message.statusCode; + rres.statusCode = statusCode; + // not found leads to null obj returned + if (statusCode == httpm.HttpCodes.NotFound) { + resolve(rres); + } + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + let contents = yield res.readBody(); + let obj; + if (contents && contents.length > 0) { + obj = JSON.parse(contents); + if (options && options.responseProcessor) { + rres.result = options.responseProcessor(obj); + } + else { + rres.result = obj; + } + } + if (obj && obj.message) { + msg = obj.message; + } + else { + msg = "Failed request: (" + statusCode + ") " + res.message.url; + } + reject(new Error(msg)); + } + else { + // if the response is gzipped, unzip it + if (res.message.headers["content-encoding"] === "gzip") { + let unzipStream = zlib.createGunzip(); + res.message.pipe(unzipStream); + rres.result = unzipStream; + } + else { + rres.result = res.message; + } + resolve(rres); + } + } + catch (err) { + reject(err); + } + })); + }); + } + createItem(contentStream, uncompressedLength, containerId, itemPath, scope, options) { + return new Promise((resolve, reject) => { + let chunkStream = new ChunkStream(this, uncompressedLength, containerId, itemPath, scope, options); + chunkStream.on('finish', () => { + resolve(chunkStream.getItem()); + }); + contentStream.pipe(chunkStream); + }); + } + // used by ChunkStream + _createItem(customHeaders, contentStream, containerId, itemPath, scope, onResult) { + var routeValues = { + containerId: containerId + }; + var queryValues = { + itemPath: itemPath, + scope: scope, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = ""; + this.vsoClient.getVersioningData("4.0-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues) + .then((versioningData) => { + var url = versioningData.requestUrl; + var serializationData = { responseTypeMetadata: FileContainerInterfaces.TypeInfo.FileContainerItem, responseIsCollection: false }; + let options = this.createRequestOptions('application/octet-stream', versioningData.apiVersion); + options.additionalHeaders = customHeaders; + this.rest.uploadStream('PUT', url, contentStream, options) + .then((res) => { + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, false); + onResult(null, res.statusCode, ret); + }) + .catch((err) => { + onResult(err, err.statusCode, null); + }); + }, (error) => { + onResult(error, error.statusCode, null); + }); + } +} +exports.FileContainerApi = FileContainerApi; +class ChunkStream extends stream.Writable { + constructor(api, uncompressedLength, containerId, itemPath, scope, options) { + super(); + this._buffer = new Buffer(ChunkStream.ChunkSize); + this._length = 0; + this._startRange = 0; + this._bytesToSend = 0; + this._totalReceived = 0; + this._api = api; + this._options = options || {}; + this._uncompressedLength = uncompressedLength; + this._containerId = containerId; + this._itemPath = itemPath; + this._scope = scope; + this._bytesToSend = this._options.isGzipped ? this._options.compressedLength : uncompressedLength; + } + _write(data, encoding, callback) { + let chunk = data; + if (!chunk) { + if (this._length == 0) { + callback(); + } + else { + // last chunk + this._sendChunk(callback); + } + return; + } + let newBuffer = null; + if (this._length + chunk.length > ChunkStream.ChunkSize) { + // overflow + let overflowPosition = chunk.length - (ChunkStream.ChunkSize - this._length); + chunk.copy(this._buffer, this._length, 0, overflowPosition); + this._length += overflowPosition; + newBuffer = chunk.slice(overflowPosition); + } + else { + chunk.copy(this._buffer, this._length, 0, chunk.length); + this._length += chunk.length; + } + this._totalReceived += chunk.length; + if (this._length >= ChunkStream.ChunkSize || this._totalReceived >= this._bytesToSend) { + this._sendChunk(callback, newBuffer); + } + else { + callback(); + } + } + _sendChunk(callback, newBuffer) { + let endRange = this._startRange + this._length; + let headers = { + "Content-Range": "bytes " + this._startRange + "-" + (endRange - 1) + "/" + this._bytesToSend, + "Content-Length": this._length + }; + if (this._options.isGzipped) { + headers["Accept-Encoding"] = "gzip"; + headers["Content-Encoding"] = "gzip"; + headers["x-tfs-filelength"] = this._uncompressedLength; + } + this._startRange = endRange; + this._api._createItem(headers, new BufferStream(this._buffer, this._length), this._containerId, this._itemPath, this._scope, (err, statusCode, item) => { + if (newBuffer) { + this._length = newBuffer.length; + newBuffer.copy(this._buffer); + } + else { + this._length = 0; + } + this._item = item; + callback(err); + }); + } + getItem() { + return this._item; + } +} +ChunkStream.ChunkSize = (16 * 1024 * 1024); +class BufferStream extends stream.Readable { + constructor(buffer, length) { + super(); + this._position = 0; + this._length = 0; + this._buffer = buffer; + this._length = length; + } + _read(size) { + if (this._position >= this._length) { + this.push(null); + return; + } + let end = Math.min(this._position + size, this._length); + this.push(this._buffer.slice(this._position, end)); + this._position = end; + } +} diff --git a/node_modules/azure-devops-node-api/FileContainerApiBase.d.ts b/node_modules/azure-devops-node-api/FileContainerApiBase.d.ts new file mode 100644 index 0000000..b5be177 --- /dev/null +++ b/node_modules/azure-devops-node-api/FileContainerApiBase.d.ts @@ -0,0 +1,50 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import FileContainerInterfaces = require("./interfaces/FileContainerInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface IFileContainerApiBase extends basem.ClientApiBase { + createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; + deleteItem(containerId: number, itemPath: string, scope?: string): Promise; + getContainers(scope?: string, artifactUris?: string): Promise; + getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean): Promise; +} +export declare class FileContainerApiBase extends basem.ClientApiBase implements IFileContainerApiBase { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * Creates the specified items in in the referenced container. + * + * @param {VSSInterfaces.VssJsonCollectionWrapperV} items + * @param {number} containerId + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + createItems(items: VSSInterfaces.VssJsonCollectionWrapperV, containerId: number, scope?: string): Promise; + /** + * Deletes the specified items in a container. + * + * @param {number} containerId - Container Id. + * @param {string} itemPath - Path to delete. + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + deleteItem(containerId: number, itemPath: string, scope?: string): Promise; + /** + * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + * + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} artifactUris + */ + getContainers(scope?: string, artifactUris?: string): Promise; + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {boolean} metadata + * @param {string} format + * @param {string} downloadFileName + * @param {boolean} includeDownloadTickets + * @param {boolean} isShallow + * @param {boolean} ignoreRequestedMediaType + * @param {boolean} includeBlobMetadata + * @param {boolean} saveAbsolutePath + */ + getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean): Promise; +} diff --git a/node_modules/azure-devops-node-api/FileContainerApiBase.js b/node_modules/azure-devops-node-api/FileContainerApiBase.js new file mode 100644 index 0000000..c173061 --- /dev/null +++ b/node_modules/azure-devops-node-api/FileContainerApiBase.js @@ -0,0 +1,168 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const FileContainerInterfaces = require("./interfaces/FileContainerInterfaces"); +class FileContainerApiBase extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-FileContainer-api', options); + } + /** + * Creates the specified items in in the referenced container. + * + * @param {VSSInterfaces.VssJsonCollectionWrapperV} items + * @param {number} containerId + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + createItems(items, containerId, scope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + scope: scope, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, items, options); + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the specified items in a container. + * + * @param {number} containerId - Container Id. + * @param {string} itemPath - Path to delete. + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + */ + deleteItem(containerId, itemPath, scope) { + return __awaiter(this, void 0, void 0, function* () { + if (itemPath == null) { + throw new TypeError('itemPath can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + itemPath: itemPath, + scope: scope, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets containers filtered by a comma separated list of artifact uris within the same scope, if not specified returns all containers + * + * @param {string} scope - A guid representing the scope of the container. This is often the project id. + * @param {string} artifactUris + */ + getContainers(scope, artifactUris) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + scope: scope, + artifactUris: artifactUris, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainer, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} containerId + * @param {string} scope + * @param {string} itemPath + * @param {boolean} metadata + * @param {string} format + * @param {string} downloadFileName + * @param {boolean} includeDownloadTickets + * @param {boolean} isShallow + * @param {boolean} ignoreRequestedMediaType + * @param {boolean} includeBlobMetadata + * @param {boolean} saveAbsolutePath + */ + getItems(containerId, scope, itemPath, metadata, format, downloadFileName, includeDownloadTickets, isShallow, ignoreRequestedMediaType, includeBlobMetadata, saveAbsolutePath) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + containerId: containerId + }; + let queryValues = { + scope: scope, + itemPath: itemPath, + metadata: metadata, + '$format': format, + downloadFileName: downloadFileName, + includeDownloadTickets: includeDownloadTickets, + isShallow: isShallow, + ignoreRequestedMediaType: ignoreRequestedMediaType, + includeBlobMetadata: includeBlobMetadata, + saveAbsolutePath: saveAbsolutePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Container", "e4f5c81e-e250-447b-9fef-bd48471bea5e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, FileContainerInterfaces.TypeInfo.FileContainerItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.FileContainerApiBase = FileContainerApiBase; diff --git a/node_modules/azure-devops-node-api/GalleryApi.d.ts b/node_modules/azure-devops-node-api/GalleryApi.d.ts new file mode 100644 index 0000000..96a58bd --- /dev/null +++ b/node_modules/azure-devops-node-api/GalleryApi.d.ts @@ -0,0 +1,677 @@ +/// +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import compatBase = require("././GalleryCompatHttpClientBase"); +import GalleryInterfaces = require("./interfaces/GalleryInterfaces"); +export interface IGalleryApi extends compatBase.GalleryCompatHttpClientBase { + shareExtensionById(extensionId: string, accountName: string): Promise; + unshareExtensionById(extensionId: string, accountName: string): Promise; + shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise; + requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; + getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise; + associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise; + queryAssociatedAzurePublisher(publisherName: string): Promise; + getCategories(languages?: string): Promise; + getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise; + getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string, productArchitecture?: string): Promise; + getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise; + getCertificate(publisherName: string, extensionName: string, version?: string): Promise; + getContentVerificationLog(publisherName: string, extensionName: string): Promise; + createSupportRequest(customerSupportRequest: GalleryInterfaces.CustomerSupportRequest): Promise; + createDraftForEditExtension(publisherName: string, extensionName: string): Promise; + performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise; + updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise; + addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise; + createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise; + performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise; + updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise; + addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise; + getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise; + getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise; + getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise; + publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise; + queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise; + createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, extensionType?: string, reCaptchaToken?: string): Promise; + deleteExtensionById(extensionId: string, version?: string): Promise; + getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; + updateExtensionById(extensionId: string, reCaptchaToken?: string): Promise; + createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionType?: string, reCaptchaToken?: string): Promise; + deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; + getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise; + updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise; + updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise; + shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; + unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; + extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise; + sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise; + getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + deletePublisherAsset(publisherName: string, assetType?: string): Promise; + getPublisherAsset(publisherName: string, assetType?: string): Promise; + updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{ + [key: string]: string; + }>; + fetchDomainToken(publisherName: string): Promise; + verifyDomainToken(publisherName: string): Promise; + queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; + createPublisher(publisher: GalleryInterfaces.Publisher): Promise; + deletePublisher(publisherName: string): Promise; + getPublisher(publisherName: string, flags?: number): Promise; + updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; + updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise; + getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise; + reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise; + createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise; + deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise; + updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise; + createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise; + deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; + updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; + getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise; + getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise; + getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise; + createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise; + deleteReview(pubName: string, extName: string, reviewId: number): Promise; + updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise; + createCategory(category: GalleryInterfaces.ExtensionCategory): Promise; + getGalleryUserSettings(userScope: string, key?: string): Promise<{ + [key: string]: any; + }>; + setGalleryUserSettings(entries: { + [key: string]: any; + }, userScope: string): Promise; + generateKey(keyType: string, expireCurrentSeconds?: number): Promise; + getSigningKey(keyType: string): Promise; + updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise; + getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise; + getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise; + incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string, targetPlatform?: string): Promise; + getVerificationLog(publisherName: string, extensionName: string, version: string, targetPlatform?: string): Promise; + updateVSCodeWebExtensionStatistics(itemName: string, version: string, statType: GalleryInterfaces.VSCodeWebExtensionStatisicsType): Promise; +} +export declare class GalleryApi extends compatBase.GalleryCompatHttpClientBase implements IGalleryApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819"; + /** + * @param {string} extensionId + * @param {string} accountName + */ + shareExtensionById(extensionId: string, accountName: string): Promise; + /** + * @param {string} extensionId + * @param {string} accountName + */ + unshareExtensionById(extensionId: string, accountName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + shareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + unshareExtension(publisherName: string, extensionName: string, accountName: string): Promise; + /** + * @param {string} itemId + * @param {string} installationTarget + * @param {boolean} testCommerce + * @param {boolean} isFreeOrTrialInstall + */ + getAcquisitionOptions(itemId: string, installationTarget: string, testCommerce?: boolean, isFreeOrTrialInstall?: boolean): Promise; + /** + * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest: GalleryInterfaces.ExtensionAcquisitionRequest): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetByName(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + /** + * @param {string} extensionId + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAsset(customHeaders: any, extensionId: string, version: string, assetType: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetAuthenticated(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, accountToken?: string, accountTokenHeader?: String): Promise; + /** + * @param {string} publisherName + * @param {string} azurePublisherId + */ + associateAzurePublisher(publisherName: string, azurePublisherId: string): Promise; + /** + * @param {string} publisherName + */ + queryAssociatedAzurePublisher(publisherName: string): Promise; + /** + * @param {string} languages + */ + getCategories(languages?: string): Promise; + /** + * @param {string} categoryName + * @param {string} languages + * @param {string} product + */ + getCategoryDetails(categoryName: string, languages?: string, product?: string): Promise; + /** + * @param {string} product + * @param {string} categoryId + * @param {number} lcid + * @param {string} source + * @param {string} productVersion + * @param {string} skus + * @param {string} subSkus + * @param {string} productArchitecture + */ + getCategoryTree(product: string, categoryId: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string, productArchitecture?: string): Promise; + /** + * @param {string} product + * @param {number} lcid + * @param {string} source + * @param {string} productVersion + * @param {string} skus + * @param {string} subSkus + */ + getRootCategories(product: string, lcid?: number, source?: string, productVersion?: string, skus?: string, subSkus?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + getCertificate(publisherName: string, extensionName: string, version?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + */ + getContentVerificationLog(publisherName: string, extensionName: string): Promise; + /** + * @param {GalleryInterfaces.CustomerSupportRequest} customerSupportRequest + */ + createSupportRequest(customerSupportRequest: GalleryInterfaces.CustomerSupportRequest): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + */ + createDraftForEditExtension(publisherName: string, extensionName: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + */ + performEditExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, extensionName: string, draftId: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePayloadInDraftForEditExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, fileName?: String): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + * @param {string} assetType + */ + addAssetForEditExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, draftId: string, assetType: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {String} product - Header to pass the product type of the payload file + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + createDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, product: String, fileName?: String): Promise; + /** + * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch + * @param {string} publisherName + * @param {string} draftId + */ + performNewExtensionDraftOperation(draftPatch: GalleryInterfaces.ExtensionDraftPatch, publisherName: string, draftId: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} draftId + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePayloadInDraftForNewExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, fileName?: String): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + */ + addAssetForNewExtensionDraft(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, draftId: string, assetType: string): Promise; + /** + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + * @param {string} extensionName + */ + getAssetFromEditExtensionDraft(publisherName: string, draftId: string, assetType: string, extensionName: string): Promise; + /** + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + */ + getAssetFromNewExtensionDraft(publisherName: string, draftId: string, assetType: string): Promise; + /** + * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {number} count - Count of events to fetch, applies to each event type. + * @param {Date} afterDate - Fetch events that occurred on or after this date + * @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events + * @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events + */ + getExtensionEvents(publisherName: string, extensionName: string, count?: number, afterDate?: Date, include?: string, includeProperty?: string): Promise; + /** + * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension. + * + * @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents + */ + publishExtensionEvents(extensionEvents: GalleryInterfaces.ExtensionEvents[]): Promise; + /** + * @param {GalleryInterfaces.ExtensionQuery} extensionQuery + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + queryExtensions(customHeaders: any, extensionQuery: GalleryInterfaces.ExtensionQuery, accountToken?: string, accountTokenHeader?: String): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} extensionType + * @param {string} reCaptchaToken + */ + createExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, extensionType?: string, reCaptchaToken?: string): Promise; + /** + * @param {string} extensionId + * @param {string} version + */ + deleteExtensionById(extensionId: string, version?: string): Promise; + /** + * @param {string} extensionId + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + */ + getExtensionById(extensionId: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags): Promise; + /** + * @param {string} extensionId + * @param {string} reCaptchaToken + */ + updateExtensionById(extensionId: string, reCaptchaToken?: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionType + * @param {string} reCaptchaToken + */ + createExtensionWithPublisher(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionType?: string, reCaptchaToken?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + deleteExtension(publisherName: string, extensionName: string, version?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + getExtension(customHeaders: any, publisherName: string, extensionName: string, version?: string, flags?: GalleryInterfaces.ExtensionQueryFlags, accountToken?: string, accountTokenHeader?: String): Promise; + /** + * REST endpoint to update an extension. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} extensionType + * @param {string} reCaptchaToken + * @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not + */ + updateExtension(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, extensionName: string, extensionType?: string, reCaptchaToken?: string, bypassScopeCheck?: boolean): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {GalleryInterfaces.PublishedExtensionFlags} flags + */ + updateExtensionProperties(publisherName: string, extensionName: string, flags: GalleryInterfaces.PublishedExtensionFlags): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} hostType + * @param {string} hostName + */ + shareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} hostType + * @param {string} hostName + */ + unshareExtensionWithHost(publisherName: string, extensionName: string, hostType: string, hostName: string): Promise; + /** + * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel + */ + extensionValidator(azureRestApiRequestModel: GalleryInterfaces.AzureRestApiRequestModel): Promise; + /** + * Send Notification + * + * @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification + */ + sendNotifications(notificationData: GalleryInterfaces.NotificationsData): Promise; + /** + * This endpoint gets hit when you download a VSTS extension from the Web UI + * + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getPackage(customHeaders: any, publisherName: string, extensionName: string, version: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} assetToken + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetWithToken(customHeaders: any, publisherName: string, extensionName: string, version: string, assetType: string, assetToken?: string, accountToken?: string, acceptDefault?: boolean, accountTokenHeader?: String): Promise; + /** + * Delete publisher asset like logo + * + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + */ + deletePublisherAsset(publisherName: string, assetType?: string): Promise; + /** + * Get publisher asset like logo as a stream + * + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + */ + getPublisherAsset(publisherName: string, assetType?: string): Promise; + /** + * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePublisherAsset(customHeaders: any, contentStream: NodeJS.ReadableStream, publisherName: string, assetType?: string, fileName?: String): Promise<{ + [key: string]: string; + }>; + /** + * @param {string} publisherName + */ + fetchDomainToken(publisherName: string): Promise; + /** + * @param {string} publisherName + */ + verifyDomainToken(publisherName: string): Promise; + /** + * @param {GalleryInterfaces.PublisherQuery} publisherQuery + */ + queryPublishers(publisherQuery: GalleryInterfaces.PublisherQuery): Promise; + /** + * @param {GalleryInterfaces.Publisher} publisher + */ + createPublisher(publisher: GalleryInterfaces.Publisher): Promise; + /** + * @param {string} publisherName + */ + deletePublisher(publisherName: string): Promise; + /** + * @param {string} publisherName + * @param {number} flags + */ + getPublisher(publisherName: string, flags?: number): Promise; + /** + * @param {GalleryInterfaces.Publisher} publisher + * @param {string} publisherName + */ + updatePublisher(publisher: GalleryInterfaces.Publisher, publisherName: string): Promise; + /** + * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant. + * + * @param {GalleryInterfaces.PublisherUserRoleAssignmentRef[]} roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported. + * @param {string} publisherName - The name/id of publisher to which users have to be added + * @param {boolean} limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not. + */ + updatePublisherMembers(roleAssignments: GalleryInterfaces.PublisherUserRoleAssignmentRef[], publisherName: string, limitToCallerIdentityDomain?: boolean): Promise; + /** + * Returns a list of questions with their responses associated with an extension. + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} count - Number of questions to retrieve (defaults to 10). + * @param {number} page - Page number from which set of questions are to be retrieved. + * @param {Date} afterDate - If provided, results questions are returned which were posted after this date + */ + getQuestions(publisherName: string, extensionName: string, count?: number, page?: number, afterDate?: Date): Promise; + /** + * Flags a concern with an existing question for an extension. + * + * @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension. + * @param {string} pubName - Name of the publisher who published the extension. + * @param {string} extName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + */ + reportQuestion(concern: GalleryInterfaces.Concern, pubName: string, extName: string, questionId: number): Promise; + /** + * Creates a new question for an extension. + * + * @param {GalleryInterfaces.Question} question - Question to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + */ + createQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string): Promise; + /** + * Deletes an existing question and all its associated responses for an extension. (soft delete) + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be deleted for the extension. + */ + deleteQuestion(publisherName: string, extensionName: string, questionId: number): Promise; + /** + * Updates an existing question for an extension. + * + * @param {GalleryInterfaces.Question} question - Updated question to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + */ + updateQuestion(question: GalleryInterfaces.Question, publisherName: string, extensionName: string, questionId: number): Promise; + /** + * Creates a new response for a given question for an extension. + * + * @param {GalleryInterfaces.Response} response - Response to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be created for the extension. + */ + createResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number): Promise; + /** + * Deletes a response for an extension. (soft delete) + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifies the question whose response is to be deleted. + * @param {number} responseId - Identifies the response to be deleted. + */ + deleteResponse(publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; + /** + * Updates an existing response for a given question for an extension. + * + * @param {GalleryInterfaces.Response} response - Updated response to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be updated for the extension. + * @param {number} responseId - Identifier of the response which has to be updated. + */ + updateResponse(response: GalleryInterfaces.Response, publisherName: string, extensionName: string, questionId: number, responseId: number): Promise; + /** + * Returns extension reports + * + * @param {string} publisherName - Name of the publisher who published the extension + * @param {string} extensionName - Name of the extension + * @param {number} days - Last n days report. If afterDate and days are specified, days will take priority + * @param {number} count - Number of events to be returned + * @param {Date} afterDate - Use if you want to fetch events newer than the specified date + */ + getExtensionReports(publisherName: string, extensionName: string, days?: number, count?: number, afterDate?: Date): Promise; + /** + * Returns a list of reviews associated with an extension + * + * @param {string} publisherName - Name of the publisher who published the extension + * @param {string} extensionName - Name of the extension + * @param {number} count - Number of reviews to retrieve (defaults to 5) + * @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none + * @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null + * @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null + */ + getReviews(publisherName: string, extensionName: string, count?: number, filterOptions?: GalleryInterfaces.ReviewFilterOptions, beforeDate?: Date, afterDate?: Date): Promise; + /** + * Returns a summary of the reviews + * + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null + * @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null + */ + getReviewsSummary(pubName: string, extName: string, beforeDate?: Date, afterDate?: Date): Promise; + /** + * Creates a new review for an extension + * + * @param {GalleryInterfaces.Review} review - Review to be created for the extension + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + */ + createReview(review: GalleryInterfaces.Review, pubName: string, extName: string): Promise; + /** + * Deletes a review + * + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {number} reviewId - Id of the review which needs to be updated + */ + deleteReview(pubName: string, extName: string, reviewId: number): Promise; + /** + * Updates or Flags a review + * + * @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {number} reviewId - Id of the review which needs to be updated + */ + updateReview(reviewPatch: GalleryInterfaces.ReviewPatch, pubName: string, extName: string, reviewId: number): Promise; + /** + * @param {GalleryInterfaces.ExtensionCategory} category + */ + createCategory(category: GalleryInterfaces.ExtensionCategory): Promise; + /** + * Get all setting entries for the given user/all-users scope + * + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} key - Optional key under which to filter all the entries + */ + getGalleryUserSettings(userScope: string, key?: string): Promise<{ + [key: string]: any; + }>; + /** + * Set all setting entries for the given user/all-users scope + * + * @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + */ + setGalleryUserSettings(entries: { + [key: string]: any; + }, userScope: string): Promise; + /** + * @param {string} keyType + * @param {number} expireCurrentSeconds + */ + generateKey(keyType: string, expireCurrentSeconds?: number): Promise; + /** + * @param {string} keyType + */ + getSigningKey(keyType: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtensionStatistics(extensionStatisticsUpdate: GalleryInterfaces.ExtensionStatisticUpdate, publisherName: string, extensionName: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {number} days + * @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate + * @param {Date} afterDate + */ + getExtensionDailyStats(publisherName: string, extensionName: string, days?: number, aggregate?: GalleryInterfaces.ExtensionStatsAggregateType, afterDate?: Date): Promise; + /** + * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats. + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} version - Version of the extension + */ + getExtensionDailyStatsAnonymous(publisherName: string, extensionName: string, version: string): Promise; + /** + * Increments a daily statistic associated with the extension + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} version - Version of the extension + * @param {string} statType - Type of stat to increment + * @param {string} targetPlatform + */ + incrementExtensionDailyStat(publisherName: string, extensionName: string, version: string, statType: string, targetPlatform?: string): Promise; + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} targetPlatform + */ + getVerificationLog(publisherName: string, extensionName: string, version: string, targetPlatform?: string): Promise; + /** + * @param {string} itemName + * @param {string} version + * @param {GalleryInterfaces.VSCodeWebExtensionStatisicsType} statType + */ + updateVSCodeWebExtensionStatistics(itemName: string, version: string, statType: GalleryInterfaces.VSCodeWebExtensionStatisicsType): Promise; +} diff --git a/node_modules/azure-devops-node-api/GalleryApi.js b/node_modules/azure-devops-node-api/GalleryApi.js new file mode 100644 index 0000000..8903a0d --- /dev/null +++ b/node_modules/azure-devops-node-api/GalleryApi.js @@ -0,0 +1,2491 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const compatBase = require("././GalleryCompatHttpClientBase"); +const GalleryInterfaces = require("./interfaces/GalleryInterfaces"); +class GalleryApi extends compatBase.GalleryCompatHttpClientBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Gallery-api', options); + } + /** + * @param {string} extensionId + * @param {string} accountName + */ + shareExtensionById(extensionId, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1f19631b-a0b4-4a03-89c2-d79785d24360", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} accountName + */ + unshareExtensionById(extensionId, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1f19631b-a0b4-4a03-89c2-d79785d24360", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + shareExtension(publisherName, extensionName, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a1e66d8f-f5de-4d16-8309-91a4e015ee46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} accountName + */ + unshareExtension(publisherName, extensionName, accountName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + accountName: accountName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a1e66d8f-f5de-4d16-8309-91a4e015ee46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} itemId + * @param {string} installationTarget + * @param {boolean} testCommerce + * @param {boolean} isFreeOrTrialInstall + */ + getAcquisitionOptions(itemId, installationTarget, testCommerce, isFreeOrTrialInstall) { + return __awaiter(this, void 0, void 0, function* () { + if (installationTarget == null) { + throw new TypeError('installationTarget can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + itemId: itemId + }; + let queryValues = { + installationTarget: installationTarget, + testCommerce: testCommerce, + isFreeOrTrialInstall: isFreeOrTrialInstall, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9d0a0105-075e-4760-aa15-8bcf54d1bd7d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.AcquisitionOptions, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionAcquisitionRequest} acquisitionRequest + */ + requestAcquisition(acquisitionRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "3adb1f2d-e328-446e-be73-9f6d98071c45", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, acquisitionRequest, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionAcquisitionRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetByName(customHeaders, publisherName, extensionName, version, assetType, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version, + assetType: assetType + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7529171f-a002-4180-93ba-685f358a0482", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAsset(customHeaders, extensionId, version, assetType, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId, + version: version, + assetType: assetType + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "5d545f3d-ef47-488b-8be3-f5ee1517856c", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetAuthenticated(customHeaders, publisherName, extensionName, version, assetType, accountToken, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version, + assetType: assetType + }; + let queryValues = { + accountToken: accountToken, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "506aff36-2622-4f70-8063-77cce6366d20", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} azurePublisherId + */ + associateAzurePublisher(publisherName, azurePublisherId) { + return __awaiter(this, void 0, void 0, function* () { + if (azurePublisherId == null) { + throw new TypeError('azurePublisherId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + azurePublisherId: azurePublisherId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + queryAssociatedAzurePublisher(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "efd202a6-9d87-4ebc-9229-d2b8ae2fdb6d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} languages + */ + getCategories(languages) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + languages: languages, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e0a5a71e-3ac3-43a0-ae7d-0bb5c3046a2a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} categoryName + * @param {string} languages + * @param {string} product + */ + getCategoryDetails(categoryName, languages, product) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + categoryName: categoryName + }; + let queryValues = { + languages: languages, + product: product, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "75d3c04d-84d2-4973-acd2-22627587dabc", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} product + * @param {string} categoryId + * @param {number} lcid + * @param {string} source + * @param {string} productVersion + * @param {string} skus + * @param {string} subSkus + * @param {string} productArchitecture + */ + getCategoryTree(product, categoryId, lcid, source, productVersion, skus, subSkus, productArchitecture) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + product: product, + categoryId: categoryId + }; + let queryValues = { + lcid: lcid, + source: source, + productVersion: productVersion, + skus: skus, + subSkus: subSkus, + productArchitecture: productArchitecture, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "1102bb42-82b0-4955-8d8a-435d6b4cedd3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} product + * @param {number} lcid + * @param {string} source + * @param {string} productVersion + * @param {string} skus + * @param {string} subSkus + */ + getRootCategories(product, lcid, source, productVersion, skus, subSkus) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + product: product + }; + let queryValues = { + lcid: lcid, + source: source, + productVersion: productVersion, + skus: skus, + subSkus: subSkus, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "31fba831-35b2-46f6-a641-d05de5a877d8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + getCertificate(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e905ad6a-3f1f-4d08-9f6d-7d357ff8b7d0", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + getContentVerificationLog(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c0f1c7c4-3557-4ffb-b774-1e48c4865e99", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.CustomerSupportRequest} customerSupportRequest + */ + createSupportRequest(customerSupportRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "8eded385-026a-4c15-b810-b8eb402771f1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, customerSupportRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + */ + createDraftForEditExtension(publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + */ + performEditExtensionDraftOperation(draftPatch, publisherName, extensionName, draftId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + draftId: draftId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, draftPatch, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePayloadInDraftForEditExtension(customHeaders, contentStream, publisherName, extensionName, draftId, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + draftId: draftId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "02b33873-4e61-496e-83a2-59d1df46b7d8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionName + * @param {string} draftId + * @param {string} assetType + */ + addAssetForEditExtensionDraft(customHeaders, contentStream, publisherName, extensionName, draftId, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + draftId: draftId, + assetType: assetType + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "f1db9c47-6619-4998-a7e5-d7f9f41a4617", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {String} product - Header to pass the product type of the payload file + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + createDraftForNewExtension(customHeaders, contentStream, publisherName, product, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileProduct"] = "product"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionDraftPatch} draftPatch + * @param {string} publisherName + * @param {string} draftId + */ + performNewExtensionDraftOperation(draftPatch, publisherName, draftId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, draftPatch, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} draftId + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePayloadInDraftForNewExtension(customHeaders, contentStream, publisherName, draftId, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b3ab127d-ebb9-4d22-b611-4e09593c8d79", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDraft, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + */ + addAssetForNewExtensionDraft(customHeaders, contentStream, publisherName, draftId, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId, + assetType: assetType + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + * @param {string} extensionName + */ + getAssetFromEditExtensionDraft(publisherName, draftId, assetType, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + if (extensionName == null) { + throw new TypeError('extensionName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId, + assetType: assetType + }; + let queryValues = { + extensionName: extensionName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} draftId + * @param {string} assetType + */ + getAssetFromNewExtensionDraft(publisherName, draftId, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + draftId: draftId, + assetType: assetType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "88c0b1c8-b4f1-498a-9b2a-8446ef9f32e7", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get install/uninstall events of an extension. If both count and afterDate parameters are specified, count takes precedence. + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {number} count - Count of events to fetch, applies to each event type. + * @param {Date} afterDate - Fetch events that occurred on or after this date + * @param {string} include - Filter options. Supported values: install, uninstall, review, acquisition, sales. Default is to fetch all types of events + * @param {string} includeProperty - Event properties to include. Currently only 'lastContactDetails' is supported for uninstall events + */ + getExtensionEvents(publisherName, extensionName, count, afterDate, include, includeProperty) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + count: count, + afterDate: afterDate, + include: include, + includeProperty: includeProperty, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "3d13c499-2168-4d06-bef4-14aba185dcd5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionEvents, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * API endpoint to publish extension install/uninstall events. This is meant to be invoked by EMS only for sending us data related to install/uninstall of an extension. + * + * @param {GalleryInterfaces.ExtensionEvents[]} extensionEvents + */ + publishExtensionEvents(extensionEvents) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "0bf2bd3a-70e0-4d5d-8bf7-bd4a9c2ab6e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, extensionEvents, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionQuery} extensionQuery + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + queryExtensions(customHeaders, extensionQuery, accountToken, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + accountToken: accountToken, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "eb9d5ee1-6d43-456b-b80e-8a96fbc014b6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.create(url, extensionQuery, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} extensionType + * @param {string} reCaptchaToken + */ + createExtension(customHeaders, contentStream, extensionType, reCaptchaToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + extensionType: extensionType, + reCaptchaToken: reCaptchaToken, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} version + */ + deleteExtensionById(extensionId, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + let queryValues = { + version: version, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + */ + getExtensionById(extensionId, version, flags) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + let queryValues = { + version: version, + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} extensionId + * @param {string} reCaptchaToken + */ + updateExtensionById(extensionId, reCaptchaToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + let queryValues = { + reCaptchaToken: reCaptchaToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName + * @param {string} extensionType + * @param {string} reCaptchaToken + */ + createExtensionWithPublisher(customHeaders, contentStream, publisherName, extensionType, reCaptchaToken) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + extensionType: extensionType, + reCaptchaToken: reCaptchaToken, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + */ + deleteExtension(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + version: version, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {GalleryInterfaces.ExtensionQueryFlags} flags + * @param {string} accountToken + * @param {String} accountTokenHeader - Header to pass the account token + */ + getExtension(customHeaders, publisherName, extensionName, version, flags, accountToken, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + version: version, + flags: flags, + accountToken: accountToken, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * REST endpoint to update an extension. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} extensionType + * @param {string} reCaptchaToken + * @param {boolean} bypassScopeCheck - This parameter decides if the scope change check needs to be invoked or not + */ + updateExtension(customHeaders, contentStream, publisherName, extensionName, extensionType, reCaptchaToken, bypassScopeCheck) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + extensionType: extensionType, + reCaptchaToken: reCaptchaToken, + bypassScopeCheck: bypassScopeCheck, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {GalleryInterfaces.PublishedExtensionFlags} flags + */ + updateExtensionProperties(publisherName, extensionName, flags) { + return __awaiter(this, void 0, void 0, function* () { + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} hostType + * @param {string} hostName + */ + shareExtensionWithHost(publisherName, extensionName, hostType, hostName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + hostType: hostType, + hostName: hostName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "328a3af8-d124-46e9-9483-01690cd415b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} hostType + * @param {string} hostName + */ + unshareExtensionWithHost(publisherName, extensionName, hostType, hostName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + hostType: hostType, + hostName: hostName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "328a3af8-d124-46e9-9483-01690cd415b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.AzureRestApiRequestModel} azureRestApiRequestModel + */ + extensionValidator(azureRestApiRequestModel) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "05e8a5e1-8c59-4c2c-8856-0ff087d1a844", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, azureRestApiRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Send Notification + * + * @param {GalleryInterfaces.NotificationsData} notificationData - Denoting the data needed to send notification + */ + sendNotifications(notificationData) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "eab39817-413c-4602-a49f-07ad00844980", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, notificationData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * This endpoint gets hit when you download a VSTS extension from the Web UI + * + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getPackage(customHeaders, publisherName, extensionName, version, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7cb576f8-1cae-4c4b-b7b1-e4af5759e965", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} assetType + * @param {string} assetToken + * @param {string} accountToken + * @param {boolean} acceptDefault + * @param {String} accountTokenHeader - Header to pass the account token + */ + getAssetWithToken(customHeaders, publisherName, extensionName, version, assetType, assetToken, accountToken, acceptDefault, accountTokenHeader) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version, + assetType: assetType, + assetToken: assetToken + }; + let queryValues = { + accountToken: accountToken, + acceptDefault: acceptDefault, + }; + customHeaders = customHeaders || {}; + customHeaders["X-Market-AccountToken"] = "accountTokenHeader"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "364415a1-0077-4a41-a7a0-06edd4497492", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete publisher asset like logo + * + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + */ + deletePublisherAsset(publisherName, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + assetType: assetType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get publisher asset like logo as a stream + * + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + */ + getPublisherAsset(publisherName, assetType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + assetType: assetType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update publisher asset like logo. It accepts asset file as an octet stream and file name is passed in header values. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} publisherName - Internal name of the publisher + * @param {string} assetType - Type of asset. Default value is 'logo'. + * @param {String} fileName - Header to pass the filename of the uploaded data + */ + updatePublisherAsset(customHeaders, contentStream, publisherName, assetType, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + assetType: assetType, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + customHeaders["X-Market-UploadFileName"] = "fileName"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "21143299-34f9-4c62-8ca8-53da691192f9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + fetchDomainToken(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "67a609ef-fa74-4b52-8664-78d76f7b3634", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + verifyDomainToken(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "67a609ef-fa74-4b52-8664-78d76f7b3634", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.PublisherQuery} publisherQuery + */ + queryPublishers(publisherQuery) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "2ad6ee0a-b53f-4034-9d1d-d009fda1212e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, publisherQuery, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublisherQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.Publisher} publisher + */ + createPublisher(publisher) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, publisher, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + */ + deletePublisher(publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {number} flags + */ + getPublisher(publisherName, flags) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.Publisher} publisher + * @param {string} publisherName + */ + updatePublisher(publisher, publisherName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, publisher, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Publisher, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Endpoint to add/modify publisher membership. Currently Supports only addition/modification of 1 user at a time Works only for adding members of same tenant. + * + * @param {GalleryInterfaces.PublisherUserRoleAssignmentRef[]} roleAssignments - List of user identifiers(email address) and role to be added. Currently only one entry is supported. + * @param {string} publisherName - The name/id of publisher to which users have to be added + * @param {boolean} limitToCallerIdentityDomain - Should cross tenant addtions be allowed or not. + */ + updatePublisherMembers(roleAssignments, publisherName, limitToCallerIdentityDomain) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + let queryValues = { + limitToCallerIdentityDomain: limitToCallerIdentityDomain, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4ddec66a-e4f6-4f5d-999e-9e77710d7ff4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, roleAssignments, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublisherRoleAssignment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of questions with their responses associated with an extension. + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} count - Number of questions to retrieve (defaults to 10). + * @param {number} page - Page number from which set of questions are to be retrieved. + * @param {Date} afterDate - If provided, results questions are returned which were posted after this date + */ + getQuestions(publisherName, extensionName, count, page, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + count: count, + page: page, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c010d03d-812c-4ade-ae07-c1862475eda5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.QuestionsResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Flags a concern with an existing question for an extension. + * + * @param {GalleryInterfaces.Concern} concern - User reported concern with a question for the extension. + * @param {string} pubName - Name of the publisher who published the extension. + * @param {string} extName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + */ + reportQuestion(concern, pubName, extName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "784910cd-254a-494d-898b-0728549b2f10", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, concern, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Concern, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new question for an extension. + * + * @param {GalleryInterfaces.Question} question - Question to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + */ + createQuestion(question, publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, question, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Question, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes an existing question and all its associated responses for an extension. (soft delete) + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be deleted for the extension. + */ + deleteQuestion(publisherName, extensionName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing question for an extension. + * + * @param {GalleryInterfaces.Question} question - Updated question to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question to be updated for the extension. + */ + updateQuestion(question, publisherName, extensionName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "6d1d9741-eca8-4701-a3a5-235afc82dfa4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, question, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Question, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new response for a given question for an extension. + * + * @param {GalleryInterfaces.Response} response - Response to be created for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be created for the extension. + */ + createResponse(response, publisherName, extensionName, questionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, response, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Response, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a response for an extension. (soft delete) + * + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifies the question whose response is to be deleted. + * @param {number} responseId - Identifies the response to be deleted. + */ + deleteResponse(publisherName, extensionName, questionId, responseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId, + responseId: responseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing response for a given question for an extension. + * + * @param {GalleryInterfaces.Response} response - Updated response to be set for the extension. + * @param {string} publisherName - Name of the publisher who published the extension. + * @param {string} extensionName - Name of the extension. + * @param {number} questionId - Identifier of the question for which response is to be updated for the extension. + * @param {number} responseId - Identifier of the response which has to be updated. + */ + updateResponse(response, publisherName, extensionName, questionId, responseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + questionId: questionId, + responseId: responseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "7f8ae5e0-46b0-438f-b2e8-13e8513517bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, response, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Response, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns extension reports + * + * @param {string} publisherName - Name of the publisher who published the extension + * @param {string} extensionName - Name of the extension + * @param {number} days - Last n days report. If afterDate and days are specified, days will take priority + * @param {number} count - Number of events to be returned + * @param {Date} afterDate - Use if you want to fetch events newer than the specified date + */ + getExtensionReports(publisherName, extensionName, days, count, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + days: days, + count: count, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "79e0c74f-157f-437e-845f-74fbb4121d4c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of reviews associated with an extension + * + * @param {string} publisherName - Name of the publisher who published the extension + * @param {string} extensionName - Name of the extension + * @param {number} count - Number of reviews to retrieve (defaults to 5) + * @param {GalleryInterfaces.ReviewFilterOptions} filterOptions - FilterOptions to filter out empty reviews etcetera, defaults to none + * @param {Date} beforeDate - Use if you want to fetch reviews older than the specified date, defaults to null + * @param {Date} afterDate - Use if you want to fetch reviews newer than the specified date, defaults to null + */ + getReviews(publisherName, extensionName, count, filterOptions, beforeDate, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + count: count, + filterOptions: filterOptions, + beforeDate: beforeDate, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "5b3f819f-f247-42ad-8c00-dd9ab9ab246d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ReviewsResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a summary of the reviews + * + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {Date} beforeDate - Use if you want to fetch summary of reviews older than the specified date, defaults to null + * @param {Date} afterDate - Use if you want to fetch summary of reviews newer than the specified date, defaults to null + */ + getReviewsSummary(pubName, extName, beforeDate, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName + }; + let queryValues = { + beforeDate: beforeDate, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "b7b44e21-209e-48f0-ae78-04727fc37d77", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new review for an extension + * + * @param {GalleryInterfaces.Review} review - Review to be created for the extension + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + */ + createReview(review, pubName, extName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, review, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.Review, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a review + * + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {number} reviewId - Id of the review which needs to be updated + */ + deleteReview(pubName, extName, reviewId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName, + reviewId: reviewId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates or Flags a review + * + * @param {GalleryInterfaces.ReviewPatch} reviewPatch - ReviewPatch object which contains the changes to be applied to the review + * @param {string} pubName - Name of the publisher who published the extension + * @param {string} extName - Name of the extension + * @param {number} reviewId - Id of the review which needs to be updated + */ + updateReview(reviewPatch, pubName, extName, reviewId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + pubName: pubName, + extName: extName, + reviewId: reviewId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "e6e85b9d-aa70-40e6-aa28-d0fbf40b91a3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, reviewPatch, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ReviewPatch, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionCategory} category + */ + createCategory(category) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "476531a3-7024-4516-a76a-ed64d3008ad6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, category, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all setting entries for the given user/all-users scope + * + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + * @param {string} key - Optional key under which to filter all the entries + */ + getGalleryUserSettings(userScope, key) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope, + key: key + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9b75ece3-7960-401c-848b-148ac01ca350", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set all setting entries for the given user/all-users scope + * + * @param {{ [key: string] : any; }} entries - A key-value pair of all settings that need to be set + * @param {string} userScope - User-Scope at which to get the value. Should be "me" for the current user or "host" for all users. + */ + setGalleryUserSettings(entries, userScope) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + userScope: userScope + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "9b75ece3-7960-401c-848b-148ac01ca350", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, entries, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} keyType + * @param {number} expireCurrentSeconds + */ + generateKey(keyType, expireCurrentSeconds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + keyType: keyType + }; + let queryValues = { + expireCurrentSeconds: expireCurrentSeconds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "92ed5cf4-c38b-465a-9059-2f2fb7c624b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} keyType + */ + getSigningKey(keyType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + keyType: keyType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "92ed5cf4-c38b-465a-9059-2f2fb7c624b5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GalleryInterfaces.ExtensionStatisticUpdate} extensionStatisticsUpdate + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtensionStatistics(extensionStatisticsUpdate, publisherName, extensionName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "a0ea3204-11e9-422d-a9ca-45851cc41400", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, extensionStatisticsUpdate, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {number} days + * @param {GalleryInterfaces.ExtensionStatsAggregateType} aggregate + * @param {Date} afterDate + */ + getExtensionDailyStats(publisherName, extensionName, days, aggregate, afterDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + let queryValues = { + days: days, + aggregate: aggregate, + afterDate: afterDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "ae06047e-51c5-4fb4-ab65-7be488544416", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDailyStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * This route/location id only supports HTTP POST anonymously, so that the page view daily stat can be incremented from Marketplace client. Trying to call GET on this route should result in an exception. Without this explicit implementation, calling GET on this public route invokes the above GET implementation GetExtensionDailyStats. + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} version - Version of the extension + */ + getExtensionDailyStatsAnonymous(publisherName, extensionName, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4fa7adb6-ca65-4075-a232-5f28323288ea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.ExtensionDailyStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Increments a daily statistic associated with the extension + * + * @param {string} publisherName - Name of the publisher + * @param {string} extensionName - Name of the extension + * @param {string} version - Version of the extension + * @param {string} statType - Type of stat to increment + * @param {string} targetPlatform + */ + incrementExtensionDailyStat(publisherName, extensionName, version, statType, targetPlatform) { + return __awaiter(this, void 0, void 0, function* () { + if (statType == null) { + throw new TypeError('statType can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + let queryValues = { + statType: statType, + targetPlatform: targetPlatform, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "4fa7adb6-ca65-4075-a232-5f28323288ea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} publisherName + * @param {string} extensionName + * @param {string} version + * @param {string} targetPlatform + */ + getVerificationLog(publisherName, extensionName, version, targetPlatform) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName, + version: version + }; + let queryValues = { + targetPlatform: targetPlatform, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "c5523abe-b843-437f-875b-5833064efe4d", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} itemName + * @param {string} version + * @param {GalleryInterfaces.VSCodeWebExtensionStatisicsType} statType + */ + updateVSCodeWebExtensionStatistics(itemName, version, statType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + itemName: itemName, + version: version, + statType: statType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "gallery", "205c91a8-7841-4fd3-ae4f-5a745d5a8df5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +GalleryApi.RESOURCE_AREA_ID = "69d21c00-f135-441b-b5ce-3626378e0819"; +exports.GalleryApi = GalleryApi; diff --git a/node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.d.ts b/node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.d.ts new file mode 100644 index 0000000..302ad98 --- /dev/null +++ b/node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.d.ts @@ -0,0 +1,32 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import GalleryInterfaces = require("./interfaces/GalleryInterfaces"); +export interface IGalleryCompatHttpClientBase extends basem.ClientApiBase { + createExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; + updateExtensionByIdJson(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; + createExtensionWithPublisherJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; + updateExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; +} +export declare class GalleryCompatHttpClientBase extends basem.ClientApiBase implements IGalleryCompatHttpClientBase { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], userAgent?: string, options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + */ + createExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} extensionId + */ + updateExtensionByIdJson(extensionPackage: GalleryInterfaces.ExtensionPackage, extensionId: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + */ + createExtensionWithPublisherJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string): Promise; + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtensionJson(extensionPackage: GalleryInterfaces.ExtensionPackage, publisherName: string, extensionName: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.js b/node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.js new file mode 100644 index 0000000..b46d587 --- /dev/null +++ b/node_modules/azure-devops-node-api/GalleryCompatHttpClientBase.js @@ -0,0 +1,118 @@ +"use strict"; +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const GalleryInterfaces = require("./interfaces/GalleryInterfaces"); +class GalleryCompatHttpClientBase extends basem.ClientApiBase { + constructor(baseUrl, handlers, userAgent, options) { + super(baseUrl, handlers, userAgent, options); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + */ + createExtensionJson(extensionPackage) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} extensionId + */ + updateExtensionByIdJson(extensionPackage, extensionId) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + extensionId: extensionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "a41192c8-9525-4b58-bc86-179fa549d80d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + */ + createExtensionWithPublisherJson(extensionPackage, publisherName) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } + /** + * @param {GalleryInterfaces.ExtensionPackage} extensionPackage + * @param {string} publisherName + * @param {string} extensionName + */ + updateExtensionJson(extensionPackage, publisherName, extensionName) { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + publisherName: publisherName, + extensionName: extensionName + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.1-preview.1", "gallery", "e11ea35a-16fe-4b80-ab11-c4cab88a0966", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, extensionPackage, options); + let ret = this.formatResponse(res.result, GalleryInterfaces.TypeInfo.PublishedExtension, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + } +} +exports.GalleryCompatHttpClientBase = GalleryCompatHttpClientBase; diff --git a/node_modules/azure-devops-node-api/GitApi.d.ts b/node_modules/azure-devops-node-api/GitApi.d.ts new file mode 100644 index 0000000..b3f8610 --- /dev/null +++ b/node_modules/azure-devops-node-api/GitApi.d.ts @@ -0,0 +1,1397 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import GitInterfaces = require("./interfaces/GitInterfaces"); +import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface IGitApi extends basem.ClientApiBase { + createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise; + getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise; + getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; + getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; + getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; + getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; + getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise; + getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; + getCherryPickConflict(repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise; + getCherryPickConflicts(repositoryId: string, cherryPickId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise; + updateCherryPickConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise; + updateCherryPickConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, cherryPickId: number, project?: string): Promise; + getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise; + createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; + getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise; + getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise; + getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise; + getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; + getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; + getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; + getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise; + getDeletedRepositories(project: string): Promise; + getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise; + getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise; + createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise; + getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise; + getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise; + createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise; + getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise; + queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise; + updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise; + getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; + getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise; + createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise; + getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise; + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise; + getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise; + getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; + getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise; + updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; + updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise; + getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise; + createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; + getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; + getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; + deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; + getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; + getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; + getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise; + updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise; + createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; + createUnmaterializedPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, project?: string): Promise; + deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; + updatePullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestById(pullRequestId: number, project?: string): Promise; + getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; + createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise; + getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise; + getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; + updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; + sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise; + createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise; + deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; + getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; + getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise; + updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; + createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; + deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; + updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise; + getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise; + getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise; + updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; + getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise; + createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; + getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; + getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; + deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise; + getRecycleBinRepositories(project: string): Promise; + restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise; + getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise; + updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise; + updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; + createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise; + deleteRefFavorite(project: string, favoriteId: number): Promise; + getRefFavorite(project: string, favoriteId: number): Promise; + getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise; + createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise; + deleteRepository(repositoryId: string, project?: string): Promise; + getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise; + getRepository(repositoryId: string, project?: string): Promise; + getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise; + updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; + getRevertConflict(repositoryId: string, revertId: number, conflictId: number, project?: string): Promise; + getRevertConflicts(repositoryId: string, revertId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise; + updateRevertConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, revertId: number, conflictId: number, project?: string): Promise; + updateRevertConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, revertId: number, project?: string): Promise; + createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; + getRevert(project: string, revertId: number, repositoryId: string): Promise; + getRevertForRefName(project: string, repositoryId: string, refName: string): Promise; + createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; + getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise; + getSuggestions(repositoryId: string, project?: string): Promise; + getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; + getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; +} +export declare class GitApi extends basem.ClientApiBase implements IGitApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "4e080c62-fa21-4fbc-8fef-2a10a2b38049"; + /** + * Create an annotated tag. + * + * @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID or name of the repository. + */ + createAnnotatedTag(tagObject: GitInterfaces.GitAnnotatedTag, project: string, repositoryId: string): Promise; + /** + * Get an annotated tag. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID or name of the repository. + * @param {string} objectId - ObjectId (Sha1Id) of tag to get. + */ + getAnnotatedTag(project: string, repositoryId: string, objectId: string): Promise; + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlob(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlobContent(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; + /** + * Gets one or more blobs in a zip file download. + * + * @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file. + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} filename + */ + getBlobsZip(blobIds: string[], repositoryId: string, project?: string, filename?: string): Promise; + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlobZip(repositoryId: string, sha1: string, project?: string, download?: boolean, fileName?: string, resolveLfs?: boolean): Promise; + /** + * Retrieve statistics about a single branch. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} name - Name of the branch. + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + */ + getBranch(repositoryId: string, name: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Retrieve statistics about all branches within a repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + */ + getBranches(repositoryId: string, project?: string, baseVersionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + getBranchStatsBatch(searchCriteria: GitInterfaces.GitQueryBranchStatsCriteria, repositoryId: string, project?: string): Promise; + /** + * Retrieve changes for a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of changes to return. + * @param {number} skip - The number of changes to skip. + */ + getChanges(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number): Promise; + /** + * Retrieve one conflict for a cherry pick by ID + * + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getCherryPickConflict(repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise; + /** + * Retrieve all conflicts for a cherry pick + * + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete + */ + getCherryPickConflicts(repositoryId: string, cherryPickId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise; + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updateCherryPickConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, cherryPickId: number, conflictId: number, project?: string): Promise; + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {string} project - Project ID or project name + */ + updateCherryPickConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, cherryPickId: number, project?: string): Promise; + /** + * Given a commitId, returns a list of commits that are in the same cherry-pick family. + * + * @param {string} repositoryNameOrId + * @param {string} commitId + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks + */ + getCherryPickRelationships(repositoryNameOrId: string, commitId: string, project?: string, includeLinks?: boolean): Promise; + /** + * Cherry pick a specific commit or commits that are associated to a pull request into a new branch. + * + * @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + */ + createCherryPick(cherryPickToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; + /** + * Retrieve information about a cherry pick operation by cherry pick Id. + * + * @param {string} project - Project ID or project name + * @param {number} cherryPickId - ID of the cherry pick. + * @param {string} repositoryId - ID of the repository. + */ + getCherryPick(project: string, cherryPickId: number, repositoryId: string): Promise; + /** + * Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. + */ + getCherryPickForRefName(project: string, repositoryId: string, refName: string): Promise; + /** + * Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits. + * @param {number} top - Maximum number of changes to return. Defaults to 100. + * @param {number} skip - Number of changes to skip + * @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit. + * @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit. + */ + getCommitDiffs(repositoryId: string, project?: string, diffCommonCommit?: boolean, top?: number, skip?: number, baseVersionDescriptor?: GitInterfaces.GitBaseVersionDescriptor, targetVersionDescriptor?: GitInterfaces.GitTargetVersionDescriptor): Promise; + /** + * Retrieve a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} changeCount - The number of changes to include in the result. + */ + getCommit(commitId: string, repositoryId: string, project?: string, changeCount?: number): Promise; + /** + * Retrieve git commits for a project + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + */ + getCommits(repositoryId: string, searchCriteria: GitInterfaces.GitQueryCommitsCriteria, project?: string, skip?: number, top?: number): Promise; + /** + * Retrieve a list of commits associated with a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of commits to return ("get the top x commits"). + * @param {number} skip - The number of commits to skip. + * @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true. + */ + getPushCommits(repositoryId: string, pushId: number, project?: string, top?: number, skip?: number, includeLinks?: boolean): Promise; + /** + * Retrieve git commits for a project matching the search criteria + * + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of commits to skip. + * @param {number} top - Maximum number of commits to return. + * @param {boolean} includeStatuses - True to include additional commit status information. + */ + getCommitsBatch(searchCriteria: GitInterfaces.GitQueryCommitsCriteria, repositoryId: string, project?: string, skip?: number, top?: number, includeStatuses?: boolean): Promise; + /** + * Retrieve deleted git repositories. + * + * @param {string} project - Project ID or project name + */ + getDeletedRepositories(project: string): Promise; + /** + * Get the file diffs for each of the specified files + * + * @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository + */ + getFileDiffs(fileDiffsCriteria: GitInterfaces.FileDiffsCriteria, project: string, repositoryId: string): Promise; + /** + * Retrieve all forks of a repository in the collection. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} collectionId - Team project collection ID. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links. + */ + getForks(repositoryNameOrId: string, collectionId: string, project?: string, includeLinks?: boolean): Promise; + /** + * Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint + * + * @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping. + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links + */ + createForkSyncRequest(syncParams: GitInterfaces.GitForkSyncRequestParameters, repositoryNameOrId: string, project?: string, includeLinks?: boolean): Promise; + /** + * Get a specific fork sync operation's details. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {number} forkSyncOperationId - OperationId of the sync request. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links. + */ + getForkSyncRequest(repositoryNameOrId: string, forkSyncOperationId: number, project?: string, includeLinks?: boolean): Promise; + /** + * Retrieve all requested fork sync operations on this repository. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} includeAbandoned - True to include abandoned requests. + * @param {boolean} includeLinks - True to include links. + */ + getForkSyncRequests(repositoryNameOrId: string, project?: string, includeAbandoned?: boolean, includeLinks?: boolean): Promise; + /** + * Create an import request. + * + * @param {GitInterfaces.GitImportRequest} importRequest - The import request to create. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + */ + createImportRequest(importRequest: GitInterfaces.GitImportRequest, project: string, repositoryId: string): Promise; + /** + * Retrieve a particular import request. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request. + */ + getImportRequest(project: string, repositoryId: string, importRequestId: number): Promise; + /** + * Retrieve import requests for a repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {boolean} includeAbandoned - True to include abandoned import requests in the results. + */ + queryImportRequests(project: string, repositoryId: string, includeAbandoned?: boolean): Promise; + /** + * Retry or abandon a failed import request. + * + * @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request to update. + */ + updateImportRequest(importRequestToUpdate: GitInterfaces.GitImportRequest, project: string, repositoryId: string, importRequestId: number): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItem(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemContent(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + /** + * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {boolean} includeLinks - Set to true to include links to items. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + */ + getItems(repositoryId: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, includeLinks?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemText(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemZip(repositoryId: string, path: string, project?: string, scopePath?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContentMetadata?: boolean, latestProcessedChange?: boolean, download?: boolean, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean, resolveLfs?: boolean, sanitize?: boolean): Promise; + /** + * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + * + * @param {GitInterfaces.GitItemRequestData} requestData - Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. + * @param {string} repositoryId - The name or ID of the repository + * @param {string} project - Project ID or project name + */ + getItemsBatch(requestData: GitInterfaces.GitItemRequestData, repositoryId: string, project?: string): Promise; + /** + * Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId. + * + * @param {string} repositoryNameOrId - ID or name of the local repository. + * @param {string} commitId - First commit, usually the tip of the target branch of the potential merge. + * @param {string} otherCommitId - Other commit, usually the tip of the source branch of the potential merge. + * @param {string} project - Project ID or project name + * @param {string} otherCollectionId - The collection ID where otherCommitId lives. + * @param {string} otherRepositoryId - The repository ID where otherCommitId lives. + */ + getMergeBases(repositoryNameOrId: string, commitId: string, otherCommitId: string, project?: string, otherCollectionId?: string, otherRepositoryId?: string): Promise; + /** + * Request a git merge operation. Currently we support merging only 2 commits. + * + * @param {GitInterfaces.GitMergeParameters} mergeParameters - Parents commitIds and merge commit messsage. + * @param {string} project - Project ID or project name + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {boolean} includeLinks - True to include links + */ + createMergeRequest(mergeParameters: GitInterfaces.GitMergeParameters, project: string, repositoryNameOrId: string, includeLinks?: boolean): Promise; + /** + * Get a specific merge operation's details. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {number} mergeOperationId - OperationId of the merge request. + * @param {boolean} includeLinks - True to include links + */ + getMergeRequest(project: string, repositoryNameOrId: string, mergeOperationId: number, includeLinks?: boolean): Promise; + /** + * Attach a new file to a pull request. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName - The name of the file. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Delete a pull request attachment. + * + * @param {string} fileName - The name of the attachment to delete. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + deleteAttachment(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Get the file content of a pull request attachment. + * + * @param {string} fileName - The name of the attachment. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachmentContent(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Get a list of files attached to a given pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachments(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Get the file content of a pull request attachment. + * + * @param {string} fileName - The name of the attachment. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachmentZip(fileName: string, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Add a like on a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + createLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + /** + * Delete a like on a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + deleteLike(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + /** + * Get likes for a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + getLikes(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + /** + * Get the commits for the specified iteration of a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the iteration from which to get the commits. + * @param {string} project - Project ID or project name + * @param {number} top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500. + * @param {number} skip - Number of commits to skip. + */ + getPullRequestIterationCommits(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number): Promise; + /** + * Get the commits for the specified pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestCommits(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Retrieve one conflict for a pull request by ID + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getPullRequestConflict(repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; + /** + * Retrieve all conflicts for a pull request + * + * @param {string} repositoryId - The repository of the Pull Request. + * @param {number} pullRequestId - The pull request ID. + * @param {string} project - Project ID or project name + * @param {number} skip - Conflicts to skip. + * @param {number} top - Conflicts to return after skip. + * @param {boolean} includeObsolete - Includes obsolete conflicts. + * @param {boolean} excludeResolved - Excludes conflicts already resolved. + * @param {boolean} onlyResolved - Returns only the conflicts that are resolved. + */ + getPullRequestConflicts(repositoryId: string, pullRequestId: number, project?: string, skip?: number, top?: number, includeObsolete?: boolean, excludeResolved?: boolean, onlyResolved?: boolean): Promise; + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updatePullRequestConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, pullRequestId: number, conflictId: number, project?: string): Promise; + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + updatePullRequestConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Retrieve the changes made in a pull request between two iterations. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration.
Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request. + * @param {string} project - Project ID or project name + * @param {number} top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. + * @param {number} skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. + * @param {number} compareTo - ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches + */ + getPullRequestIterationChanges(repositoryId: string, pullRequestId: number, iterationId: number, project?: string, top?: number, skip?: number, compareTo?: number): Promise; + /** + * Get the specified iteration for a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration to return. + * @param {string} project - Project ID or project name + */ + getPullRequestIteration(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + /** + * Get the list of iterations for the specified pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {boolean} includeCommits - If true, include the commits associated with each iteration in the response. + */ + getPullRequestIterations(repositoryId: string, pullRequestId: number, project?: string, includeCommits?: boolean): Promise; + /** + * Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. + * + * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {string} project - Project ID or project name + */ + createPullRequestIterationStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + /** + * Delete pull request iteration status. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + deletePullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; + /** + * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + getPullRequestIterationStatus(repositoryId: string, pullRequestId: number, iterationId: number, statusId: number, project?: string): Promise; + /** + * Get all the statuses associated with a pull request iteration. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {string} project - Project ID or project name + */ + getPullRequestIterationStatuses(repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + /** + * Update pull request iteration statuses collection. The only supported operation type is `remove`. + * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {string} project - Project ID or project name + */ + updatePullRequestIterationStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, iterationId: number, project?: string): Promise; + /** + * Create a label for a specified pull request. The only required field is the name of the new label. + * + * @param {TfsCoreInterfaces.WebApiCreateTagRequestData} label - Label to assign to the pull request. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + createPullRequestLabel(label: TfsCoreInterfaces.WebApiCreateTagRequestData, repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; + /** + * Removes a label from the set of those assigned to the pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} labelIdOrName - The name or ID of the label requested. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + deletePullRequestLabels(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; + /** + * Retrieves a single label that has been assigned to a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} labelIdOrName - The name or ID of the label requested. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + getPullRequestLabel(repositoryId: string, pullRequestId: number, labelIdOrName: string, project?: string, projectId?: string): Promise; + /** + * Get all the labels assigned to a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + getPullRequestLabels(repositoryId: string, pullRequestId: number, project?: string, projectId?: string): Promise; + /** + * Get external properties of the pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestProperties(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. + * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Properties to add, replace or remove in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + updatePullRequestProperties(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. + * + * @param {GitInterfaces.GitPullRequestQuery} queries - The list of queries to perform. + * @param {string} repositoryId - ID of the repository. + * @param {string} project - Project ID or project name + */ + getPullRequestQuery(queries: GitInterfaces.GitPullRequestQuery, repositoryId: string, project?: string): Promise; + /** + * Add a reviewer to a pull request or cast a vote. + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. + * @param {string} project - Project ID or project name + */ + createPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Add reviewers to a pull request. + * + * @param {VSSInterfaces.IdentityRef[]} reviewers - Reviewers to add to the pull request. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createPullRequestReviewers(reviewers: VSSInterfaces.IdentityRef[], repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Add an unmaterialized identity to the reviewers of a pull request. + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer to add to the pull request. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createUnmaterializedPullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Remove a reviewer from a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer to remove. + * @param {string} project - Project ID or project name + */ + deletePullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Retrieve information about a particular reviewer on a pull request + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. + * @param {string} project - Project ID or project name + */ + getPullRequestReviewer(repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Retrieve the reviewers for a pull request + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestReviewers(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. + * @param {string} project - Project ID or project name + */ + updatePullRequestReviewer(reviewer: GitInterfaces.IdentityRefWithVote, repositoryId: string, pullRequestId: number, reviewerId: string, project?: string): Promise; + /** + * Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. + * + * @param {GitInterfaces.IdentityRefWithVote[]} patchVotes - IDs of the reviewers whose votes will be reset to zero + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request + * @param {string} project - Project ID or project name + */ + updatePullRequestReviewers(patchVotes: GitInterfaces.IdentityRefWithVote[], repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Retrieve a pull request. + * + * @param {number} pullRequestId - The ID of the pull request to retrieve. + * @param {string} project - Project ID or project name + */ + getPullRequestById(pullRequestId: number, project?: string): Promise; + /** + * Retrieve all pull requests matching a specified criteria. + * + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. + * @param {number} maxCommentLength - Not used. + * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {number} top - The number of pull requests to retrieve. + */ + getPullRequestsByProject(project: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, maxCommentLength?: number, skip?: number, top?: number): Promise; + /** + * Create a pull request. + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - The pull request to create. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {string} project - Project ID or project name + * @param {boolean} supportsIterations - If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed. + */ + createPullRequest(gitPullRequestToCreate: GitInterfaces.GitPullRequest, repositoryId: string, project?: string, supportsIterations?: boolean): Promise; + /** + * Retrieve a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - The ID of the pull request to retrieve. + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength - Not used. + * @param {number} skip - Not used. + * @param {number} top - Not used. + * @param {boolean} includeCommits - If true, the pull request will be returned with the associated commits. + * @param {boolean} includeWorkItemRefs - If true, the pull request will be returned with the associated work item references. + */ + getPullRequest(repositoryId: string, pullRequestId: number, project?: string, maxCommentLength?: number, skip?: number, top?: number, includeCommits?: boolean, includeWorkItemRefs?: boolean): Promise; + /** + * Retrieve all pull requests matching a specified criteria. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength - Not used. + * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {number} top - The number of pull requests to retrieve. + */ + getPullRequests(repositoryId: string, searchCriteria: GitInterfaces.GitPullRequestSearchCriteria, project?: string, maxCommentLength?: number, skip?: number, top?: number): Promise; + /** + * Update a pull request + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - The pull request content that should be updated. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request to update. + * @param {string} project - Project ID or project name + */ + updatePullRequest(gitPullRequestToUpdate: GitInterfaces.GitPullRequest, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Sends an e-mail notification about a specific pull request to a set of recipients + * + * @param {GitInterfaces.ShareNotificationContext} userMessage + * @param {string} repositoryId - ID of the git repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + sharePullRequest(userMessage: GitInterfaces.ShareNotificationContext, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Create a pull request status. + * + * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createPullRequestStatus(status: GitInterfaces.GitPullRequestStatus, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Delete pull request status. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + deletePullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; + /** + * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + getPullRequestStatus(repositoryId: string, pullRequestId: number, statusId: number, project?: string): Promise; + /** + * Get all the statuses associated with a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestStatuses(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Update pull request statuses collection. The only supported operation type is `remove`. + * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + updatePullRequestStatuses(customHeaders: any, patchDocument: VSSInterfaces.JsonPatchDocument, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). + * + * @param {GitInterfaces.Comment} comment - The comment to create. Comments can be up to 150,000 characters. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {string} project - Project ID or project name + */ + createComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; + /** + * Delete a comment associated with a specific thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment. + * @param {string} project - Project ID or project name + */ + deleteComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + /** + * Retrieve a comment associated with a specific thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment. + * @param {string} project - Project ID or project name + */ + getComment(repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + /** + * Retrieve all comments associated with a specific thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread. + * @param {string} project - Project ID or project name + */ + getComments(repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; + /** + * Update a comment associated with a specific thread in a pull request. + * + * @param {GitInterfaces.Comment} comment - The comment content that should be updated. Comments can be up to 150,000 characters. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment to update. + * @param {string} project - Project ID or project name + */ + updateComment(comment: GitInterfaces.Comment, repositoryId: string, pullRequestId: number, threadId: number, commentId: number, project?: string): Promise; + /** + * Create a thread in a pull request. + * + * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread to create. Thread must contain at least one comment. + * @param {string} repositoryId - Repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Retrieve a thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread. + * @param {string} project - Project ID or project name + * @param {number} iteration - If specified, thread position will be tracked using this iteration as the right side of the diff. + * @param {number} baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff. + */ + getPullRequestThread(repositoryId: string, pullRequestId: number, threadId: number, project?: string, iteration?: number, baseIteration?: number): Promise; + /** + * Retrieve all threads in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {number} iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff. + * @param {number} baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff. + */ + getThreads(repositoryId: string, pullRequestId: number, project?: string, iteration?: number, baseIteration?: number): Promise; + /** + * Update a thread in a pull request. + * + * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread content that should be updated. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread to update. + * @param {string} project - Project ID or project name + */ + updateThread(commentThread: GitInterfaces.GitPullRequestCommentThread, repositoryId: string, pullRequestId: number, threadId: number, project?: string): Promise; + /** + * Retrieve a list of work items associated with a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestWorkItemRefs(repositoryId: string, pullRequestId: number, project?: string): Promise; + /** + * Push changes to the repository. + * + * @param {GitInterfaces.GitPush} push + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + */ + createPush(push: GitInterfaces.GitPush, repositoryId: string, project?: string): Promise; + /** + * Retrieves a particular push. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} pushId - ID of the push. + * @param {string} project - Project ID or project name + * @param {number} includeCommits - The number of commits to include in the result. + * @param {boolean} includeRefUpdates - If true, include the list of refs that were updated by the push. + */ + getPush(repositoryId: string, pushId: number, project?: string, includeCommits?: number, includeRefUpdates?: boolean): Promise; + /** + * Retrieves pushes associated with the specified repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of pushes to skip. + * @param {number} top - Number of pushes to return. + * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. + */ + getPushes(repositoryId: string, project?: string, skip?: number, top?: number, searchCriteria?: GitInterfaces.GitPushSearchCriteria): Promise; + /** + * Destroy (hard delete) a soft-deleted Git repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. + */ + deleteRepositoryFromRecycleBin(project: string, repositoryId: string): Promise; + /** + * Retrieve soft-deleted git repositories from the recycle bin. + * + * @param {string} project - Project ID or project name + */ + getRecycleBinRepositories(project: string): Promise; + /** + * Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. + * + * @param {GitInterfaces.GitRecycleBinRepositoryDetails} repositoryDetails + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. + */ + restoreRepositoryFromRecycleBin(repositoryDetails: GitInterfaces.GitRecycleBinRepositoryDetails, project: string, repositoryId: string): Promise; + /** + * Queries the provided repository for its refs and returns them. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} filter - [optional] A filter to apply to the refs (starts with). + * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. + * @param {boolean} includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false. + * @param {boolean} includeMyBranches - [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter. + * @param {boolean} latestStatusesOnly - [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false. + * @param {boolean} peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false. + * @param {string} filterContains - [optional] A filter to apply to the refs (contains). + */ + getRefs(repositoryId: string, project?: string, filter?: string, includeLinks?: boolean, includeStatuses?: boolean, includeMyBranches?: boolean, latestStatusesOnly?: boolean, peelTags?: boolean, filterContains?: string): Promise; + /** + * Lock or Unlock a branch. + * + * @param {GitInterfaces.GitRefUpdate} newRefInfo - The ref update action (lock/unlock) to perform + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} filter - The name of the branch to lock/unlock + * @param {string} project - Project ID or project name + * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + */ + updateRef(newRefInfo: GitInterfaces.GitRefUpdate, repositoryId: string, filter: string, project?: string, projectId?: string): Promise; + /** + * Creating, updating, or deleting refs(branches). + * + * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + */ + updateRefs(refUpdates: GitInterfaces.GitRefUpdate[], repositoryId: string, project?: string, projectId?: string): Promise; + /** + * Creates a ref favorite + * + * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create. + * @param {string} project - Project ID or project name + */ + createFavorite(favorite: GitInterfaces.GitRefFavorite, project: string): Promise; + /** + * Deletes the refs favorite specified + * + * @param {string} project - Project ID or project name + * @param {number} favoriteId - The Id of the ref favorite to delete. + */ + deleteRefFavorite(project: string, favoriteId: number): Promise; + /** + * Gets the refs favorite for a favorite Id. + * + * @param {string} project - Project ID or project name + * @param {number} favoriteId - The Id of the requested ref favorite. + */ + getRefFavorite(project: string, favoriteId: number): Promise; + /** + * Gets the refs favorites for a repo and an identity. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The id of the repository. + * @param {string} identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. + */ + getRefFavorites(project: string, repositoryId?: string, identityId?: string): Promise; + /** + * Create a git repository in a team project. + * + * @param {GitInterfaces.GitRepositoryCreateOptions} gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). + * @param {string} project - Project ID or project name + * @param {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo + */ + createRepository(gitRepositoryToCreate: GitInterfaces.GitRepositoryCreateOptions, project?: string, sourceRef?: string): Promise; + /** + * Delete a git repository + * + * @param {string} repositoryId - The ID of the repository. + * @param {string} project - Project ID or project name + */ + deleteRepository(repositoryId: string, project?: string): Promise; + /** + * Retrieve git repositories. + * + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - [optional] True to include reference links. The default value is false. + * @param {boolean} includeAllUrls - [optional] True to include all remote URLs. The default value is false. + * @param {boolean} includeHidden - [optional] True to include hidden repositories. The default value is false. + */ + getRepositories(project?: string, includeLinks?: boolean, includeAllUrls?: boolean, includeHidden?: boolean): Promise; + /** + * Retrieve a git repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + */ + getRepository(repositoryId: string, project?: string): Promise; + /** + * Retrieve a git repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {boolean} includeParent - True to include parent repository. Only available in authenticated calls. + * @param {string} project - Project ID or project name + */ + getRepositoryWithParent(repositoryId: string, includeParent: boolean, project?: string): Promise; + /** + * Updates the Git repository with either a new repo name or a new default branch. + * + * @param {GitInterfaces.GitRepository} newRepositoryInfo - Specify a new repo name or a new default branch of the repository + * @param {string} repositoryId - The ID of the repository. + * @param {string} project - Project ID or project name + */ + updateRepository(newRepositoryInfo: GitInterfaces.GitRepository, repositoryId: string, project?: string): Promise; + /** + * Retrieve one conflict for a revert by ID + * + * @param {string} repositoryId + * @param {number} revertId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getRevertConflict(repositoryId: string, revertId: number, conflictId: number, project?: string): Promise; + /** + * Retrieve all conflicts for a revert + * + * @param {string} repositoryId + * @param {number} revertId + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete + */ + getRevertConflicts(repositoryId: string, revertId: number, project?: string, continuationToken?: string, top?: number, excludeResolved?: boolean, onlyResolved?: boolean, includeObsolete?: boolean): Promise; + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} revertId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updateRevertConflict(conflict: GitInterfaces.GitConflict, repositoryId: string, revertId: number, conflictId: number, project?: string): Promise; + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} revertId + * @param {string} project - Project ID or project name + */ + updateRevertConflicts(conflictUpdates: GitInterfaces.GitConflict[], repositoryId: string, revertId: number, project?: string): Promise; + /** + * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. + * + * @param {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + */ + createRevert(revertToCreate: GitInterfaces.GitAsyncRefOperationParameters, project: string, repositoryId: string): Promise; + /** + * Retrieve information about a revert operation by revert Id. + * + * @param {string} project - Project ID or project name + * @param {number} revertId - ID of the revert operation. + * @param {string} repositoryId - ID of the repository. + */ + getRevert(project: string, revertId: number, repositoryId: string): Promise; + /** + * Retrieve information about a revert operation for a specific branch. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation. + */ + getRevertForRefName(project: string, repositoryId: string, refName: string): Promise; + /** + * Create Git commit status. + * + * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - Git commit status object to create. + * @param {string} commitId - ID of the Git commit. + * @param {string} repositoryId - ID of the repository. + * @param {string} project - Project ID or project name + */ + createCommitStatus(gitCommitStatusToCreate: GitInterfaces.GitStatus, commitId: string, repositoryId: string, project?: string): Promise; + /** + * Get statuses associated with the Git commit. + * + * @param {string} commitId - ID of the Git commit. + * @param {string} repositoryId - ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} top - Optional. The number of statuses to retrieve. Default is 1000. + * @param {number} skip - Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {boolean} latestOnly - The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`. + */ + getStatuses(commitId: string, repositoryId: string, project?: string, top?: number, skip?: number, latestOnly?: boolean): Promise; + /** + * Retrieve a pull request suggestion for a particular repository or team project. + * + * @param {string} repositoryId - ID of the git repository. + * @param {string} project - Project ID or project name + */ + getSuggestions(repositoryId: string, project?: string): Promise; + /** + * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + * + * @param {string} repositoryId - Repository Id. + * @param {string} sha1 - SHA1 hash of the tree object. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project Id. + * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. + * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. + */ + getTree(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; + /** + * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + * + * @param {string} repositoryId - Repository Id. + * @param {string} sha1 - SHA1 hash of the tree object. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project Id. + * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. + * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. + */ + getTreeZip(repositoryId: string, sha1: string, project?: string, projectId?: string, recursive?: boolean, fileName?: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/GitApi.js b/node_modules/azure-devops-node-api/GitApi.js new file mode 100644 index 0000000..3fb831c --- /dev/null +++ b/node_modules/azure-devops-node-api/GitApi.js @@ -0,0 +1,4494 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const GitInterfaces = require("./interfaces/GitInterfaces"); +class GitApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Git-api', options); + } + /** + * Create an annotated tag. + * + * @param {GitInterfaces.GitAnnotatedTag} tagObject - Object containing details of tag to be created. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID or name of the repository. + */ + createAnnotatedTag(tagObject, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5e8a8081-3851-4626-b677-9891cc04102e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tagObject, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitAnnotatedTag, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an annotated tag. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID or name of the repository. + * @param {string} objectId - ObjectId (Sha1Id) of tag to get. + */ + getAnnotatedTag(project, repositoryId, objectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + objectId: objectId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5e8a8081-3851-4626-b677-9891cc04102e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitAnnotatedTag, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlob(repositoryId, sha1, project, download, fileName, resolveLfs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + download: download, + fileName: fileName, + resolveLfs: resolveLfs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlobContent(repositoryId, sha1, project, download, fileName, resolveLfs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + download: download, + fileName: fileName, + resolveLfs: resolveLfs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets one or more blobs in a zip file download. + * + * @param {string[]} blobIds - Blob IDs (SHA1 hashes) to be returned in the zip file. + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} filename + */ + getBlobsZip(blobIds, repositoryId, project, filename) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + filename: filename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single blob. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} sha1 - SHA1 hash of the file. You can get the SHA1 of a file using the "Git/Items/Get Item" endpoint. + * @param {string} project - Project ID or project name + * @param {boolean} download - If true, prompt for a download rather than rendering in a browser. Note: this value defaults to true if $format is zip + * @param {string} fileName - Provide a fileName to use for a download. + * @param {boolean} resolveLfs - If true, try to resolve a blob to its LFS contents, if it's an LFS pointer file. Only compatible with octet-stream Accept headers or $format types + */ + getBlobZip(repositoryId, sha1, project, download, fileName, resolveLfs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + download: download, + fileName: fileName, + resolveLfs: resolveLfs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7b28e929-2c99-405d-9c5c-6167a06e6816", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve statistics about a single branch. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} name - Name of the branch. + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + */ + getBranch(repositoryId, name, project, baseVersionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + if (name == null) { + throw new TypeError('name can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + name: name, + baseVersionDescriptor: baseVersionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve statistics about all branches within a repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitVersionDescriptor} baseVersionDescriptor - Identifies the commit or branch to use as the base. + */ + getBranches(repositoryId, project, baseVersionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + baseVersionDescriptor: baseVersionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {GitInterfaces.GitQueryBranchStatsCriteria} searchCriteria + * @param {string} repositoryId + * @param {string} project - Project ID or project name + */ + getBranchStatsBatch(searchCriteria, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d5b216de-d8d5-4d32-ae76-51df755b16d3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, searchCriteria, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitBranchStats, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve changes for a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of changes to return. + * @param {number} skip - The number of changes to skip. + */ + getChanges(commitId, repositoryId, project, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + commitId: commitId, + repositoryId: repositoryId + }; + let queryValues = { + top: top, + skip: skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5bf884f5-3e07-42e9-afb8-1b872267bf16", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitChanges, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve one conflict for a cherry pick by ID + * + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getCherryPickConflict(repositoryId, cherryPickId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all conflicts for a cherry pick + * + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete + */ + getCherryPickConflicts(repositoryId, cherryPickId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + includeObsolete: includeObsolete, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updateCherryPickConflict(conflict, repositoryId, cherryPickId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflict, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} cherryPickId + * @param {string} project - Project ID or project name + */ + updateCherryPickConflicts(conflictUpdates, repositoryId, cherryPickId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + cherryPickId: cherryPickId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1fe5aab2-d4c0-4b2f-a030-f3831e7aca26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Given a commitId, returns a list of commits that are in the same cherry-pick family. + * + * @param {string} repositoryNameOrId + * @param {string} commitId + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks + */ + getCherryPickRelationships(repositoryNameOrId, commitId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + commitId: commitId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "8af142a4-27c2-4168-9e82-46b8629aaa0d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Cherry pick a specific commit or commits that are associated to a pull request into a new branch. + * + * @param {GitInterfaces.GitAsyncRefOperationParameters} cherryPickToCreate + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + */ + createCherryPick(cherryPickToCreate, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, cherryPickToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a cherry pick operation by cherry pick Id. + * + * @param {string} project - Project ID or project name + * @param {number} cherryPickId - ID of the cherry pick. + * @param {string} repositoryId - ID of the repository. + */ + getCherryPick(project, cherryPickId, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + cherryPickId: cherryPickId, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a cherry pick operation for a specific branch. This operation is expensive due to the underlying object structure, so this API only looks at the 1000 most recent cherry pick operations. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the cherry pick operation. + */ + getCherryPickForRefName(project, repositoryId, refName) { + return __awaiter(this, void 0, void 0, function* () { + if (refName == null) { + throw new TypeError('refName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + refName: refName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "033bad68-9a14-43d1-90e0-59cb8856fef6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCherryPick, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Find the closest common commit (the merge base) between base and target commits, and get the diff between either the base and target commits or common and target commits. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} diffCommonCommit - If true, diff between common and target commits. If false, diff between base and target commits. + * @param {number} top - Maximum number of changes to return. Defaults to 100. + * @param {number} skip - Number of changes to skip + * @param {GitInterfaces.GitBaseVersionDescriptor} baseVersionDescriptor - Descriptor for base commit. + * @param {GitInterfaces.GitTargetVersionDescriptor} targetVersionDescriptor - Descriptor for target commit. + */ + getCommitDiffs(repositoryId, project, diffCommonCommit, top, skip, baseVersionDescriptor, targetVersionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + diffCommonCommit: diffCommonCommit, + '$top': top, + '$skip': skip, + }; + if (baseVersionDescriptor) { + queryValues.baseVersionType = baseVersionDescriptor.versionType; + queryValues.baseVersion = baseVersionDescriptor.version; + queryValues.baseVersionOptions = baseVersionDescriptor.versionOptions; + } + if (targetVersionDescriptor) { + queryValues.targetVersionType = targetVersionDescriptor.versionType; + queryValues.targetVersion = targetVersionDescriptor.version; + queryValues.targetVersionOptions = targetVersionDescriptor.versionOptions; + } + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "615588d5-c0c7-4b88-88f8-e625306446e8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitDiffs, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a particular commit. + * + * @param {string} commitId - The id of the commit. + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {string} project - Project ID or project name + * @param {number} changeCount - The number of changes to include in the result. + */ + getCommit(commitId, repositoryId, project, changeCount) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + commitId: commitId, + repositoryId: repositoryId + }; + let queryValues = { + changeCount: changeCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommit, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve git commits for a project + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria + * @param {string} project - Project ID or project name + * @param {number} skip + * @param {number} top + */ + getCommits(repositoryId, searchCriteria, project, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + if (searchCriteria == null) { + throw new TypeError('searchCriteria can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + searchCriteria: searchCriteria, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a list of commits associated with a particular push. + * + * @param {string} repositoryId - The id or friendly name of the repository. To use the friendly name, projectId must also be specified. + * @param {number} pushId - The id of the push. + * @param {string} project - Project ID or project name + * @param {number} top - The maximum number of commits to return ("get the top x commits"). + * @param {number} skip - The number of commits to skip. + * @param {boolean} includeLinks - Set to false to avoid including REST Url links for resources. Defaults to true. + */ + getPushCommits(repositoryId, pushId, project, top, skip, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + if (pushId == null) { + throw new TypeError('pushId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + pushId: pushId, + top: top, + skip: skip, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c2570c3b-5b3f-41b8-98bf-5407bfde8d58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve git commits for a project matching the search criteria + * + * @param {GitInterfaces.GitQueryCommitsCriteria} searchCriteria - Search options + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of commits to skip. + * @param {number} top - Maximum number of commits to return. + * @param {boolean} includeStatuses - True to include additional commit status information. + */ + getCommitsBatch(searchCriteria, repositoryId, project, skip, top, includeStatuses) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + '$skip': skip, + '$top': top, + includeStatuses: includeStatuses, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "6400dfb2-0bcb-462b-b992-5a57f8f1416c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, searchCriteria, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve deleted git repositories. + * + * @param {string} project - Project ID or project name + */ + getDeletedRepositories(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2b6869c4-cb25-42b5-b7a3-0d3e6be0a11a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitDeletedRepository, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the file diffs for each of the specified files + * + * @param {GitInterfaces.FileDiffsCriteria} fileDiffsCriteria - List of file parameters objects + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository + */ + getFileDiffs(fileDiffsCriteria, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "c4c5a7e6-e9f3-4730-a92b-84baacff694b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, fileDiffsCriteria, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.FileDiff, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all forks of a repository in the collection. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} collectionId - Team project collection ID. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links. + */ + getForks(repositoryNameOrId, collectionId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + collectionId: collectionId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "158c0340-bf6f-489c-9625-d572a1480d57", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepositoryRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Request that another repository's refs be fetched into this one. It syncs two existing forks. To create a fork, please see the repositories endpoint + * + * @param {GitInterfaces.GitForkSyncRequestParameters} syncParams - Source repository and ref mapping. + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links + */ + createForkSyncRequest(syncParams, repositoryNameOrId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, syncParams, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific fork sync operation's details. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {number} forkSyncOperationId - OperationId of the sync request. + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - True to include links. + */ + getForkSyncRequest(repositoryNameOrId, forkSyncOperationId, project, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + forkSyncOperationId: forkSyncOperationId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all requested fork sync operations on this repository. + * + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {boolean} includeAbandoned - True to include abandoned requests. + * @param {boolean} includeLinks - True to include links. + */ + getForkSyncRequests(repositoryNameOrId, project, includeAbandoned, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId + }; + let queryValues = { + includeAbandoned: includeAbandoned, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "1703f858-b9d1-46af-ab62-483e9e1055b5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitForkSyncRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create an import request. + * + * @param {GitInterfaces.GitImportRequest} importRequest - The import request to create. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + */ + createImportRequest(importRequest, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, importRequest, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a particular import request. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request. + */ + getImportRequest(project, repositoryId, importRequestId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + importRequestId: importRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve import requests for a repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {boolean} includeAbandoned - True to include abandoned import requests in the results. + */ + queryImportRequests(project, repositoryId, includeAbandoned) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + includeAbandoned: includeAbandoned, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retry or abandon a failed import request. + * + * @param {GitInterfaces.GitImportRequest} importRequestToUpdate - The updated version of the import request. Currently, the only change allowed is setting the Status to Queued or Abandoned. + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} importRequestId - The unique identifier for the import request to update. + */ + updateImportRequest(importRequestToUpdate, project, repositoryId, importRequestId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + importRequestId: importRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01828ddc-3600-4a41-8633-99b3a73a0eb3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, importRequestToUpdate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitImportRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItem(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemContent(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a collection of items. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {boolean} includeLinks - Set to true to include links to items. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + */ + getItems(repositoryId, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, includeLinks, versionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + includeLinks: includeLinks, + versionDescriptor: versionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemText(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content, which is always returned as a download. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} path - The item path. + * @param {string} project - Project ID or project name + * @param {string} scopePath - The path scope. The default is null. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - The recursion level of this request. The default is 'none', no recursion. + * @param {boolean} includeContentMetadata - Set to true to include content metadata. Default is false. + * @param {boolean} latestProcessedChange - Set to true to include the latest changes. Default is false. + * @param {boolean} download - Set to true to download the response as a file. Default is false. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - Version descriptor. Default is the default branch for the repository. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + * @param {boolean} resolveLfs - Set to true to resolve Git LFS pointer files to return actual content from Git LFS. Default is false. + * @param {boolean} sanitize - Set to true to sanitize an svg file and return it as image. Useful only if requested for svg file. Default is false. + */ + getItemZip(repositoryId, path, project, scopePath, recursionLevel, includeContentMetadata, latestProcessedChange, download, versionDescriptor, includeContent, resolveLfs, sanitize) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + path: path, + scopePath: scopePath, + recursionLevel: recursionLevel, + includeContentMetadata: includeContentMetadata, + latestProcessedChange: latestProcessedChange, + download: download, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + resolveLfs: resolveLfs, + sanitize: sanitize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "fb93c0db-47ed-4a31-8c20-47552878fb44", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Post for retrieving a creating a batch out of a set of items in a repo / project given a list of paths or a long path + * + * @param {GitInterfaces.GitItemRequestData} requestData - Request data attributes: ItemDescriptors, IncludeContentMetadata, LatestProcessedChange, IncludeLinks. ItemDescriptors: Collection of items to fetch, including path, version, and recursion level. IncludeContentMetadata: Whether to include metadata for all items LatestProcessedChange: Whether to include shallow ref to commit that last changed each item. IncludeLinks: Whether to include the _links field on the shallow references. + * @param {string} repositoryId - The name or ID of the repository + * @param {string} project - Project ID or project name + */ + getItemsBatch(requestData, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "630fd2e4-fb88-4f85-ad21-13f3fd1fbca9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, requestData, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Find the merge bases of two commits, optionally across forks. If otherRepositoryId is not specified, the merge bases will only be calculated within the context of the local repositoryNameOrId. + * + * @param {string} repositoryNameOrId - ID or name of the local repository. + * @param {string} commitId - First commit, usually the tip of the target branch of the potential merge. + * @param {string} otherCommitId - Other commit, usually the tip of the source branch of the potential merge. + * @param {string} project - Project ID or project name + * @param {string} otherCollectionId - The collection ID where otherCommitId lives. + * @param {string} otherRepositoryId - The repository ID where otherCommitId lives. + */ + getMergeBases(repositoryNameOrId, commitId, otherCommitId, project, otherCollectionId, otherRepositoryId) { + return __awaiter(this, void 0, void 0, function* () { + if (otherCommitId == null) { + throw new TypeError('otherCommitId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + commitId: commitId + }; + let queryValues = { + otherCommitId: otherCommitId, + otherCollectionId: otherCollectionId, + otherRepositoryId: otherRepositoryId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "7cf2abb6-c964-4f7e-9872-f78c66e72e9c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Request a git merge operation. Currently we support merging only 2 commits. + * + * @param {GitInterfaces.GitMergeParameters} mergeParameters - Parents commitIds and merge commit messsage. + * @param {string} project - Project ID or project name + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {boolean} includeLinks - True to include links + */ + createMergeRequest(mergeParameters, project, repositoryNameOrId, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "985f7ae9-844f-4906-9897-7ef41516c0e2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, mergeParameters, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitMerge, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific merge operation's details. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryNameOrId - The name or ID of the repository. + * @param {number} mergeOperationId - OperationId of the merge request. + * @param {boolean} includeLinks - True to include links + */ + getMergeRequest(project, repositoryNameOrId, mergeOperationId, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryNameOrId: repositoryNameOrId, + mergeOperationId: mergeOperationId + }; + let queryValues = { + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "985f7ae9-844f-4906-9897-7ef41516c0e2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitMerge, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Attach a new file to a pull request. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName - The name of the file. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createAttachment(customHeaders, contentStream, fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Attachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a pull request attachment. + * + * @param {string} fileName - The name of the attachment to delete. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + deleteAttachment(fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the file content of a pull request attachment. + * + * @param {string} fileName - The name of the attachment. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachmentContent(fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of files attached to a given pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachments(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Attachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the file content of a pull request attachment. + * + * @param {string} fileName - The name of the attachment. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getAttachmentZip(fileName, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fileName: fileName, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965d9361-878b-413b-a494-45d5b5fd8ab7", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a like on a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + createLike(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a like on a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + deleteLike(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get likes for a comment. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - The ID of the thread that contains the comment. + * @param {number} commentId - The ID of the comment. + * @param {string} project - Project ID or project name + */ + getLikes(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "5f2e2851-1389-425b-a00b-fb2adb3ef31b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the commits for the specified iteration of a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the iteration from which to get the commits. + * @param {string} project - Project ID or project name + * @param {number} top - Maximum number of commits to return. The maximum number of commits that can be returned per batch is 500. + * @param {number} skip - Number of commits to skip. + */ + getPullRequestIterationCommits(repositoryId, pullRequestId, iterationId, project, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + let queryValues = { + top: top, + skip: skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "e7ea0883-095f-4926-b5fb-f24691c26fb9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the commits for the specified pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestCommits(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "52823034-34a8-4576-922c-8d8b77e9e4c4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitCommitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve one conflict for a pull request by ID + * + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getPullRequestConflict(repositoryId, pullRequestId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all conflicts for a pull request + * + * @param {string} repositoryId - The repository of the Pull Request. + * @param {number} pullRequestId - The pull request ID. + * @param {string} project - Project ID or project name + * @param {number} skip - Conflicts to skip. + * @param {number} top - Conflicts to return after skip. + * @param {boolean} includeObsolete - Includes obsolete conflicts. + * @param {boolean} excludeResolved - Excludes conflicts already resolved. + * @param {boolean} onlyResolved - Returns only the conflicts that are resolved. + */ + getPullRequestConflicts(repositoryId, pullRequestId, project, skip, top, includeObsolete, excludeResolved, onlyResolved) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + '$skip': skip, + '$top': top, + includeObsolete: includeObsolete, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updatePullRequestConflict(conflict, repositoryId, pullRequestId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflict, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} pullRequestId + * @param {string} project - Project ID or project name + */ + updatePullRequestConflicts(conflictUpdates, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d840fb74-bbef-42d3-b250-564604c054a4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve the changes made in a pull request between two iterations. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration.
Iteration one is the head of the source branch at the time the pull request is created and subsequent iterations are created when there are pushes to the source branch. Allowed values are between 1 and the maximum iteration on this pull request. + * @param {string} project - Project ID or project name + * @param {number} top - Optional. The number of changes to retrieve. The default value is 100 and the maximum value is 2000. + * @param {number} skip - Optional. The number of changes to ignore. For example, to retrieve changes 101-150, set top 50 and skip to 100. + * @param {number} compareTo - ID of the pull request iteration to compare against. The default value is zero which indicates the comparison is made against the common commit between the source and target branches + */ + getPullRequestIterationChanges(repositoryId, pullRequestId, iterationId, project, top, skip, compareTo) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + let queryValues = { + '$top': top, + '$skip': skip, + '$compareTo': compareTo, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4216bdcf-b6b1-4d59-8b82-c34cc183fc8b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIterationChanges, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the specified iteration for a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration to return. + * @param {string} project - Project ID or project name + */ + getPullRequestIteration(repositoryId, pullRequestId, iterationId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d43911ee-6958-46b0-a42b-8445b8a0d004", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIteration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the list of iterations for the specified pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {boolean} includeCommits - If true, include the commits associated with each iteration in the response. + */ + getPullRequestIterations(repositoryId, pullRequestId, project, includeCommits) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + includeCommits: includeCommits, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "d43911ee-6958-46b0-a42b-8445b8a0d004", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestIteration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a pull request status on the iteration. This operation will have the same result as Create status on pull request with specified iteration ID in the request body. + * + * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {string} project - Project ID or project name + */ + createPullRequestIterationStatus(status, repositoryId, pullRequestId, iterationId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, status, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete pull request iteration status. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + deletePullRequestIterationStatus(repositoryId, pullRequestId, iterationId, statusId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the specific pull request iteration status by ID. The status ID is unique within the pull request across all iterations. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + getPullRequestIterationStatus(repositoryId, pullRequestId, iterationId, statusId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the statuses associated with a pull request iteration. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {string} project - Project ID or project name + */ + getPullRequestIterationStatuses(repositoryId, pullRequestId, iterationId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update pull request iteration statuses collection. The only supported operation type is `remove`. + * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} iterationId - ID of the pull request iteration. + * @param {string} project - Project ID or project name + */ + updatePullRequestIterationStatuses(customHeaders, patchDocument, repositoryId, pullRequestId, iterationId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + iterationId: iterationId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "75cf11c5-979f-4038-a76e-058a06adf2bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a label for a specified pull request. The only required field is the name of the new label. + * + * @param {TfsCoreInterfaces.WebApiCreateTagRequestData} label - Label to assign to the pull request. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + createPullRequestLabel(label, repositoryId, pullRequestId, project, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, label, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a label from the set of those assigned to the pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} labelIdOrName - The name or ID of the label requested. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + deletePullRequestLabels(repositoryId, pullRequestId, labelIdOrName, project, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + labelIdOrName: labelIdOrName + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves a single label that has been assigned to a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} labelIdOrName - The name or ID of the label requested. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + getPullRequestLabel(repositoryId, pullRequestId, labelIdOrName, project, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + labelIdOrName: labelIdOrName + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the labels assigned to a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project ID or project name. + */ + getPullRequestLabels(repositoryId, pullRequestId, project, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "f22387e3-984e-4c52-9c6d-fbb8f14c812d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get external properties of the pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestProperties(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "48a52185-5b9e-4736-9dc1-bb1e2feac80b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create or update pull request external properties. The patch operation can be `add`, `replace` or `remove`. For `add` operation, the path can be empty. If the path is empty, the value must be a list of key value pairs. For `replace` operation, the path cannot be empty. If the path does not exist, the property will be added to the collection. For `remove` operation, the path cannot be empty. If the path does not exist, no action will be performed. + * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Properties to add, replace or remove in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + updatePullRequestProperties(customHeaders, patchDocument, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "48a52185-5b9e-4736-9dc1-bb1e2feac80b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * This API is used to find what pull requests are related to a given commit. It can be used to either find the pull request that created a particular merge commit or it can be used to find all pull requests that have ever merged a particular commit. The input is a list of queries which each contain a list of commits. For each commit that you search against, you will get back a dictionary of commit -> pull requests. + * + * @param {GitInterfaces.GitPullRequestQuery} queries - The list of queries to perform. + * @param {string} repositoryId - ID of the repository. + * @param {string} project - Project ID or project name + */ + getPullRequestQuery(queries, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b3a6eebe-9cf0-49ea-b6cb-1a4c5f5007b0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, queries, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a reviewer to a pull request or cast a vote. + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer's vote.
If the reviewer's ID is included here, it must match the reviewerID parameter.
Reviewers can set their own vote with this method. When adding other reviewers, vote must be set to zero. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. + * @param {string} project - Project ID or project name + */ + createPullRequestReviewer(reviewer, repositoryId, pullRequestId, reviewerId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add reviewers to a pull request. + * + * @param {VSSInterfaces.IdentityRef[]} reviewers - Reviewers to add to the pull request. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createPullRequestReviewers(reviewers, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, reviewers, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add an unmaterialized identity to the reviewers of a pull request. + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer to add to the pull request. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createUnmaterializedPullRequestReviewer(reviewer, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Remove a reviewer from a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer to remove. + * @param {string} project - Project ID or project name + */ + deletePullRequestReviewer(repositoryId, pullRequestId, reviewerId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a particular reviewer on a pull request + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. + * @param {string} project - Project ID or project name + */ + getPullRequestReviewer(repositoryId, pullRequestId, reviewerId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve the reviewers for a pull request + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestReviewers(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Edit a reviewer entry. These fields are patchable: isFlagged, hasDeclined + * + * @param {GitInterfaces.IdentityRefWithVote} reviewer - Reviewer data.
If the reviewer's ID is included here, it must match the reviewerID parameter. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} reviewerId - ID of the reviewer. + * @param {string} project - Project ID or project name + */ + updatePullRequestReviewer(reviewer, repositoryId, pullRequestId, reviewerId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + reviewerId: reviewerId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, reviewer, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Reset the votes of multiple reviewers on a pull request. NOTE: This endpoint only supports updating votes, but does not support updating required reviewers (use policy) or display names. + * + * @param {GitInterfaces.IdentityRefWithVote[]} patchVotes - IDs of the reviewers whose votes will be reset to zero + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request + * @param {string} project - Project ID or project name + */ + updatePullRequestReviewers(patchVotes, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "4b6702c7-aa35-4b89-9c96-b9abf6d3e540", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, patchVotes, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a pull request. + * + * @param {number} pullRequestId - The ID of the pull request to retrieve. + * @param {string} project - Project ID or project name + */ + getPullRequestById(pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "01a46dea-7d46-4d40-bc84-319e7c260d99", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all pull requests matching a specified criteria. + * + * @param {string} project - Project ID or project name + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. + * @param {number} maxCommentLength - Not used. + * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {number} top - The number of pull requests to retrieve. + */ + getPullRequestsByProject(project, searchCriteria, maxCommentLength, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + if (searchCriteria == null) { + throw new TypeError('searchCriteria can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + searchCriteria: searchCriteria, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a5d28130-9cd2-40fa-9f08-902e7daa9efb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a pull request. + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToCreate - The pull request to create. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {string} project - Project ID or project name + * @param {boolean} supportsIterations - If true, subsequent pushes to the pull request will be individually reviewable. Set this to false for large pull requests for performance reasons if this functionality is not needed. + */ + createPullRequest(gitPullRequestToCreate, repositoryId, project, supportsIterations) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + supportsIterations: supportsIterations, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, gitPullRequestToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - The ID of the pull request to retrieve. + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength - Not used. + * @param {number} skip - Not used. + * @param {number} top - Not used. + * @param {boolean} includeCommits - If true, the pull request will be returned with the associated commits. + * @param {boolean} includeWorkItemRefs - If true, the pull request will be returned with the associated work item references. + */ + getPullRequest(repositoryId, pullRequestId, project, maxCommentLength, skip, top, includeCommits, includeWorkItemRefs) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + includeCommits: includeCommits, + includeWorkItemRefs: includeWorkItemRefs, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all pull requests matching a specified criteria. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {GitInterfaces.GitPullRequestSearchCriteria} searchCriteria - Pull requests will be returned that match this search criteria. + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength - Not used. + * @param {number} skip - The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {number} top - The number of pull requests to retrieve. + */ + getPullRequests(repositoryId, searchCriteria, project, maxCommentLength, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + if (searchCriteria == null) { + throw new TypeError('searchCriteria can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + searchCriteria: searchCriteria, + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a pull request + * + * @param {GitInterfaces.GitPullRequest} gitPullRequestToUpdate - The pull request content that should be updated. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request to update. + * @param {string} project - Project ID or project name + */ + updatePullRequest(gitPullRequestToUpdate, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9946fd70-0d40-406e-b686-b4744cbbcc37", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, gitPullRequestToUpdate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Sends an e-mail notification about a specific pull request to a set of recipients + * + * @param {GitInterfaces.ShareNotificationContext} userMessage + * @param {string} repositoryId - ID of the git repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + sharePullRequest(userMessage, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "696f3a82-47c9-487f-9117-b9d00972ca84", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, userMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a pull request status. + * + * @param {GitInterfaces.GitPullRequestStatus} status - Pull request status to create. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createPullRequestStatus(status, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, status, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete pull request status. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + deletePullRequestStatus(repositoryId, pullRequestId, statusId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the specific pull request status by ID. The status ID is unique within the pull request across all iterations. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} statusId - ID of the pull request status. + * @param {string} project - Project ID or project name + */ + getPullRequestStatus(repositoryId, pullRequestId, statusId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + statusId: statusId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all the statuses associated with a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestStatuses(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update pull request statuses collection. The only supported operation type is `remove`. + * + * @param {VSSInterfaces.JsonPatchDocument} patchDocument - Operations to apply to the pull request statuses in JSON Patch format. + * @param {string} repositoryId - The repository ID of the pull request’s target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + updatePullRequestStatuses(customHeaders, patchDocument, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "b5f6bb4f-8d1e-4d79-8d11-4c9172c99c35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, patchDocument, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a comment on a specific thread in a pull request (up to 500 comments can be created per thread). + * + * @param {GitInterfaces.Comment} comment - The comment to create. Comments can be up to 150,000 characters. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {string} project - Project ID or project name + */ + createComment(comment, repositoryId, pullRequestId, threadId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, comment, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a comment associated with a specific thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment. + * @param {string} project - Project ID or project name + */ + deleteComment(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a comment associated with a specific thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment. + * @param {string} project - Project ID or project name + */ + getComment(repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all comments associated with a specific thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread. + * @param {string} project - Project ID or project name + */ + getComments(repositoryId, pullRequestId, threadId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a comment associated with a specific thread in a pull request. + * + * @param {GitInterfaces.Comment} comment - The comment content that should be updated. Comments can be up to 150,000 characters. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread that the desired comment is in. + * @param {number} commentId - ID of the comment to update. + * @param {string} project - Project ID or project name + */ + updateComment(comment, repositoryId, pullRequestId, threadId, commentId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "965a3ec7-5ed8-455a-bdcb-835a5ea7fe7b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, comment, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a thread in a pull request. + * + * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread to create. Thread must contain at least one comment. + * @param {string} repositoryId - Repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + createThread(commentThread, repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, commentThread, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a thread in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread. + * @param {string} project - Project ID or project name + * @param {number} iteration - If specified, thread position will be tracked using this iteration as the right side of the diff. + * @param {number} baseIteration - If specified, thread position will be tracked using this iteration as the left side of the diff. + */ + getPullRequestThread(repositoryId, pullRequestId, threadId, project, iteration, baseIteration) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + let queryValues = { + '$iteration': iteration, + '$baseIteration': baseIteration, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all threads in a pull request. + * + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + * @param {number} iteration - If specified, thread positions will be tracked using this iteration as the right side of the diff. + * @param {number} baseIteration - If specified, thread positions will be tracked using this iteration as the left side of the diff. + */ + getThreads(repositoryId, pullRequestId, project, iteration, baseIteration) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + let queryValues = { + '$iteration': iteration, + '$baseIteration': baseIteration, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a thread in a pull request. + * + * @param {GitInterfaces.GitPullRequestCommentThread} commentThread - The thread content that should be updated. + * @param {string} repositoryId - The repository ID of the pull request's target branch. + * @param {number} pullRequestId - ID of the pull request. + * @param {number} threadId - ID of the thread to update. + * @param {string} project - Project ID or project name + */ + updateThread(commentThread, repositoryId, pullRequestId, threadId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId, + threadId: threadId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "ab6e2e5d-a0b7-4153-b64a-a4efe0d49449", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, commentThread, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPullRequestCommentThread, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a list of work items associated with a pull request. + * + * @param {string} repositoryId - ID or name of the repository. + * @param {number} pullRequestId - ID of the pull request. + * @param {string} project - Project ID or project name + */ + getPullRequestWorkItemRefs(repositoryId, pullRequestId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pullRequestId: pullRequestId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "0a637fcc-5370-4ce8-b0e8-98091f5f9482", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Push changes to the repository. + * + * @param {GitInterfaces.GitPush} push + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + */ + createPush(push, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, push, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves a particular push. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {number} pushId - ID of the push. + * @param {string} project - Project ID or project name + * @param {number} includeCommits - The number of commits to include in the result. + * @param {boolean} includeRefUpdates - If true, include the list of refs that were updated by the push. + */ + getPush(repositoryId, pushId, project, includeCommits, includeRefUpdates) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + pushId: pushId + }; + let queryValues = { + includeCommits: includeCommits, + includeRefUpdates: includeRefUpdates, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves pushes associated with the specified repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of pushes to skip. + * @param {number} top - Number of pushes to return. + * @param {GitInterfaces.GitPushSearchCriteria} searchCriteria - Search criteria attributes: fromDate, toDate, pusherId, refName, includeRefUpdates or includeLinks. fromDate: Start date to search from. toDate: End date to search to. pusherId: Identity of the person who submitted the push. refName: Branch name to consider. includeRefUpdates: If true, include the list of refs that were updated by the push. includeLinks: Whether to include the _links field on the shallow references. + */ + getPushes(repositoryId, project, skip, top, searchCriteria) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + '$skip': skip, + '$top': top, + searchCriteria: searchCriteria, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "git", "ea98d07b-3c87-4971-8ede-a613694ffb55", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitPush, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Destroy (hard delete) a soft-deleted Git repository. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. + */ + deleteRepositoryFromRecycleBin(project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve soft-deleted git repositories from the recycle bin. + * + * @param {string} project - Project ID or project name + */ + getRecycleBinRepositories(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitDeletedRepository, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Recover a soft-deleted Git repository. Recently deleted repositories go into a soft-delete state for a period of time before they are hard deleted and become unrecoverable. + * + * @param {GitInterfaces.GitRecycleBinRepositoryDetails} repositoryDetails + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The ID of the repository. + */ + restoreRepositoryFromRecycleBin(repositoryDetails, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "a663da97-81db-4eb3-8b83-287670f63073", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, repositoryDetails, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queries the provided repository for its refs and returns them. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} filter - [optional] A filter to apply to the refs (starts with). + * @param {boolean} includeLinks - [optional] Specifies if referenceLinks should be included in the result. default is false. + * @param {boolean} includeStatuses - [optional] Includes up to the first 1000 commit statuses for each ref. The default value is false. + * @param {boolean} includeMyBranches - [optional] Includes only branches that the user owns, the branches the user favorites, and the default branch. The default value is false. Cannot be combined with the filter parameter. + * @param {boolean} latestStatusesOnly - [optional] True to include only the tip commit status for each ref. This option requires `includeStatuses` to be true. The default value is false. + * @param {boolean} peelTags - [optional] Annotated tags will populate the PeeledObjectId property. default is false. + * @param {string} filterContains - [optional] A filter to apply to the refs (contains). + */ + getRefs(repositoryId, project, filter, includeLinks, includeStatuses, includeMyBranches, latestStatusesOnly, peelTags, filterContains) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + filter: filter, + includeLinks: includeLinks, + includeStatuses: includeStatuses, + includeMyBranches: includeMyBranches, + latestStatusesOnly: latestStatusesOnly, + peelTags: peelTags, + filterContains: filterContains, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Lock or Unlock a branch. + * + * @param {GitInterfaces.GitRefUpdate} newRefInfo - The ref update action (lock/unlock) to perform + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} filter - The name of the branch to lock/unlock + * @param {string} project - Project ID or project name + * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + */ + updateRef(newRefInfo, repositoryId, filter, project, projectId) { + return __awaiter(this, void 0, void 0, function* () { + if (filter == null) { + throw new TypeError('filter can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + filter: filter, + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, newRefInfo, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creating, updating, or deleting refs(branches). + * + * @param {GitInterfaces.GitRefUpdate[]} refUpdates - List of ref updates to attempt to perform + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + * @param {string} projectId - ID or name of the team project. Optional if specifying an ID for repository. + */ + updateRefs(refUpdates, repositoryId, project, projectId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + projectId: projectId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "2d874a60-a811-4f62-9c9f-963a6ea0a55b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, refUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a ref favorite + * + * @param {GitInterfaces.GitRefFavorite} favorite - The ref favorite to create. + * @param {string} project - Project ID or project name + */ + createFavorite(favorite, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, favorite, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the refs favorite specified + * + * @param {string} project - Project ID or project name + * @param {number} favoriteId - The Id of the ref favorite to delete. + */ + deleteRefFavorite(project, favoriteId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + favoriteId: favoriteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the refs favorite for a favorite Id. + * + * @param {string} project - Project ID or project name + * @param {number} favoriteId - The Id of the requested ref favorite. + */ + getRefFavorite(project, favoriteId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + favoriteId: favoriteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the refs favorites for a repo and an identity. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - The id of the repository. + * @param {string} identityId - The id of the identity whose favorites are to be retrieved. If null, the requesting identity is used. + */ + getRefFavorites(project, repositoryId, identityId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + repositoryId: repositoryId, + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "876f70af-5792-485a-a1c7-d0a7b2f42bbb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRefFavorite, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a git repository in a team project. + * + * @param {GitInterfaces.GitRepositoryCreateOptions} gitRepositoryToCreate - Specify the repo name, team project and/or parent repository. Team project information can be omitted from gitRepositoryToCreate if the request is project-scoped (i.e., includes project Id). + * @param {string} project - Project ID or project name + * @param {string} sourceRef - [optional] Specify the source refs to use while creating a fork repo + */ + createRepository(gitRepositoryToCreate, project, sourceRef) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + sourceRef: sourceRef, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, gitRepositoryToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a git repository + * + * @param {string} repositoryId - The ID of the repository. + * @param {string} project - Project ID or project name + */ + deleteRepository(repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve git repositories. + * + * @param {string} project - Project ID or project name + * @param {boolean} includeLinks - [optional] True to include reference links. The default value is false. + * @param {boolean} includeAllUrls - [optional] True to include all remote URLs. The default value is false. + * @param {boolean} includeHidden - [optional] True to include hidden repositories. The default value is false. + */ + getRepositories(project, includeLinks, includeAllUrls, includeHidden) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + includeLinks: includeLinks, + includeAllUrls: includeAllUrls, + includeHidden: includeHidden, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a git repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {string} project - Project ID or project name + */ + getRepository(repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a git repository. + * + * @param {string} repositoryId - The name or ID of the repository. + * @param {boolean} includeParent - True to include parent repository. Only available in authenticated calls. + * @param {string} project - Project ID or project name + */ + getRepositoryWithParent(repositoryId, includeParent, project) { + return __awaiter(this, void 0, void 0, function* () { + if (includeParent == null) { + throw new TypeError('includeParent can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + includeParent: includeParent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the Git repository with either a new repo name or a new default branch. + * + * @param {GitInterfaces.GitRepository} newRepositoryInfo - Specify a new repo name or a new default branch of the repository + * @param {string} repositoryId - The ID of the repository. + * @param {string} project - Project ID or project name + */ + updateRepository(newRepositoryInfo, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "225f7195-f9c7-4d14-ab28-a83f7ff77e1f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, newRepositoryInfo, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRepository, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve one conflict for a revert by ID + * + * @param {string} repositoryId + * @param {number} revertId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + getRevertConflict(repositoryId, revertId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + revertId: revertId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all conflicts for a revert + * + * @param {string} repositoryId + * @param {number} revertId + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} top + * @param {boolean} excludeResolved + * @param {boolean} onlyResolved + * @param {boolean} includeObsolete + */ + getRevertConflicts(repositoryId, revertId, project, continuationToken, top, excludeResolved, onlyResolved, includeObsolete) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + revertId: revertId + }; + let queryValues = { + continuationToken: continuationToken, + '$top': top, + excludeResolved: excludeResolved, + onlyResolved: onlyResolved, + includeObsolete: includeObsolete, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update merge conflict resolution + * + * @param {GitInterfaces.GitConflict} conflict + * @param {string} repositoryId + * @param {number} revertId + * @param {number} conflictId + * @param {string} project - Project ID or project name + */ + updateRevertConflict(conflict, repositoryId, revertId, conflictId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + revertId: revertId, + conflictId: conflictId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflict, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflict, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update multiple merge conflict resolutions + * + * @param {GitInterfaces.GitConflict[]} conflictUpdates + * @param {string} repositoryId + * @param {number} revertId + * @param {string} project - Project ID or project name + */ + updateRevertConflicts(conflictUpdates, repositoryId, revertId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + revertId: revertId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "10d7ae6d-1050-446d-852a-bd5d99f834bf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, conflictUpdates, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitConflictUpdateResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Starts the operation to create a new branch which reverts changes introduced by either a specific commit or commits that are associated to a pull request. + * + * @param {GitInterfaces.GitAsyncRefOperationParameters} revertToCreate + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + */ + createRevert(revertToCreate, project, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, revertToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a revert operation by revert Id. + * + * @param {string} project - Project ID or project name + * @param {number} revertId - ID of the revert operation. + * @param {string} repositoryId - ID of the repository. + */ + getRevert(project, revertId, repositoryId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + revertId: revertId, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve information about a revert operation for a specific branch. + * + * @param {string} project - Project ID or project name + * @param {string} repositoryId - ID of the repository. + * @param {string} refName - The GitAsyncRefOperationParameters generatedRefName used for the revert operation. + */ + getRevertForRefName(project, repositoryId, refName) { + return __awaiter(this, void 0, void 0, function* () { + if (refName == null) { + throw new TypeError('refName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + refName: refName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "bc866058-5449-4715-9cf1-a510b6ff193c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitRevert, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create Git commit status. + * + * @param {GitInterfaces.GitStatus} gitCommitStatusToCreate - Git commit status object to create. + * @param {string} commitId - ID of the Git commit. + * @param {string} repositoryId - ID of the repository. + * @param {string} project - Project ID or project name + */ + createCommitStatus(gitCommitStatusToCreate, commitId, repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + commitId: commitId, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "428dd4fb-fda5-4722-af02-9313b80305da", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, gitCommitStatusToCreate, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get statuses associated with the Git commit. + * + * @param {string} commitId - ID of the Git commit. + * @param {string} repositoryId - ID of the repository. + * @param {string} project - Project ID or project name + * @param {number} top - Optional. The number of statuses to retrieve. Default is 1000. + * @param {number} skip - Optional. The number of statuses to ignore. Default is 0. For example, to retrieve results 101-150, set top to 50 and skip to 100. + * @param {boolean} latestOnly - The flag indicates whether to get only latest statuses grouped by `Context.Name` and `Context.Genre`. + */ + getStatuses(commitId, repositoryId, project, top, skip, latestOnly) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + commitId: commitId, + repositoryId: repositoryId + }; + let queryValues = { + top: top, + skip: skip, + latestOnly: latestOnly, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "428dd4fb-fda5-4722-af02-9313b80305da", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitStatus, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a pull request suggestion for a particular repository or team project. + * + * @param {string} repositoryId - ID of the git repository. + * @param {string} project - Project ID or project name + */ + getSuggestions(repositoryId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "9393b4fb-4445-4919-972b-9ad16f442d83", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + * + * @param {string} repositoryId - Repository Id. + * @param {string} sha1 - SHA1 hash of the tree object. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project Id. + * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. + * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. + */ + getTree(repositoryId, sha1, project, projectId, recursive, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + projectId: projectId, + recursive: recursive, + fileName: fileName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, GitInterfaces.TypeInfo.GitTreeRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * The Tree endpoint returns the collection of objects underneath the specified tree. Trees are folders in a Git repository. + * + * @param {string} repositoryId - Repository Id. + * @param {string} sha1 - SHA1 hash of the tree object. + * @param {string} project - Project ID or project name + * @param {string} projectId - Project Id. + * @param {boolean} recursive - Search recursively. Include trees underneath this tree. Default is false. + * @param {string} fileName - Name to use if a .zip file is returned. Default is the object ID. + */ + getTreeZip(repositoryId, sha1, project, projectId, recursive, fileName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId, + sha1: sha1 + }; + let queryValues = { + projectId: projectId, + recursive: recursive, + fileName: fileName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "git", "729f6437-6f92-44ec-8bee-273a7111063c", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } +} +GitApi.RESOURCE_AREA_ID = "4e080c62-fa21-4fbc-8fef-2a10a2b38049"; +exports.GitApi = GitApi; diff --git a/node_modules/azure-devops-node-api/LICENSE b/node_modules/azure-devops-node-api/LICENSE new file mode 100644 index 0000000..593446a --- /dev/null +++ b/node_modules/azure-devops-node-api/LICENSE @@ -0,0 +1,21 @@ +Visual Studio Team Services Client for Node.js + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/azure-devops-node-api/LocationsApi.d.ts b/node_modules/azure-devops-node-api/LocationsApi.d.ts new file mode 100644 index 0000000..58294d4 --- /dev/null +++ b/node_modules/azure-devops-node-api/LocationsApi.d.ts @@ -0,0 +1,68 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import LocationsInterfaces = require("./interfaces/LocationsInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface ILocationsApi extends basem.ClientApiBase { + getConnectionData(connectOptions?: VSSInterfaces.ConnectOptions, lastChangeId?: number, lastChangeId64?: number): Promise; + getResourceArea(areaId: string, enterpriseName?: string, organizationName?: string): Promise; + getResourceAreaByHost(areaId: string, hostId: string): Promise; + getResourceAreas(enterpriseName?: string, organizationName?: string): Promise; + getResourceAreasByHost(hostId: string): Promise; + deleteServiceDefinition(serviceType: string, identifier: string): Promise; + getServiceDefinition(serviceType: string, identifier: string, allowFaultIn?: boolean, previewFaultIn?: boolean): Promise; + getServiceDefinitions(serviceType?: string): Promise; + updateServiceDefinitions(serviceDefinitions: VSSInterfaces.VssJsonCollectionWrapperV): Promise; +} +export declare class LocationsApi extends basem.ClientApiBase implements ILocationsApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * This was copied and adapted from TeamFoundationConnectionService.Connect() + * + * @param {VSSInterfaces.ConnectOptions} connectOptions + * @param {number} lastChangeId - Obsolete 32-bit LastChangeId + * @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId + */ + getConnectionData(connectOptions?: VSSInterfaces.ConnectOptions, lastChangeId?: number, lastChangeId64?: number): Promise; + /** + * @param {string} areaId + * @param {string} enterpriseName + * @param {string} organizationName + */ + getResourceArea(areaId: string, enterpriseName?: string, organizationName?: string): Promise; + /** + * @param {string} areaId + * @param {string} hostId + */ + getResourceAreaByHost(areaId: string, hostId: string): Promise; + /** + * @param {string} enterpriseName + * @param {string} organizationName + */ + getResourceAreas(enterpriseName?: string, organizationName?: string): Promise; + /** + * @param {string} hostId + */ + getResourceAreasByHost(hostId: string): Promise; + /** + * @param {string} serviceType + * @param {string} identifier + */ + deleteServiceDefinition(serviceType: string, identifier: string): Promise; + /** + * Finds a given service definition. + * + * @param {string} serviceType + * @param {string} identifier + * @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS. + * @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it. + */ + getServiceDefinition(serviceType: string, identifier: string, allowFaultIn?: boolean, previewFaultIn?: boolean): Promise; + /** + * @param {string} serviceType + */ + getServiceDefinitions(serviceType?: string): Promise; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} serviceDefinitions + */ + updateServiceDefinitions(serviceDefinitions: VSSInterfaces.VssJsonCollectionWrapperV): Promise; +} diff --git a/node_modules/azure-devops-node-api/LocationsApi.js b/node_modules/azure-devops-node-api/LocationsApi.js new file mode 100644 index 0000000..a802142 --- /dev/null +++ b/node_modules/azure-devops-node-api/LocationsApi.js @@ -0,0 +1,280 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const LocationsInterfaces = require("./interfaces/LocationsInterfaces"); +class LocationsApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Locations-api', options); + } + /** + * This was copied and adapted from TeamFoundationConnectionService.Connect() + * + * @param {VSSInterfaces.ConnectOptions} connectOptions + * @param {number} lastChangeId - Obsolete 32-bit LastChangeId + * @param {number} lastChangeId64 - Non-truncated 64-bit LastChangeId + */ + getConnectionData(connectOptions, lastChangeId, lastChangeId64) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + connectOptions: connectOptions, + lastChangeId: lastChangeId, + lastChangeId64: lastChangeId64, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "00d9565f-ed9c-4a06-9a50-00e7896ccab4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ConnectionData, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} areaId + * @param {string} enterpriseName + * @param {string} organizationName + */ + getResourceArea(areaId, enterpriseName, organizationName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + areaId: areaId + }; + let queryValues = { + enterpriseName: enterpriseName, + organizationName: organizationName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} areaId + * @param {string} hostId + */ + getResourceAreaByHost(areaId, hostId) { + return __awaiter(this, void 0, void 0, function* () { + if (hostId == null) { + throw new TypeError('hostId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + areaId: areaId + }; + let queryValues = { + hostId: hostId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} enterpriseName + * @param {string} organizationName + */ + getResourceAreas(enterpriseName, organizationName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + enterpriseName: enterpriseName, + organizationName: organizationName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} hostId + */ + getResourceAreasByHost(hostId) { + return __awaiter(this, void 0, void 0, function* () { + if (hostId == null) { + throw new TypeError('hostId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + hostId: hostId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "e81700f7-3be2-46de-8624-2eb35882fcaa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} serviceType + * @param {string} identifier + */ + deleteServiceDefinition(serviceType, identifier) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + serviceType: serviceType, + identifier: identifier + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Finds a given service definition. + * + * @param {string} serviceType + * @param {string} identifier + * @param {boolean} allowFaultIn - If true, we will attempt to fault in a host instance mapping if in SPS. + * @param {boolean} previewFaultIn - If true, we will calculate and return a host instance mapping, but not persist it. + */ + getServiceDefinition(serviceType, identifier, allowFaultIn, previewFaultIn) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + serviceType: serviceType, + identifier: identifier + }; + let queryValues = { + allowFaultIn: allowFaultIn, + previewFaultIn: previewFaultIn, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} serviceType + */ + getServiceDefinitions(serviceType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + serviceType: serviceType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, LocationsInterfaces.TypeInfo.ServiceDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} serviceDefinitions + */ + updateServiceDefinitions(serviceDefinitions) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Location", "d810a47d-f4f4-4a62-a03f-fa1860585c4c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, serviceDefinitions, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.LocationsApi = LocationsApi; diff --git a/node_modules/azure-devops-node-api/NotificationApi.d.ts b/node_modules/azure-devops-node-api/NotificationApi.d.ts new file mode 100644 index 0000000..b141293 --- /dev/null +++ b/node_modules/azure-devops-node-api/NotificationApi.d.ts @@ -0,0 +1,175 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import NotificationInterfaces = require("./interfaces/NotificationInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface INotificationApi extends basem.ClientApiBase { + performBatchNotificationOperations(operation: NotificationInterfaces.BatchNotificationOperation): Promise; + listLogs(source: string, entryId?: string, startTime?: Date, endTime?: Date): Promise; + getSubscriptionDiagnostics(subscriptionId: string): Promise; + updateSubscriptionDiagnostics(updateParameters: NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters, subscriptionId: string): Promise; + publishEvent(notificationEvent: VSSInterfaces.VssNotificationEvent): Promise; + transformEvent(transformRequest: NotificationInterfaces.EventTransformRequest): Promise; + queryEventTypes(inputValuesQuery: NotificationInterfaces.FieldValuesQuery, eventType: string): Promise; + getEventType(eventType: string): Promise; + listEventTypes(publisherId?: string): Promise; + getNotificationReasons(notificationId: number): Promise; + listNotificationReasons(notificationIds?: number): Promise; + getSettings(): Promise; + updateSettings(updateParameters: NotificationInterfaces.NotificationAdminSettingsUpdateParameters): Promise; + getSubscriber(subscriberId: string): Promise; + updateSubscriber(updateParameters: NotificationInterfaces.NotificationSubscriberUpdateParameters, subscriberId: string): Promise; + querySubscriptions(subscriptionQuery: NotificationInterfaces.SubscriptionQuery): Promise; + createSubscription(createParameters: NotificationInterfaces.NotificationSubscriptionCreateParameters): Promise; + deleteSubscription(subscriptionId: string): Promise; + getSubscription(subscriptionId: string, queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise; + listSubscriptions(targetId?: string, ids?: string[], queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise; + updateSubscription(updateParameters: NotificationInterfaces.NotificationSubscriptionUpdateParameters, subscriptionId: string): Promise; + getSubscriptionTemplates(): Promise; + publishTokenEvent(notificationEvent: VSSInterfaces.VssNotificationEvent): Promise; + updateSubscriptionUserSettings(userSettings: NotificationInterfaces.SubscriptionUserSettings, subscriptionId: string, userId: string): Promise; +} +export declare class NotificationApi extends basem.ClientApiBase implements INotificationApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {NotificationInterfaces.BatchNotificationOperation} operation + */ + performBatchNotificationOperations(operation: NotificationInterfaces.BatchNotificationOperation): Promise; + /** + * Get a list of diagnostic logs for this service. + * + * @param {string} source - ID specifying which type of logs to check diagnostics for. + * @param {string} entryId - The ID of the specific log to query for. + * @param {Date} startTime - Start time for the time range to query in. + * @param {Date} endTime - End time for the time range to query in. + */ + listLogs(source: string, entryId?: string, startTime?: Date, endTime?: Date): Promise; + /** + * Get the diagnostics settings for a subscription. + * + * @param {string} subscriptionId - The id of the notifications subscription. + */ + getSubscriptionDiagnostics(subscriptionId: string): Promise; + /** + * Update the diagnostics settings for a subscription. + * + * @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters + * @param {string} subscriptionId - The id of the notifications subscription. + */ + updateSubscriptionDiagnostics(updateParameters: NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters, subscriptionId: string): Promise; + /** + * Publish an event. This request must be directed to the service "extmgmt". + * + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + */ + publishEvent(notificationEvent: VSSInterfaces.VssNotificationEvent): Promise; + /** + * Tranform a notification event. + * + * @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed. + */ + transformEvent(transformRequest: NotificationInterfaces.EventTransformRequest): Promise; + /** + * @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery + * @param {string} eventType + */ + queryEventTypes(inputValuesQuery: NotificationInterfaces.FieldValuesQuery, eventType: string): Promise; + /** + * Get a specific event type. + * + * @param {string} eventType - The ID of the event type. + */ + getEventType(eventType: string): Promise; + /** + * List available event types for this service. Optionally filter by only event types for the specified publisher. + * + * @param {string} publisherId - Limit to event types for this publisher + */ + listEventTypes(publisherId?: string): Promise; + /** + * @param {number} notificationId + */ + getNotificationReasons(notificationId: number): Promise; + /** + * @param {number} notificationIds + */ + listNotificationReasons(notificationIds?: number): Promise; + /** + */ + getSettings(): Promise; + /** + * @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters + */ + updateSettings(updateParameters: NotificationInterfaces.NotificationAdminSettingsUpdateParameters): Promise; + /** + * Get delivery preferences of a notifications subscriber. + * + * @param {string} subscriberId - ID of the user or group. + */ + getSubscriber(subscriberId: string): Promise; + /** + * Update delivery preferences of a notifications subscriber. + * + * @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters + * @param {string} subscriberId - ID of the user or group. + */ + updateSubscriber(updateParameters: NotificationInterfaces.NotificationSubscriberUpdateParameters, subscriberId: string): Promise; + /** + * Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + * + * @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery + */ + querySubscriptions(subscriptionQuery: NotificationInterfaces.SubscriptionQuery): Promise; + /** + * Create a new subscription. + * + * @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters + */ + createSubscription(createParameters: NotificationInterfaces.NotificationSubscriptionCreateParameters): Promise; + /** + * Delete a subscription. + * + * @param {string} subscriptionId + */ + deleteSubscription(subscriptionId: string): Promise; + /** + * Get a notification subscription by its ID. + * + * @param {string} subscriptionId + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + */ + getSubscription(subscriptionId: string, queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise; + /** + * Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. + * + * @param {string} targetId - User or Group ID + * @param {string[]} ids - List of subscription IDs + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + */ + listSubscriptions(targetId?: string, ids?: string[], queryFlags?: NotificationInterfaces.SubscriptionQueryFlags): Promise; + /** + * Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. + * + * @param {NotificationInterfaces.NotificationSubscriptionUpdateParameters} updateParameters + * @param {string} subscriptionId + */ + updateSubscription(updateParameters: NotificationInterfaces.NotificationSubscriptionUpdateParameters, subscriptionId: string): Promise; + /** + * Get available subscription templates. + * + */ + getSubscriptionTemplates(): Promise; + /** + * Publish an event. This request is only for the Token service since it's a deploy only service. + * + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + */ + publishTokenEvent(notificationEvent: VSSInterfaces.VssNotificationEvent): Promise; + /** + * Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. + * + * @param {NotificationInterfaces.SubscriptionUserSettings} userSettings + * @param {string} subscriptionId + * @param {string} userId - ID of the user + */ + updateSubscriptionUserSettings(userSettings: NotificationInterfaces.SubscriptionUserSettings, subscriptionId: string, userId: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/NotificationApi.js b/node_modules/azure-devops-node-api/NotificationApi.js new file mode 100644 index 0000000..a6cb9e7 --- /dev/null +++ b/node_modules/azure-devops-node-api/NotificationApi.js @@ -0,0 +1,646 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const NotificationInterfaces = require("./interfaces/NotificationInterfaces"); +const VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +class NotificationApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Notification-api', options); + } + /** + * @param {NotificationInterfaces.BatchNotificationOperation} operation + */ + performBatchNotificationOperations(operation) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "8f3c6ab2-5bae-4537-b16e-f84e0955599e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, operation, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of diagnostic logs for this service. + * + * @param {string} source - ID specifying which type of logs to check diagnostics for. + * @param {string} entryId - The ID of the specific log to query for. + * @param {Date} startTime - Start time for the time range to query in. + * @param {Date} endTime - End time for the time range to query in. + */ + listLogs(source, entryId, startTime, endTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + source: source, + entryId: entryId + }; + let queryValues = { + startTime: startTime, + endTime: endTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "991842f3-eb16-4aea-ac81-81353ef2b75c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.INotificationDiagnosticLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the diagnostics settings for a subscription. + * + * @param {string} subscriptionId - The id of the notifications subscription. + */ + getSubscriptionDiagnostics(subscriptionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the diagnostics settings for a subscription. + * + * @param {NotificationInterfaces.UpdateSubscripitonDiagnosticsParameters} updateParameters + * @param {string} subscriptionId - The id of the notifications subscription. + */ + updateSubscriptionDiagnostics(updateParameters, subscriptionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "20f1929d-4be7-4c2e-a74e-d47640ff3418", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.SubscriptionDiagnostics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Publish an event. This request must be directed to the service "extmgmt". + * + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + */ + publishEvent(notificationEvent) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "14c57b7a-c0e6-4555-9f51-e067188fdd8e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, notificationEvent, options); + let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Tranform a notification event. + * + * @param {NotificationInterfaces.EventTransformRequest} transformRequest - Object to be transformed. + */ + transformEvent(transformRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "9463a800-1b44-450e-9083-f948ea174b45", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, transformRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NotificationInterfaces.FieldValuesQuery} inputValuesQuery + * @param {string} eventType + */ + queryEventTypes(inputValuesQuery, eventType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + eventType: eventType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "b5bbdd21-c178-4398-b6db-0166d910028a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, inputValuesQuery, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventField, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific event type. + * + * @param {string} eventType - The ID of the event type. + */ + getEventType(eventType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + eventType: eventType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List available event types for this service. Optionally filter by only event types for the specified publisher. + * + * @param {string} publisherId - Limit to event types for this publisher + */ + listEventTypes(publisherId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + publisherId: publisherId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cc84fb5f-6247-4c7a-aeae-e5a3c3fddb21", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationEventType, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} notificationId + */ + getNotificationReasons(notificationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + notificationId: notificationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} notificationIds + */ + listNotificationReasons(notificationIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + notificationIds: notificationIds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "19824fa9-1c76-40e6-9cce-cf0b9ca1cb60", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationReason, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getSettings() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NotificationInterfaces.NotificationAdminSettingsUpdateParameters} updateParameters + */ + updateSettings(updateParameters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "cbe076d8-2803-45ff-8d8d-44653686ea2a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationAdminSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get delivery preferences of a notifications subscriber. + * + * @param {string} subscriberId - ID of the user or group. + */ + getSubscriber(subscriberId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriberId: subscriberId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update delivery preferences of a notifications subscriber. + * + * @param {NotificationInterfaces.NotificationSubscriberUpdateParameters} updateParameters + * @param {string} subscriberId - ID of the user or group. + */ + updateSubscriber(updateParameters, subscriberId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriberId: subscriberId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "4d5caff1-25ba-430b-b808-7a1f352cc197", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriber, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query for subscriptions. A subscription is returned if it matches one or more of the specified conditions. + * + * @param {NotificationInterfaces.SubscriptionQuery} subscriptionQuery + */ + querySubscriptions(subscriptionQuery) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "6864db85-08c0-4006-8e8e-cc1bebe31675", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, subscriptionQuery, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new subscription. + * + * @param {NotificationInterfaces.NotificationSubscriptionCreateParameters} createParameters + */ + createSubscription(createParameters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, createParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a subscription. + * + * @param {string} subscriptionId + */ + deleteSubscription(subscriptionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a notification subscription by its ID. + * + * @param {string} subscriptionId + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + */ + getSubscription(subscriptionId, queryFlags) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + let queryValues = { + queryFlags: queryFlags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of notification subscriptions, either by subscription IDs or by all subscriptions for a given user or group. + * + * @param {string} targetId - User or Group ID + * @param {string[]} ids - List of subscription IDs + * @param {NotificationInterfaces.SubscriptionQueryFlags} queryFlags + */ + listSubscriptions(targetId, ids, queryFlags) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + targetId: targetId, + ids: ids && ids.join(","), + queryFlags: queryFlags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update an existing subscription. Depending on the type of subscription and permissions, the caller can update the description, filter settings, channel (delivery) settings and more. + * + * @param {NotificationInterfaces.NotificationSubscriptionUpdateParameters} updateParameters + * @param {string} subscriptionId + */ + updateSubscription(updateParameters, subscriptionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "70f911d6-abac-488c-85b3-a206bf57e165", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscription, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get available subscription templates. + * + */ + getSubscriptionTemplates() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "fa5d24ba-7484-4f3d-888d-4ec6b1974082", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, NotificationInterfaces.TypeInfo.NotificationSubscriptionTemplate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Publish an event. This request is only for the Token service since it's a deploy only service. + * + * @param {VSSInterfaces.VssNotificationEvent} notificationEvent + */ + publishTokenEvent(notificationEvent) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "31dc86a2-67e8-4452-99a4-2b301ba28291", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, notificationEvent, options); + let ret = this.formatResponse(res.result, VSSInterfaces.TypeInfo.VssNotificationEvent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the specified user's settings for the specified subscription. This API is typically used to opt in or out of a shared subscription. User settings can only be applied to shared subscriptions, like team subscriptions or default subscriptions. + * + * @param {NotificationInterfaces.SubscriptionUserSettings} userSettings + * @param {string} subscriptionId + * @param {string} userId - ID of the user + */ + updateSubscriptionUserSettings(userSettings, subscriptionId, userId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + subscriptionId: subscriptionId, + userId: userId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "notification", "ed5a3dff-aeb5-41b1-b4f7-89e66e58b62e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, userSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.NotificationApi = NotificationApi; diff --git a/node_modules/azure-devops-node-api/PolicyApi.d.ts b/node_modules/azure-devops-node-api/PolicyApi.d.ts new file mode 100644 index 0000000..463a85b --- /dev/null +++ b/node_modules/azure-devops-node-api/PolicyApi.d.ts @@ -0,0 +1,113 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import PolicyInterfaces = require("./interfaces/PolicyInterfaces"); +export interface IPolicyApi extends basem.ClientApiBase { + createPolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId?: number): Promise; + deletePolicyConfiguration(project: string, configurationId: number): Promise; + getPolicyConfiguration(project: string, configurationId: number): Promise; + getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise; + updatePolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId: number): Promise; + getPolicyEvaluation(project: string, evaluationId: string): Promise; + requeuePolicyEvaluation(project: string, evaluationId: string): Promise; + getPolicyEvaluations(project: string, artifactId: string, includeNotApplicable?: boolean, top?: number, skip?: number): Promise; + getPolicyConfigurationRevision(project: string, configurationId: number, revisionId: number): Promise; + getPolicyConfigurationRevisions(project: string, configurationId: number, top?: number, skip?: number): Promise; + getPolicyType(project: string, typeId: string): Promise; + getPolicyTypes(project: string): Promise; +} +export declare class PolicyApi extends basem.ClientApiBase implements IPolicyApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef"; + /** + * Create a policy configuration of a given policy type. + * + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create. + * @param {string} project - Project ID or project name + * @param {number} configurationId + */ + createPolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId?: number): Promise; + /** + * Delete a policy configuration by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration to delete. + */ + deletePolicyConfiguration(project: string, configurationId: number): Promise; + /** + * Get a policy configuration by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration + */ + getPolicyConfiguration(project: string, configurationId: number): Promise; + /** + * Get a list of policy configurations in a project. + * + * @param {string} project - Project ID or project name + * @param {string} scope - [Provided for legacy reasons] The scope on which a subset of policies is defined. + * @param {string} policyType - Filter returned policies to only this type + */ + getPolicyConfigurations(project: string, scope?: string, policyType?: string): Promise; + /** + * Update a policy configuration by its ID. + * + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to update. + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the existing policy configuration to be updated. + */ + updatePolicyConfiguration(configuration: PolicyInterfaces.PolicyConfiguration, project: string, configurationId: number): Promise; + /** + * Gets the present evaluation state of a policy. + * + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + */ + getPolicyEvaluation(project: string, evaluationId: string): Promise; + /** + * Requeue the policy evaluation. + * + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + */ + requeuePolicyEvaluation(project: string, evaluationId: string): Promise; + /** + * Retrieves a list of all the policy evaluation statuses for a specific pull request. + * + * @param {string} project - Project ID or project name + * @param {string} artifactId - A string which uniquely identifies the target of a policy evaluation. + * @param {boolean} includeNotApplicable - Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request. + * @param {number} top - The number of policy evaluation records to retrieve. + * @param {number} skip - The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + */ + getPolicyEvaluations(project: string, artifactId: string, includeNotApplicable?: boolean, top?: number, skip?: number): Promise; + /** + * Retrieve a specific revision of a given policy by ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - The policy configuration ID. + * @param {number} revisionId - The revision ID. + */ + getPolicyConfigurationRevision(project: string, configurationId: number, revisionId: number): Promise; + /** + * Retrieve all revisions for a given policy. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - The policy configuration ID. + * @param {number} top - The number of revisions to retrieve. + * @param {number} skip - The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + */ + getPolicyConfigurationRevisions(project: string, configurationId: number, top?: number, skip?: number): Promise; + /** + * Retrieve a specific policy type by ID. + * + * @param {string} project - Project ID or project name + * @param {string} typeId - The policy ID. + */ + getPolicyType(project: string, typeId: string): Promise; + /** + * Retrieve all available policy types. + * + * @param {string} project - Project ID or project name + */ + getPolicyTypes(project: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/PolicyApi.js b/node_modules/azure-devops-node-api/PolicyApi.js new file mode 100644 index 0000000..3604ce9 --- /dev/null +++ b/node_modules/azure-devops-node-api/PolicyApi.js @@ -0,0 +1,387 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const PolicyInterfaces = require("./interfaces/PolicyInterfaces"); +class PolicyApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Policy-api', options); + } + /** + * Create a policy configuration of a given policy type. + * + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to create. + * @param {string} project - Project ID or project name + * @param {number} configurationId + */ + createPolicyConfiguration(configuration, project, configurationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + configurationId: configurationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, configuration, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a policy configuration by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration to delete. + */ + deletePolicyConfiguration(project, configurationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + configurationId: configurationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a policy configuration by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the policy configuration + */ + getPolicyConfiguration(project, configurationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + configurationId: configurationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of policy configurations in a project. + * + * @param {string} project - Project ID or project name + * @param {string} scope - [Provided for legacy reasons] The scope on which a subset of policies is defined. + * @param {string} policyType - Filter returned policies to only this type + */ + getPolicyConfigurations(project, scope, policyType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + scope: scope, + policyType: policyType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a policy configuration by its ID. + * + * @param {PolicyInterfaces.PolicyConfiguration} configuration - The policy configuration to update. + * @param {string} project - Project ID or project name + * @param {number} configurationId - ID of the existing policy configuration to be updated. + */ + updatePolicyConfiguration(configuration, project, configurationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + configurationId: configurationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "dad91cbe-d183-45f8-9c6e-9c1164472121", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, configuration, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the present evaluation state of a policy. + * + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + */ + getPolicyEvaluation(project, evaluationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + evaluationId: evaluationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Requeue the policy evaluation. + * + * @param {string} project - Project ID or project name + * @param {string} evaluationId - ID of the policy evaluation to be retrieved. + */ + requeuePolicyEvaluation(project, evaluationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + evaluationId: evaluationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "46aecb7a-5d2c-4647-897b-0209505a9fe4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves a list of all the policy evaluation statuses for a specific pull request. + * + * @param {string} project - Project ID or project name + * @param {string} artifactId - A string which uniquely identifies the target of a policy evaluation. + * @param {boolean} includeNotApplicable - Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request. + * @param {number} top - The number of policy evaluation records to retrieve. + * @param {number} skip - The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + */ + getPolicyEvaluations(project, artifactId, includeNotApplicable, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactId == null) { + throw new TypeError('artifactId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + artifactId: artifactId, + includeNotApplicable: includeNotApplicable, + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "c23ddff5-229c-4d04-a80b-0fdce9f360c8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyEvaluationRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a specific revision of a given policy by ID. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - The policy configuration ID. + * @param {number} revisionId - The revision ID. + */ + getPolicyConfigurationRevision(project, configurationId, revisionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + configurationId: configurationId, + revisionId: revisionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all revisions for a given policy. + * + * @param {string} project - Project ID or project name + * @param {number} configurationId - The policy configuration ID. + * @param {number} top - The number of revisions to retrieve. + * @param {number} skip - The number of revisions to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100. + */ + getPolicyConfigurationRevisions(project, configurationId, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + configurationId: configurationId + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "fe1e68a2-60d3-43cb-855b-85e41ae97c95", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, PolicyInterfaces.TypeInfo.PolicyConfiguration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a specific policy type by ID. + * + * @param {string} project - Project ID or project name + * @param {string} typeId - The policy ID. + */ + getPolicyType(project, typeId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + typeId: typeId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve all available policy types. + * + * @param {string} project - Project ID or project name + */ + getPolicyTypes(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "policy", "44096322-2d3d-466a-bb30-d1b7de69f61f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +PolicyApi.RESOURCE_AREA_ID = "fb13a388-40dd-4a04-b530-013a739c72ef"; +exports.PolicyApi = PolicyApi; diff --git a/node_modules/azure-devops-node-api/ProfileApi.d.ts b/node_modules/azure-devops-node-api/ProfileApi.d.ts new file mode 100644 index 0000000..39693cc --- /dev/null +++ b/node_modules/azure-devops-node-api/ProfileApi.d.ts @@ -0,0 +1,122 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import ProfileInterfaces = require("./interfaces/ProfileInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface IProfileApi extends basem.ClientApiBase { + deleteProfileAttribute(id: string, descriptor: string): Promise; + getProfileAttribute(id: string, descriptor: string): Promise; + getProfileAttributes(id: string, partition: string, modifiedSince?: string, modifiedAfterRevision?: string, withCoreAttributes?: boolean, coreAttributes?: string): Promise; + setProfileAttribute(container: any, id: string, descriptor: string): Promise; + setProfileAttributes(attributesCollection: VSSInterfaces.VssJsonCollectionWrapperV[]>, id: string): Promise; + getAvatar(id: string, size?: string, format?: string): Promise; + getAvatarPreview(container: any, id: string, size?: string, format?: string, displayName?: string): Promise; + resetAvatar(id: string): Promise; + setAvatar(container: any, id: string): Promise; + getGeoRegion(ipaddress: string): Promise; + createProfile(createProfileContext: ProfileInterfaces.CreateProfileContext, autoCreate?: boolean): Promise; + getProfile(id: string, details?: boolean, withAttributes?: boolean, partition?: string, coreAttributes?: string, forceRefresh?: boolean): Promise; + updateProfile(profile: ProfileInterfaces.Profile, id: string): Promise; + getRegions(): Promise; + getSupportedLcids(): Promise; + getUserDefaults(includeAvatar?: boolean): Promise; + refreshUserDefaults(id: string): Promise; +} +export declare class ProfileApi extends basem.ClientApiBase implements IProfileApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {string} id + * @param {string} descriptor + */ + deleteProfileAttribute(id: string, descriptor: string): Promise; + /** + * @param {string} id + * @param {string} descriptor + */ + getProfileAttribute(id: string, descriptor: string): Promise; + /** + * @param {string} id + * @param {string} partition + * @param {string} modifiedSince + * @param {string} modifiedAfterRevision + * @param {boolean} withCoreAttributes + * @param {string} coreAttributes + */ + getProfileAttributes(id: string, partition: string, modifiedSince?: string, modifiedAfterRevision?: string, withCoreAttributes?: boolean, coreAttributes?: string): Promise; + /** + * @param {any} container + * @param {string} id + * @param {string} descriptor + */ + setProfileAttribute(container: any, id: string, descriptor: string): Promise; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV[]>} attributesCollection + * @param {string} id + */ + setProfileAttributes(attributesCollection: VSSInterfaces.VssJsonCollectionWrapperV[]>, id: string): Promise; + /** + * @param {string} id + * @param {string} size + * @param {string} format + */ + getAvatar(id: string, size?: string, format?: string): Promise; + /** + * @param {any} container + * @param {string} id + * @param {string} size + * @param {string} format + * @param {string} displayName + */ + getAvatarPreview(container: any, id: string, size?: string, format?: string, displayName?: string): Promise; + /** + * @param {string} id + */ + resetAvatar(id: string): Promise; + /** + * @param {any} container + * @param {string} id + */ + setAvatar(container: any, id: string): Promise; + /** + * Lookup up country/region based on provided IPv4, null if using the remote IPv4 address. + * + * @param {string} ipaddress - IPv4 address to be used for reverse lookup, null if using RemoteIPAddress in request context + */ + getGeoRegion(ipaddress: string): Promise; + /** + * Create profile + * + * @param {ProfileInterfaces.CreateProfileContext} createProfileContext - Context for profile creation + * @param {boolean} autoCreate - Create profile automatically + */ + createProfile(createProfileContext: ProfileInterfaces.CreateProfileContext, autoCreate?: boolean): Promise; + /** + * @param {string} id + * @param {boolean} details + * @param {boolean} withAttributes + * @param {string} partition + * @param {string} coreAttributes + * @param {boolean} forceRefresh + */ + getProfile(id: string, details?: boolean, withAttributes?: boolean, partition?: string, coreAttributes?: string, forceRefresh?: boolean): Promise; + /** + * Update profile + * + * @param {ProfileInterfaces.Profile} profile - Update profile + * @param {string} id - Profile ID + */ + updateProfile(profile: ProfileInterfaces.Profile, id: string): Promise; + /** + */ + getRegions(): Promise; + /** + */ + getSupportedLcids(): Promise; + /** + * @param {boolean} includeAvatar + */ + getUserDefaults(includeAvatar?: boolean): Promise; + /** + * @param {string} id + */ + refreshUserDefaults(id: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/ProfileApi.js b/node_modules/azure-devops-node-api/ProfileApi.js new file mode 100644 index 0000000..1f89601 --- /dev/null +++ b/node_modules/azure-devops-node-api/ProfileApi.js @@ -0,0 +1,494 @@ +"use strict"; +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const ProfileInterfaces = require("./interfaces/ProfileInterfaces"); +class ProfileApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Profile-api', options); + } + /** + * @param {string} id + * @param {string} descriptor + */ + deleteProfileAttribute(id, descriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + descriptor: descriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} id + * @param {string} descriptor + */ + getProfileAttribute(id, descriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + descriptor: descriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} id + * @param {string} partition + * @param {string} modifiedSince + * @param {string} modifiedAfterRevision + * @param {boolean} withCoreAttributes + * @param {string} coreAttributes + */ + getProfileAttributes(id, partition, modifiedSince, modifiedAfterRevision, withCoreAttributes, coreAttributes) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + partition: partition, + modifiedSince: modifiedSince, + modifiedAfterRevision: modifiedAfterRevision, + withCoreAttributes: withCoreAttributes, + coreAttributes: coreAttributes, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.ProfileAttribute, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} container + * @param {string} id + * @param {string} descriptor + */ + setProfileAttribute(container, id, descriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + descriptor: descriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, container, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV[]>} attributesCollection + * @param {string} id + */ + setProfileAttributes(attributesCollection, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.2", "Profile", "1392b6ac-d511-492e-af5b-2263e5545a5d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, attributesCollection, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} id + * @param {string} size + * @param {string} format + */ + getAvatar(id, size, format) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + size: size, + format: format, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} container + * @param {string} id + * @param {string} size + * @param {string} format + * @param {string} displayName + */ + getAvatarPreview(container, id, size, format, displayName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + size: size, + format: format, + displayName: displayName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, container, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Avatar, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} id + */ + resetAvatar(id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} container + * @param {string} id + */ + setAvatar(container, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "67436615-b382-462a-b659-5367a492fb3c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, container, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Lookup up country/region based on provided IPv4, null if using the remote IPv4 address. + * + * @param {string} ipaddress - IPv4 address to be used for reverse lookup, null if using RemoteIPAddress in request context + */ + getGeoRegion(ipaddress) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + ipaddress: ipaddress, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "3bcda9c0-3078-48a5-a1e0-83bd05931ad0", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create profile + * + * @param {ProfileInterfaces.CreateProfileContext} createProfileContext - Context for profile creation + * @param {boolean} autoCreate - Create profile automatically + */ + createProfile(createProfileContext, autoCreate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + autoCreate: autoCreate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, createProfileContext, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} id + * @param {boolean} details + * @param {boolean} withAttributes + * @param {string} partition + * @param {string} coreAttributes + * @param {boolean} forceRefresh + */ + getProfile(id, details, withAttributes, partition, coreAttributes, forceRefresh) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + details: details, + withAttributes: withAttributes, + partition: partition, + coreAttributes: coreAttributes, + forceRefresh: forceRefresh, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update profile + * + * @param {ProfileInterfaces.Profile} profile - Update profile + * @param {string} id - Profile ID + */ + updateProfile(profile, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.3", "Profile", "f83735dc-483f-4238-a291-d45f6080a9af", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, profile, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getRegions() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "92d8d1c9-26b8-4774-a929-d640a73da524", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getSupportedLcids() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "d5bd1aa6-c269-4bcd-ad32-75fa17475584", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {boolean} includeAvatar + */ + getUserDefaults(includeAvatar) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + includeAvatar: includeAvatar, + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} id + */ + refreshUserDefaults(id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "Profile", "b583a356-1da7-4237-9f4c-1deb2edbc7e8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, options); + let ret = this.formatResponse(res.result, ProfileInterfaces.TypeInfo.Profile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.ProfileApi = ProfileApi; diff --git a/node_modules/azure-devops-node-api/ProjectAnalysisApi.d.ts b/node_modules/azure-devops-node-api/ProjectAnalysisApi.d.ts new file mode 100644 index 0000000..b4f91cf --- /dev/null +++ b/node_modules/azure-devops-node-api/ProjectAnalysisApi.d.ts @@ -0,0 +1,40 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import ProjectAnalysisInterfaces = require("./interfaces/ProjectAnalysisInterfaces"); +export interface IProjectAnalysisApi extends basem.ClientApiBase { + getProjectLanguageAnalytics(project: string): Promise; + getProjectActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise; + getGitRepositoriesActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType, skip: number, top: number): Promise; + getRepositoryActivityMetrics(project: string, repositoryId: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise; +} +export declare class ProjectAnalysisApi extends basem.ClientApiBase implements IProjectAnalysisApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3"; + /** + * @param {string} project - Project ID or project name + */ + getProjectLanguageAnalytics(project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + */ + getProjectActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise; + /** + * Retrieves git activity metrics for repositories matching a specified criteria. + * + * @param {string} project - Project ID or project name + * @param {Date} fromDate - Date from which, the trends are to be fetched. + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated. + * @param {number} skip - The number of repositories to ignore. + * @param {number} top - The number of repositories for which activity metrics are to be retrieved. + */ + getGitRepositoriesActivityMetrics(project: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType, skip: number, top: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} repositoryId + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + */ + getRepositoryActivityMetrics(project: string, repositoryId: string, fromDate: Date, aggregationType: ProjectAnalysisInterfaces.AggregationType): Promise; +} diff --git a/node_modules/azure-devops-node-api/ProjectAnalysisApi.js b/node_modules/azure-devops-node-api/ProjectAnalysisApi.js new file mode 100644 index 0000000..f4e9710 --- /dev/null +++ b/node_modules/azure-devops-node-api/ProjectAnalysisApi.js @@ -0,0 +1,174 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const ProjectAnalysisInterfaces = require("./interfaces/ProjectAnalysisInterfaces"); +class ProjectAnalysisApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-ProjectAnalysis-api', options); + } + /** + * @param {string} project - Project ID or project name + */ + getProjectLanguageAnalytics(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "5b02a779-1867-433f-90b7-d23ed5e33e57", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectLanguageAnalytics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + */ + getProjectActivityMetrics(project, fromDate, aggregationType) { + return __awaiter(this, void 0, void 0, function* () { + if (fromDate == null) { + throw new TypeError('fromDate can not be null or undefined'); + } + if (aggregationType == null) { + throw new TypeError('aggregationType can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "e40ae584-9ea6-4f06-a7c7-6284651b466b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.ProjectActivityMetrics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves git activity metrics for repositories matching a specified criteria. + * + * @param {string} project - Project ID or project name + * @param {Date} fromDate - Date from which, the trends are to be fetched. + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType - Bucket size on which, trends are to be aggregated. + * @param {number} skip - The number of repositories to ignore. + * @param {number} top - The number of repositories for which activity metrics are to be retrieved. + */ + getGitRepositoriesActivityMetrics(project, fromDate, aggregationType, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + if (fromDate == null) { + throw new TypeError('fromDate can not be null or undefined'); + } + if (aggregationType == null) { + throw new TypeError('aggregationType can not be null or undefined'); + } + if (skip == null) { + throw new TypeError('skip can not be null or undefined'); + } + if (top == null) { + throw new TypeError('top can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} repositoryId + * @param {Date} fromDate + * @param {ProjectAnalysisInterfaces.AggregationType} aggregationType + */ + getRepositoryActivityMetrics(project, repositoryId, fromDate, aggregationType) { + return __awaiter(this, void 0, void 0, function* () { + if (fromDate == null) { + throw new TypeError('fromDate can not be null or undefined'); + } + if (aggregationType == null) { + throw new TypeError('aggregationType can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + repositoryId: repositoryId + }; + let queryValues = { + fromDate: fromDate, + aggregationType: aggregationType, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "projectanalysis", "df7fbbca-630a-40e3-8aa3-7a3faf66947e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ProjectAnalysisInterfaces.TypeInfo.RepositoryActivityMetrics, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +ProjectAnalysisApi.RESOURCE_AREA_ID = "7658fa33-b1bf-4580-990f-fac5896773d3"; +exports.ProjectAnalysisApi = ProjectAnalysisApi; diff --git a/node_modules/azure-devops-node-api/README.md b/node_modules/azure-devops-node-api/README.md new file mode 100644 index 0000000..51e5377 --- /dev/null +++ b/node_modules/azure-devops-node-api/README.md @@ -0,0 +1,161 @@ +[![Build Status](https://dev.azure.com/ms/azure-devops-node-api/_apis/build/status/Microsoft.azure-devops-node-api?branchName=master)](https://dev.azure.com/ms/azure-devops-node-api/_build/latest?definitionId=89&branchName=master) + +# Azure DevOps Client for Node.js + +Integrate with Azure DevOps from your Node.js apps. + +### Install the library +``` +npm install azure-devops-node-api --save +``` + +## News + +vso-node-api has been renamed and released as azure-devops-node-api + +## Get started + +### Samples + +See [samples](./samples) for complete coding examples + +### Install the library +``` +npm install azure-devops-node-api --save +``` + +![Intellisense](docs/intellisense.png) + +### Create a connection +```javascript +import * as azdev from "azure-devops-node-api"; + +// your collection url +let orgUrl = "https://dev.azure.com/yourorgname"; + +let token: string = process.env.AZURE_PERSONAL_ACCESS_TOKEN; + +let authHandler = azdev.getPersonalAccessTokenHandler(token); +let connection = new azdev.WebApi(orgUrl, authHandler); +``` + +> Please note that some API's (e.g. ProfileApi) can't be hit at the org level, and has to be hit at the deployment level, +so url should be structured like https://**vssps**.dev.azure.com/{yourorgname} + +### Get an instance of a client + +```javascript +import * as ba from "azure-devops-node-api/BuildApi"; + +let build: ba.IBuildApi = await connection.getBuildApi(); +``` + +#### Available clients + +These clients are available: + +* Build +* Core +* Dashboard +* ExtensionManagement +* FeatureManagement +* FileContainer +* Git +* Locations +* Notification +* Policy +* Profile +* ProjectAnalysis +* Release +* SecurityRoles +* TaskAgent +* Task +* Test +* Tfvc +* Wiki +* Work +* WorkItemTracking +* WorkItemTrackingProcess +* WorkItemTrackingProcessDefinitions + +### Use the client + +Coding is easy using linear coding with async/await in TypeScript + +```javascript +import * as bi from "azure-devops-node-api/interfaces/BuildInterfaces"; + +async function run() { + let project: string = "myProject"; + let defs: bi.DefinitionReference[] = await build.getDefinitions(project); + + defs.forEach((defRef: bi.DefinitionReference) => { + console.log(`${defRef.name} (${defRef.id})`); + }); +} + +run(); +``` + +## APIs + +To see what APIs are available, see the appropriate client interface. For example, [GitApi.ts](https://github.com/Microsoft/azure-devops-node-api/blob/master/api/GitApi.ts) + +More detailed information for the endpoints of each API can be found at https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1 + +## Running Samples + +Pre-reqs: [Node >= 4.4.7 LTS](https://nodejs.org) and [typescript (tsc) >= 1.8](https://www.npmjs.com/package/typescript) + +Run `npm install` first + +Set environment variables using set or export: + +```bash +API_URL=https://dev.azure.com/yourorgname + +// use your token +API_TOKEN=cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha + +API_PROJECT=myProject +``` + +Run samples: + +```bash +$ npm run samples +``` + +Run a specific sample: + +```bash +$ npm run samples -- projectAnalysis +``` + +## API and TFS Mapping + +Below you'll find a quick mapping of azure-devops-node-api versions and their corresponding TFS releases. All API versions will work on the TFS version mentioned as well as later TFS versions. + + |**TFS Version** | **Node API VERSION**| + |-------------------|------------------| + |Azure DevOps Server vNext | 8.0.0| + |Azure DevOps Server 2019 | 7.0.0| + |TFS 2018 Update 2 | 6.6.2| + |TFS 2017 Update 2 | 6.2.8-preview| + |TFS 2017 Update 1 | 5.1.2| + |TFS 2017 RTW | 5.0.0| + |TFS 2015 Update 2 | 0.7.0| + +## Contributing + +To contribute to this repository, see the [contribution guide](./CONTRIBUTING.md) + +## Issues + +Feel free to file an issue in this repo. + +Do you think there might be a security issue? Have you been phished or identified a security vulnerability? Please don't report it here - let us know by sending an email to secure@microsoft.com. + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/node_modules/azure-devops-node-api/ReleaseApi.d.ts b/node_modules/azure-devops-node-api/ReleaseApi.d.ts new file mode 100644 index 0000000..b98e644 --- /dev/null +++ b/node_modules/azure-devops-node-api/ReleaseApi.d.ts @@ -0,0 +1,809 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import FormInputInterfaces = require("./interfaces/common/FormInputInterfaces"); +import ReleaseInterfaces = require("./interfaces/ReleaseInterfaces"); +export interface IReleaseApi extends basem.ClientApiBase { + getAgentArtifactDefinitions(project: string, releaseId: number): Promise; + getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[], typeFilter?: ReleaseInterfaces.ApprovalType, top?: number, continuationToken?: number, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, includeMyGroupApprovals?: boolean): Promise; + getApprovalHistory(project: string, approvalStepId: number): Promise; + getApproval(project: string, approvalId: number, includeHistory?: boolean): Promise; + updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; + updateReleaseApprovals(approvals: ReleaseInterfaces.ReleaseApproval[], project: string): Promise; + getTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, recordId: string, type: string, name: string): Promise; + getReleaseTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + getTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, type: string): Promise; + getReleaseTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, type: string): Promise; + getAutoTriggerIssues(artifactType: string, sourceId: string, artifactVersionId: string, project?: string): Promise; + getDeploymentBadge(projectId: string, releaseDefinitionId: number, environmentId: number, branchName?: string): Promise; + getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise; + getDefinitionEnvironments(project: string, taskGroupId?: string, propertyFilters?: string[]): Promise; + createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + deleteReleaseDefinition(project: string, definitionId: number, comment?: string, forceDelete?: boolean): Promise; + getReleaseDefinition(project: string, definitionId: number, propertyFilters?: string[]): Promise; + getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; + getReleaseDefinitions(project: string, searchText?: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands, artifactType?: string, artifactSourceId?: string, top?: number, continuationToken?: string, queryOrder?: ReleaseInterfaces.ReleaseDefinitionQueryOrder, path?: string, isExactNameMatch?: boolean, tagFilter?: string[], propertyFilters?: string[], definitionIdFilter?: string[], isDeleted?: boolean, searchTextContainsFolderName?: boolean): Promise; + undeleteReleaseDefinition(releaseDefinitionUndeleteParameter: ReleaseInterfaces.ReleaseDefinitionUndeleteParameter, project: string, definitionId: number): Promise; + updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, minModifiedTime?: Date, maxModifiedTime?: Date, deploymentStatus?: ReleaseInterfaces.DeploymentStatus, operationStatus?: ReleaseInterfaces.DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, createdFor?: string, minStartedTime?: Date, maxStartedTime?: Date, sourceBranch?: string): Promise; + getDeploymentsForMultipleEnvironments(queryParameters: ReleaseInterfaces.DeploymentQueryParameters, project: string): Promise; + getReleaseEnvironment(project: string, releaseId: number, environmentId: number, expand?: ReleaseInterfaces.ReleaseEnvironmentExpands): Promise; + updateReleaseEnvironment(environmentUpdateData: ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata, project: string, releaseId: number, environmentId: number): Promise; + createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; + deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + listDefinitionEnvironmentTemplates(project: string, isDeleted?: boolean): Promise; + undeleteReleaseDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + createFavorites(favoriteItems: ReleaseInterfaces.FavoriteItem[], project: string, scope: string, identityId?: string): Promise; + deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise; + getFavorites(project: string, scope: string, identityId?: string): Promise; + getFlightAssignments(flightName?: string): Promise; + createFolder(folder: ReleaseInterfaces.Folder, project: string, path?: string): Promise; + deleteFolder(project: string, path: string): Promise; + getFolders(project: string, path?: string, queryOrder?: ReleaseInterfaces.FolderPathQueryOrder): Promise; + updateFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise; + updateGates(gateUpdateMetadata: ReleaseInterfaces.GateUpdateMetadata, project: string, gateStepId: number): Promise; + getReleaseHistory(project: string, releaseId: number): Promise; + getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; + getIssues(project: string, buildId: number, sourceId?: string): Promise; + getGateLog(project: string, releaseId: number, environmentId: number, gateId: number, taskId: number): Promise; + getLogs(project: string, releaseId: number): Promise; + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; + getTaskLog2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, taskId: number, startLine?: number, endLine?: number): Promise; + getTaskLog(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number, taskId: number, startLine?: number, endLine?: number): Promise; + getManualIntervention(project: string, releaseId: number, manualInterventionId: number): Promise; + getManualInterventions(project: string, releaseId: number): Promise; + updateManualIntervention(manualInterventionUpdateMetadata: ReleaseInterfaces.ManualInterventionUpdateMetadata, project: string, releaseId: number, manualInterventionId: number): Promise; + getMetrics(project: string, minMetricsTime?: Date): Promise; + getOrgPipelineReleaseSettings(): Promise; + updateOrgPipelineReleaseSettings(newSettings: ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters): Promise; + getPipelineReleaseSettings(project: string): Promise; + updatePipelineReleaseSettings(newSettings: ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters, project: string): Promise; + getReleaseProjects(artifactType: string, artifactSourceId: string): Promise; + getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[], path?: string): Promise; + createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; + deleteRelease(project: string, releaseId: number, comment?: string): Promise; + getRelease(project: string, releaseId: number, approvalFilters?: ReleaseInterfaces.ApprovalFilters, propertyFilters?: string[], expand?: ReleaseInterfaces.SingleReleaseExpands, topGateRecords?: number): Promise; + getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean, definitionEnvironmentIdsFilter?: number[]): Promise; + getReleaseRevision(project: string, releaseId: number, definitionSnapshotRevision: number): Promise; + undeleteRelease(project: string, releaseId: number, comment: string): Promise; + updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; + updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; + getReleaseSettings(project: string): Promise; + updateReleaseSettings(releaseSettings: ReleaseInterfaces.ReleaseSettings, project: string): Promise; + getDefinitionRevision(project: string, definitionId: number, revision: number): Promise; + getReleaseDefinitionHistory(project: string, definitionId: number): Promise; + getSummaryMailSections(project: string, releaseId: number): Promise; + sendSummaryMail(mailMessage: ReleaseInterfaces.MailMessage, project: string, releaseId: number): Promise; + getSourceBranches(project: string, definitionId: number): Promise; + addDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise; + addDefinitionTags(tags: string[], project: string, releaseDefinitionId: number): Promise; + deleteDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise; + getDefinitionTags(project: string, releaseDefinitionId: number): Promise; + addReleaseTag(project: string, releaseId: number, tag: string): Promise; + addReleaseTags(tags: string[], project: string, releaseId: number): Promise; + deleteReleaseTag(project: string, releaseId: number, tag: string): Promise; + getReleaseTags(project: string, releaseId: number): Promise; + getTags(project: string): Promise; + getTasksForTaskGroup(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number): Promise; + getTasks2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string): Promise; + getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; + getArtifactTypeDefinitions(project: string): Promise; + getArtifactVersions(project: string, releaseDefinitionId: number): Promise; + getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; + getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise; +} +export declare class ReleaseApi extends basem.ClientApiBase implements IReleaseApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"; + /** + * Returns the artifact details that automation agent requires + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getAgentArtifactDefinitions(project: string, releaseId: number): Promise; + /** + * Get a list of approvals + * + * @param {string} project - Project ID or project name + * @param {string} assignedToFilter - Approvals assigned to this user. + * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - Approvals with this status. Default is 'pending'. + * @param {number[]} releaseIdsFilter - Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4. + * @param {ReleaseInterfaces.ApprovalType} typeFilter - Approval with this type. + * @param {number} top - Number of approvals to get. Default is 50. + * @param {number} continuationToken - Gets the approvals after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created approvals. Default is 'descending'. + * @param {boolean} includeMyGroupApprovals - 'true' to include my group approvals. Default is 'false'. + */ + getApprovals(project: string, assignedToFilter?: string, statusFilter?: ReleaseInterfaces.ApprovalStatus, releaseIdsFilter?: number[], typeFilter?: ReleaseInterfaces.ApprovalType, top?: number, continuationToken?: number, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, includeMyGroupApprovals?: boolean): Promise; + /** + * Get approval history. + * + * @param {string} project - Project ID or project name + * @param {number} approvalStepId - Id of the approval. + */ + getApprovalHistory(project: string, approvalStepId: number): Promise; + /** + * Get an approval. + * + * @param {string} project - Project ID or project name + * @param {number} approvalId - Id of the approval. + * @param {boolean} includeHistory - 'true' to include history of the approval. Default is 'false'. + */ + getApproval(project: string, approvalId: number, includeHistory?: boolean): Promise; + /** + * Update status of an approval + * + * @param {ReleaseInterfaces.ReleaseApproval} approval - ReleaseApproval object having status, approver and comments. + * @param {string} project - Project ID or project name + * @param {number} approvalId - Id of the approval. + */ + updateReleaseApproval(approval: ReleaseInterfaces.ReleaseApproval, project: string, approvalId: number): Promise; + /** + * @param {ReleaseInterfaces.ReleaseApproval[]} approvals + * @param {string} project - Project ID or project name + */ + updateReleaseApprovals(approvals: ReleaseInterfaces.ReleaseApproval[], project: string): Promise; + /** + * Get a task attachment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} recordId - Record Id of attachment. + * @param {string} type - Type of the attachment. + * @param {string} name - Name of the attachment. + */ + getTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * Get a release task attachment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} planId - Plan Id of the deploy phase. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} recordId - Record Id of attachment. + * @param {string} type - Type of the attachment. + * @param {string} name - Name of the attachment. + */ + getReleaseTaskAttachmentContent(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * Get the task attachments. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} type - Type of the attachment. + */ + getTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, type: string): Promise; + /** + * Get the release task attachments. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} planId - Plan Id of the deploy phase. + * @param {string} type - Type of the attachment. + */ + getReleaseTaskAttachments(project: string, releaseId: number, environmentId: number, attemptId: number, planId: string, type: string): Promise; + /** + * @param {string} artifactType + * @param {string} sourceId + * @param {string} artifactVersionId + * @param {string} project - Project ID or project name + */ + getAutoTriggerIssues(artifactType: string, sourceId: string, artifactVersionId: string, project?: string): Promise; + /** + * Gets a badge that indicates the status of the most recent deployment for an environment. + * + * @param {string} projectId - The ID of the Project. + * @param {number} releaseDefinitionId - The ID of the Release Definition. + * @param {number} environmentId - The ID of the Environment. + * @param {string} branchName - The name of the branch. + */ + getDeploymentBadge(projectId: string, releaseDefinitionId: number, environmentId: number, branchName?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias + */ + getReleaseChanges(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {string[]} propertyFilters + */ + getDefinitionEnvironments(project: string, taskGroupId?: string, propertyFilters?: string[]): Promise; + /** + * Create a release definition + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - release definition object to create. + * @param {string} project - Project ID or project name + */ + createReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + /** + * Delete a release definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {string} comment - Comment for deleting a release definition. + * @param {boolean} forceDelete - 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'. + */ + deleteReleaseDefinition(project: string, definitionId: number, comment?: string, forceDelete?: boolean): Promise; + /** + * Get a release definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included. + */ + getReleaseDefinition(project: string, definitionId: number, propertyFilters?: string[]): Promise; + /** + * Get release definition of a given revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {number} revision - Revision number of the release definition. + */ + getReleaseDefinitionRevision(project: string, definitionId: number, revision: number): Promise; + /** + * Get a list of release definitions. + * + * @param {string} project - Project ID or project name + * @param {string} searchText - Get release definitions with names containing searchText. + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - The properties that should be expanded in the list of Release definitions. + * @param {string} artifactType - Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + * @param {string} artifactSourceId - Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + * @param {number} top - Number of release definitions to get. + * @param {string} continuationToken - Gets the release definitions after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseDefinitionQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdAscending'. + * @param {string} path - Gets the release definitions under the specified path. + * @param {boolean} isExactNameMatch - 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'. + * @param {string[]} tagFilter - A comma-delimited list of tags. Only release definitions with these tags will be returned. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not. + * @param {string[]} definitionIdFilter - A comma-delimited list of release definitions to retrieve. + * @param {boolean} isDeleted - 'true' to get release definitions that has been deleted. Default is 'false' + * @param {boolean} searchTextContainsFolderName - 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'. + */ + getReleaseDefinitions(project: string, searchText?: string, expand?: ReleaseInterfaces.ReleaseDefinitionExpands, artifactType?: string, artifactSourceId?: string, top?: number, continuationToken?: string, queryOrder?: ReleaseInterfaces.ReleaseDefinitionQueryOrder, path?: string, isExactNameMatch?: boolean, tagFilter?: string[], propertyFilters?: string[], definitionIdFilter?: string[], isDeleted?: boolean, searchTextContainsFolderName?: boolean): Promise; + /** + * Undelete a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinitionUndeleteParameter} releaseDefinitionUndeleteParameter - Object for undelete release definition. + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition to be undeleted + */ + undeleteReleaseDefinition(releaseDefinitionUndeleteParameter: ReleaseInterfaces.ReleaseDefinitionUndeleteParameter, project: string, definitionId: number): Promise; + /** + * Update a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - Release definition object to update. + * @param {string} project - Project ID or project name + */ + updateReleaseDefinition(releaseDefinition: ReleaseInterfaces.ReleaseDefinition, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} definitionEnvironmentId + * @param {string} createdBy + * @param {Date} minModifiedTime + * @param {Date} maxModifiedTime + * @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus + * @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus + * @param {boolean} latestAttemptsOnly + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder + * @param {number} top + * @param {number} continuationToken + * @param {string} createdFor + * @param {Date} minStartedTime + * @param {Date} maxStartedTime + * @param {string} sourceBranch + */ + getDeployments(project: string, definitionId?: number, definitionEnvironmentId?: number, createdBy?: string, minModifiedTime?: Date, maxModifiedTime?: Date, deploymentStatus?: ReleaseInterfaces.DeploymentStatus, operationStatus?: ReleaseInterfaces.DeploymentOperationStatus, latestAttemptsOnly?: boolean, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, createdFor?: string, minStartedTime?: Date, maxStartedTime?: Date, sourceBranch?: string): Promise; + /** + * @param {ReleaseInterfaces.DeploymentQueryParameters} queryParameters + * @param {string} project - Project ID or project name + */ + getDeploymentsForMultipleEnvironments(queryParameters: ReleaseInterfaces.DeploymentQueryParameters, project: string): Promise; + /** + * Get a release environment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {ReleaseInterfaces.ReleaseEnvironmentExpands} expand - A property that should be expanded in the environment. + */ + getReleaseEnvironment(project: string, releaseId: number, environmentId: number, expand?: ReleaseInterfaces.ReleaseEnvironmentExpands): Promise; + /** + * Update the status of a release environment + * + * @param {ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata} environmentUpdateData - Environment update meta data. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + */ + updateReleaseEnvironment(environmentUpdateData: ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata, project: string, releaseId: number, environmentId: number): Promise; + /** + * Creates a definition environment template + * + * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - Definition environment template to create + * @param {string} project - Project ID or project name + */ + createDefinitionEnvironmentTemplate(template: ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate, project: string): Promise; + /** + * Delete a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template + */ + deleteDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + /** + * Gets a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template + */ + getDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + /** + * Gets a list of definition environment templates + * + * @param {string} project - Project ID or project name + * @param {boolean} isDeleted - 'true' to get definition environment templates that have been deleted. Default is 'false' + */ + listDefinitionEnvironmentTemplates(project: string, isDeleted?: boolean): Promise; + /** + * Undelete a release definition environment template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template to be undeleted + */ + undeleteReleaseDefinitionEnvironmentTemplate(project: string, templateId: string): Promise; + /** + * @param {ReleaseInterfaces.FavoriteItem[]} favoriteItems + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + */ + createFavorites(favoriteItems: ReleaseInterfaces.FavoriteItem[], project: string, scope: string, identityId?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + * @param {string} favoriteItemIds + */ + deleteFavorites(project: string, scope: string, identityId?: string, favoriteItemIds?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + */ + getFavorites(project: string, scope: string, identityId?: string): Promise; + /** + * @param {string} flightName + */ + getFlightAssignments(flightName?: string): Promise; + /** + * Creates a new folder. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. + */ + createFolder(folder: ReleaseInterfaces.Folder, project: string, path?: string): Promise; + /** + * Deletes a definition folder for given folder name and path and all it's existing definitions. + * + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder to delete. + */ + deleteFolder(project: string, path: string): Promise; + /** + * Gets folders. + * + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. + * @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder - Gets the results in the defined order. Default is 'None'. + */ + getFolders(project: string, path?: string, queryOrder?: ReleaseInterfaces.FolderPathQueryOrder): Promise; + /** + * Updates an existing folder at given existing path. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder to update. + */ + updateFolder(folder: ReleaseInterfaces.Folder, project: string, path: string): Promise; + /** + * Updates the gate for a deployment. + * + * @param {ReleaseInterfaces.GateUpdateMetadata} gateUpdateMetadata - Metadata to patch the Release Gates. + * @param {string} project - Project ID or project name + * @param {number} gateStepId - Gate step Id. + */ + updateGates(gateUpdateMetadata: ReleaseInterfaces.GateUpdateMetadata, project: string, gateStepId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getReleaseHistory(project: string, releaseId: number): Promise; + /** + * @param {FormInputInterfaces.InputValuesQuery} query + * @param {string} project - Project ID or project name + */ + getInputValues(query: FormInputInterfaces.InputValuesQuery, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} sourceId + */ + getIssues(project: string, buildId: number, sourceId?: string): Promise; + /** + * Gets gate logs + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} gateId - Id of the gate. + * @param {number} taskId - ReleaseTask Id for the log. + */ + getGateLog(project: string, releaseId: number, environmentId: number, gateId: number, taskId: number): Promise; + /** + * Get logs for a release Id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + */ + getLogs(project: string, releaseId: number): Promise; + /** + * Gets logs + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} attemptId - Id of the attempt. + */ + getLog(project: string, releaseId: number, environmentId: number, taskId: number, attemptId?: number): Promise; + /** + * Gets the task log of a release as a plain text file. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} attemptId + * @param {string} timelineId + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} startLine - Starting line number for logs + * @param {number} endLine - Ending line number for logs + */ + getTaskLog2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string, taskId: number, startLine?: number, endLine?: number): Promise; + /** + * Gets the task log of a release as a plain text file. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} releaseDeployPhaseId - Release deploy phase Id. + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} startLine - Starting line number for logs + * @param {number} endLine - Ending line number for logs + */ + getTaskLog(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number, taskId: number, startLine?: number, endLine?: number): Promise; + /** + * Get manual intervention for a given release and manual intervention id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} manualInterventionId - Id of the manual intervention. + */ + getManualIntervention(project: string, releaseId: number, manualInterventionId: number): Promise; + /** + * List all manual interventions for a given release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + */ + getManualInterventions(project: string, releaseId: number): Promise; + /** + * Update manual intervention. + * + * @param {ReleaseInterfaces.ManualInterventionUpdateMetadata} manualInterventionUpdateMetadata - Meta data to update manual intervention. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} manualInterventionId - Id of the manual intervention. + */ + updateManualIntervention(manualInterventionUpdateMetadata: ReleaseInterfaces.ManualInterventionUpdateMetadata, project: string, releaseId: number, manualInterventionId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {Date} minMetricsTime + */ + getMetrics(project: string, minMetricsTime?: Date): Promise; + /** + * Gets Org pipeline release settings + * + */ + getOrgPipelineReleaseSettings(): Promise; + /** + * Updates Org pipeline release settings + * + * @param {ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters} newSettings + */ + updateOrgPipelineReleaseSettings(newSettings: ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters): Promise; + /** + * Gets pipeline release settings + * + * @param {string} project - Project ID or project name + */ + getPipelineReleaseSettings(project: string): Promise; + /** + * Updates pipeline release settings + * + * @param {ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters} newSettings + * @param {string} project - Project ID or project name + */ + updatePipelineReleaseSettings(newSettings: ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters, project: string): Promise; + /** + * @param {string} artifactType + * @param {string} artifactSourceId + */ + getReleaseProjects(artifactType: string, artifactSourceId: string): Promise; + /** + * Get a list of releases + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Releases from this release definition Id. + * @param {number} definitionEnvironmentId + * @param {string} searchText - Releases with names containing searchText. + * @param {string} createdBy - Releases created by this user. + * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - Releases that have this status. + * @param {number} environmentStatusFilter + * @param {Date} minCreatedTime - Releases that were created after this time. + * @param {Date} maxCreatedTime - Releases that were created before this time. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created date for releases. Default is descending. + * @param {number} top - Number of releases to get. Default is 50. + * @param {number} continuationToken - Gets the releases after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseExpands} expand - The property that should be expanded in the list of releases. + * @param {string} artifactTypeId - Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + * @param {string} sourceId - Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + * @param {string} artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId. + * @param {string} sourceBranchFilter - Releases with given sourceBranchFilter will be returned. + * @param {boolean} isDeleted - Gets the soft deleted releases, if true. + * @param {string[]} tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not. + * @param {number[]} releaseIdFilter - A comma-delimited list of releases Ids. Only releases with these Ids will be returned. + * @param {string} path - Releases under this folder path will be returned + */ + getReleases(project?: string, definitionId?: number, definitionEnvironmentId?: number, searchText?: string, createdBy?: string, statusFilter?: ReleaseInterfaces.ReleaseStatus, environmentStatusFilter?: number, minCreatedTime?: Date, maxCreatedTime?: Date, queryOrder?: ReleaseInterfaces.ReleaseQueryOrder, top?: number, continuationToken?: number, expand?: ReleaseInterfaces.ReleaseExpands, artifactTypeId?: string, sourceId?: string, artifactVersionId?: string, sourceBranchFilter?: string, isDeleted?: boolean, tagFilter?: string[], propertyFilters?: string[], releaseIdFilter?: number[], path?: string): Promise; + /** + * Create a release. + * + * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - Metadata to create a release. + * @param {string} project - Project ID or project name + */ + createRelease(releaseStartMetadata: ReleaseInterfaces.ReleaseStartMetadata, project: string): Promise; + /** + * Soft delete a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {string} comment - Comment for deleting a release. + */ + deleteRelease(project: string, releaseId: number, comment?: string): Promise; + /** + * Get a Release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {ReleaseInterfaces.ApprovalFilters} approvalFilters - A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included. + * @param {ReleaseInterfaces.SingleReleaseExpands} expand - A property that should be expanded in the release. + * @param {number} topGateRecords - Number of release gate records to get. Default is 5. + */ + getRelease(project: string, releaseId: number, approvalFilters?: ReleaseInterfaces.ApprovalFilters, propertyFilters?: string[], expand?: ReleaseInterfaces.SingleReleaseExpands, topGateRecords?: number): Promise; + /** + * Get release summary of a given definition Id. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition to get release summary. + * @param {number} releaseCount - Count of releases to be included in summary. + * @param {boolean} includeArtifact - Include artifact details.Default is 'false'. + * @param {number[]} definitionEnvironmentIdsFilter + */ + getReleaseDefinitionSummary(project: string, definitionId: number, releaseCount: number, includeArtifact?: boolean, definitionEnvironmentIdsFilter?: number[]): Promise; + /** + * Get release for a given revision number. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} definitionSnapshotRevision - Definition snapshot revision number. + */ + getReleaseRevision(project: string, releaseId: number, definitionSnapshotRevision: number): Promise; + /** + * Undelete a soft deleted release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of release to be undeleted. + * @param {string} comment - Any comment for undeleting. + */ + undeleteRelease(project: string, releaseId: number, comment: string): Promise; + /** + * Update a complete release object. + * + * @param {ReleaseInterfaces.Release} release - Release object for update. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release to update. + */ + updateRelease(release: ReleaseInterfaces.Release, project: string, releaseId: number): Promise; + /** + * Update few properties of a release. + * + * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - Properties of release to update. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release to update. + */ + updateReleaseResource(releaseUpdateMetadata: ReleaseInterfaces.ReleaseUpdateMetadata, project: string, releaseId: number): Promise; + /** + * Gets the release settings + * + * @param {string} project - Project ID or project name + */ + getReleaseSettings(project: string): Promise; + /** + * Updates the release settings + * + * @param {ReleaseInterfaces.ReleaseSettings} releaseSettings + * @param {string} project - Project ID or project name + */ + updateReleaseSettings(releaseSettings: ReleaseInterfaces.ReleaseSettings, project: string): Promise; + /** + * Get release definition for a given definitionId and revision + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. + * @param {number} revision - Id of the revision. + */ + getDefinitionRevision(project: string, definitionId: number, revision: number): Promise; + /** + * Get revision history for a release definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. + */ + getReleaseDefinitionHistory(project: string, definitionId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getSummaryMailSections(project: string, releaseId: number): Promise; + /** + * @param {ReleaseInterfaces.MailMessage} mailMessage + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + sendSummaryMail(mailMessage: ReleaseInterfaces.MailMessage, project: string, releaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getSourceBranches(project: string, definitionId: number): Promise; + /** + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag + */ + addDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise; + /** + * Adds multiple tags to a definition + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + addDefinitionTags(tags: string[], project: string, releaseDefinitionId: number): Promise; + /** + * Deletes a tag from a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag + */ + deleteDefinitionTag(project: string, releaseDefinitionId: number, tag: string): Promise; + /** + * Gets the tags for a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + getDefinitionTags(project: string, releaseDefinitionId: number): Promise; + /** + * Adds a tag to a releaseId + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag + */ + addReleaseTag(project: string, releaseId: number, tag: string): Promise; + /** + * Adds tag to a release + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + addReleaseTags(tags: string[], project: string, releaseId: number): Promise; + /** + * Deletes a tag from a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag + */ + deleteReleaseTag(project: string, releaseId: number, tag: string): Promise; + /** + * Gets the tags for a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getReleaseTags(project: string, releaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + */ + getTags(project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} releaseDeployPhaseId + */ + getTasksForTaskGroup(project: string, releaseId: number, environmentId: number, releaseDeployPhaseId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + * @param {string} timelineId + */ + getTasks2(project: string, releaseId: number, environmentId: number, attemptId: number, timelineId: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + */ + getTasks(project: string, releaseId: number, environmentId: number, attemptId?: number): Promise; + /** + * @param {string} project - Project ID or project name + */ + getArtifactTypeDefinitions(project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + getArtifactVersions(project: string, releaseDefinitionId: number): Promise; + /** + * @param {ReleaseInterfaces.Artifact[]} artifacts + * @param {string} project - Project ID or project name + */ + getArtifactVersionsForSources(artifacts: ReleaseInterfaces.Artifact[], project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias + */ + getReleaseWorkItemsRefs(project: string, releaseId: number, baseReleaseId?: number, top?: number, artifactAlias?: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/ReleaseApi.js b/node_modules/azure-devops-node-api/ReleaseApi.js new file mode 100644 index 0000000..94453dd --- /dev/null +++ b/node_modules/azure-devops-node-api/ReleaseApi.js @@ -0,0 +1,2796 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const ReleaseInterfaces = require("./interfaces/ReleaseInterfaces"); +class ReleaseApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Release-api', options); + } + /** + * Returns the artifact details that automation agent requires + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getAgentArtifactDefinitions(project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "f2571c27-bf50-4938-b396-32d109ddef26", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AgentArtifactDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of approvals + * + * @param {string} project - Project ID or project name + * @param {string} assignedToFilter - Approvals assigned to this user. + * @param {ReleaseInterfaces.ApprovalStatus} statusFilter - Approvals with this status. Default is 'pending'. + * @param {number[]} releaseIdsFilter - Approvals for release id(s) mentioned in the filter. Multiple releases can be mentioned by separating them with ',' e.g. releaseIdsFilter=1,2,3,4. + * @param {ReleaseInterfaces.ApprovalType} typeFilter - Approval with this type. + * @param {number} top - Number of approvals to get. Default is 50. + * @param {number} continuationToken - Gets the approvals after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created approvals. Default is 'descending'. + * @param {boolean} includeMyGroupApprovals - 'true' to include my group approvals. Default is 'false'. + */ + getApprovals(project, assignedToFilter, statusFilter, releaseIdsFilter, typeFilter, top, continuationToken, queryOrder, includeMyGroupApprovals) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + assignedToFilter: assignedToFilter, + statusFilter: statusFilter, + releaseIdsFilter: releaseIdsFilter && releaseIdsFilter.join(","), + typeFilter: typeFilter, + top: top, + continuationToken: continuationToken, + queryOrder: queryOrder, + includeMyGroupApprovals: includeMyGroupApprovals, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "b47c6458-e73b-47cb-a770-4df1e8813a91", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get approval history. + * + * @param {string} project - Project ID or project name + * @param {number} approvalStepId - Id of the approval. + */ + getApprovalHistory(project, approvalStepId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + approvalStepId: approvalStepId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "250c7158-852e-4130-a00f-a0cce9b72d05", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an approval. + * + * @param {string} project - Project ID or project name + * @param {number} approvalId - Id of the approval. + * @param {boolean} includeHistory - 'true' to include history of the approval. Default is 'false'. + */ + getApproval(project, approvalId, includeHistory) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + approvalId: approvalId + }; + let queryValues = { + includeHistory: includeHistory, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "9328e074-59fb-465a-89d9-b09c82ee5109", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update status of an approval + * + * @param {ReleaseInterfaces.ReleaseApproval} approval - ReleaseApproval object having status, approver and comments. + * @param {string} project - Project ID or project name + * @param {number} approvalId - Id of the approval. + */ + updateReleaseApproval(approval, project, approvalId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + approvalId: approvalId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "9328e074-59fb-465a-89d9-b09c82ee5109", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, approval, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.ReleaseApproval[]} approvals + * @param {string} project - Project ID or project name + */ + updateReleaseApprovals(approvals, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Release", "c957584a-82aa-4131-8222-6d47f78bfa7a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, approvals, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseApproval, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a task attachment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} recordId - Record Id of attachment. + * @param {string} type - Type of the attachment. + * @param {string} name - Name of the attachment. + */ + getTaskAttachmentContent(project, releaseId, environmentId, attemptId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c4071f6d-3697-46ca-858e-8b10ff09e52f", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a release task attachment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} planId - Plan Id of the deploy phase. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} recordId - Record Id of attachment. + * @param {string} type - Type of the attachment. + * @param {string} name - Name of the attachment. + */ + getReleaseTaskAttachmentContent(project, releaseId, environmentId, attemptId, planId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "60b86efb-7b8c-4853-8f9f-aa142b77b479", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the task attachments. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} timelineId - Timeline Id of the task. + * @param {string} type - Type of the attachment. + */ + getTaskAttachments(project, releaseId, environmentId, attemptId, timelineId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "214111ee-2415-4df2-8ed2-74417f7d61f9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the release task attachments. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {number} attemptId - Attempt number of deployment. + * @param {string} planId - Plan Id of the deploy phase. + * @param {string} type - Type of the attachment. + */ + getReleaseTaskAttachments(project, releaseId, environmentId, attemptId, planId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + planId: planId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "a4d06688-0dfa-4895-82a5-f43ec9452306", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} artifactType + * @param {string} sourceId + * @param {string} artifactVersionId + * @param {string} project - Project ID or project name + */ + getAutoTriggerIssues(artifactType, sourceId, artifactVersionId, project) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactType == null) { + throw new TypeError('artifactType can not be null or undefined'); + } + if (sourceId == null) { + throw new TypeError('sourceId can not be null or undefined'); + } + if (artifactVersionId == null) { + throw new TypeError('artifactVersionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + artifactType: artifactType, + sourceId: sourceId, + artifactVersionId: artifactVersionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c1a68497-69da-40fb-9423-cab19cfeeca9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AutoTriggerIssue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that indicates the status of the most recent deployment for an environment. + * + * @param {string} projectId - The ID of the Project. + * @param {number} releaseDefinitionId - The ID of the Release Definition. + * @param {number} environmentId - The ID of the Environment. + * @param {string} branchName - The name of the branch. + */ + getDeploymentBadge(projectId, releaseDefinitionId, environmentId, branchName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + projectId: projectId, + releaseDefinitionId: releaseDefinitionId, + environmentId: environmentId, + branchName: branchName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "1a60a35d-b8c9-45fb-bf67-da0829711147", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias + */ + getReleaseChanges(project, releaseId, baseReleaseId, top, artifactAlias) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + baseReleaseId: baseReleaseId, + '$top': top, + artifactAlias: artifactAlias, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "8dcf9fe9-ca37-4113-8ee1-37928e98407c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Change, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {string[]} propertyFilters + */ + getDefinitionEnvironments(project, taskGroupId, propertyFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + taskGroupId: taskGroupId, + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "12b5d21a-f54c-430e-a8c1-7515d196890e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a release definition + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - release definition object to create. + * @param {string} project - Project ID or project name + */ + createReleaseDefinition(releaseDefinition, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, releaseDefinition, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a release definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {string} comment - Comment for deleting a release definition. + * @param {boolean} forceDelete - 'true' to automatically cancel any in-progress release deployments and proceed with release definition deletion . Default is 'false'. + */ + deleteReleaseDefinition(project, definitionId, comment, forceDelete) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + comment: comment, + forceDelete: forceDelete, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a release definition. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definition will contain values for the specified property Ids (if they exist). If not set, properties will not be included. + */ + getReleaseDefinition(project, definitionId, propertyFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get release definition of a given revision. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition. + * @param {number} revision - Revision number of the release definition. + */ + getReleaseDefinitionRevision(project, definitionId, revision) { + return __awaiter(this, void 0, void 0, function* () { + if (revision == null) { + throw new TypeError('revision can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + let queryValues = { + revision: revision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of release definitions. + * + * @param {string} project - Project ID or project name + * @param {string} searchText - Get release definitions with names containing searchText. + * @param {ReleaseInterfaces.ReleaseDefinitionExpands} expand - The properties that should be expanded in the list of Release definitions. + * @param {string} artifactType - Release definitions with given artifactType will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + * @param {string} artifactSourceId - Release definitions with given artifactSourceId will be returned. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json at https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + * @param {number} top - Number of release definitions to get. + * @param {string} continuationToken - Gets the release definitions after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseDefinitionQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdAscending'. + * @param {string} path - Gets the release definitions under the specified path. + * @param {boolean} isExactNameMatch - 'true'to gets the release definitions with exact match as specified in searchText. Default is 'false'. + * @param {string[]} tagFilter - A comma-delimited list of tags. Only release definitions with these tags will be returned. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release Definitions will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release Definition from results irrespective of whether it has property set or not. + * @param {string[]} definitionIdFilter - A comma-delimited list of release definitions to retrieve. + * @param {boolean} isDeleted - 'true' to get release definitions that has been deleted. Default is 'false' + * @param {boolean} searchTextContainsFolderName - 'true' to get the release definitions under the folder with name as specified in searchText. Default is 'false'. + */ + getReleaseDefinitions(project, searchText, expand, artifactType, artifactSourceId, top, continuationToken, queryOrder, path, isExactNameMatch, tagFilter, propertyFilters, definitionIdFilter, isDeleted, searchTextContainsFolderName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + searchText: searchText, + '$expand': expand, + artifactType: artifactType, + artifactSourceId: artifactSourceId, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, + path: path, + isExactNameMatch: isExactNameMatch, + tagFilter: tagFilter && tagFilter.join(","), + propertyFilters: propertyFilters && propertyFilters.join(","), + definitionIdFilter: definitionIdFilter && definitionIdFilter.join(","), + isDeleted: isDeleted, + searchTextContainsFolderName: searchTextContainsFolderName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Undelete a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinitionUndeleteParameter} releaseDefinitionUndeleteParameter - Object for undelete release definition. + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the release definition to be undeleted + */ + undeleteReleaseDefinition(releaseDefinitionUndeleteParameter, project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, releaseDefinitionUndeleteParameter, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a release definition. + * + * @param {ReleaseInterfaces.ReleaseDefinition} releaseDefinition - Release definition object to update. + * @param {string} project - Project ID or project name + */ + updateReleaseDefinition(releaseDefinition, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "d8f96f24-8ea7-4cb6-baab-2df8fc515665", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, releaseDefinition, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + * @param {number} definitionEnvironmentId + * @param {string} createdBy + * @param {Date} minModifiedTime + * @param {Date} maxModifiedTime + * @param {ReleaseInterfaces.DeploymentStatus} deploymentStatus + * @param {ReleaseInterfaces.DeploymentOperationStatus} operationStatus + * @param {boolean} latestAttemptsOnly + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder + * @param {number} top + * @param {number} continuationToken + * @param {string} createdFor + * @param {Date} minStartedTime + * @param {Date} maxStartedTime + * @param {string} sourceBranch + */ + getDeployments(project, definitionId, definitionEnvironmentId, createdBy, minModifiedTime, maxModifiedTime, deploymentStatus, operationStatus, latestAttemptsOnly, queryOrder, top, continuationToken, createdFor, minStartedTime, maxStartedTime, sourceBranch) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitionId: definitionId, + definitionEnvironmentId: definitionEnvironmentId, + createdBy: createdBy, + minModifiedTime: minModifiedTime, + maxModifiedTime: maxModifiedTime, + deploymentStatus: deploymentStatus, + operationStatus: operationStatus, + latestAttemptsOnly: latestAttemptsOnly, + queryOrder: queryOrder, + '$top': top, + continuationToken: continuationToken, + createdFor: createdFor, + minStartedTime: minStartedTime, + maxStartedTime: maxStartedTime, + sourceBranch: sourceBranch, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "b005ef73-cddc-448e-9ba2-5193bf36b19f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.DeploymentQueryParameters} queryParameters + * @param {string} project - Project ID or project name + */ + getDeploymentsForMultipleEnvironments(queryParameters, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "b005ef73-cddc-448e-9ba2-5193bf36b19f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, queryParameters, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Deployment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a release environment. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of the release environment. + * @param {ReleaseInterfaces.ReleaseEnvironmentExpands} expand - A property that should be expanded in the environment. + */ + getReleaseEnvironment(project, releaseId, environmentId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseEnvironment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the status of a release environment + * + * @param {ReleaseInterfaces.ReleaseEnvironmentUpdateMetadata} environmentUpdateData - Environment update meta data. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + */ + updateReleaseEnvironment(environmentUpdateData, project, releaseId, environmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.7", "Release", "a7e426b1-03dc-48af-9dfe-c98bac612dcb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, environmentUpdateData, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseEnvironment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a definition environment template + * + * @param {ReleaseInterfaces.ReleaseDefinitionEnvironmentTemplate} template - Definition environment template to create + * @param {string} project - Project ID or project name + */ + createDefinitionEnvironmentTemplate(template, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, template, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template + */ + deleteDefinitionEnvironmentTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + if (templateId == null) { + throw new TypeError('templateId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + templateId: templateId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a definition environment template + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template + */ + getDefinitionEnvironmentTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + if (templateId == null) { + throw new TypeError('templateId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + templateId: templateId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of definition environment templates + * + * @param {string} project - Project ID or project name + * @param {boolean} isDeleted - 'true' to get definition environment templates that have been deleted. Default is 'false' + */ + listDefinitionEnvironmentTemplates(project, isDeleted) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + isDeleted: isDeleted, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Undelete a release definition environment template. + * + * @param {string} project - Project ID or project name + * @param {string} templateId - Id of the definition environment template to be undeleted + */ + undeleteReleaseDefinitionEnvironmentTemplate(project, templateId) { + return __awaiter(this, void 0, void 0, function* () { + if (templateId == null) { + throw new TypeError('templateId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + templateId: templateId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.4", "Release", "6b03b696-824e-4479-8eb2-6644a51aba89", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionEnvironmentTemplate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.FavoriteItem[]} favoriteItems + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + */ + createFavorites(favoriteItems, project, scope, identityId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, favoriteItems, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + * @param {string} favoriteItemIds + */ + deleteFavorites(project, scope, identityId, favoriteItemIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, + favoriteItemIds: favoriteItemIds, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} scope + * @param {string} identityId + */ + getFavorites(project, scope, identityId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + scope: scope + }; + let queryValues = { + identityId: identityId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "938f7222-9acb-48fe-b8a3-4eda04597171", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} flightName + */ + getFlightAssignments(flightName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + flightName: flightName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "409d301f-3046-46f3-beb9-4357fbce0a8c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new folder. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. + */ + createFolder(folder, project, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, folder, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a definition folder for given folder name and path and all it's existing definitions. + * + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder to delete. + */ + deleteFolder(project, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets folders. + * + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder. + * @param {ReleaseInterfaces.FolderPathQueryOrder} queryOrder - Gets the results in the defined order. Default is 'None'. + */ + getFolders(project, path, queryOrder) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + path: path + }; + let queryValues = { + queryOrder: queryOrder, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates an existing folder at given existing path. + * + * @param {ReleaseInterfaces.Folder} folder - folder. + * @param {string} project - Project ID or project name + * @param {string} path - Path of the folder to update. + */ + updateFolder(folder, project, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "f7ddf76d-ce0c-4d68-94ff-becaec5d9dea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, folder, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Folder, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the gate for a deployment. + * + * @param {ReleaseInterfaces.GateUpdateMetadata} gateUpdateMetadata - Metadata to patch the Release Gates. + * @param {string} project - Project ID or project name + * @param {number} gateStepId - Gate step Id. + */ + updateGates(gateUpdateMetadata, project, gateStepId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + gateStepId: gateStepId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "2666a539-2001-4f80-bcc7-0379956749d4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, gateUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseGates, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getReleaseHistory(project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "23f461c8-629a-4144-a076-3054fa5f268a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {FormInputInterfaces.InputValuesQuery} query + * @param {string} project - Project ID or project name + */ + getInputValues(query, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "71dd499b-317d-45ea-9134-140ea1932b5e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} sourceId + */ + getIssues(project, buildId, sourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + buildId: buildId + }; + let queryValues = { + sourceId: sourceId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "cd42261a-f5c6-41c8-9259-f078989b9f25", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.AutoTriggerIssue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets gate logs + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} gateId - Id of the gate. + * @param {number} taskId - ReleaseTask Id for the log. + */ + getGateLog(project, releaseId, environmentId, gateId, taskId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + gateId: gateId, + taskId: taskId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "dec7ca5a-7f7f-4797-8bf1-8efc0dc93b28", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get logs for a release Id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + */ + getLogs(project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "c37fbab5-214b-48e4-a55b-cb6b4f6e4038", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets logs + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} attemptId - Id of the attempt. + */ + getLog(project, releaseId, environmentId, taskId, attemptId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + taskId: taskId + }; + let queryValues = { + attemptId: attemptId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "e71ba1ed-c0a4-4a28-a61f-2dd5f68cf3fd", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the task log of a release as a plain text file. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} attemptId + * @param {string} timelineId + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} startLine - Starting line number for logs + * @param {number} endLine - Ending line number for logs + */ + getTaskLog2(project, releaseId, environmentId, attemptId, timelineId, taskId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId, + taskId: taskId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "2577e6c3-6999-4400-bc69-fe1d837755fe", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the task log of a release as a plain text file. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} environmentId - Id of release environment. + * @param {number} releaseDeployPhaseId - Release deploy phase Id. + * @param {number} taskId - ReleaseTask Id for the log. + * @param {number} startLine - Starting line number for logs + * @param {number} endLine - Ending line number for logs + */ + getTaskLog(project, releaseId, environmentId, releaseDeployPhaseId, taskId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + releaseDeployPhaseId: releaseDeployPhaseId, + taskId: taskId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "17c91af7-09fd-4256-bff1-c24ee4f73bc0", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get manual intervention for a given release and manual intervention id. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} manualInterventionId - Id of the manual intervention. + */ + getManualIntervention(project, releaseId, manualInterventionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + manualInterventionId: manualInterventionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List all manual interventions for a given release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + */ + getManualInterventions(project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update manual intervention. + * + * @param {ReleaseInterfaces.ManualInterventionUpdateMetadata} manualInterventionUpdateMetadata - Meta data to update manual intervention. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} manualInterventionId - Id of the manual intervention. + */ + updateManualIntervention(manualInterventionUpdateMetadata, project, releaseId, manualInterventionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + manualInterventionId: manualInterventionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "616c46e4-f370-4456-adaa-fbaf79c7b79e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, manualInterventionUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ManualIntervention, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {Date} minMetricsTime + */ + getMetrics(project, minMetricsTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + minMetricsTime: minMetricsTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "cd1502bb-3c73-4e11-80a6-d11308dceae5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets Org pipeline release settings + * + */ + getOrgPipelineReleaseSettings() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "d156c759-ca4e-492b-90d4-db03971796ea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates Org pipeline release settings + * + * @param {ReleaseInterfaces.OrgPipelineReleaseSettingsUpdateParameters} newSettings + */ + updateOrgPipelineReleaseSettings(newSettings) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "d156c759-ca4e-492b-90d4-db03971796ea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets pipeline release settings + * + * @param {string} project - Project ID or project name + */ + getPipelineReleaseSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "e816b9f4-f9fe-46ba-bdcc-a9af6abf3144", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates pipeline release settings + * + * @param {ReleaseInterfaces.ProjectPipelineReleaseSettingsUpdateParameters} newSettings + * @param {string} project - Project ID or project name + */ + updatePipelineReleaseSettings(newSettings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "e816b9f4-f9fe-46ba-bdcc-a9af6abf3144", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, newSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} artifactType + * @param {string} artifactSourceId + */ + getReleaseProjects(artifactType, artifactSourceId) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactType == null) { + throw new TypeError('artifactType can not be null or undefined'); + } + if (artifactSourceId == null) { + throw new TypeError('artifactSourceId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + artifactType: artifactType, + artifactSourceId: artifactSourceId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "917ace4a-79d1-45a7-987c-7be4db4268fa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of releases + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Releases from this release definition Id. + * @param {number} definitionEnvironmentId + * @param {string} searchText - Releases with names containing searchText. + * @param {string} createdBy - Releases created by this user. + * @param {ReleaseInterfaces.ReleaseStatus} statusFilter - Releases that have this status. + * @param {number} environmentStatusFilter + * @param {Date} minCreatedTime - Releases that were created after this time. + * @param {Date} maxCreatedTime - Releases that were created before this time. + * @param {ReleaseInterfaces.ReleaseQueryOrder} queryOrder - Gets the results in the defined order of created date for releases. Default is descending. + * @param {number} top - Number of releases to get. Default is 50. + * @param {number} continuationToken - Gets the releases after the continuation token provided. + * @param {ReleaseInterfaces.ReleaseExpands} expand - The property that should be expanded in the list of releases. + * @param {string} artifactTypeId - Releases with given artifactTypeId will be returned. Values can be Build, Jenkins, GitHub, Nuget, Team Build (external), ExternalTFSBuild, Git, TFVC, ExternalTfsXamlBuild. + * @param {string} sourceId - Unique identifier of the artifact used. e.g. For build it would be {projectGuid}:{BuildDefinitionId}, for Jenkins it would be {JenkinsConnectionId}:{JenkinsDefinitionId}, for TfsOnPrem it would be {TfsOnPremConnectionId}:{ProjectName}:{TfsOnPremDefinitionId}. For third-party artifacts e.g. TeamCity, BitBucket you may refer 'uniqueSourceIdentifier' inside vss-extension.json https://github.com/Microsoft/vsts-rm-extensions/blob/master/Extensions. + * @param {string} artifactVersionId - Releases with given artifactVersionId will be returned. E.g. in case of Build artifactType, it is buildId. + * @param {string} sourceBranchFilter - Releases with given sourceBranchFilter will be returned. + * @param {boolean} isDeleted - Gets the soft deleted releases, if true. + * @param {string[]} tagFilter - A comma-delimited list of tags. Only releases with these tags will be returned. + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Releases will contain values for the specified property Ids (if they exist). If not set, properties will not be included. Note that this will not filter out any Release from results irrespective of whether it has property set or not. + * @param {number[]} releaseIdFilter - A comma-delimited list of releases Ids. Only releases with these Ids will be returned. + * @param {string} path - Releases under this folder path will be returned + */ + getReleases(project, definitionId, definitionEnvironmentId, searchText, createdBy, statusFilter, environmentStatusFilter, minCreatedTime, maxCreatedTime, queryOrder, top, continuationToken, expand, artifactTypeId, sourceId, artifactVersionId, sourceBranchFilter, isDeleted, tagFilter, propertyFilters, releaseIdFilter, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitionId: definitionId, + definitionEnvironmentId: definitionEnvironmentId, + searchText: searchText, + createdBy: createdBy, + statusFilter: statusFilter, + environmentStatusFilter: environmentStatusFilter, + minCreatedTime: minCreatedTime, + maxCreatedTime: maxCreatedTime, + queryOrder: queryOrder, + '$top': top, + continuationToken: continuationToken, + '$expand': expand, + artifactTypeId: artifactTypeId, + sourceId: sourceId, + artifactVersionId: artifactVersionId, + sourceBranchFilter: sourceBranchFilter, + isDeleted: isDeleted, + tagFilter: tagFilter && tagFilter.join(","), + propertyFilters: propertyFilters && propertyFilters.join(","), + releaseIdFilter: releaseIdFilter && releaseIdFilter.join(","), + path: path, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a release. + * + * @param {ReleaseInterfaces.ReleaseStartMetadata} releaseStartMetadata - Metadata to create a release. + * @param {string} project - Project ID or project name + */ + createRelease(releaseStartMetadata, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, releaseStartMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Soft delete a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {string} comment - Comment for deleting a release. + */ + deleteRelease(project, releaseId, comment) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + comment: comment, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a Release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {ReleaseInterfaces.ApprovalFilters} approvalFilters - A filter which would allow fetching approval steps selectively based on whether it is automated, or manual. This would also decide whether we should fetch pre and post approval snapshots. Assumes All by default + * @param {string[]} propertyFilters - A comma-delimited list of extended properties to be retrieved. If set, the returned Release will contain values for the specified property Ids (if they exist). If not set, properties will not be included. + * @param {ReleaseInterfaces.SingleReleaseExpands} expand - A property that should be expanded in the release. + * @param {number} topGateRecords - Number of release gate records to get. Default is 5. + */ + getRelease(project, releaseId, approvalFilters, propertyFilters, expand, topGateRecords) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + approvalFilters: approvalFilters, + propertyFilters: propertyFilters && propertyFilters.join(","), + '$expand': expand, + '$topGateRecords': topGateRecords, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get release summary of a given definition Id. + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition to get release summary. + * @param {number} releaseCount - Count of releases to be included in summary. + * @param {boolean} includeArtifact - Include artifact details.Default is 'false'. + * @param {number[]} definitionEnvironmentIdsFilter + */ + getReleaseDefinitionSummary(project, definitionId, releaseCount, includeArtifact, definitionEnvironmentIdsFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (definitionId == null) { + throw new TypeError('definitionId can not be null or undefined'); + } + if (releaseCount == null) { + throw new TypeError('releaseCount can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + definitionId: definitionId, + releaseCount: releaseCount, + includeArtifact: includeArtifact, + definitionEnvironmentIdsFilter: definitionEnvironmentIdsFilter && definitionEnvironmentIdsFilter.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get release for a given revision number. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release. + * @param {number} definitionSnapshotRevision - Definition snapshot revision number. + */ + getReleaseRevision(project, releaseId, definitionSnapshotRevision) { + return __awaiter(this, void 0, void 0, function* () { + if (definitionSnapshotRevision == null) { + throw new TypeError('definitionSnapshotRevision can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + definitionSnapshotRevision: definitionSnapshotRevision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Undelete a soft deleted release. + * + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of release to be undeleted. + * @param {string} comment - Any comment for undeleting. + */ + undeleteRelease(project, releaseId, comment) { + return __awaiter(this, void 0, void 0, function* () { + if (comment == null) { + throw new TypeError('comment can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + comment: comment, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a complete release object. + * + * @param {ReleaseInterfaces.Release} release - Release object for update. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release to update. + */ + updateRelease(release, project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, release, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update few properties of a release. + * + * @param {ReleaseInterfaces.ReleaseUpdateMetadata} releaseUpdateMetadata - Properties of release to update. + * @param {string} project - Project ID or project name + * @param {number} releaseId - Id of the release to update. + */ + updateReleaseResource(releaseUpdateMetadata, project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.8", "Release", "a166fde7-27ad-408e-ba75-703c2cc9d500", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, releaseUpdateMetadata, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.Release, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the release settings + * + * @param {string} project - Project ID or project name + */ + getReleaseSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c63c3718-7cfd-41e0-b89b-81c1ca143437", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the release settings + * + * @param {ReleaseInterfaces.ReleaseSettings} releaseSettings + * @param {string} project - Project ID or project name + */ + updateReleaseSettings(releaseSettings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c63c3718-7cfd-41e0-b89b-81c1ca143437", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, releaseSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get release definition for a given definitionId and revision + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. + * @param {number} revision - Id of the revision. + */ + getDefinitionRevision(project, definitionId, revision) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId, + revision: revision + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get revision history for a release definition + * + * @param {string} project - Project ID or project name + * @param {number} definitionId - Id of the definition. + */ + getReleaseDefinitionHistory(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "258b82e0-9d41-43f3-86d6-fef14ddd44bc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseDefinitionRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getSummaryMailSections(project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "224e92b2-8d13-4c14-b120-13d877c516f8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.SummaryMailSection, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.MailMessage} mailMessage + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + sendSummaryMail(mailMessage, project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "224e92b2-8d13-4c14-b120-13d877c516f8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, mailMessage, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} definitionId + */ + getSourceBranches(project, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "0e5def23-78b3-461f-8198-1558f25041c8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag + */ + addDefinitionTag(project, releaseDefinitionId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseDefinitionId: releaseDefinitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds multiple tags to a definition + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + addDefinitionTags(tags, project, releaseDefinitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseDefinitionId: releaseDefinitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a tag from a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + * @param {string} tag + */ + deleteDefinitionTag(project, releaseDefinitionId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseDefinitionId: releaseDefinitionId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a definition + * + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + getDefinitionTags(project, releaseDefinitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseDefinitionId: releaseDefinitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "3d21b4c8-c32e-45b2-a7cb-770a369012f4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a tag to a releaseId + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag + */ + addReleaseTag(project, releaseId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds tag to a release + * + * @param {string[]} tags + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + addReleaseTags(tags, project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, tags, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a tag from a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} tag + */ + deleteReleaseTag(project, releaseId, tag) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + tag: tag + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the tags for a release + * + * @param {string} project - Project ID or project name + * @param {number} releaseId + */ + getReleaseTags(project, releaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "c5b602b6-d1b3-4363-8a51-94384f78068f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + */ + getTags(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "86cee25a-68ba-4ba3-9171-8ad6ffc6df93", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} releaseDeployPhaseId + */ + getTasksForTaskGroup(project, releaseId, environmentId, releaseDeployPhaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + releaseDeployPhaseId: releaseDeployPhaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "4259191d-4b0a-4409-9fb3-09f22ab9bc47", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + * @param {string} timelineId + */ + getTasks2(project, releaseId, environmentId, attemptId, timelineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId, + attemptId: attemptId, + timelineId: timelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "4259291d-4b0a-4409-9fb3-04f22ab9bc47", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} environmentId + * @param {number} attemptId + */ + getTasks(project, releaseId, environmentId, attemptId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId, + environmentId: environmentId + }; + let queryValues = { + attemptId: attemptId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Release", "36b276e0-3c70-4320-a63c-1a2e1466a0d1", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ReleaseTask, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + */ + getArtifactTypeDefinitions(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "8efc2a3c-1fc8-4f6d-9822-75e98cecb48f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactTypeDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseDefinitionId + */ + getArtifactVersions(project, releaseDefinitionId) { + return __awaiter(this, void 0, void 0, function* () { + if (releaseDefinitionId == null) { + throw new TypeError('releaseDefinitionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + releaseDefinitionId: releaseDefinitionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "30fc787e-a9e0-4a07-9fbc-3e903aa051d2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {ReleaseInterfaces.Artifact[]} artifacts + * @param {string} project - Project ID or project name + */ + getArtifactVersionsForSources(artifacts, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "30fc787e-a9e0-4a07-9fbc-3e903aa051d2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, artifacts, options); + let ret = this.formatResponse(res.result, ReleaseInterfaces.TypeInfo.ArtifactVersionQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} baseReleaseId + * @param {number} top + * @param {string} artifactAlias + */ + getReleaseWorkItemsRefs(project, releaseId, baseReleaseId, top, artifactAlias) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + releaseId: releaseId + }; + let queryValues = { + baseReleaseId: baseReleaseId, + '$top': top, + artifactAlias: artifactAlias, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Release", "4f165cc0-875c-4768-b148-f12f78769fab", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +ReleaseApi.RESOURCE_AREA_ID = "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"; +exports.ReleaseApi = ReleaseApi; diff --git a/node_modules/azure-devops-node-api/SecurityRolesApi.d.ts b/node_modules/azure-devops-node-api/SecurityRolesApi.d.ts new file mode 100644 index 0000000..a171813 --- /dev/null +++ b/node_modules/azure-devops-node-api/SecurityRolesApi.d.ts @@ -0,0 +1,48 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import SecurityRolesInterfaces = require("./interfaces/SecurityRolesInterfaces"); +export interface ISecurityRolesApi extends basem.ClientApiBase { + getRoleAssignments(scopeId: string, resourceId: string): Promise; + removeRoleAssignment(scopeId: string, resourceId: string, identityId: string): Promise; + removeRoleAssignments(identityIds: string[], scopeId: string, resourceId: string): Promise; + setRoleAssignment(roleAssignment: SecurityRolesInterfaces.UserRoleAssignmentRef, scopeId: string, resourceId: string, identityId: string): Promise; + setRoleAssignments(roleAssignments: SecurityRolesInterfaces.UserRoleAssignmentRef[], scopeId: string, resourceId: string): Promise; + getRoleDefinitions(scopeId: string): Promise; +} +export declare class SecurityRolesApi extends basem.ClientApiBase implements ISecurityRolesApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {string} scopeId + * @param {string} resourceId + */ + getRoleAssignments(scopeId: string, resourceId: string): Promise; + /** + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId + */ + removeRoleAssignment(scopeId: string, resourceId: string, identityId: string): Promise; + /** + * @param {string[]} identityIds + * @param {string} scopeId + * @param {string} resourceId + */ + removeRoleAssignments(identityIds: string[], scopeId: string, resourceId: string): Promise; + /** + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId + */ + setRoleAssignment(roleAssignment: SecurityRolesInterfaces.UserRoleAssignmentRef, scopeId: string, resourceId: string, identityId: string): Promise; + /** + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments + * @param {string} scopeId + * @param {string} resourceId + */ + setRoleAssignments(roleAssignments: SecurityRolesInterfaces.UserRoleAssignmentRef[], scopeId: string, resourceId: string): Promise; + /** + * @param {string} scopeId + */ + getRoleDefinitions(scopeId: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/SecurityRolesApi.js b/node_modules/azure-devops-node-api/SecurityRolesApi.js new file mode 100644 index 0000000..21e2876 --- /dev/null +++ b/node_modules/azure-devops-node-api/SecurityRolesApi.js @@ -0,0 +1,188 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const SecurityRolesInterfaces = require("./interfaces/SecurityRolesInterfaces"); +class SecurityRolesApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-SecurityRoles-api', options); + } + /** + * @param {string} scopeId + * @param {string} resourceId + */ + getRoleAssignments(scopeId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId + */ + removeRoleAssignment(scopeId, resourceId, identityId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId, + resourceId: resourceId, + identityId: identityId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string[]} identityIds + * @param {string} scopeId + * @param {string} resourceId + */ + removeRoleAssignments(identityIds, scopeId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, identityIds, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef} roleAssignment + * @param {string} scopeId + * @param {string} resourceId + * @param {string} identityId + */ + setRoleAssignment(roleAssignment, scopeId, resourceId, identityId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId, + resourceId: resourceId, + identityId: identityId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, roleAssignment, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {SecurityRolesInterfaces.UserRoleAssignmentRef[]} roleAssignments + * @param {string} scopeId + * @param {string} resourceId + */ + setRoleAssignments(roleAssignments, scopeId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "9461c234-c84c-4ed2-b918-2f0f92ad0a35", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, roleAssignments, options); + let ret = this.formatResponse(res.result, SecurityRolesInterfaces.TypeInfo.RoleAssignment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeId + */ + getRoleDefinitions(scopeId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeId: scopeId + }; + try { + let verData = yield this.vsoClient.getVersioningData("3.2-preview.1", "securityroles", "f4cc9a86-453c-48d2-b44d-d3bd5c105f4f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.SecurityRolesApi = SecurityRolesApi; diff --git a/node_modules/azure-devops-node-api/Serialization.d.ts b/node_modules/azure-devops-node-api/Serialization.d.ts new file mode 100644 index 0000000..99c0ad8 --- /dev/null +++ b/node_modules/azure-devops-node-api/Serialization.d.ts @@ -0,0 +1,67 @@ +/** +* Metadata for deserializing an enum field on a contract/type +*/ +export interface ContractEnumMetadata { + enumValues?: { + [name: string]: number; + }; +} +export interface SerializationData { + requestTypeMetadata?: ContractMetadata; + responseTypeMetadata?: ContractMetadata; + responseIsCollection: boolean; +} +/** +* Metadata for deserializing a particular field on a contract/type +*/ +export interface ContractFieldMetadata { + isArray?: boolean; + isDate?: boolean; + enumType?: ContractEnumMetadata; + typeInfo?: ContractMetadata; + isDictionary?: boolean; + dictionaryKeyIsDate?: boolean; + dictionaryValueIsDate?: boolean; + dictionaryKeyEnumType?: ContractEnumMetadata; + dictionaryValueEnumType?: ContractEnumMetadata; + dictionaryValueTypeInfo?: ContractMetadata; + dictionaryValueFieldInfo?: ContractFieldMetadata; +} +/** +* Metadata required for deserializing a given type +*/ +export interface ContractMetadata { + fields?: { + [fieldName: string]: ContractFieldMetadata; + }; +} +export interface IWebApiArrayResult { + count: number; + value: any[]; +} +/** +* Module for handling serialization and deserialization of data contracts +* (contracts sent from the server using the VSO default REST api serialization settings) +*/ +export declare module ContractSerializer { + /** + * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and + * return a pure JSON object that can be posted to REST endpoint. + * + * @param data The object to serialize + * @param contractMetadata The type info/metadata for the contract type being serialized + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + */ + function serialize(data: any, contractMetadata: ContractMetadata, preserveOriginal: boolean): any; + /** + * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object + * where date strings are converted to Date objects and enum values are converted from strings into + * their numerical value. + * + * @param data The object to deserialize + * @param contractMetadata The type info/metadata for the contract type being deserialize + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. + */ + function deserialize(data: any, contractMetadata: ContractMetadata, preserveOriginal: boolean, unwrapWrappedCollections: boolean): any; +} diff --git a/node_modules/azure-devops-node-api/Serialization.js b/node_modules/azure-devops-node-api/Serialization.js new file mode 100644 index 0000000..0f380f8 --- /dev/null +++ b/node_modules/azure-devops-node-api/Serialization.js @@ -0,0 +1,271 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** +* Module for handling serialization and deserialization of data contracts +* (contracts sent from the server using the VSO default REST api serialization settings) +*/ +var ContractSerializer; +(function (ContractSerializer) { + var _legacyDateRegExp; + /** + * Process a contract in its raw form (e.g. date fields are Dates, and Enums are numbers) and + * return a pure JSON object that can be posted to REST endpoint. + * + * @param data The object to serialize + * @param contractMetadata The type info/metadata for the contract type being serialized + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + */ + function serialize(data, contractMetadata, preserveOriginal) { + if (data && contractMetadata) { + if (Array.isArray(data)) { + return _getTranslatedArray(data, contractMetadata, true, preserveOriginal); + } + else { + return _getTranslatedObject(data, contractMetadata, true, preserveOriginal); + } + } + else { + return data; + } + } + ContractSerializer.serialize = serialize; + /** + * Process a pure JSON object (e.g. that came from a REST call) and transform it into a JS object + * where date strings are converted to Date objects and enum values are converted from strings into + * their numerical value. + * + * @param data The object to deserialize + * @param contractMetadata The type info/metadata for the contract type being deserialize + * @param preserveOriginal If true, don't modify the original object. False modifies the original object (the return value points to the data argument). + * @param unwrapWrappedCollections If true check for wrapped arrays (REST apis will not return arrays directly as the root result but will instead wrap them in a { values: [], count: 0 } object. + */ + function deserialize(data, contractMetadata, preserveOriginal, unwrapWrappedCollections) { + if (data) { + if (unwrapWrappedCollections && Array.isArray(data.value)) { + // Wrapped json array - unwrap it and send the array as the result + data = data.value; + } + if (contractMetadata) { + if (Array.isArray(data)) { + data = _getTranslatedArray(data, contractMetadata, false, preserveOriginal); + } + else { + data = _getTranslatedObject(data, contractMetadata, false, preserveOriginal); + } + } + } + return data; + } + ContractSerializer.deserialize = deserialize; + function _getTranslatedArray(array, typeMetadata, serialize, preserveOriginal) { + var resultArray = array; + var arrayCopy = []; + var i; + for (i = 0; i < array.length; i++) { + var item = array[i]; + var processedItem; + // handle arrays of arrays + if (Array.isArray(item)) { + processedItem = _getTranslatedArray(item, typeMetadata, serialize, preserveOriginal); + } + else { + processedItem = _getTranslatedObject(item, typeMetadata, serialize, preserveOriginal); + } + if (preserveOriginal) { + arrayCopy.push(processedItem); + if (processedItem !== item) { + resultArray = arrayCopy; + } + } + else { + array[i] = processedItem; + } + } + return resultArray; + } + function _getTranslatedObject(typeObject, typeMetadata, serialize, preserveOriginal) { + var processedItem = typeObject, copiedItem = false; + if (typeObject && typeMetadata.fields) { + for (var fieldName in typeMetadata.fields) { + var fieldMetadata = typeMetadata.fields[fieldName]; + var fieldValue = typeObject[fieldName]; + var translatedValue = _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal); + if (fieldValue !== translatedValue) { + if (preserveOriginal && !copiedItem) { + processedItem = this._extend({}, typeObject); + copiedItem = true; + } + processedItem[fieldName] = translatedValue; + } + } + } + return processedItem; + } + function _getTranslatedField(fieldValue, fieldMetadata, serialize, preserveOriginal) { + if (!fieldValue) { + return fieldValue; + } + if (fieldMetadata.isArray) { + if (Array.isArray(fieldValue)) { + var newArray = [], processedArray = fieldValue; + for (var index = 0; index < fieldValue.length; index++) { + var arrayValue = fieldValue[index]; + var processedValue = arrayValue; + if (fieldMetadata.isDate) { + processedValue = _getTranslatedDateValue(arrayValue, serialize); + } + else if (fieldMetadata.enumType) { + processedValue = _getTranslatedEnumValue(fieldMetadata.enumType, arrayValue, serialize); + } + else if (fieldMetadata.typeInfo) { + if (Array.isArray(arrayValue)) { + processedValue = _getTranslatedArray(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal); + } + else { + processedValue = _getTranslatedObject(arrayValue, fieldMetadata.typeInfo, serialize, preserveOriginal); + } + } + if (preserveOriginal) { + newArray.push(processedValue); + if (processedValue !== arrayValue) { + processedArray = newArray; + } + } + else { + fieldValue[index] = processedValue; + } + } + return processedArray; + } + else { + return fieldValue; + } + } + else if (fieldMetadata.isDictionary) { + var dictionaryModified = false; + var newDictionary = {}; + for (var key in fieldValue) { + var dictionaryValue = fieldValue[key]; + var newKey = key, newValue = dictionaryValue; + if (fieldMetadata.dictionaryKeyIsDate) { + newKey = _getTranslatedDateValue(key, serialize); + } + else if (fieldMetadata.dictionaryKeyEnumType) { + newKey = _getTranslatedEnumValue(fieldMetadata.dictionaryKeyEnumType, key, serialize); + } + if (fieldMetadata.dictionaryValueIsDate) { + newValue = _getTranslatedDateValue(dictionaryValue, serialize); + } + else if (fieldMetadata.dictionaryValueEnumType) { + newValue = _getTranslatedEnumValue(fieldMetadata.dictionaryValueEnumType, dictionaryValue, serialize); + } + else if (fieldMetadata.dictionaryValueTypeInfo) { + newValue = _getTranslatedObject(newValue, fieldMetadata.dictionaryValueTypeInfo, serialize, preserveOriginal); + } + else if (fieldMetadata.dictionaryValueFieldInfo) { + newValue = _getTranslatedField(dictionaryValue, fieldMetadata.dictionaryValueFieldInfo, serialize, preserveOriginal); + } + newDictionary[newKey] = newValue; + if (key !== newKey || dictionaryValue !== newValue) { + dictionaryModified = true; + } + } + return dictionaryModified ? newDictionary : fieldValue; + } + else { + if (fieldMetadata.isDate) { + return _getTranslatedDateValue(fieldValue, serialize); + } + else if (fieldMetadata.enumType) { + return _getTranslatedEnumValue(fieldMetadata.enumType, fieldValue, serialize); + } + else if (fieldMetadata.typeInfo) { + return _getTranslatedObject(fieldValue, fieldMetadata.typeInfo, serialize, preserveOriginal); + } + else { + return fieldValue; + } + } + } + function _getTranslatedEnumValue(enumType, valueToConvert, serialize) { + if (serialize && typeof valueToConvert === "number") { + // Serialize: number --> String + // Because webapi handles the numerical value for enums, there is no need to convert to string. + // Let this fall through to return the numerical value. + } + else if (!serialize && typeof valueToConvert === "string") { + // Deserialize: String --> number + var result = 0; + if (valueToConvert) { + var splitValue = valueToConvert.split(","); + for (var i = 0; i < splitValue.length; i++) { + var valuePart = splitValue[i]; + //equivalent to jquery trim + //copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/trim/ie8.js + var enumName = valuePart.replace(/^\s+|\s+$/g, '') || ""; + if (enumName) { + var resultPart = enumType.enumValues[enumName]; + if (!resultPart) { + // No matching enum value. Try again but case insensitive + var lowerCaseEnumName = enumName.toLowerCase(); + if (lowerCaseEnumName !== enumName) { + for (var name in enumType.enumValues) { + var value = enumType.enumValues[name]; + if (name.toLowerCase() === lowerCaseEnumName) { + resultPart = value; + break; + } + } + } + } + if (resultPart) { + result |= resultPart; + } + } + } + } + return result; + } + return valueToConvert; + } + function _getTranslatedDateValue(valueToConvert, serialize) { + if (!serialize && typeof valueToConvert === "string") { + // Deserialize: String --> Date + var dateValue = new Date(valueToConvert); + if (isNaN(dateValue) && navigator.userAgent && /msie/i.test(navigator.userAgent)) { + dateValue = _convertLegacyIEDate(valueToConvert); + } + return dateValue; + } + return valueToConvert; + } + function _convertLegacyIEDate(dateStringValue) { + // IE 8/9 does not handle parsing dates in ISO form like: + // 2013-05-13T14:26:54.397Z + var match; + if (!_legacyDateRegExp) { + _legacyDateRegExp = new RegExp("(\\d+)-(\\d+)-(\\d+)T(\\d+):(\\d+):(\\d+).(\\d+)Z"); + } + match = _legacyDateRegExp.exec(dateStringValue); + if (match) { + return new Date(Date.UTC(parseInt(match[1]), parseInt(match[2]) - 1, parseInt(match[3]), parseInt(match[4]), parseInt(match[5]), parseInt(match[6]), parseInt(match[7]))); + } + else { + return null; + } + } + // jquery extend method in native javascript (used to clone objects) + // copied from https://github.com/HubSpot/youmightnotneedjquery/blob/ef987223c20e480fcbfb5924d96c11cd928e1226/comparisons/utils/extend/ie8.js + var _extend = function (out) { + out = out || {}; + for (var i = 1; i < arguments.length; i++) { + if (!arguments[i]) + continue; + for (var key in arguments[i]) { + if (arguments[i].hasOwnProperty(key)) + out[key] = arguments[i][key]; + } + } + return out; + }; +})(ContractSerializer = exports.ContractSerializer || (exports.ContractSerializer = {})); diff --git a/node_modules/azure-devops-node-api/TaskAgentApi.d.ts b/node_modules/azure-devops-node-api/TaskAgentApi.d.ts new file mode 100644 index 0000000..0c0422f --- /dev/null +++ b/node_modules/azure-devops-node-api/TaskAgentApi.d.ts @@ -0,0 +1,50 @@ +/// +import taskagentbasem = require('./TaskAgentApiBase'); +import TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces"); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +export interface ITaskAgentApi extends taskagentbasem.ITaskAgentApiBase { + uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; +} +export declare class TaskAgentApi extends taskagentbasem.TaskAgentApiBase implements ITaskAgentApi { + private _handlers; + private _options; + private _fallbackClient; + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {string} taskId + * @param onResult callback function + */ + deleteTaskDefinition(taskId: string): Promise; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting ArrayBuffer + */ + getTaskContentZip(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean): Promise; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition + */ + getTaskDefinition(taskId: string, versionString: string, visibility: string[], scopeLocal: boolean): Promise; + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] + */ + getTaskDefinitions(taskId: string, visibility: string[], scopeLocal: boolean): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + * @param onResult callback function + */ + uploadTaskDefinition(customHeaders: VsoBaseInterfaces.IHeaders, contentStream: NodeJS.ReadableStream, taskId: string, overwrite: boolean): Promise; + private _getFallbackClient; + private _getAccountUrl; +} diff --git a/node_modules/azure-devops-node-api/TaskAgentApi.js b/node_modules/azure-devops-node-api/TaskAgentApi.js new file mode 100644 index 0000000..329fcb6 --- /dev/null +++ b/node_modules/azure-devops-node-api/TaskAgentApi.js @@ -0,0 +1,201 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const taskagentbasem = require("./TaskAgentApiBase"); +const url = require("url"); +class TaskAgentApi extends taskagentbasem.TaskAgentApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, options); + // hang on to the handlers in case we need to fall back to an account-level client + this._handlers = handlers; + this._options = options; + } + /** + * @param {string} taskId + * @param onResult callback function + */ + deleteTaskDefinition(taskId) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.deleteTaskDefinition(taskId); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + } + else { + // use the fallback client + return fallbackClient.deleteTaskDefinition(taskId); + } + } + }); + return promise; + } + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting ArrayBuffer + */ + getTaskContentZip(taskId, versionString, visibility, scopeLocal) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.getTaskContentZip(taskId, versionString, visibility, scopeLocal); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + } + else { + // use the fallback client + return fallbackClient.getTaskContentZip(taskId, versionString, visibility, scopeLocal); + } + } + }); + return promise; + } + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition + */ + getTaskDefinition(taskId, versionString, visibility, scopeLocal) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.getTaskDefinition(taskId, versionString, visibility, scopeLocal); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + } + else { + // use the fallback client + return fallbackClient.getTaskDefinition(taskId, versionString, visibility, scopeLocal); + } + } + }); + return promise; + } + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param onResult callback function with the resulting TaskAgentInterfaces.TaskDefinition[] + */ + getTaskDefinitions(taskId, visibility, scopeLocal) { + let promise = this.vsoClient.beginGetLocation("distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd") + .then((location) => { + if (location) { + // the resource exists at the url we were given. go! + return super.getTaskDefinitions(taskId, visibility, scopeLocal); + } + else { + // this is the case when the server doesn't support collection-level task definitions + var fallbackClient = this._getFallbackClient(this.baseUrl); + if (!fallbackClient) { + // couldn't convert + throw new Error("Failed to find api location for area: distributedtask id: 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd"); + } + else { + // use the fallback client + return fallbackClient.getTaskDefinitions(taskId, visibility, scopeLocal); + } + } + }); + return promise; + } + /** + * @param {NodeJS.ReadableStream} contentStream + * @param {string} taskId + * @param {boolean} overwrite + * @param onResult callback function + */ + uploadTaskDefinition(customHeaders, contentStream, taskId, overwrite) { + return __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId + }; + let queryValues = { + overwrite: overwrite, + }; + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("3.0-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + resolve(res.result); + } + catch (err) { + reject(err); + } + })); + }); + } + _getFallbackClient(baseUrl) { + if (!this._fallbackClient) { + var accountUrl = this._getAccountUrl(baseUrl); + if (accountUrl) { + this._fallbackClient = new TaskAgentApi(accountUrl, this._handlers, this._options); + } + } + return this._fallbackClient; + } + _getAccountUrl(collectionUrl) { + // converts a collection URL to an account URL + // returns null if the conversion can't be made + var purl = url.parse(collectionUrl); + if (!purl.protocol || !purl.host) { + return null; + } + var accountUrl = purl.protocol + '//' + purl.host; + // purl.path is something like /DefaultCollection or /tfs/DefaultCollection or /DefaultCollection/ + var splitPath = purl.path.split('/').slice(1); + if (splitPath.length === 0 || (splitPath.length === 1 && splitPath[0] === '')) { + return null; + } + // if the first segment of the path is tfs, the second is the collection. if the url ends in / there will be a third, empty entry + if (splitPath[0] === 'tfs' && (splitPath.length === 2 || (splitPath.length === 3 && splitPath[2].length === 0))) { + //on prem + accountUrl += '/' + 'tfs'; + } + else if (splitPath.length === 2 && splitPath[0] === '') { + // /DefaultCollection/ + return accountUrl; + } + else if (splitPath.length > 1) { + return null; + } + return accountUrl; + } +} +exports.TaskAgentApi = TaskAgentApi; diff --git a/node_modules/azure-devops-node-api/TaskAgentApiBase.d.ts b/node_modules/azure-devops-node-api/TaskAgentApiBase.d.ts new file mode 100644 index 0000000..c9e621d --- /dev/null +++ b/node_modules/azure-devops-node-api/TaskAgentApiBase.d.ts @@ -0,0 +1,1229 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces"); +export interface ITaskAgentApiBase extends basem.ClientApiBase { + addAgentCloud(agentCloud: TaskAgentInterfaces.TaskAgentCloud): Promise; + deleteAgentCloud(agentCloudId: number): Promise; + getAgentCloud(agentCloudId: number): Promise; + getAgentClouds(): Promise; + updateAgentCloud(updatedCloud: TaskAgentInterfaces.TaskAgentCloud, agentCloudId: number): Promise; + getAgentCloudTypes(): Promise; + getAgentRequestsForQueue(project: string, queueId: number, top: number, continuationToken?: string): Promise; + queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, project: string, queueId: number): Promise; + addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; + deleteAgent(poolId: number, agentId: number): Promise; + getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, includeLastCompletedRequest?: boolean, propertyFilters?: string[]): Promise; + getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, includeLastCompletedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; + replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + getAzureManagementGroups(): Promise; + getAzureSubscriptions(): Promise; + generateDeploymentGroupAccessToken(project: string, deploymentGroupId: number): Promise; + addDeploymentGroup(deploymentGroup: TaskAgentInterfaces.DeploymentGroupCreateParameter, project: string): Promise; + deleteDeploymentGroup(project: string, deploymentGroupId: number): Promise; + getDeploymentGroup(project: string, deploymentGroupId: number, actionFilter?: TaskAgentInterfaces.DeploymentGroupActionFilter, expand?: TaskAgentInterfaces.DeploymentGroupExpands): Promise; + getDeploymentGroups(project: string, name?: string, actionFilter?: TaskAgentInterfaces.DeploymentGroupActionFilter, expand?: TaskAgentInterfaces.DeploymentGroupExpands, continuationToken?: string, top?: number, ids?: number[]): Promise; + updateDeploymentGroup(deploymentGroup: TaskAgentInterfaces.DeploymentGroupUpdateParameter, project: string, deploymentGroupId: number): Promise; + getDeploymentGroupsMetrics(project: string, deploymentGroupName?: string, continuationToken?: string, top?: number): Promise; + getAgentRequestsForDeploymentMachine(project: string, deploymentGroupId: number, machineId: number, completedRequestCount?: number): Promise; + getAgentRequestsForDeploymentMachines(project: string, deploymentGroupId: number, machineIds?: number[], completedRequestCount?: number): Promise; + refreshDeploymentMachines(project: string, deploymentGroupId: number): Promise; + generateDeploymentPoolAccessToken(poolId: number): Promise; + getDeploymentPoolsSummary(poolName?: string, expands?: TaskAgentInterfaces.DeploymentPoolSummaryExpands, poolIds?: number[]): Promise; + getAgentRequestsForDeploymentTarget(project: string, deploymentGroupId: number, targetId: number, completedRequestCount?: number): Promise; + getAgentRequestsForDeploymentTargets(project: string, deploymentGroupId: number, targetIds?: number[], ownerId?: number, completedOn?: Date, completedRequestCount?: number): Promise; + refreshDeploymentTargets(project: string, deploymentGroupId: number): Promise; + queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; + getEnvironmentDeploymentExecutionRecords(project: string, environmentId: number, continuationToken?: string, top?: number): Promise; + addEnvironment(environmentCreateParameter: TaskAgentInterfaces.EnvironmentCreateParameter, project: string): Promise; + deleteEnvironment(project: string, environmentId: number): Promise; + getEnvironmentById(project: string, environmentId: number, expands?: TaskAgentInterfaces.EnvironmentExpands): Promise; + getEnvironments(project: string, name?: string, continuationToken?: string, top?: number): Promise; + updateEnvironment(environmentUpdateParameter: TaskAgentInterfaces.EnvironmentUpdateParameter, project: string, environmentId: number): Promise; + getTaskHubLicenseDetails(hubName: string, includeEnterpriseUsersCount?: boolean, includeHostedAgentMinutesCount?: boolean): Promise; + updateTaskHubLicenseDetails(taskHubLicenseDetails: TaskAgentInterfaces.TaskHubLicenseDetails, hubName: string): Promise; + validateInputs(inputValidationRequest: TaskAgentInterfaces.InputValidationRequest): Promise; + deleteAgentRequest(poolId: number, requestId: number, lockToken: string, result?: TaskAgentInterfaces.TaskResult, agentShuttingDown?: boolean): Promise; + getAgentRequest(poolId: number, requestId: number, includeStatus?: boolean): Promise; + getAgentRequests(poolId: number, top: number, continuationToken?: string): Promise; + getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; + getAgentRequestsForAgents(poolId: number, agentIds?: number[], completedRequestCount?: number): Promise; + getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; + queueAgentRequestByPool(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; + updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, updateOptions?: TaskAgentInterfaces.TaskAgentRequestUpdateOptions): Promise; + addKubernetesResource(createParameters: TaskAgentInterfaces.KubernetesResourceCreateParameters, project: string, environmentId: number): Promise; + deleteKubernetesResource(project: string, environmentId: number, resourceId: number): Promise; + getKubernetesResource(project: string, environmentId: number, resourceId: number): Promise; + generateDeploymentMachineGroupAccessToken(project: string, machineGroupId: number): Promise; + addDeploymentMachineGroup(machineGroup: TaskAgentInterfaces.DeploymentMachineGroup, project: string): Promise; + deleteDeploymentMachineGroup(project: string, machineGroupId: number): Promise; + getDeploymentMachineGroup(project: string, machineGroupId: number, actionFilter?: TaskAgentInterfaces.MachineGroupActionFilter): Promise; + getDeploymentMachineGroups(project: string, machineGroupName?: string, actionFilter?: TaskAgentInterfaces.MachineGroupActionFilter): Promise; + updateDeploymentMachineGroup(machineGroup: TaskAgentInterfaces.DeploymentMachineGroup, project: string, machineGroupId: number): Promise; + getDeploymentMachineGroupMachines(project: string, machineGroupId: number, tagFilters?: string[]): Promise; + updateDeploymentMachineGroupMachines(deploymentMachines: TaskAgentInterfaces.DeploymentMachine[], project: string, machineGroupId: number): Promise; + addDeploymentMachine(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number): Promise; + deleteDeploymentMachine(project: string, deploymentGroupId: number, machineId: number): Promise; + getDeploymentMachine(project: string, deploymentGroupId: number, machineId: number, expand?: TaskAgentInterfaces.DeploymentMachineExpands): Promise; + getDeploymentMachines(project: string, deploymentGroupId: number, tags?: string[], name?: string, expand?: TaskAgentInterfaces.DeploymentMachineExpands): Promise; + replaceDeploymentMachine(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, machineId: number): Promise; + updateDeploymentMachine(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, machineId: number): Promise; + updateDeploymentMachines(machines: TaskAgentInterfaces.DeploymentMachine[], project: string, deploymentGroupId: number): Promise; + createAgentPoolMaintenanceDefinition(definition: TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition, poolId: number): Promise; + deleteAgentPoolMaintenanceDefinition(poolId: number, definitionId: number): Promise; + getAgentPoolMaintenanceDefinition(poolId: number, definitionId: number): Promise; + getAgentPoolMaintenanceDefinitions(poolId: number): Promise; + updateAgentPoolMaintenanceDefinition(definition: TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition, poolId: number, definitionId: number): Promise; + deleteAgentPoolMaintenanceJob(poolId: number, jobId: number): Promise; + getAgentPoolMaintenanceJob(poolId: number, jobId: number): Promise; + getAgentPoolMaintenanceJobLogs(poolId: number, jobId: number): Promise; + getAgentPoolMaintenanceJobs(poolId: number, definitionId?: number): Promise; + queueAgentPoolMaintenanceJob(job: TaskAgentInterfaces.TaskAgentPoolMaintenanceJob, poolId: number): Promise; + updateAgentPoolMaintenanceJob(job: TaskAgentInterfaces.TaskAgentPoolMaintenanceJob, poolId: number, jobId: number): Promise; + deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; + getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; + refreshAgent(poolId: number, agentId: number): Promise; + refreshAgents(poolId: number): Promise; + sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; + getPackage(packageType: string, platform: string, version: string): Promise; + getPackages(packageType: string, platform?: string, top?: number): Promise; + getAgentPoolMetadata(poolId: number): Promise; + setAgentPoolMetadata(customHeaders: any, agentPoolMetadata: any, poolId: number): Promise; + addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; + deleteAgentPool(poolId: number): Promise; + getAgentPool(poolId: number, properties?: string[], actionFilter?: TaskAgentInterfaces.TaskAgentPoolActionFilter): Promise; + getAgentPools(poolName?: string, properties?: string[], poolType?: TaskAgentInterfaces.TaskAgentPoolType, actionFilter?: TaskAgentInterfaces.TaskAgentPoolActionFilter): Promise; + getAgentPoolsByIds(poolIds: number[], actionFilter?: TaskAgentInterfaces.TaskAgentPoolActionFilter): Promise; + updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; + addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, project?: string, authorizePipelines?: boolean): Promise; + createTeamProject(project?: string): Promise; + deleteAgentQueue(queueId: number, project?: string): Promise; + getAgentQueue(queueId: number, project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + getAgentQueues(project?: string, queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + getAgentQueuesByIds(queueIds: number[], project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + getAgentQueuesByNames(queueNames: string[], project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + getAgentQueuesForPools(poolIds: number[], project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + getAgentCloudRequests(agentCloudId: number): Promise; + getResourceLimits(): Promise; + getResourceUsage(parallelismTag?: string, poolIsHosted?: boolean, includeRunningRequests?: boolean): Promise; + getTaskGroupHistory(project: string, taskGroupId: string): Promise; + deleteSecureFile(project: string, secureFileId: string): Promise; + downloadSecureFile(project: string, secureFileId: string, ticket: string, download?: boolean): Promise; + getSecureFile(project: string, secureFileId: string, includeDownloadTicket?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + getSecureFiles(project: string, namePattern?: string, includeDownloadTickets?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + getSecureFilesByIds(project: string, secureFileIds: string[], includeDownloadTickets?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + getSecureFilesByNames(project: string, secureFileNames: string[], includeDownloadTickets?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + querySecureFilesByProperties(condition: string, project: string, namePattern?: string): Promise; + updateSecureFile(secureFile: TaskAgentInterfaces.SecureFile, project: string, secureFileId: string): Promise; + updateSecureFiles(secureFiles: TaskAgentInterfaces.SecureFile[], project: string): Promise; + uploadSecureFile(customHeaders: any, contentStream: NodeJS.ReadableStream, project: string, name: string, authorizePipelines?: boolean): Promise; + createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; + deleteAgentSession(poolId: number, sessionId: string): Promise; + addDeploymentTarget(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number): Promise; + deleteDeploymentTarget(project: string, deploymentGroupId: number, targetId: number): Promise; + getDeploymentTarget(project: string, deploymentGroupId: number, targetId: number, expand?: TaskAgentInterfaces.DeploymentTargetExpands): Promise; + getDeploymentTargets(project: string, deploymentGroupId: number, tags?: string[], name?: string, partialNameMatch?: boolean, expand?: TaskAgentInterfaces.DeploymentTargetExpands, agentStatus?: TaskAgentInterfaces.TaskAgentStatusFilter, agentJobResult?: TaskAgentInterfaces.TaskAgentJobResultFilter, continuationToken?: string, top?: number, enabled?: boolean, propertyFilters?: string[]): Promise; + replaceDeploymentTarget(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, targetId: number): Promise; + updateDeploymentTarget(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, targetId: number): Promise; + updateDeploymentTargets(machines: TaskAgentInterfaces.DeploymentTargetUpdateParameter[], project: string, deploymentGroupId: number): Promise; + addTaskGroup(taskGroup: TaskAgentInterfaces.TaskGroupCreateParameter, project: string): Promise; + deleteTaskGroup(project: string, taskGroupId: string, comment?: string): Promise; + getTaskGroup(project: string, taskGroupId: string, versionSpec: string, expand?: TaskAgentInterfaces.TaskGroupExpands): Promise; + getTaskGroupRevision(project: string, taskGroupId: string, revision: number): Promise; + getTaskGroups(project: string, taskGroupId?: string, expanded?: boolean, taskIdFilter?: string, deleted?: boolean, top?: number, continuationToken?: Date, queryOrder?: TaskAgentInterfaces.TaskGroupQueryOrder): Promise; + publishTaskGroup(taskGroupMetadata: TaskAgentInterfaces.PublishTaskGroupMetadata, project: string, parentTaskGroupId: string): Promise; + undeleteTaskGroup(taskGroup: TaskAgentInterfaces.TaskGroup, project: string): Promise; + updateTaskGroup(taskGroup: TaskAgentInterfaces.TaskGroupUpdateParameter, project: string, taskGroupId?: string): Promise; + updateTaskGroupProperties(taskGroupUpdateProperties: TaskAgentInterfaces.TaskGroupUpdatePropertiesBase, project: string, taskGroupId: string, disablePriorVersions?: boolean): Promise; + deleteTaskDefinition(taskId: string): Promise; + getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean, allVersions?: boolean): Promise; + updateAgentUpdateState(poolId: number, agentId: number, currentState: string): Promise; + updateAgentUserCapabilities(userCapabilities: { + [key: string]: string; + }, poolId: number, agentId: number): Promise; + addVariableGroup(variableGroupParameters: TaskAgentInterfaces.VariableGroupParameters): Promise; + deleteVariableGroup(groupId: number, projectIds: string[]): Promise; + shareVariableGroup(variableGroupProjectReferences: TaskAgentInterfaces.VariableGroupProjectReference[], variableGroupId: number): Promise; + updateVariableGroup(variableGroupParameters: TaskAgentInterfaces.VariableGroupParameters, groupId: number): Promise; + getVariableGroup(project: string, groupId: number): Promise; + getVariableGroups(project: string, groupName?: string, actionFilter?: TaskAgentInterfaces.VariableGroupActionFilter, top?: number, continuationToken?: number, queryOrder?: TaskAgentInterfaces.VariableGroupQueryOrder): Promise; + getVariableGroupsById(project: string, groupIds: number[]): Promise; + addVirtualMachineGroup(createParameters: TaskAgentInterfaces.VirtualMachineGroupCreateParameters, project: string, environmentId: number): Promise; + deleteVirtualMachineGroup(project: string, environmentId: number, resourceId: number): Promise; + getVirtualMachineGroup(project: string, environmentId: number, resourceId: number): Promise; + updateVirtualMachineGroup(resource: TaskAgentInterfaces.VirtualMachineGroup, project: string, environmentId: number): Promise; + getVirtualMachines(project: string, environmentId: number, resourceId: number, continuationToken?: string, name?: string, partialNameMatch?: boolean, tags?: string[], top?: number): Promise; + updateVirtualMachines(machines: TaskAgentInterfaces.VirtualMachine[], project: string, environmentId: number, resourceId: number): Promise; + acquireAccessToken(authenticationRequest: TaskAgentInterfaces.AadOauthTokenRequest): Promise; + createAadOAuthRequest(tenantId: string, redirectUri: string, promptOption?: TaskAgentInterfaces.AadLoginPromptOption, completeCallbackPayload?: string, completeCallbackByAuthCode?: boolean): Promise; + getVstsAadTenantId(): Promise; + getYamlSchema(validateTaskNames?: boolean): Promise; +} +export declare class TaskAgentApiBase extends basem.ClientApiBase implements ITaskAgentApiBase { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"; + /** + * @param {TaskAgentInterfaces.TaskAgentCloud} agentCloud + */ + addAgentCloud(agentCloud: TaskAgentInterfaces.TaskAgentCloud): Promise; + /** + * @param {number} agentCloudId + */ + deleteAgentCloud(agentCloudId: number): Promise; + /** + * @param {number} agentCloudId + */ + getAgentCloud(agentCloudId: number): Promise; + /** + */ + getAgentClouds(): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentCloud} updatedCloud + * @param {number} agentCloudId + */ + updateAgentCloud(updatedCloud: TaskAgentInterfaces.TaskAgentCloud, agentCloudId: number): Promise; + /** + * Get agent cloud types. + * + */ + getAgentCloudTypes(): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} queueId + * @param {number} top + * @param {string} continuationToken + */ + getAgentRequestsForQueue(project: string, queueId: number, top: number, continuationToken?: string): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {string} project - Project ID or project name + * @param {number} queueId + */ + queueAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, project: string, queueId: number): Promise; + /** + * Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package. + * + * @param {TaskAgentInterfaces.TaskAgent} agent - Details about the agent being added + * @param {number} poolId - The agent pool in which to add the agent + */ + addAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number): Promise; + /** + * Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization. + * + * @param {number} poolId - The pool ID to remove the agent from + * @param {number} agentId - The agent ID to remove + */ + deleteAgent(poolId: number, agentId: number): Promise; + /** + * Get information about an agent. + * + * @param {number} poolId - The agent pool containing the agent + * @param {number} agentId - The agent ID to get information about + * @param {boolean} includeCapabilities - Whether to include the agent's capabilities in the response + * @param {boolean} includeAssignedRequest - Whether to include details about the agent's current work + * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work + * @param {string[]} propertyFilters - Filter which custom properties will be returned + */ + getAgent(poolId: number, agentId: number, includeCapabilities?: boolean, includeAssignedRequest?: boolean, includeLastCompletedRequest?: boolean, propertyFilters?: string[]): Promise; + /** + * Get a list of agents. + * + * @param {number} poolId - The agent pool containing the agents + * @param {string} agentName - Filter on agent name + * @param {boolean} includeCapabilities - Whether to include the agents' capabilities in the response + * @param {boolean} includeAssignedRequest - Whether to include details about the agents' current work + * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work + * @param {string[]} propertyFilters - Filter which custom properties will be returned + * @param {string[]} demands - Filter by demands the agents can satisfy + */ + getAgents(poolId: number, agentName?: string, includeCapabilities?: boolean, includeAssignedRequest?: boolean, includeLastCompletedRequest?: boolean, propertyFilters?: string[], demands?: string[]): Promise; + /** + * Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization. + * + * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the replacing agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to replace + */ + replaceAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + /** + * Update agent details. + * + * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to update + */ + updateAgent(agent: TaskAgentInterfaces.TaskAgent, poolId: number, agentId: number): Promise; + /** + * Returns list of azure subscriptions + * + */ + getAzureManagementGroups(): Promise; + /** + * Returns list of azure subscriptions + * + */ + getAzureSubscriptions(): Promise; + /** + * GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are managed. + */ + generateDeploymentGroupAccessToken(project: string, deploymentGroupId: number): Promise; + /** + * Create a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentGroupCreateParameter} deploymentGroup - Deployment group to create. + * @param {string} project - Project ID or project name + */ + addDeploymentGroup(deploymentGroup: TaskAgentInterfaces.DeploymentGroupCreateParameter, project: string): Promise; + /** + * Delete a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to be deleted. + */ + deleteDeploymentGroup(project: string, deploymentGroupId: number): Promise; + /** + * Get a deployment group by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get the deployment group only if this action can be performed on it. + * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned object. + */ + getDeploymentGroup(project: string, deploymentGroupId: number, actionFilter?: TaskAgentInterfaces.DeploymentGroupActionFilter, expand?: TaskAgentInterfaces.DeploymentGroupExpands): Promise; + /** + * Get a list of deployment groups by name or IDs. + * + * @param {string} project - Project ID or project name + * @param {string} name - Name of the deployment group. + * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get only deployment groups on which this action can be performed. + * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned objects. + * @param {string} continuationToken - Get deployment groups with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment groups to return. Default is **1000**. + * @param {number[]} ids - Comma separated list of IDs of the deployment groups. + */ + getDeploymentGroups(project: string, name?: string, actionFilter?: TaskAgentInterfaces.DeploymentGroupActionFilter, expand?: TaskAgentInterfaces.DeploymentGroupExpands, continuationToken?: string, top?: number, ids?: number[]): Promise; + /** + * Update a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentGroupUpdateParameter} deploymentGroup - Deployment group to update. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + */ + updateDeploymentGroup(deploymentGroup: TaskAgentInterfaces.DeploymentGroupUpdateParameter, project: string, deploymentGroupId: number): Promise; + /** + * Get a list of deployment group metrics. + * + * @param {string} project - Project ID or project name + * @param {string} deploymentGroupName - Name of the deployment group. + * @param {string} continuationToken - Get metrics for deployment groups with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment group metrics to return. Default is **50**. + */ + getDeploymentGroupsMetrics(project: string, deploymentGroupName?: string, continuationToken?: string, top?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {number} completedRequestCount + */ + getAgentRequestsForDeploymentMachine(project: string, deploymentGroupId: number, machineId: number, completedRequestCount?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number[]} machineIds + * @param {number} completedRequestCount + */ + getAgentRequestsForDeploymentMachines(project: string, deploymentGroupId: number, machineIds?: number[], completedRequestCount?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + refreshDeploymentMachines(project: string, deploymentGroupId: number): Promise; + /** + * GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool. + * + * @param {number} poolId - ID of the deployment pool in which deployment agents are managed. + */ + generateDeploymentPoolAccessToken(poolId: number): Promise; + /** + * Get a list of deployment pool summaries. + * + * @param {string} poolName - Name of the deployment pool. + * @param {TaskAgentInterfaces.DeploymentPoolSummaryExpands} expands - Include these additional details in the returned objects. + * @param {number[]} poolIds - List of deployment pool ids. + */ + getDeploymentPoolsSummary(poolName?: string, expands?: TaskAgentInterfaces.DeploymentPoolSummaryExpands, poolIds?: number[]): Promise; + /** + * Get agent requests for a deployment target. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which the target belongs. + * @param {number} targetId - ID of the deployment target. + * @param {number} completedRequestCount - Maximum number of completed requests to return. Default is **50** + */ + getAgentRequestsForDeploymentTarget(project: string, deploymentGroupId: number, targetId: number, completedRequestCount?: number): Promise; + /** + * Get agent requests for a list deployment targets. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which the targets belong. + * @param {number[]} targetIds - Comma separated list of IDs of the deployment targets. + * @param {number} ownerId - Id of owner of agent job request. + * @param {Date} completedOn - Datetime to return request after this time. + * @param {number} completedRequestCount - Maximum number of completed requests to return for each target. Default is **50** + */ + getAgentRequestsForDeploymentTargets(project: string, deploymentGroupId: number, targetIds?: number[], ownerId?: number, completedOn?: Date, completedRequestCount?: number): Promise; + /** + * Upgrade the deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + */ + refreshDeploymentTargets(project: string, deploymentGroupId: number): Promise; + /** + * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. + * + * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. + */ + queryEndpoint(endpoint: TaskAgentInterfaces.TaskDefinitionEndpoint): Promise; + /** + * Get environment deployment execution history + * + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {string} continuationToken + * @param {number} top + */ + getEnvironmentDeploymentExecutionRecords(project: string, environmentId: number, continuationToken?: string, top?: number): Promise; + /** + * Create an environment. + * + * @param {TaskAgentInterfaces.EnvironmentCreateParameter} environmentCreateParameter - Environment to create. + * @param {string} project - Project ID or project name + */ + addEnvironment(environmentCreateParameter: TaskAgentInterfaces.EnvironmentCreateParameter, project: string): Promise; + /** + * Delete the specified environment. + * + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + */ + deleteEnvironment(project: string, environmentId: number): Promise; + /** + * Get an environment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + * @param {TaskAgentInterfaces.EnvironmentExpands} expands - Include these additional details in the returned objects. + */ + getEnvironmentById(project: string, environmentId: number, expands?: TaskAgentInterfaces.EnvironmentExpands): Promise; + /** + * Get all environments. + * + * @param {string} project - Project ID or project name + * @param {string} name + * @param {string} continuationToken + * @param {number} top + */ + getEnvironments(project: string, name?: string, continuationToken?: string, top?: number): Promise; + /** + * Update the specified environment. + * + * @param {TaskAgentInterfaces.EnvironmentUpdateParameter} environmentUpdateParameter - Environment data to update. + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + */ + updateEnvironment(environmentUpdateParameter: TaskAgentInterfaces.EnvironmentUpdateParameter, project: string, environmentId: number): Promise; + /** + * @param {string} hubName + * @param {boolean} includeEnterpriseUsersCount + * @param {boolean} includeHostedAgentMinutesCount + */ + getTaskHubLicenseDetails(hubName: string, includeEnterpriseUsersCount?: boolean, includeHostedAgentMinutesCount?: boolean): Promise; + /** + * @param {TaskAgentInterfaces.TaskHubLicenseDetails} taskHubLicenseDetails + * @param {string} hubName + */ + updateTaskHubLicenseDetails(taskHubLicenseDetails: TaskAgentInterfaces.TaskHubLicenseDetails, hubName: string): Promise; + /** + * @param {TaskAgentInterfaces.InputValidationRequest} inputValidationRequest + */ + validateInputs(inputValidationRequest: TaskAgentInterfaces.InputValidationRequest): Promise; + /** + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskResult} result + * @param {boolean} agentShuttingDown + */ + deleteAgentRequest(poolId: number, requestId: number, lockToken: string, result?: TaskAgentInterfaces.TaskResult, agentShuttingDown?: boolean): Promise; + /** + * @param {number} poolId + * @param {number} requestId + * @param {boolean} includeStatus + */ + getAgentRequest(poolId: number, requestId: number, includeStatus?: boolean): Promise; + /** + * @param {number} poolId + * @param {number} top + * @param {string} continuationToken + */ + getAgentRequests(poolId: number, top: number, continuationToken?: string): Promise; + /** + * @param {number} poolId + * @param {number} agentId + * @param {number} completedRequestCount + */ + getAgentRequestsForAgent(poolId: number, agentId: number, completedRequestCount?: number): Promise; + /** + * @param {number} poolId + * @param {number[]} agentIds + * @param {number} completedRequestCount + */ + getAgentRequestsForAgents(poolId: number, agentIds?: number[], completedRequestCount?: number): Promise; + /** + * @param {number} poolId + * @param {string} planId + * @param {string} jobId + */ + getAgentRequestsForPlan(poolId: number, planId: string, jobId?: string): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + */ + queueAgentRequestByPool(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskAgentRequestUpdateOptions} updateOptions + */ + updateAgentRequest(request: TaskAgentInterfaces.TaskAgentJobRequest, poolId: number, requestId: number, lockToken: string, updateOptions?: TaskAgentInterfaces.TaskAgentRequestUpdateOptions): Promise; + /** + * @param {TaskAgentInterfaces.KubernetesResourceCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + addKubernetesResource(createParameters: TaskAgentInterfaces.KubernetesResourceCreateParameters, project: string, environmentId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + deleteKubernetesResource(project: string, environmentId: number, resourceId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + getKubernetesResource(project: string, environmentId: number, resourceId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + generateDeploymentMachineGroupAccessToken(project: string, machineGroupId: number): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + */ + addDeploymentMachineGroup(machineGroup: TaskAgentInterfaces.DeploymentMachineGroup, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + deleteDeploymentMachineGroup(project: string, machineGroupId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + */ + getDeploymentMachineGroup(project: string, machineGroupId: number, actionFilter?: TaskAgentInterfaces.MachineGroupActionFilter): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} machineGroupName + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + */ + getDeploymentMachineGroups(project: string, machineGroupName?: string, actionFilter?: TaskAgentInterfaces.MachineGroupActionFilter): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + updateDeploymentMachineGroup(machineGroup: TaskAgentInterfaces.DeploymentMachineGroup, project: string, machineGroupId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {string[]} tagFilters + */ + getDeploymentMachineGroupMachines(project: string, machineGroupId: number, tagFilters?: string[]): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachine[]} deploymentMachines + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + updateDeploymentMachineGroupMachines(deploymentMachines: TaskAgentInterfaces.DeploymentMachine[], project: string, machineGroupId: number): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + addDeploymentMachine(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + deleteDeploymentMachine(project: string, deploymentGroupId: number, machineId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + */ + getDeploymentMachine(project: string, deploymentGroupId: number, machineId: number, expand?: TaskAgentInterfaces.DeploymentMachineExpands): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {string[]} tags + * @param {string} name + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + */ + getDeploymentMachines(project: string, deploymentGroupId: number, tags?: string[], name?: string, expand?: TaskAgentInterfaces.DeploymentMachineExpands): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + replaceDeploymentMachine(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, machineId: number): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + updateDeploymentMachine(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, machineId: number): Promise; + /** + * @param {TaskAgentInterfaces.DeploymentMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + updateDeploymentMachines(machines: TaskAgentInterfaces.DeploymentMachine[], project: string, deploymentGroupId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + */ + createAgentPoolMaintenanceDefinition(definition: TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition, poolId: number): Promise; + /** + * @param {number} poolId + * @param {number} definitionId + */ + deleteAgentPoolMaintenanceDefinition(poolId: number, definitionId: number): Promise; + /** + * @param {number} poolId + * @param {number} definitionId + */ + getAgentPoolMaintenanceDefinition(poolId: number, definitionId: number): Promise; + /** + * @param {number} poolId + */ + getAgentPoolMaintenanceDefinitions(poolId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + * @param {number} definitionId + */ + updateAgentPoolMaintenanceDefinition(definition: TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition, poolId: number, definitionId: number): Promise; + /** + * @param {number} poolId + * @param {number} jobId + */ + deleteAgentPoolMaintenanceJob(poolId: number, jobId: number): Promise; + /** + * @param {number} poolId + * @param {number} jobId + */ + getAgentPoolMaintenanceJob(poolId: number, jobId: number): Promise; + /** + * @param {number} poolId + * @param {number} jobId + */ + getAgentPoolMaintenanceJobLogs(poolId: number, jobId: number): Promise; + /** + * @param {number} poolId + * @param {number} definitionId + */ + getAgentPoolMaintenanceJobs(poolId: number, definitionId?: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + */ + queueAgentPoolMaintenanceJob(job: TaskAgentInterfaces.TaskAgentPoolMaintenanceJob, poolId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + * @param {number} jobId + */ + updateAgentPoolMaintenanceJob(job: TaskAgentInterfaces.TaskAgentPoolMaintenanceJob, poolId: number, jobId: number): Promise; + /** + * @param {number} poolId + * @param {number} messageId + * @param {string} sessionId + */ + deleteMessage(poolId: number, messageId: number, sessionId: string): Promise; + /** + * @param {number} poolId + * @param {string} sessionId + * @param {number} lastMessageId + */ + getMessage(poolId: number, sessionId: string, lastMessageId?: number): Promise; + /** + * @param {number} poolId + * @param {number} agentId + */ + refreshAgent(poolId: number, agentId: number): Promise; + /** + * @param {number} poolId + */ + refreshAgents(poolId: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentMessage} message + * @param {number} poolId + * @param {number} requestId + */ + sendMessage(message: TaskAgentInterfaces.TaskAgentMessage, poolId: number, requestId: number): Promise; + /** + * @param {string} packageType + * @param {string} platform + * @param {string} version + */ + getPackage(packageType: string, platform: string, version: string): Promise; + /** + * @param {string} packageType + * @param {string} platform + * @param {number} top + */ + getPackages(packageType: string, platform?: string, top?: number): Promise; + /** + * @param {number} poolId + */ + getAgentPoolMetadata(poolId: number): Promise; + /** + * @param {any} agentPoolMetadata + * @param {number} poolId + */ + setAgentPoolMetadata(customHeaders: any, agentPoolMetadata: any, poolId: number): Promise; + /** + * Create an agent pool. + * + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Details about the new agent pool + */ + addAgentPool(pool: TaskAgentInterfaces.TaskAgentPool): Promise; + /** + * Delete an agent pool. + * + * @param {number} poolId - ID of the agent pool to delete + */ + deleteAgentPool(poolId: number): Promise; + /** + * Get information about an agent pool. + * + * @param {number} poolId - An agent pool ID + * @param {string[]} properties - Agent pool properties (comma-separated) + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentPool(poolId: number, properties?: string[], actionFilter?: TaskAgentInterfaces.TaskAgentPoolActionFilter): Promise; + /** + * Get a list of agent pools. + * + * @param {string} poolName - Filter by name + * @param {string[]} properties - Filter by agent pool properties (comma-separated) + * @param {TaskAgentInterfaces.TaskAgentPoolType} poolType - Filter by pool type + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentPools(poolName?: string, properties?: string[], poolType?: TaskAgentInterfaces.TaskAgentPoolType, actionFilter?: TaskAgentInterfaces.TaskAgentPoolActionFilter): Promise; + /** + * Get a list of agent pools. + * + * @param {number[]} poolIds - pool Ids to fetch + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentPoolsByIds(poolIds: number[], actionFilter?: TaskAgentInterfaces.TaskAgentPoolActionFilter): Promise; + /** + * Update properties on an agent pool + * + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Updated agent pool details + * @param {number} poolId - The agent pool to update + */ + updateAgentPool(pool: TaskAgentInterfaces.TaskAgentPool, poolId: number): Promise; + /** + * Create a new agent queue to connect a project to an agent pool. + * + * @param {TaskAgentInterfaces.TaskAgentQueue} queue - Details about the queue to create + * @param {string} project - Project ID or project name + * @param {boolean} authorizePipelines - Automatically authorize this queue when using YAML + */ + addAgentQueue(queue: TaskAgentInterfaces.TaskAgentQueue, project?: string, authorizePipelines?: boolean): Promise; + /** + * Create a new team project. + * + * @param {string} project - Project ID or project name + */ + createTeamProject(project?: string): Promise; + /** + * Removes an agent queue from a project. + * + * @param {number} queueId - The agent queue to remove + * @param {string} project - Project ID or project name + */ + deleteAgentQueue(queueId: number, project?: string): Promise; + /** + * Get information about an agent queue. + * + * @param {number} queueId - The agent queue to get information about + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueue(queueId: number, project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * Get a list of agent queues. + * + * @param {string} project - Project ID or project name + * @param {string} queueName - Filter on the agent queue name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueues(project?: string, queueName?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * Get a list of agent queues by their IDs + * + * @param {number[]} queueIds - A comma-separated list of agent queue IDs to retrieve + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueuesByIds(queueIds: number[], project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * Get a list of agent queues by their names + * + * @param {string[]} queueNames - A comma-separated list of agent names to retrieve + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueuesByNames(queueNames: string[], project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * Get a list of agent queues by pool ids + * + * @param {number[]} poolIds - A comma-separated list of pool ids to get the corresponding queues for + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueuesForPools(poolIds: number[], project?: string, actionFilter?: TaskAgentInterfaces.TaskAgentQueueActionFilter): Promise; + /** + * @param {number} agentCloudId + */ + getAgentCloudRequests(agentCloudId: number): Promise; + /** + */ + getResourceLimits(): Promise; + /** + * @param {string} parallelismTag + * @param {boolean} poolIsHosted + * @param {boolean} includeRunningRequests + */ + getResourceUsage(parallelismTag?: string, poolIsHosted?: boolean, includeRunningRequests?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + */ + getTaskGroupHistory(project: string, taskGroupId: string): Promise; + /** + * Delete a secure file + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + */ + deleteSecureFile(project: string, secureFileId: string): Promise; + /** + * Download a secure file by Id + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + * @param {string} ticket - A valid download ticket + * @param {boolean} download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream. + */ + downloadSecureFile(project: string, secureFileId: string, ticket: string, download?: boolean): Promise; + /** + * Get a secure file + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + * @param {boolean} includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + */ + getSecureFile(project: string, secureFileId: string, includeDownloadTicket?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + /** + * Get secure files + * + * @param {string} project - Project ID or project name + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View. + */ + getSecureFiles(project: string, namePattern?: string, includeDownloadTickets?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + /** + * Get secure files + * + * @param {string} project - Project ID or project name + * @param {string[]} secureFileIds - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + */ + getSecureFilesByIds(project: string, secureFileIds: string[], includeDownloadTickets?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + /** + * Get secure files + * + * @param {string} project - Project ID or project name + * @param {string[]} secureFileNames - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + */ + getSecureFilesByNames(project: string, secureFileNames: string[], includeDownloadTickets?: boolean, actionFilter?: TaskAgentInterfaces.SecureFileActionFilter): Promise; + /** + * Query secure files using a name pattern and a condition on file properties. + * + * @param {string} condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. ``` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) ``` + * @param {string} project - Project ID or project name + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + */ + querySecureFilesByProperties(condition: string, project: string, namePattern?: string): Promise; + /** + * Update the name or properties of an existing secure file + * + * @param {TaskAgentInterfaces.SecureFile} secureFile - The secure file with updated name and/or properties + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + */ + updateSecureFile(secureFile: TaskAgentInterfaces.SecureFile, project: string, secureFileId: string): Promise; + /** + * Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge. + * + * @param {TaskAgentInterfaces.SecureFile[]} secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored. + * @param {string} project - Project ID or project name + */ + updateSecureFiles(secureFiles: TaskAgentInterfaces.SecureFile[], project: string): Promise; + /** + * Upload a secure file, include the file stream in the request body + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} project - Project ID or project name + * @param {string} name - Name of the file to upload + * @param {boolean} authorizePipelines - If authorizePipelines is true, then the secure file is authorized for use by all pipelines in the project. + */ + uploadSecureFile(customHeaders: any, contentStream: NodeJS.ReadableStream, project: string, name: string, authorizePipelines?: boolean): Promise; + /** + * @param {TaskAgentInterfaces.TaskAgentSession} session + * @param {number} poolId + */ + createAgentSession(session: TaskAgentInterfaces.TaskAgentSession, poolId: number): Promise; + /** + * @param {number} poolId + * @param {string} sessionId + */ + deleteAgentSession(poolId: number, sessionId: string): Promise; + /** + * Register a deployment target to a deployment group. Generally this is called by agent configuration tool. + * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to register. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which the deployment target is registered. + */ + addDeploymentTarget(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number): Promise; + /** + * Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is deleted. + * @param {number} targetId - ID of the deployment target to delete. + */ + deleteDeploymentTarget(project: string, deploymentGroupId: number, targetId: number): Promise; + /** + * Get a deployment target by its ID in a deployment group + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which deployment target belongs. + * @param {number} targetId - ID of the deployment target to return. + * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. + */ + getDeploymentTarget(project: string, deploymentGroupId: number, targetId: number, expand?: TaskAgentInterfaces.DeploymentTargetExpands): Promise; + /** + * Get a list of deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + * @param {string[]} tags - Get only the deployment targets that contain all these comma separted list of tags. + * @param {string} name - Name pattern of the deployment targets to return. + * @param {boolean} partialNameMatch - When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**. + * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. + * @param {TaskAgentInterfaces.TaskAgentStatusFilter} agentStatus - Get only deployment targets that have this status. + * @param {TaskAgentInterfaces.TaskAgentJobResultFilter} agentJobResult - Get only deployment targets that have this last job result. + * @param {string} continuationToken - Get deployment targets with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment targets to return. Default is **1000**. + * @param {boolean} enabled - Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets. + * @param {string[]} propertyFilters + */ + getDeploymentTargets(project: string, deploymentGroupId: number, tags?: string[], name?: string, partialNameMatch?: boolean, expand?: TaskAgentInterfaces.DeploymentTargetExpands, agentStatus?: TaskAgentInterfaces.TaskAgentStatusFilter, agentJobResult?: TaskAgentInterfaces.TaskAgentJobResultFilter, continuationToken?: string, top?: number, enabled?: boolean, propertyFilters?: string[]): Promise; + /** + * Replace a deployment target in a deployment group. Generally this is called by agent configuration tool. + * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - New deployment target. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is replaced. + * @param {number} targetId - ID of the deployment target to replace. + */ + replaceDeploymentTarget(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, targetId: number): Promise; + /** + * Update a deployment target and its agent properties in a deployment group. Generally this is called by agent configuration tool. + * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to update. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is updated. + * @param {number} targetId - ID of the deployment target to update. + */ + updateDeploymentTarget(machine: TaskAgentInterfaces.DeploymentMachine, project: string, deploymentGroupId: number, targetId: number): Promise; + /** + * Update tags of a list of deployment targets in a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentTargetUpdateParameter[]} machines - Deployment targets with tags to udpdate. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are updated. + */ + updateDeploymentTargets(machines: TaskAgentInterfaces.DeploymentTargetUpdateParameter[], project: string, deploymentGroupId: number): Promise; + /** + * Create a task group. + * + * @param {TaskAgentInterfaces.TaskGroupCreateParameter} taskGroup - Task group object to create. + * @param {string} project - Project ID or project name + */ + addTaskGroup(taskGroup: TaskAgentInterfaces.TaskGroupCreateParameter, project: string): Promise; + /** + * Delete a task group. + * + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group to be deleted. + * @param {string} comment - Comments to delete. + */ + deleteTaskGroup(project: string, taskGroupId: string, comment?: string): Promise; + /** + * Get task group. + * + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group. + * @param {string} versionSpec - version specification of the task group. examples: 1, 1.0. + * @param {TaskAgentInterfaces.TaskGroupExpands} expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups. + */ + getTaskGroup(project: string, taskGroupId: string, versionSpec: string, expand?: TaskAgentInterfaces.TaskGroupExpands): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {number} revision + */ + getTaskGroupRevision(project: string, taskGroupId: string, revision: number): Promise; + /** + * List task groups. + * + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group. + * @param {boolean} expanded - 'true' to recursively expand task groups. Default is 'false'. + * @param {string} taskIdFilter - Guid of the taskId to filter. + * @param {boolean} deleted - 'true'to include deleted task groups. Default is 'false'. + * @param {number} top - Number of task groups to get. + * @param {Date} continuationToken - Gets the task groups after the continuation token provided. + * @param {TaskAgentInterfaces.TaskGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'CreatedOnDescending'. + */ + getTaskGroups(project: string, taskGroupId?: string, expanded?: boolean, taskIdFilter?: string, deleted?: boolean, top?: number, continuationToken?: Date, queryOrder?: TaskAgentInterfaces.TaskGroupQueryOrder): Promise; + /** + * @param {TaskAgentInterfaces.PublishTaskGroupMetadata} taskGroupMetadata + * @param {string} project - Project ID or project name + * @param {string} parentTaskGroupId + */ + publishTaskGroup(taskGroupMetadata: TaskAgentInterfaces.PublishTaskGroupMetadata, project: string, parentTaskGroupId: string): Promise; + /** + * @param {TaskAgentInterfaces.TaskGroup} taskGroup + * @param {string} project - Project ID or project name + */ + undeleteTaskGroup(taskGroup: TaskAgentInterfaces.TaskGroup, project: string): Promise; + /** + * Update a task group. + * + * @param {TaskAgentInterfaces.TaskGroupUpdateParameter} taskGroup - Task group to update. + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group to update. + */ + updateTaskGroup(taskGroup: TaskAgentInterfaces.TaskGroupUpdateParameter, project: string, taskGroupId?: string): Promise; + /** + * @param {TaskAgentInterfaces.TaskGroupUpdatePropertiesBase} taskGroupUpdateProperties + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {boolean} disablePriorVersions + */ + updateTaskGroupProperties(taskGroupUpdateProperties: TaskAgentInterfaces.TaskGroupUpdatePropertiesBase, project: string, taskGroupId: string, disablePriorVersions?: boolean): Promise; + /** + * @param {string} taskId + */ + deleteTaskDefinition(taskId: string): Promise; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskContentZip(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskDefinition(taskId: string, versionString: string, visibility?: string[], scopeLocal?: boolean): Promise; + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param {boolean} allVersions + */ + getTaskDefinitions(taskId?: string, visibility?: string[], scopeLocal?: boolean, allVersions?: boolean): Promise; + /** + * @param {number} poolId + * @param {number} agentId + * @param {string} currentState + */ + updateAgentUpdateState(poolId: number, agentId: number, currentState: string): Promise; + /** + * @param {{ [key: string] : string; }} userCapabilities + * @param {number} poolId + * @param {number} agentId + */ + updateAgentUserCapabilities(userCapabilities: { + [key: string]: string; + }, poolId: number, agentId: number): Promise; + /** + * Add a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + */ + addVariableGroup(variableGroupParameters: TaskAgentInterfaces.VariableGroupParameters): Promise; + /** + * Delete a variable group + * + * @param {number} groupId - Id of the variable group. + * @param {string[]} projectIds + */ + deleteVariableGroup(groupId: number, projectIds: string[]): Promise; + /** + * Add a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupProjectReference[]} variableGroupProjectReferences + * @param {number} variableGroupId + */ + shareVariableGroup(variableGroupProjectReferences: TaskAgentInterfaces.VariableGroupProjectReference[], variableGroupId: number): Promise; + /** + * Update a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + * @param {number} groupId - Id of the variable group to update. + */ + updateVariableGroup(variableGroupParameters: TaskAgentInterfaces.VariableGroupParameters, groupId: number): Promise; + /** + * Get a variable group. + * + * @param {string} project - Project ID or project name + * @param {number} groupId - Id of the variable group. + */ + getVariableGroup(project: string, groupId: number): Promise; + /** + * Get variable groups. + * + * @param {string} project - Project ID or project name + * @param {string} groupName - Name of variable group. + * @param {TaskAgentInterfaces.VariableGroupActionFilter} actionFilter - Action filter for the variable group. It specifies the action which can be performed on the variable groups. + * @param {number} top - Number of variable groups to get. + * @param {number} continuationToken - Gets the variable groups after the continuation token provided. + * @param {TaskAgentInterfaces.VariableGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdDescending'. + */ + getVariableGroups(project: string, groupName?: string, actionFilter?: TaskAgentInterfaces.VariableGroupActionFilter, top?: number, continuationToken?: number, queryOrder?: TaskAgentInterfaces.VariableGroupQueryOrder): Promise; + /** + * Get variable groups by ids. + * + * @param {string} project - Project ID or project name + * @param {number[]} groupIds - Comma separated list of Ids of variable groups. + */ + getVariableGroupsById(project: string, groupIds: number[]): Promise; + /** + * @param {TaskAgentInterfaces.VirtualMachineGroupCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + addVirtualMachineGroup(createParameters: TaskAgentInterfaces.VirtualMachineGroupCreateParameters, project: string, environmentId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + deleteVirtualMachineGroup(project: string, environmentId: number, resourceId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + getVirtualMachineGroup(project: string, environmentId: number, resourceId: number): Promise; + /** + * @param {TaskAgentInterfaces.VirtualMachineGroup} resource + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + updateVirtualMachineGroup(resource: TaskAgentInterfaces.VirtualMachineGroup, project: string, environmentId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + * @param {string} continuationToken + * @param {string} name + * @param {boolean} partialNameMatch + * @param {string[]} tags + * @param {number} top + */ + getVirtualMachines(project: string, environmentId: number, resourceId: number, continuationToken?: string, name?: string, partialNameMatch?: boolean, tags?: string[], top?: number): Promise; + /** + * @param {TaskAgentInterfaces.VirtualMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + updateVirtualMachines(machines: TaskAgentInterfaces.VirtualMachine[], project: string, environmentId: number, resourceId: number): Promise; + /** + * @param {TaskAgentInterfaces.AadOauthTokenRequest} authenticationRequest + */ + acquireAccessToken(authenticationRequest: TaskAgentInterfaces.AadOauthTokenRequest): Promise; + /** + * @param {string} tenantId + * @param {string} redirectUri + * @param {TaskAgentInterfaces.AadLoginPromptOption} promptOption + * @param {string} completeCallbackPayload + * @param {boolean} completeCallbackByAuthCode + */ + createAadOAuthRequest(tenantId: string, redirectUri: string, promptOption?: TaskAgentInterfaces.AadLoginPromptOption, completeCallbackPayload?: string, completeCallbackByAuthCode?: boolean): Promise; + /** + */ + getVstsAadTenantId(): Promise; + /** + * GET the Yaml schema used for Yaml file validation. + * + * @param {boolean} validateTaskNames - Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). + */ + getYamlSchema(validateTaskNames?: boolean): Promise; +} diff --git a/node_modules/azure-devops-node-api/TaskAgentApiBase.js b/node_modules/azure-devops-node-api/TaskAgentApiBase.js new file mode 100644 index 0000000..ef4bdc7 --- /dev/null +++ b/node_modules/azure-devops-node-api/TaskAgentApiBase.js @@ -0,0 +1,4646 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces"); +class TaskAgentApiBase extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-TaskAgent-api', options); + } + /** + * @param {TaskAgentInterfaces.TaskAgentCloud} agentCloud + */ + addAgentCloud(agentCloud) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, agentCloud, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} agentCloudId + */ + deleteAgentCloud(agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} agentCloudId + */ + getAgentCloud(agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getAgentClouds() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentCloud} updatedCloud + * @param {number} agentCloudId + */ + updateAgentCloud(updatedCloud, agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bfa72b3d-0fc6-43fb-932b-a7f6559f93b9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updatedCloud, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get agent cloud types. + * + */ + getAgentCloudTypes() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "5932e193-f376-469d-9c3e-e5588ce12cb5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentCloudType, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} queueId + * @param {number} top + * @param {string} continuationToken + */ + getAgentRequestsForQueue(project, queueId, top, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (top == null) { + throw new TypeError('top can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + queueId: queueId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f5f81ffb-f396-498d-85b1-5ada145e648a", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {string} project - Project ID or project name + * @param {number} queueId + */ + queueAgentRequest(request, project, queueId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + queueId: queueId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f5f81ffb-f396-498d-85b1-5ada145e648a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds an agent to a pool. You probably don't want to call this endpoint directly. Instead, [configure an agent](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) using the agent download package. + * + * @param {TaskAgentInterfaces.TaskAgent} agent - Details about the agent being added + * @param {number} poolId - The agent pool in which to add the agent + */ + addAgent(agent, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove an agent from your organization. + * + * @param {number} poolId - The pool ID to remove the agent from + * @param {number} agentId - The agent ID to remove + */ + deleteAgent(poolId, agentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get information about an agent. + * + * @param {number} poolId - The agent pool containing the agent + * @param {number} agentId - The agent ID to get information about + * @param {boolean} includeCapabilities - Whether to include the agent's capabilities in the response + * @param {boolean} includeAssignedRequest - Whether to include details about the agent's current work + * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work + * @param {string[]} propertyFilters - Filter which custom properties will be returned + */ + getAgent(poolId, agentId, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + agentId: agentId + }; + let queryValues = { + includeCapabilities: includeCapabilities, + includeAssignedRequest: includeAssignedRequest, + includeLastCompletedRequest: includeLastCompletedRequest, + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agents. + * + * @param {number} poolId - The agent pool containing the agents + * @param {string} agentName - Filter on agent name + * @param {boolean} includeCapabilities - Whether to include the agents' capabilities in the response + * @param {boolean} includeAssignedRequest - Whether to include details about the agents' current work + * @param {boolean} includeLastCompletedRequest - Whether to include details about the agents' most recent completed work + * @param {string[]} propertyFilters - Filter which custom properties will be returned + * @param {string[]} demands - Filter by demands the agents can satisfy + */ + getAgents(poolId, agentName, includeCapabilities, includeAssignedRequest, includeLastCompletedRequest, propertyFilters, demands) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + agentName: agentName, + includeCapabilities: includeCapabilities, + includeAssignedRequest: includeAssignedRequest, + includeLastCompletedRequest: includeLastCompletedRequest, + propertyFilters: propertyFilters && propertyFilters.join(","), + demands: demands && demands.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replace an agent. You probably don't want to call this endpoint directly. Instead, [use the agent configuration script](https://docs.microsoft.com/azure/devops/pipelines/agents/agents) to remove and reconfigure an agent from your organization. + * + * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the replacing agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to replace + */ + replaceAgent(agent, poolId, agentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update agent details. + * + * @param {TaskAgentInterfaces.TaskAgent} agent - Updated details about the agent + * @param {number} poolId - The agent pool to use + * @param {number} agentId - The agent to update + */ + updateAgent(agent, poolId, agentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e298ef32-5878-4cab-993c-043836571f42", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, agent, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns list of azure subscriptions + * + */ + getAzureManagementGroups() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "39fe3bf2-7ee0-4198-a469-4a29929afa9c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns list of azure subscriptions + * + */ + getAzureSubscriptions() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "bcd6189c-0303-471f-a8e1-acb22b74d700", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * GET a PAT token for managing (configuring, removing, tagging) deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are managed. + */ + generateDeploymentGroupAccessToken(project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "3d197ba2-c3e9-4253-882f-0ee2440f8174", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentGroupCreateParameter} deploymentGroup - Deployment group to create. + * @param {string} project - Project ID or project name + */ + addDeploymentGroup(deploymentGroup, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, deploymentGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to be deleted. + */ + deleteDeploymentGroup(project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a deployment group by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get the deployment group only if this action can be performed on it. + * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned object. + */ + getDeploymentGroup(project, deploymentGroupId, actionFilter, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + actionFilter: actionFilter, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployment groups by name or IDs. + * + * @param {string} project - Project ID or project name + * @param {string} name - Name of the deployment group. + * @param {TaskAgentInterfaces.DeploymentGroupActionFilter} actionFilter - Get only deployment groups on which this action can be performed. + * @param {TaskAgentInterfaces.DeploymentGroupExpands} expand - Include these additional details in the returned objects. + * @param {string} continuationToken - Get deployment groups with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment groups to return. Default is **1000**. + * @param {number[]} ids - Comma separated list of IDs of the deployment groups. + */ + getDeploymentGroups(project, name, actionFilter, expand, continuationToken, top, ids) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + name: name, + actionFilter: actionFilter, + '$expand': expand, + continuationToken: continuationToken, + '$top': top, + ids: ids && ids.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentGroupUpdateParameter} deploymentGroup - Deployment group to update. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + */ + updateDeploymentGroup(deploymentGroup, project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "083c4d89-ab35-45af-aa11-7cf66895c53e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, deploymentGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployment group metrics. + * + * @param {string} project - Project ID or project name + * @param {string} deploymentGroupName - Name of the deployment group. + * @param {string} continuationToken - Get metrics for deployment groups with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment group metrics to return. Default is **50**. + */ + getDeploymentGroupsMetrics(project, deploymentGroupName, continuationToken, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + deploymentGroupName: deploymentGroupName, + continuationToken: continuationToken, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "281c6308-427a-49e1-b83a-dac0f4862189", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentGroupMetrics, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {number} completedRequestCount + */ + getAgentRequestsForDeploymentMachine(project, deploymentGroupId, machineId, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + if (machineId == null) { + throw new TypeError('machineId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + machineId: machineId, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a3540e5b-f0dc-4668-963b-b752459be545", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number[]} machineIds + * @param {number} completedRequestCount + */ + getAgentRequestsForDeploymentMachines(project, deploymentGroupId, machineIds, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + machineIds: machineIds && machineIds.join(","), + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a3540e5b-f0dc-4668-963b-b752459be545", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + refreshDeploymentMachines(project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "91006ac4-0f68-4d82-a2bc-540676bd73ce", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * GET a PAT token for managing (configuring, removing, tagging) deployment agents in a deployment pool. + * + * @param {number} poolId - ID of the deployment pool in which deployment agents are managed. + */ + generateDeploymentPoolAccessToken(poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "e077ee4a-399b-420b-841f-c43fbc058e0b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployment pool summaries. + * + * @param {string} poolName - Name of the deployment pool. + * @param {TaskAgentInterfaces.DeploymentPoolSummaryExpands} expands - Include these additional details in the returned objects. + * @param {number[]} poolIds - List of deployment pool ids. + */ + getDeploymentPoolsSummary(poolName, expands, poolIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + poolName: poolName, + expands: expands, + poolIds: poolIds && poolIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6525d6c6-258f-40e0-a1a9-8a24a3957625", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentPoolSummary, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get agent requests for a deployment target. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which the target belongs. + * @param {number} targetId - ID of the deployment target. + * @param {number} completedRequestCount - Maximum number of completed requests to return. Default is **50** + */ + getAgentRequestsForDeploymentTarget(project, deploymentGroupId, targetId, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + if (targetId == null) { + throw new TypeError('targetId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + targetId: targetId, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2fac0be3-8c8f-4473-ab93-c1389b08a2c9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get agent requests for a list deployment targets. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which the targets belong. + * @param {number[]} targetIds - Comma separated list of IDs of the deployment targets. + * @param {number} ownerId - Id of owner of agent job request. + * @param {Date} completedOn - Datetime to return request after this time. + * @param {number} completedRequestCount - Maximum number of completed requests to return for each target. Default is **50** + */ + getAgentRequestsForDeploymentTargets(project, deploymentGroupId, targetIds, ownerId, completedOn, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + targetIds: targetIds && targetIds.join(","), + ownerId: ownerId, + completedOn: completedOn, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2fac0be3-8c8f-4473-ab93-c1389b08a2c9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Upgrade the deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + */ + refreshDeploymentTargets(project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1c1a817f-f23d-41c6-bf8d-14b638f64152", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Proxy for a GET request defined by an 'endpoint'. The request is authorized using a service connection. The response is filtered using an XPath/Json based selector. + * + * @param {TaskAgentInterfaces.TaskDefinitionEndpoint} endpoint - Describes the URL to fetch. + */ + queryEndpoint(endpoint) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f223b809-8c33-4b7d-b53f-07232569b5d6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, endpoint, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get environment deployment execution history + * + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {string} continuationToken + * @param {number} top + */ + getEnvironmentDeploymentExecutionRecords(project, environmentId, continuationToken, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + let queryValues = { + continuationToken: continuationToken, + top: top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "51bb5d21-4305-4ea6-9dbb-b7488af73334", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentDeploymentExecutionRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create an environment. + * + * @param {TaskAgentInterfaces.EnvironmentCreateParameter} environmentCreateParameter - Environment to create. + * @param {string} project - Project ID or project name + */ + addEnvironment(environmentCreateParameter, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, environmentCreateParameter, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete the specified environment. + * + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + */ + deleteEnvironment(project, environmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an environment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + * @param {TaskAgentInterfaces.EnvironmentExpands} expands - Include these additional details in the returned objects. + */ + getEnvironmentById(project, environmentId, expands) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + let queryValues = { + expands: expands, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all environments. + * + * @param {string} project - Project ID or project name + * @param {string} name + * @param {string} continuationToken + * @param {number} top + */ + getEnvironments(project, name, continuationToken, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + name: name, + continuationToken: continuationToken, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the specified environment. + * + * @param {TaskAgentInterfaces.EnvironmentUpdateParameter} environmentUpdateParameter - Environment data to update. + * @param {string} project - Project ID or project name + * @param {number} environmentId - ID of the environment. + */ + updateEnvironment(environmentUpdateParameter, project, environmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8572b1fc-2482-47fa-8f74-7e3ed53ee54b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, environmentUpdateParameter, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.EnvironmentInstance, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} hubName + * @param {boolean} includeEnterpriseUsersCount + * @param {boolean} includeHostedAgentMinutesCount + */ + getTaskHubLicenseDetails(hubName, includeEnterpriseUsersCount, includeHostedAgentMinutesCount) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + hubName: hubName + }; + let queryValues = { + includeEnterpriseUsersCount: includeEnterpriseUsersCount, + includeHostedAgentMinutesCount: includeHostedAgentMinutesCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskHubLicenseDetails} taskHubLicenseDetails + * @param {string} hubName + */ + updateTaskHubLicenseDetails(taskHubLicenseDetails, hubName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + hubName: hubName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "distributedtask", "f9f0f436-b8a1-4475-9041-1ccdbf8f0128", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, taskHubLicenseDetails, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.InputValidationRequest} inputValidationRequest + */ + validateInputs(inputValidationRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "58475b1e-adaf-4155-9bc1-e04bf1fff4c2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, inputValidationRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskResult} result + * @param {boolean} agentShuttingDown + */ + deleteAgentRequest(poolId, requestId, lockToken, result, agentShuttingDown) { + return __awaiter(this, void 0, void 0, function* () { + if (lockToken == null) { + throw new TypeError('lockToken can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + requestId: requestId + }; + let queryValues = { + lockToken: lockToken, + result: result, + agentShuttingDown: agentShuttingDown, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} requestId + * @param {boolean} includeStatus + */ + getAgentRequest(poolId, requestId, includeStatus) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + requestId: requestId + }; + let queryValues = { + includeStatus: includeStatus, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} top + * @param {string} continuationToken + */ + getAgentRequests(poolId, top, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (top == null) { + throw new TypeError('top can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} agentId + * @param {number} completedRequestCount + */ + getAgentRequestsForAgent(poolId, agentId, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + if (agentId == null) { + throw new TypeError('agentId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + agentId: agentId, + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number[]} agentIds + * @param {number} completedRequestCount + */ + getAgentRequestsForAgents(poolId, agentIds, completedRequestCount) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + agentIds: agentIds && agentIds.join(","), + completedRequestCount: completedRequestCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {string} planId + * @param {string} jobId + */ + getAgentRequestsForPlan(poolId, planId, jobId) { + return __awaiter(this, void 0, void 0, function* () { + if (planId == null) { + throw new TypeError('planId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + planId: planId, + jobId: jobId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + */ + queueAgentRequestByPool(request, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentJobRequest} request + * @param {number} poolId + * @param {number} requestId + * @param {string} lockToken + * @param {TaskAgentInterfaces.TaskAgentRequestUpdateOptions} updateOptions + */ + updateAgentRequest(request, poolId, requestId, lockToken, updateOptions) { + return __awaiter(this, void 0, void 0, function* () { + if (lockToken == null) { + throw new TypeError('lockToken can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + requestId: requestId + }; + let queryValues = { + lockToken: lockToken, + updateOptions: updateOptions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "fc825784-c92a-4299-9221-998a02d1b54f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, request, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJobRequest, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.KubernetesResourceCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + addKubernetesResource(createParameters, project, environmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, createParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + deleteKubernetesResource(project, environmentId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + getKubernetesResource(project, environmentId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "73fba52f-15ab-42b3-a538-ce67a9223a04", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.KubernetesResource, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + generateDeploymentMachineGroupAccessToken(project, machineGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "f8c7c0de-ac0d-469b-9cb1-c21f72d67693", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + */ + addDeploymentMachineGroup(machineGroup, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, machineGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + deleteDeploymentMachineGroup(project, machineGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + */ + getDeploymentMachineGroup(project, machineGroupId, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + machineGroupId: machineGroupId + }; + let queryValues = { + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} machineGroupName + * @param {TaskAgentInterfaces.MachineGroupActionFilter} actionFilter + */ + getDeploymentMachineGroups(project, machineGroupName, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + machineGroupName: machineGroupName, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachineGroup} machineGroup + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + updateDeploymentMachineGroup(machineGroup, project, machineGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "d4adf50f-80c6-4ac8-9ca1-6e4e544286e9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, machineGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + * @param {string[]} tagFilters + */ + getDeploymentMachineGroupMachines(project, machineGroupId, tagFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + machineGroupId: machineGroupId + }; + let queryValues = { + tagFilters: tagFilters && tagFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine[]} deploymentMachines + * @param {string} project - Project ID or project name + * @param {number} machineGroupId + */ + updateDeploymentMachineGroupMachines(deploymentMachines, project, machineGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + machineGroupId: machineGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "966c3874-c347-4b18-a90c-d509116717fd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, deploymentMachines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + addDeploymentMachine(machine, project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + deleteDeploymentMachine(project, deploymentGroupId, machineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + */ + getDeploymentMachine(project, deploymentGroupId, machineId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {string[]} tags + * @param {string} name + * @param {TaskAgentInterfaces.DeploymentMachineExpands} expand + */ + getDeploymentMachines(project, deploymentGroupId, tags, name, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + tags: tags && tags.join(","), + name: name, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + replaceDeploymentMachine(machine, project, deploymentGroupId, machineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine} machine + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + * @param {number} machineId + */ + updateDeploymentMachine(machine, project, deploymentGroupId, machineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + machineId: machineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.DeploymentMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId + */ + updateDeploymentMachines(machines, project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6f6d406f-cfe6-409c-9327-7009928077e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + */ + createAgentPoolMaintenanceDefinition(definition, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, definition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} definitionId + */ + deleteAgentPoolMaintenanceDefinition(poolId, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} definitionId + */ + getAgentPoolMaintenanceDefinition(poolId, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + */ + getAgentPoolMaintenanceDefinitions(poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceDefinition} definition + * @param {number} poolId + * @param {number} definitionId + */ + updateAgentPoolMaintenanceDefinition(definition, poolId, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + definitionId: definitionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "80572e16-58f0-4419-ac07-d19fde32195c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, definition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} jobId + */ + deleteAgentPoolMaintenanceJob(poolId, jobId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} jobId + */ + getAgentPoolMaintenanceJob(poolId, jobId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} jobId + */ + getAgentPoolMaintenanceJobLogs(poolId, jobId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} definitionId + */ + getAgentPoolMaintenanceJobs(poolId, definitionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + definitionId: definitionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + */ + queueAgentPoolMaintenanceJob(job, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, job, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentPoolMaintenanceJob} job + * @param {number} poolId + * @param {number} jobId + */ + updateAgentPoolMaintenanceJob(job, poolId, jobId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + jobId: jobId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "15e7ab6e-abce-4601-a6d8-e111fe148f46", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, job, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPoolMaintenanceJob, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} messageId + * @param {string} sessionId + */ + deleteMessage(poolId, messageId, sessionId) { + return __awaiter(this, void 0, void 0, function* () { + if (sessionId == null) { + throw new TypeError('sessionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + messageId: messageId + }; + let queryValues = { + sessionId: sessionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {string} sessionId + * @param {number} lastMessageId + */ + getMessage(poolId, sessionId, lastMessageId) { + return __awaiter(this, void 0, void 0, function* () { + if (sessionId == null) { + throw new TypeError('sessionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + sessionId: sessionId, + lastMessageId: lastMessageId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} agentId + */ + refreshAgent(poolId, agentId) { + return __awaiter(this, void 0, void 0, function* () { + if (agentId == null) { + throw new TypeError('agentId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + agentId: agentId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + */ + refreshAgents(poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentMessage} message + * @param {number} poolId + * @param {number} requestId + */ + sendMessage(message, poolId, requestId) { + return __awaiter(this, void 0, void 0, function* () { + if (requestId == null) { + throw new TypeError('requestId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + requestId: requestId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "c3a054f6-7a8a-49c0-944e-3a8e5d7adfd7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, message, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} packageType + * @param {string} platform + * @param {string} version + */ + getPackage(packageType, platform, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + packageType: packageType, + platform: platform, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "8ffcd551-079c-493a-9c02-54346299d144", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} packageType + * @param {string} platform + * @param {number} top + */ + getPackages(packageType, platform, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + packageType: packageType, + platform: platform + }; + let queryValues = { + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "8ffcd551-079c-493a-9c02-54346299d144", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.PackageMetadata, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + */ + getAgentPoolMetadata(poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0d62f887-9f53-48b9-9161-4c35d5735b0f", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {any} agentPoolMetadata + * @param {number} poolId + */ + setAgentPoolMetadata(customHeaders, agentPoolMetadata, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0d62f887-9f53-48b9-9161-4c35d5735b0f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.replace(url, agentPoolMetadata, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create an agent pool. + * + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Details about the new agent pool + */ + addAgentPool(pool) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, pool, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete an agent pool. + * + * @param {number} poolId - ID of the agent pool to delete + */ + deleteAgentPool(poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get information about an agent pool. + * + * @param {number} poolId - An agent pool ID + * @param {string[]} properties - Agent pool properties (comma-separated) + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentPool(poolId, properties, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + let queryValues = { + properties: properties && properties.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent pools. + * + * @param {string} poolName - Filter by name + * @param {string[]} properties - Filter by agent pool properties (comma-separated) + * @param {TaskAgentInterfaces.TaskAgentPoolType} poolType - Filter by pool type + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentPools(poolName, properties, poolType, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + poolName: poolName, + properties: properties && properties.join(","), + poolType: poolType, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent pools. + * + * @param {number[]} poolIds - pool Ids to fetch + * @param {TaskAgentInterfaces.TaskAgentPoolActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentPoolsByIds(poolIds, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (poolIds == null) { + throw new TypeError('poolIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + poolIds: poolIds && poolIds.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update properties on an agent pool + * + * @param {TaskAgentInterfaces.TaskAgentPool} pool - Updated agent pool details + * @param {number} poolId - The agent pool to update + */ + updateAgentPool(pool, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "a8c47e17-4d56-4a56-92bb-de7ea7dc65be", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, pool, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentPool, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new agent queue to connect a project to an agent pool. + * + * @param {TaskAgentInterfaces.TaskAgentQueue} queue - Details about the queue to create + * @param {string} project - Project ID or project name + * @param {boolean} authorizePipelines - Automatically authorize this queue when using YAML + */ + addAgentQueue(queue, project, authorizePipelines) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + authorizePipelines: authorizePipelines, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, queue, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new team project. + * + * @param {string} project - Project ID or project name + */ + createTeamProject(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes an agent queue from a project. + * + * @param {number} queueId - The agent queue to remove + * @param {string} project - Project ID or project name + */ + deleteAgentQueue(queueId, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + queueId: queueId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get information about an agent queue. + * + * @param {number} queueId - The agent queue to get information about + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueue(queueId, project, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + queueId: queueId + }; + let queryValues = { + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues. + * + * @param {string} project - Project ID or project name + * @param {string} queueName - Filter on the agent queue name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueues(project, queueName, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + queueName: queueName, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues by their IDs + * + * @param {number[]} queueIds - A comma-separated list of agent queue IDs to retrieve + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueuesByIds(queueIds, project, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (queueIds == null) { + throw new TypeError('queueIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + queueIds: queueIds && queueIds.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues by their names + * + * @param {string[]} queueNames - A comma-separated list of agent names to retrieve + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueuesByNames(queueNames, project, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (queueNames == null) { + throw new TypeError('queueNames can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + queueNames: queueNames && queueNames.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of agent queues by pool ids + * + * @param {number[]} poolIds - A comma-separated list of pool ids to get the corresponding queues for + * @param {string} project - Project ID or project name + * @param {TaskAgentInterfaces.TaskAgentQueueActionFilter} actionFilter - Filter by whether the calling user has use or manage permissions + */ + getAgentQueuesForPools(poolIds, project, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (poolIds == null) { + throw new TypeError('poolIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + poolIds: poolIds && poolIds.join(","), + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "900fa995-c559-4923-aae7-f8424fe4fbea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentQueue, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} agentCloudId + */ + getAgentCloudRequests(agentCloudId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + agentCloudId: agentCloudId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "20189bd7-5134-49c2-b8e9-f9e856eea2b2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentCloudRequest, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getResourceLimits() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1f1f0557-c445-42a6-b4a0-0df605a3a0f8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} parallelismTag + * @param {boolean} poolIsHosted + * @param {boolean} includeRunningRequests + */ + getResourceUsage(parallelismTag, poolIsHosted, includeRunningRequests) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + parallelismTag: parallelismTag, + poolIsHosted: poolIsHosted, + includeRunningRequests: includeRunningRequests, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "eae1d376-a8b1-4475-9041-1dfdbe8f0143", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.ResourceUsage, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + */ + getTaskGroupHistory(project, taskGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "100cc92a-b255-47fa-9ab3-e44a2985a3ac", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroupRevision, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a secure file + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + */ + deleteSecureFile(project, secureFileId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + secureFileId: secureFileId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a secure file by Id + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + * @param {string} ticket - A valid download ticket + * @param {boolean} download - If download is true, the file is sent as attachement in the response body. If download is false, the response body contains the file stream. + */ + downloadSecureFile(project, secureFileId, ticket, download) { + return __awaiter(this, void 0, void 0, function* () { + if (ticket == null) { + throw new TypeError('ticket can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + secureFileId: secureFileId + }; + let queryValues = { + ticket: ticket, + download: download, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a secure file + * + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + * @param {boolean} includeDownloadTicket - If includeDownloadTicket is true and the caller has permissions, a download ticket is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + */ + getSecureFile(project, secureFileId, includeDownloadTicket, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + secureFileId: secureFileId + }; + let queryValues = { + includeDownloadTicket: includeDownloadTicket, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get secure files + * + * @param {string} project - Project ID or project name + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter - Filter by secure file permissions for View, Manage or Use action. Defaults to View. + */ + getSecureFiles(project, namePattern, includeDownloadTickets, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + namePattern: namePattern, + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get secure files + * + * @param {string} project - Project ID or project name + * @param {string[]} secureFileIds - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + */ + getSecureFilesByIds(project, secureFileIds, includeDownloadTickets, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (secureFileIds == null) { + throw new TypeError('secureFileIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + secureFileIds: secureFileIds && secureFileIds.join(","), + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get secure files + * + * @param {string} project - Project ID or project name + * @param {string[]} secureFileNames - A list of secure file Ids + * @param {boolean} includeDownloadTickets - If includeDownloadTickets is true and the caller has permissions, a download ticket for each secure file is included in the response. + * @param {TaskAgentInterfaces.SecureFileActionFilter} actionFilter + */ + getSecureFilesByNames(project, secureFileNames, includeDownloadTickets, actionFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (secureFileNames == null) { + throw new TypeError('secureFileNames can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + secureFileNames: secureFileNames && secureFileNames.join(","), + includeDownloadTickets: includeDownloadTickets, + actionFilter: actionFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query secure files using a name pattern and a condition on file properties. + * + * @param {string} condition - The main condition syntax is described [here](https://go.microsoft.com/fwlink/?linkid=842996). Use the *property('property-name')* function to access the value of the specified property of a secure file. It returns null if the property is not set. E.g. ``` and( eq( property('devices'), '2' ), in( property('provisioning profile type'), 'ad hoc', 'development' ) ) ``` + * @param {string} project - Project ID or project name + * @param {string} namePattern - Name of the secure file to match. Can include wildcards to match multiple files. + */ + querySecureFilesByProperties(condition, project, namePattern) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + namePattern: namePattern, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, condition, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the name or properties of an existing secure file + * + * @param {TaskAgentInterfaces.SecureFile} secureFile - The secure file with updated name and/or properties + * @param {string} project - Project ID or project name + * @param {string} secureFileId - The unique secure file Id + */ + updateSecureFile(secureFile, project, secureFileId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + secureFileId: secureFileId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, secureFile, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update properties and/or names of a set of secure files. Files are identified by their IDs. Properties provided override the existing one entirely, i.e. do not merge. + * + * @param {TaskAgentInterfaces.SecureFile[]} secureFiles - A list of secure file objects. Only three field must be populated Id, Name, and Properties. The rest of fields in the object are ignored. + * @param {string} project - Project ID or project name + */ + updateSecureFiles(secureFiles, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, secureFiles, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Upload a secure file, include the file stream in the request body + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} project - Project ID or project name + * @param {string} name - Name of the file to upload + * @param {boolean} authorizePipelines - If authorizePipelines is true, then the secure file is authorized for use by all pipelines in the project. + */ + uploadSecureFile(customHeaders, contentStream, project, name, authorizePipelines) { + return __awaiter(this, void 0, void 0, function* () { + if (name == null) { + throw new TypeError('name can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + name: name, + authorizePipelines: authorizePipelines, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "adcfd8bc-b184-43ba-bd84-7c8c6a2ff421", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.SecureFile, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskAgentSession} session + * @param {number} poolId + */ + createAgentSession(session, poolId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "134e239e-2df3-4794-a6f6-24f1f19ec8dc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, session, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentSession, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {string} sessionId + */ + deleteAgentSession(poolId, sessionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + sessionId: sessionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "134e239e-2df3-4794-a6f6-24f1f19ec8dc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Register a deployment target to a deployment group. Generally this is called by agent configuration tool. + * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to register. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which the deployment target is registered. + */ + addDeploymentTarget(machine, project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a deployment target in a deployment group. This deletes the agent from associated deployment pool too. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is deleted. + * @param {number} targetId - ID of the deployment target to delete. + */ + deleteDeploymentTarget(project, deploymentGroupId, targetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a deployment target by its ID in a deployment group + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group to which deployment target belongs. + * @param {number} targetId - ID of the deployment target to return. + * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. + */ + getDeploymentTarget(project, deploymentGroupId, targetId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of deployment targets in a deployment group. + * + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group. + * @param {string[]} tags - Get only the deployment targets that contain all these comma separted list of tags. + * @param {string} name - Name pattern of the deployment targets to return. + * @param {boolean} partialNameMatch - When set to true, treats **name** as pattern. Else treats it as absolute match. Default is **false**. + * @param {TaskAgentInterfaces.DeploymentTargetExpands} expand - Include these additional details in the returned objects. + * @param {TaskAgentInterfaces.TaskAgentStatusFilter} agentStatus - Get only deployment targets that have this status. + * @param {TaskAgentInterfaces.TaskAgentJobResultFilter} agentJobResult - Get only deployment targets that have this last job result. + * @param {string} continuationToken - Get deployment targets with names greater than this continuationToken lexicographically. + * @param {number} top - Maximum number of deployment targets to return. Default is **1000**. + * @param {boolean} enabled - Get only deployment targets that are enabled or disabled. Default is 'null' which returns all the targets. + * @param {string[]} propertyFilters + */ + getDeploymentTargets(project, deploymentGroupId, tags, name, partialNameMatch, expand, agentStatus, agentJobResult, continuationToken, top, enabled, propertyFilters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + let queryValues = { + tags: tags && tags.join(","), + name: name, + partialNameMatch: partialNameMatch, + '$expand': expand, + agentStatus: agentStatus, + agentJobResult: agentJobResult, + continuationToken: continuationToken, + '$top': top, + enabled: enabled, + propertyFilters: propertyFilters && propertyFilters.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replace a deployment target in a deployment group. Generally this is called by agent configuration tool. + * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - New deployment target. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is replaced. + * @param {number} targetId - ID of the deployment target to replace. + */ + replaceDeploymentTarget(machine, project, deploymentGroupId, targetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a deployment target and its agent properties in a deployment group. Generally this is called by agent configuration tool. + * + * @param {TaskAgentInterfaces.DeploymentMachine} machine - Deployment target to update. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment target is updated. + * @param {number} targetId - ID of the deployment target to update. + */ + updateDeploymentTarget(machine, project, deploymentGroupId, targetId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId, + targetId: targetId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, machine, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update tags of a list of deployment targets in a deployment group. + * + * @param {TaskAgentInterfaces.DeploymentTargetUpdateParameter[]} machines - Deployment targets with tags to udpdate. + * @param {string} project - Project ID or project name + * @param {number} deploymentGroupId - ID of the deployment group in which deployment targets are updated. + */ + updateDeploymentTargets(machines, project, deploymentGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + deploymentGroupId: deploymentGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "2f0aa599-c121-4256-a5fd-ba370e0ae7b6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.DeploymentMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a task group. + * + * @param {TaskAgentInterfaces.TaskGroupCreateParameter} taskGroup - Task group object to create. + * @param {string} project - Project ID or project name + */ + addTaskGroup(taskGroup, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a task group. + * + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group to be deleted. + * @param {string} comment - Comments to delete. + */ + deleteTaskGroup(project, taskGroupId, comment) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + let queryValues = { + comment: comment, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get task group. + * + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group. + * @param {string} versionSpec - version specification of the task group. examples: 1, 1.0. + * @param {TaskAgentInterfaces.TaskGroupExpands} expand - The properties that should be expanded. example $expand=Tasks will expand nested task groups. + */ + getTaskGroup(project, taskGroupId, versionSpec, expand) { + return __awaiter(this, void 0, void 0, function* () { + if (versionSpec == null) { + throw new TypeError('versionSpec can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + let queryValues = { + versionSpec: versionSpec, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {number} revision + */ + getTaskGroupRevision(project, taskGroupId, revision) { + return __awaiter(this, void 0, void 0, function* () { + if (revision == null) { + throw new TypeError('revision can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + let queryValues = { + revision: revision, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List task groups. + * + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group. + * @param {boolean} expanded - 'true' to recursively expand task groups. Default is 'false'. + * @param {string} taskIdFilter - Guid of the taskId to filter. + * @param {boolean} deleted - 'true'to include deleted task groups. Default is 'false'. + * @param {number} top - Number of task groups to get. + * @param {Date} continuationToken - Gets the task groups after the continuation token provided. + * @param {TaskAgentInterfaces.TaskGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'CreatedOnDescending'. + */ + getTaskGroups(project, taskGroupId, expanded, taskIdFilter, deleted, top, continuationToken, queryOrder) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + let queryValues = { + expanded: expanded, + taskIdFilter: taskIdFilter, + deleted: deleted, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.PublishTaskGroupMetadata} taskGroupMetadata + * @param {string} project - Project ID or project name + * @param {string} parentTaskGroupId + */ + publishTaskGroup(taskGroupMetadata, project, parentTaskGroupId) { + return __awaiter(this, void 0, void 0, function* () { + if (parentTaskGroupId == null) { + throw new TypeError('parentTaskGroupId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + parentTaskGroupId: parentTaskGroupId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, taskGroupMetadata, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskGroup} taskGroup + * @param {string} project - Project ID or project name + */ + undeleteTaskGroup(taskGroup, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a task group. + * + * @param {TaskAgentInterfaces.TaskGroupUpdateParameter} taskGroup - Task group to update. + * @param {string} project - Project ID or project name + * @param {string} taskGroupId - Id of the task group to update. + */ + updateTaskGroup(taskGroup, project, taskGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, taskGroup, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskGroupUpdatePropertiesBase} taskGroupUpdateProperties + * @param {string} project - Project ID or project name + * @param {string} taskGroupId + * @param {boolean} disablePriorVersions + */ + updateTaskGroupProperties(taskGroupUpdateProperties, project, taskGroupId, disablePriorVersions) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + taskGroupId: taskGroupId + }; + let queryValues = { + disablePriorVersions: disablePriorVersions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "6c08ffbf-dbf1-4f9a-94e5-a1cbd47005e7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, taskGroupUpdateProperties, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} taskId + */ + deleteTaskDefinition(taskId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskContentZip(taskId, versionString, visibility, scopeLocal) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId, + versionString: versionString + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} taskId + * @param {string} versionString + * @param {string[]} visibility + * @param {boolean} scopeLocal + */ + getTaskDefinition(taskId, versionString, visibility, scopeLocal) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId, + versionString: versionString + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskDefinition, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} taskId + * @param {string[]} visibility + * @param {boolean} scopeLocal + * @param {boolean} allVersions + */ + getTaskDefinitions(taskId, visibility, scopeLocal, allVersions) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + taskId: taskId + }; + let queryValues = { + visibility: visibility, + scopeLocal: scopeLocal, + allVersions: allVersions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {number} poolId + * @param {number} agentId + * @param {string} currentState + */ + updateAgentUpdateState(poolId, agentId, currentState) { + return __awaiter(this, void 0, void 0, function* () { + if (currentState == null) { + throw new TypeError('currentState can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + agentId: agentId + }; + let queryValues = { + currentState: currentState, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8cc1b02b-ae49-4516-b5ad-4f9b29967c30", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {{ [key: string] : string; }} userCapabilities + * @param {number} poolId + * @param {number} agentId + */ + updateAgentUserCapabilities(userCapabilities, poolId, agentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + poolId: poolId, + agentId: agentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "30ba3ada-fedf-4da8-bbb5-dacf2f82e176", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, userCapabilities, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgent, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + */ + addVariableGroup(variableGroupParameters) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, variableGroupParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a variable group + * + * @param {number} groupId - Id of the variable group. + * @param {string[]} projectIds + */ + deleteVariableGroup(groupId, projectIds) { + return __awaiter(this, void 0, void 0, function* () { + if (projectIds == null) { + throw new TypeError('projectIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + groupId: groupId + }; + let queryValues = { + projectIds: projectIds && projectIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupProjectReference[]} variableGroupProjectReferences + * @param {number} variableGroupId + */ + shareVariableGroup(variableGroupProjectReferences, variableGroupId) { + return __awaiter(this, void 0, void 0, function* () { + if (variableGroupId == null) { + throw new TypeError('variableGroupId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + variableGroupId: variableGroupId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, variableGroupProjectReferences, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a variable group. + * + * @param {TaskAgentInterfaces.VariableGroupParameters} variableGroupParameters + * @param {number} groupId - Id of the variable group to update. + */ + updateVariableGroup(variableGroupParameters, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "ef5b7057-ffc3-4c77-bbad-c10b4a4abcc7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, variableGroupParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a variable group. + * + * @param {string} project - Project ID or project name + * @param {number} groupId - Id of the variable group. + */ + getVariableGroup(project, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get variable groups. + * + * @param {string} project - Project ID or project name + * @param {string} groupName - Name of variable group. + * @param {TaskAgentInterfaces.VariableGroupActionFilter} actionFilter - Action filter for the variable group. It specifies the action which can be performed on the variable groups. + * @param {number} top - Number of variable groups to get. + * @param {number} continuationToken - Gets the variable groups after the continuation token provided. + * @param {TaskAgentInterfaces.VariableGroupQueryOrder} queryOrder - Gets the results in the defined order. Default is 'IdDescending'. + */ + getVariableGroups(project, groupName, actionFilter, top, continuationToken, queryOrder) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + groupName: groupName, + actionFilter: actionFilter, + '$top': top, + continuationToken: continuationToken, + queryOrder: queryOrder, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get variable groups by ids. + * + * @param {string} project - Project ID or project name + * @param {number[]} groupIds - Comma separated list of Ids of variable groups. + */ + getVariableGroupsById(project, groupIds) { + return __awaiter(this, void 0, void 0, function* () { + if (groupIds == null) { + throw new TypeError('groupIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + groupIds: groupIds && groupIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "f5b09dd5-9d54-45a1-8b5a-1c8287d634cc", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VariableGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.VirtualMachineGroupCreateParameters} createParameters + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + addVirtualMachineGroup(createParameters, project, environmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, createParameters, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + deleteVirtualMachineGroup(project, environmentId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + getVirtualMachineGroup(project, environmentId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.VirtualMachineGroup} resource + * @param {string} project - Project ID or project name + * @param {number} environmentId + */ + updateVirtualMachineGroup(resource, project, environmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9e597901-4af7-4cc3-8d92-47d54db8ebfb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, resource, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachineGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + * @param {string} continuationToken + * @param {string} name + * @param {boolean} partialNameMatch + * @param {string[]} tags + * @param {number} top + */ + getVirtualMachines(project, environmentId, resourceId, continuationToken, name, partialNameMatch, tags, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + let queryValues = { + continuationToken: continuationToken, + name: name, + partialNameMatch: partialNameMatch, + tags: tags && tags.join(","), + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "48700676-2ba5-4282-8ec8-083280d169c7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.VirtualMachine[]} machines + * @param {string} project - Project ID or project name + * @param {number} environmentId + * @param {number} resourceId + */ + updateVirtualMachines(machines, project, environmentId, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + environmentId: environmentId, + resourceId: resourceId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "48700676-2ba5-4282-8ec8-083280d169c7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, machines, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.VirtualMachine, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.AadOauthTokenRequest} authenticationRequest + */ + acquireAccessToken(authenticationRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, authenticationRequest, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} tenantId + * @param {string} redirectUri + * @param {TaskAgentInterfaces.AadLoginPromptOption} promptOption + * @param {string} completeCallbackPayload + * @param {boolean} completeCallbackByAuthCode + */ + createAadOAuthRequest(tenantId, redirectUri, promptOption, completeCallbackPayload, completeCallbackByAuthCode) { + return __awaiter(this, void 0, void 0, function* () { + if (tenantId == null) { + throw new TypeError('tenantId can not be null or undefined'); + } + if (redirectUri == null) { + throw new TypeError('redirectUri can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + tenantId: tenantId, + redirectUri: redirectUri, + promptOption: promptOption, + completeCallbackPayload: completeCallbackPayload, + completeCallbackByAuthCode: completeCallbackByAuthCode, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + */ + getVstsAadTenantId() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "9c63205e-3a0f-42a0-ad88-095200f13607", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * GET the Yaml schema used for Yaml file validation. + * + * @param {boolean} validateTaskNames - Whether the schema should validate that tasks are actually installed (useful for offline tools where you don't want validation). + */ + getYamlSchema(validateTaskNames) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + validateTaskNames: validateTaskNames, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "1f9990b9-1dba-441f-9c2e-6485888c42b6", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +TaskAgentApiBase.RESOURCE_AREA_ID = "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"; +exports.TaskAgentApiBase = TaskAgentApiBase; diff --git a/node_modules/azure-devops-node-api/TaskApi.d.ts b/node_modules/azure-devops-node-api/TaskApi.d.ts new file mode 100644 index 0000000..6e710c9 --- /dev/null +++ b/node_modules/azure-devops-node-api/TaskApi.d.ts @@ -0,0 +1,228 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +export interface ITaskApi extends basem.ClientApiBase { + getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + createAttachmentFromArtifact(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, artifactHash: string, length: number): Promise; + getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; + appendTimelineRecordFeed(lines: TaskAgentInterfaces.TimelineRecordFeedLinesWrapper, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; + getLines(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, stepId: string, endLine?: number, takeCount?: number, continuationToken?: string): Promise; + getJobInstance(scopeIdentifier: string, hubName: string, orchestrationId: string): Promise; + appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; + associateLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, serializedBlobId: string, lineCount: number): Promise; + createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; + getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; + getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; + getPlanGroupsQueueMetrics(scopeIdentifier: string, hubName: string): Promise; + getQueuedPlanGroups(scopeIdentifier: string, hubName: string, statusFilter?: TaskAgentInterfaces.PlanGroupStatus, count?: number): Promise; + getQueuedPlanGroup(scopeIdentifier: string, hubName: string, planGroup: string): Promise; + getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; + getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; + updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; + deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; + getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; +} +export declare class TaskApi extends basem.ClientApiBase implements ITaskApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} type + */ + getPlanAttachments(scopeIdentifier: string, hubName: string, planId: string, type: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + * @param {string} artifactHash + * @param {number} length + */ + createAttachmentFromArtifact(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string, artifactHash: string, length: number): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + getAttachment(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + getAttachmentContent(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string, name: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + */ + getAttachments(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, type: string): Promise; + /** + * @param {TaskAgentInterfaces.TimelineRecordFeedLinesWrapper} lines + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + */ + appendTimelineRecordFeed(lines: TaskAgentInterfaces.TimelineRecordFeedLinesWrapper, scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} stepId + * @param {number} endLine + * @param {number} takeCount + * @param {string} continuationToken + */ + getLines(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, recordId: string, stepId: string, endLine?: number, takeCount?: number, continuationToken?: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} orchestrationId + */ + getJobInstance(scopeIdentifier: string, hubName: string, orchestrationId: string): Promise; + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + */ + appendLogContent(customHeaders: any, contentStream: NodeJS.ReadableStream, scopeIdentifier: string, hubName: string, planId: string, logId: number): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param {string} serializedBlobId + * @param {number} lineCount + */ + associateLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, serializedBlobId: string, lineCount: number): Promise; + /** + * @param {TaskAgentInterfaces.TaskLog} log + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + createLog(log: TaskAgentInterfaces.TaskLog, scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine + */ + getLog(scopeIdentifier: string, hubName: string, planId: string, logId: number, startLine?: number, endLine?: number): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getLogs(scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + */ + getPlanGroupsQueueMetrics(scopeIdentifier: string, hubName: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {TaskAgentInterfaces.PlanGroupStatus} statusFilter + * @param {number} count + */ + getQueuedPlanGroups(scopeIdentifier: string, hubName: string, statusFilter?: TaskAgentInterfaces.PlanGroupStatus, count?: number): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planGroup + */ + getQueuedPlanGroup(scopeIdentifier: string, hubName: string, planGroup: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getPlan(scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + */ + getRecords(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number): Promise; + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} records + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + */ + updateRecords(records: VSSInterfaces.VssJsonCollectionWrapperV, scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + /** + * @param {TaskAgentInterfaces.Timeline} timeline + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + createTimeline(timeline: TaskAgentInterfaces.Timeline, scopeIdentifier: string, hubName: string, planId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + */ + deleteTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + * @param {boolean} includeRecords + */ + getTimeline(scopeIdentifier: string, hubName: string, planId: string, timelineId: string, changeId?: number, includeRecords?: boolean): Promise; + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getTimelines(scopeIdentifier: string, hubName: string, planId: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/TaskApi.js b/node_modules/azure-devops-node-api/TaskApi.js new file mode 100644 index 0000000..e56caf9 --- /dev/null +++ b/node_modules/azure-devops-node-api/TaskApi.js @@ -0,0 +1,826 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const TaskAgentInterfaces = require("./interfaces/TaskAgentInterfaces"); +class TaskApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Task-api', options); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} type + */ + getPlanAttachments(scopeIdentifier, hubName, planId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "eb55e5d6-2f30-4295-b5ed-38da50b1fc52", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + createAttachment(customHeaders, contentStream, scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("PUT", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + * @param {string} artifactHash + * @param {number} length + */ + createAttachmentFromArtifact(scopeIdentifier, hubName, planId, timelineId, recordId, type, name, artifactHash, length) { + return __awaiter(this, void 0, void 0, function* () { + if (artifactHash == null) { + throw new TypeError('artifactHash can not be null or undefined'); + } + if (length == null) { + throw new TypeError('length can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + let queryValues = { + artifactHash: artifactHash, + length: length, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + getAttachment(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + * @param {string} name + */ + getAttachmentContent(scopeIdentifier, hubName, planId, timelineId, recordId, type, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} type + */ + getAttachments(scopeIdentifier, hubName, planId, timelineId, recordId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "7898f959-9cdf-4096-b29e-7f293031629e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TimelineRecordFeedLinesWrapper} lines + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + */ + appendTimelineRecordFeed(lines, scopeIdentifier, hubName, planId, timelineId, recordId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, lines, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {string} recordId + * @param {string} stepId + * @param {number} endLine + * @param {number} takeCount + * @param {string} continuationToken + */ + getLines(scopeIdentifier, hubName, planId, timelineId, recordId, stepId, endLine, takeCount, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (stepId == null) { + throw new TypeError('stepId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId, + recordId: recordId + }; + let queryValues = { + stepId: stepId, + endLine: endLine, + takeCount: takeCount, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "858983e4-19bd-4c5e-864c-507b59b58b12", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} orchestrationId + */ + getJobInstance(scopeIdentifier, hubName, orchestrationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + orchestrationId: orchestrationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0a1efd25-abda-43bd-9629-6c7bdd2e0d60", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskAgentJob, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + */ + appendLogContent(customHeaders, contentStream, scopeIdentifier, hubName, planId, logId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param {string} serializedBlobId + * @param {number} lineCount + */ + associateLog(scopeIdentifier, hubName, planId, logId, serializedBlobId, lineCount) { + return __awaiter(this, void 0, void 0, function* () { + if (serializedBlobId == null) { + throw new TypeError('serializedBlobId can not be null or undefined'); + } + if (lineCount == null) { + throw new TypeError('lineCount can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + let queryValues = { + serializedBlobId: serializedBlobId, + lineCount: lineCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.TaskLog} log + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + createLog(log, scopeIdentifier, hubName, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, log, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {number} logId + * @param {number} startLine + * @param {number} endLine + */ + getLog(scopeIdentifier, hubName, planId, logId, startLine, endLine) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + logId: logId + }; + let queryValues = { + startLine: startLine, + endLine: endLine, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getLogs(scopeIdentifier, hubName, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "46f5667d-263a-4684-91b1-dff7fdcf64e2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskLog, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + */ + getPlanGroupsQueueMetrics(scopeIdentifier, hubName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "038fd4d5-cda7-44ca-92c0-935843fee1a7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {TaskAgentInterfaces.PlanGroupStatus} statusFilter + * @param {number} count + */ + getQueuedPlanGroups(scopeIdentifier, hubName, statusFilter, count) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName + }; + let queryValues = { + statusFilter: statusFilter, + count: count, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "0dd73091-3e36-4f43-b443-1b76dd426d84", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planGroup + */ + getQueuedPlanGroup(scopeIdentifier, hubName, planGroup) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planGroup: planGroup + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "65fd0708-bc1e-447b-a731-0587c5464e5b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationQueuedPlanGroup, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getPlan(scopeIdentifier, hubName, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "distributedtask", "5cecd946-d704-471e-a45f-3b4064fcfaba", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TaskOrchestrationPlan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + */ + getRecords(scopeIdentifier, hubName, planId, timelineId, changeId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + let queryValues = { + changeId: changeId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {VSSInterfaces.VssJsonCollectionWrapperV} records + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + */ + updateRecords(records, scopeIdentifier, hubName, planId, timelineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "8893bc5b-35b2-4be7-83cb-99e683551db4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, records, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.TimelineRecord, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TaskAgentInterfaces.Timeline} timeline + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + createTimeline(timeline, scopeIdentifier, hubName, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, timeline, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + */ + deleteTimeline(scopeIdentifier, hubName, planId, timelineId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + * @param {string} timelineId + * @param {number} changeId + * @param {boolean} includeRecords + */ + getTimeline(scopeIdentifier, hubName, planId, timelineId, changeId, includeRecords) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId, + timelineId: timelineId + }; + let queryValues = { + changeId: changeId, + includeRecords: includeRecords, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} scopeIdentifier - The project GUID to scope the request + * @param {string} hubName - The name of the server hub: "build" for the Build server or "rm" for the Release Management server + * @param {string} planId + */ + getTimelines(scopeIdentifier, hubName, planId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + scopeIdentifier: scopeIdentifier, + hubName: hubName, + planId: planId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "distributedtask", "83597576-cc2c-453c-bea6-2882ae6a1653", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TaskAgentInterfaces.TypeInfo.Timeline, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +exports.TaskApi = TaskApi; diff --git a/node_modules/azure-devops-node-api/TestApi.d.ts b/node_modules/azure-devops-node-api/TestApi.d.ts new file mode 100644 index 0000000..31fd70a --- /dev/null +++ b/node_modules/azure-devops-node-api/TestApi.d.ts @@ -0,0 +1,705 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import TestInterfaces = require("./interfaces/TestInterfaces"); +import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); +export interface ITestApi extends basem.ClientApiBase { + createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; + createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; + createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; + getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise; + getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; + getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; + getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; + createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; + getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; + getTestRunAttachments(project: string, runId: number): Promise; + getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; + getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; + getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; + getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; + updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; + getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; + addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; + queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; + queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise; + getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; + getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; + getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise; + getTestRunLogs(project: string, runId: number): Promise; + getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; + getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; + updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; + getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise; + getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; + getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; + publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise; + getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise; + getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise; + queryTestResultsMetaData(testReferenceIds: string[], project: string): Promise; + getResultRetentionSettings(project: string): Promise; + updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; + addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; + getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; + getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise; + updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; + getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise; + getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; + getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; + queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; + queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; + queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise; + queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise; + queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; + queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; + getTestRunStatistics(project: string, runId: number): Promise; + createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; + deleteTestRun(project: string, runId: number): Promise; + getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise; + getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; + queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestInterfaces.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestInterfaces.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise; + updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; + createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; + getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise; + updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; + deleteSharedParameter(project: string, sharedParameterId: number): Promise; + deleteSharedStep(project: string, sharedStepId: number): Promise; + addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; + getTestCases(project: string, planId: number, suiteId: number): Promise; + removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + deleteTestCase(project: string, testCaseId: number): Promise; + queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise; + createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; + deleteTestSettings(project: string, testSettingsId: number): Promise; + getTestSettingsById(project: string, testSettingsId: number): Promise; + addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise; + deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise; + queryTestMethodLinkedWorkItems(project: string, testName: string): Promise; + queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise; +} +export declare class TestApi extends basem.ClientApiBase implements ITestApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"; + /** + * Attach a file to test step result + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iteration + * @param {number} iterationId - ID of the test result iteration. + * @param {string} actionPath - Hex value of test result action path. + */ + createTestIterationResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, iterationId: number, actionPath?: string): Promise; + /** + * Attach a file to a test result. + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded. + */ + createTestResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number): Promise; + /** + * Attach a file to a test result + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model. + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded. + */ + createTestSubResultAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; + /** + * Download a test result attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the testCaseResultId. + * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test result attachment to be downloaded. + */ + getTestResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + /** + * Get list of test result attachments reference. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result. + */ + getTestResultAttachments(project: string, runId: number, testCaseResultId: number): Promise; + /** + * Download a test result attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the testCaseResultId. + * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test result attachment to be downloaded. + */ + getTestResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number): Promise; + /** + * Download a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} attachmentId - ID of the test result attachment to be downloaded + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachmentContent(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; + /** + * Get list of test sub result attachments + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachments(project: string, runId: number, testCaseResultId: number, testSubResultId: number): Promise; + /** + * Download a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} attachmentId - ID of the test result attachment to be downloaded + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachmentZip(project: string, runId: number, testCaseResultId: number, attachmentId: number, testSubResultId: number): Promise; + /** + * Attach a file to a test run. + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run against which attachment has to be uploaded. + */ + createTestRunAttachment(attachmentRequestModel: TestInterfaces.TestAttachmentRequestModel, project: string, runId: number): Promise; + /** + * Download a test run attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test run attachment to be downloaded. + */ + getTestRunAttachmentContent(project: string, runId: number, attachmentId: number): Promise; + /** + * Get list of test run attachments reference. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run. + */ + getTestRunAttachments(project: string, runId: number): Promise; + /** + * Download a test run attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test run attachment to be downloaded. + */ + getTestRunAttachmentZip(project: string, runId: number, attachmentId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + getBugsLinkedToTestResult(project: string, runId: number, testCaseResultId: number): Promise; + /** + * Get code coverage data for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. + * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. + */ + getBuildCodeCoverage(project: string, buildId: number, flags: number): Promise; + /** + * Get Code Coverage Summary for Build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. + * @param {number} deltaBuildId - Delta Build id (optional) + */ + getCodeCoverageSummary(project: string, buildId: number, deltaBuildId?: number): Promise; + /** + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * + * @param {TestInterfaces.CodeCoverageData} coverageData + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + updateCodeCoverageSummary(coverageData: TestInterfaces.CodeCoverageData, project: string, buildId: number): Promise; + /** + * Get code coverage data for a test run + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run for which code coverage data needs to be fetched. + * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. + */ + getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise; + /** + * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields + * @param {string} project - Project ID or project name + */ + addCustomFields(newFields: TestInterfaces.CustomTestFieldDefinition[], project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {TestInterfaces.CustomTestFieldScope} scopeFilter + */ + queryCustomFields(project: string, scopeFilter: TestInterfaces.CustomTestFieldScope): Promise; + /** + * @param {TestInterfaces.ResultsFilter} filter + * @param {string} project - Project ID or project name + */ + queryTestResultHistory(filter: TestInterfaces.ResultsFilter, project: string): Promise; + /** + * Get iteration for a result + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iterations. + * @param {number} iterationId - Id of the test results Iteration. + * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. + */ + getTestIteration(project: string, runId: number, testCaseResultId: number, iterationId: number, includeActionResults?: boolean): Promise; + /** + * Get iterations for a result + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iterations. + * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. + */ + getTestIterations(project: string, runId: number, testCaseResultId: number, includeActionResults?: boolean): Promise; + /** + * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery + * @param {string} project - Project ID or project name + */ + getLinkedWorkItemsByQuery(workItemQuery: TestInterfaces.LinkedWorkItemsQuery, project: string): Promise; + /** + * Get test run message logs + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + */ + getTestRunLogs(project: string, runId: number): Promise; + /** + * Get a test point. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the point. + * @param {number} pointIds - ID of the test point to get. + * @param {string} witFields - Comma-separated list of work item field names. + */ + getPoint(project: string, planId: number, suiteId: number, pointIds: number, witFields?: string): Promise; + /** + * Get a list of test points. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the points. + * @param {string} witFields - Comma-separated list of work item field names. + * @param {string} configurationId - Get test points for specific configuration. + * @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set. + * @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set. + * @param {boolean} includePointDetails - Include all properties for the test point. + * @param {number} skip - Number of test points to skip.. + * @param {number} top - Number of test points to return. + */ + getPoints(project: string, planId: number, suiteId: number, witFields?: string, configurationId?: string, testCaseId?: string, testPointIds?: string, includePointDetails?: boolean, skip?: number, top?: number): Promise; + /** + * Update test points. + * + * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the points. + * @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points. + */ + updateTestPoints(pointUpdateModel: TestInterfaces.PointUpdateModel, project: string, planId: number, suiteId: number, pointIds: string): Promise; + /** + * Get test points using query. + * + * @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of test points to skip.. + * @param {number} top - Number of test points to return. + */ + getPointsByQuery(query: TestInterfaces.TestPointsQuery, project: string, skip?: number, top?: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress + */ + getTestResultDetailsForBuild(project: string, buildId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress + */ + getTestResultDetailsForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, groupBy?: string, filter?: string, orderby?: string, shouldIncludeResults?: boolean, queryRunSummaryForInProgress?: boolean): Promise; + /** + * @param {TestInterfaces.TestResultDocument} document + * @param {string} project - Project ID or project name + * @param {number} runId + */ + publishTestResultDocument(document: TestInterfaces.TestResultDocument, project: string, runId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string[]} fields + * @param {string} continuationToken + */ + getResultGroupsByBuild(project: string, buildId: number, publishContext: string, fields?: string[], continuationToken?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} publishContext + * @param {number} releaseEnvId + * @param {string[]} fields + * @param {string} continuationToken + */ + getResultGroupsByRelease(project: string, releaseId: number, publishContext: string, releaseEnvId?: number, fields?: string[], continuationToken?: string): Promise; + /** + * Get list of test Result meta data details for corresponding testcasereferenceId + * + * @param {string[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). + * @param {string} project - Project ID or project name + */ + queryTestResultsMetaData(testReferenceIds: string[], project: string): Promise; + /** + * Get test result retention settings + * + * @param {string} project - Project ID or project name + */ + getResultRetentionSettings(project: string): Promise; + /** + * Update test result retention settings + * + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated + * @param {string} project - Project ID or project name + */ + updateResultRetentionSettings(retentionSettings: TestInterfaces.ResultRetentionSettings, project: string): Promise; + /** + * Add test results to a test run. + * + * @param {TestInterfaces.TestCaseResult[]} results - List of test results to add. + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID into which test results to add. + */ + addTestResultsToTestRun(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; + /** + * Get a test result for a test run. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID of a test result to fetch. + * @param {number} testCaseResultId - Test result ID. + * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults. + */ + getTestResultById(project: string, runId: number, testCaseResultId: number, detailsToInclude?: TestInterfaces.ResultDetails): Promise; + /** + * Get test results for a test run. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID of test results to fetch. + * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems. + * @param {number} skip - Number of test results to skip from beginning. + * @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise. + * @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results. + */ + getTestResults(project: string, runId: number, detailsToInclude?: TestInterfaces.ResultDetails, skip?: number, top?: number, outcomes?: TestInterfaces.TestOutcome[]): Promise; + /** + * Update test results in a test run. + * + * @param {TestInterfaces.TestCaseResult[]} results - List of test results to update. + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID whose test results to update. + */ + updateTestResults(results: TestInterfaces.TestCaseResult[], project: string, runId: number): Promise; + /** + * This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract. + * + * @param {TestInterfaces.TestResultsQuery} query + * @param {string} project - Project ID or project name + */ + getTestResultsByQuery(query: TestInterfaces.TestResultsQuery, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken + */ + getTestResultsByBuild(project: string, buildId: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvid + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken + */ + getTestResultsByRelease(project: string, releaseId: number, releaseEnvid?: number, publishContext?: string, outcomes?: TestInterfaces.TestOutcome[], top?: number, continuationToken?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.BuildReference} buildToCompare + */ + queryTestResultsReportForBuild(project: string, buildId: number, publishContext?: string, includeFailureDetails?: boolean, buildToCompare?: TestInterfaces.BuildReference): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.ReleaseReference} releaseToCompare + */ + queryTestResultsReportForRelease(project: string, releaseId: number, releaseEnvId: number, publishContext?: string, includeFailureDetails?: boolean, releaseToCompare?: TestInterfaces.ReleaseReference): Promise; + /** + * @param {TestInterfaces.ReleaseReference[]} releases + * @param {string} project - Project ID or project name + */ + queryTestResultsSummaryForReleases(releases: TestInterfaces.ReleaseReference[], project: string): Promise; + /** + * @param {TestInterfaces.TestResultsContext} resultsContext + * @param {string} project - Project ID or project name + * @param {number[]} workItemIds + */ + queryTestSummaryByRequirement(resultsContext: TestInterfaces.TestResultsContext, project: string, workItemIds?: number[]): Promise; + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + queryResultTrendForBuild(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + queryResultTrendForRelease(filter: TestInterfaces.TestResultTrendFilter, project: string): Promise; + /** + * Get test run statistics , used when we want to get summary of a run by outcome. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + */ + getTestRunStatistics(project: string, runId: number): Promise; + /** + * Create new test run. + * + * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel + * @param {string} project - Project ID or project name + */ + createTestRun(testRun: TestInterfaces.RunCreateModel, project: string): Promise; + /** + * Delete a test run by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to delete. + */ + deleteTestRun(project: string, runId: number): Promise; + /** + * Get a test run by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + * @param {boolean} includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more. + */ + getTestRunById(project: string, runId: number, includeDetails?: boolean): Promise; + /** + * Get a list of test runs. + * + * @param {string} project - Project ID or project name + * @param {string} buildUri - URI of the build that the runs used. + * @param {string} owner - Team foundation ID of the owner of the runs. + * @param {string} tmiRunId + * @param {number} planId - ID of the test plan that the runs are a part of. + * @param {boolean} includeRunDetails - If true, include all the properties of the runs. + * @param {boolean} automated - If true, only returns automated runs. + * @param {number} skip - Number of test runs to skip. + * @param {number} top - Number of test runs to return. + */ + getTestRuns(project: string, buildUri?: string, owner?: string, tmiRunId?: string, planId?: number, includeRunDetails?: boolean, automated?: boolean, skip?: number, top?: number): Promise; + /** + * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. + * + * @param {string} project - Project ID or project name + * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). + * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). + * @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried. + * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {boolean} isAutomated - Automation type of the Runs to be queried. + * @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. + * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {string} branchName - Source Branch name of the Runs to be queried. + * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {string} runTitle - Run Title of the Runs to be queried. + * @param {number} top - Number of runs to be queried. Limit is 100 + * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. + */ + queryTestRuns(project: string, minLastUpdatedDate: Date, maxLastUpdatedDate: Date, state?: TestInterfaces.TestRunState, planIds?: number[], isAutomated?: boolean, publishContext?: TestInterfaces.TestRunPublishContext, buildIds?: number[], buildDefIds?: number[], branchName?: string, releaseIds?: number[], releaseDefIds?: number[], releaseEnvIds?: number[], releaseEnvDefIds?: number[], runTitle?: string, top?: number, continuationToken?: string): Promise; + /** + * Update test run by its ID. + * + * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to update. + */ + updateTestRun(runUpdateModel: TestInterfaces.RunUpdateModel, project: string, runId: number): Promise; + /** + * Create a test session + * + * @param {TestInterfaces.TestSession} testSession - Test session details for creation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Get a list of test sessions + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {number} period - Period in days from now, for which test sessions are fetched. + * @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users + * @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. + * @param {TestInterfaces.TestSessionSource} source - Source of the test session. + * @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states + */ + getTestSessions(teamContext: TfsCoreInterfaces.TeamContext, period?: number, allSessions?: boolean, includeAllProperties?: boolean, source?: TestInterfaces.TestSessionSource, includeOnlyCompletedSessions?: boolean): Promise; + /** + * Update a test session + * + * @param {TestInterfaces.TestSession} testSession - Test session details for update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTestSession(testSession: TestInterfaces.TestSession, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} sharedParameterId + */ + deleteSharedParameter(project: string, sharedParameterId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} sharedStepId + */ + deleteSharedStep(project: string, sharedStepId: number): Promise; + /** + * Add test cases to suite. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the test suite to which the test cases must be added. + * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. + */ + addTestCasesToSuite(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + /** + * Get a specific test case in a test suite with test case id. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suites. + * @param {number} suiteId - ID of the suite that contains the test case. + * @param {number} testCaseIds - ID of the test case to get. + */ + getTestCaseById(project: string, planId: number, suiteId: number, testCaseIds: number): Promise; + /** + * Get all test cases in a suite. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suites. + * @param {number} suiteId - ID of the suite to get. + */ + getTestCases(project: string, planId: number, suiteId: number): Promise; + /** + * The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the suite to get. + * @param {string} testCaseIds - IDs of the test cases to remove from the suite. + */ + removeTestCasesFromSuiteUrl(project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + /** + * Updates the properties of the test case association in a suite. + * + * @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the test suite to which the test cases must be added. + * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. + */ + updateSuiteTestCases(suiteTestCaseUpdateModel: TestInterfaces.SuiteTestCaseUpdateModel, project: string, planId: number, suiteId: number, testCaseIds: string): Promise; + /** + * Delete a test case. + * + * @param {string} project - Project ID or project name + * @param {number} testCaseId - Id of test case to delete. + */ + deleteTestCase(project: string, testCaseId: number): Promise; + /** + * Get history of a test method using TestHistoryQuery + * + * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history + * @param {string} project - Project ID or project name + */ + queryTestHistory(filter: TestInterfaces.TestHistoryQuery, project: string): Promise; + /** + * @param {TestInterfaces.TestSettings} testSettings + * @param {string} project - Project ID or project name + */ + createTestSettings(testSettings: TestInterfaces.TestSettings, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + deleteTestSettings(project: string, testSettingsId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + getTestSettingsById(project: string, testSettingsId: number): Promise; + /** + * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks + * @param {string} project - Project ID or project name + */ + addWorkItemToTestLinks(workItemToTestLinks: TestInterfaces.WorkItemToTestLinks, project: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} testName + * @param {number} workItemId + */ + deleteTestMethodToWorkItemLink(project: string, testName: string, workItemId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} testName + */ + queryTestMethodLinkedWorkItems(project: string, testName: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} workItemCategory + * @param {string} automatedTestName + * @param {number} testCaseId + * @param {Date} maxCompleteDate + * @param {number} days + * @param {number} workItemCount + */ + queryTestResultWorkItems(project: string, workItemCategory: string, automatedTestName?: string, testCaseId?: number, maxCompleteDate?: Date, days?: number, workItemCount?: number): Promise; +} diff --git a/node_modules/azure-devops-node-api/TestApi.js b/node_modules/azure-devops-node-api/TestApi.js new file mode 100644 index 0000000..b1e1769 --- /dev/null +++ b/node_modules/azure-devops-node-api/TestApi.js @@ -0,0 +1,2521 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const TestInterfaces = require("./interfaces/TestInterfaces"); +class TestApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Test-api', options); + } + /** + * Attach a file to test step result + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iteration + * @param {number} iterationId - ID of the test result iteration. + * @param {string} actionPath - Hex value of test result action path. + */ + createTestIterationResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, iterationId, actionPath) { + return __awaiter(this, void 0, void 0, function* () { + if (iterationId == null) { + throw new TypeError('iterationId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + iterationId: iterationId, + actionPath: actionPath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Attach a file to a test result. + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result against which attachment has to be uploaded. + */ + createTestResultAttachment(attachmentRequestModel, project, runId, testCaseResultId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Attach a file to a test result + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment Request Model. + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} testSubResultId - ID of the test sub results against which attachment has to be uploaded. + */ + createTestSubResultAttachment(attachmentRequestModel, project, runId, testCaseResultId, testSubResultId) { + return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a test result attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the testCaseResultId. + * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test result attachment to be downloaded. + */ + getTestResultAttachmentContent(project, runId, testCaseResultId, attachmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of test result attachments reference. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result. + */ + getTestResultAttachments(project, runId, testCaseResultId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a test result attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the testCaseResultId. + * @param {number} testCaseResultId - ID of the test result whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test result attachment to be downloaded. + */ + getTestResultAttachmentZip(project, runId, testCaseResultId, attachmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} attachmentId - ID of the test result attachment to be downloaded + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachmentContent(project, runId, testCaseResultId, attachmentId, testSubResultId) { + return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of test sub result attachments + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachments(project, runId, testCaseResultId, testSubResultId) { + return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a test sub result attachment + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test results that contains sub result. + * @param {number} attachmentId - ID of the test result attachment to be downloaded + * @param {number} testSubResultId - ID of the test sub result whose attachment has to be downloaded + */ + getTestSubResultAttachmentZip(project, runId, testCaseResultId, attachmentId, testSubResultId) { + return __awaiter(this, void 0, void 0, function* () { + if (testSubResultId == null) { + throw new TypeError('testSubResultId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + attachmentId: attachmentId + }; + let queryValues = { + testSubResultId: testSubResultId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "2bffebe9-2f0f-4639-9af8-56129e9fed2d", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Attach a file to a test run. + * + * @param {TestInterfaces.TestAttachmentRequestModel} attachmentRequestModel - Attachment details TestAttachmentRequestModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run against which attachment has to be uploaded. + */ + createTestRunAttachment(attachmentRequestModel, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, attachmentRequestModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a test run attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test run attachment to be downloaded. + */ + getTestRunAttachmentContent(project, runId, attachmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of test run attachments reference. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run. + */ + getTestRunAttachments(project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestAttachment, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Download a test run attachment by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run whose attachment has to be downloaded. + * @param {number} attachmentId - ID of the test run attachment to be downloaded. + */ + getTestRunAttachmentZip(project, runId, attachmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4f004af4-a507-489c-9b13-cb62060beb11", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} runId + * @param {number} testCaseResultId + */ + getBugsLinkedToTestResult(project, runId, testCaseResultId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "6de20ca2-67de-4faf-97fa-38c5d585eb00", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get code coverage data for a build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. + * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. + */ + getBuildCodeCoverage(project, buildId, flags) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.BuildCoverage, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Code Coverage Summary for Build. + * + * @param {string} project - Project ID or project name + * @param {number} buildId - ID of the build for which code coverage data needs to be fetched. + * @param {number} deltaBuildId - Delta Build id (optional) + */ + getCodeCoverageSummary(project, buildId, deltaBuildId) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + deltaBuildId: deltaBuildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CodeCoverageSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * http://(tfsserver):8080/tfs/DefaultCollection/_apis/test/CodeCoverage?buildId=10 Request: Json of code coverage summary + * + * @param {TestInterfaces.CodeCoverageData} coverageData + * @param {string} project - Project ID or project name + * @param {number} buildId + */ + updateCodeCoverageSummary(coverageData, project, buildId) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "77560e8a-4e8c-4d59-894e-a5f264c24444", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, coverageData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get code coverage data for a test run + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run for which code coverage data needs to be fetched. + * @param {number} flags - Value of flags determine the level of code coverage details to be fetched. Flags are additive. Expected Values are 1 for Modules, 2 for Functions, 4 for BlockData. + */ + getTestRunCodeCoverage(project, runId, flags) { + return __awaiter(this, void 0, void 0, function* () { + if (flags == null) { + throw new TypeError('flags can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + let queryValues = { + flags: flags, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "9629116f-3b89-4ed8-b358-d4694efda160", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.CustomTestFieldDefinition[]} newFields + * @param {string} project - Project ID or project name + */ + addCustomFields(newFields, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8ce1923b-f4c7-4e22-b93b-f6284e525ec2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, newFields, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {TestInterfaces.CustomTestFieldScope} scopeFilter + */ + queryCustomFields(project, scopeFilter) { + return __awaiter(this, void 0, void 0, function* () { + if (scopeFilter == null) { + throw new TypeError('scopeFilter can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + scopeFilter: scopeFilter, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8ce1923b-f4c7-4e22-b93b-f6284e525ec2", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.CustomTestFieldDefinition, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.ResultsFilter} filter + * @param {string} project - Project ID or project name + */ + queryTestResultHistory(filter, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "234616f5-429c-4e7b-9192-affd76731dfd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultHistory, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get iteration for a result + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iterations. + * @param {number} iterationId - Id of the test results Iteration. + * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. + */ + getTestIteration(project, runId, testCaseResultId, iterationId, includeActionResults) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId, + iterationId: iterationId + }; + let queryValues = { + includeActionResults: includeActionResults, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "73eb9074-3446-4c44-8296-2f811950ff8d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestIterationDetailsModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get iterations for a result + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the test run that contains the result. + * @param {number} testCaseResultId - ID of the test result that contains the iterations. + * @param {boolean} includeActionResults - Include result details for each action performed in the test iteration. ActionResults refer to outcome (pass/fail) of test steps that are executed as part of a running a manual test. Including the ActionResults flag gets the outcome of test steps in the actionResults section and test parameters in the parameters section for each test iteration. + */ + getTestIterations(project, runId, testCaseResultId, includeActionResults) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + includeActionResults: includeActionResults, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "73eb9074-3446-4c44-8296-2f811950ff8d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestIterationDetailsModel, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.LinkedWorkItemsQuery} workItemQuery + * @param {string} project - Project ID or project name + */ + getLinkedWorkItemsByQuery(workItemQuery, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a4dcb25b-9878-49ea-abfd-e440bd9b1dcd", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, workItemQuery, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test run message logs + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + */ + getTestRunLogs(project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a1e55200-637e-42e9-a7c0-7e5bfdedb1b3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestMessageLogDetails, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a test point. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the point. + * @param {number} pointIds - ID of the test point to get. + * @param {string} witFields - Comma-separated list of work item field names. + */ + getPoint(project, planId, suiteId, pointIds, witFields) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + planId: planId, + suiteId: suiteId, + pointIds: pointIds + }; + let queryValues = { + witFields: witFields, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test points. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the points. + * @param {string} witFields - Comma-separated list of work item field names. + * @param {string} configurationId - Get test points for specific configuration. + * @param {string} testCaseId - Get test points for a specific test case, valid when configurationId is not set. + * @param {string} testPointIds - Get test points for comma-separated list of test point IDs, valid only when configurationId and testCaseId are not set. + * @param {boolean} includePointDetails - Include all properties for the test point. + * @param {number} skip - Number of test points to skip.. + * @param {number} top - Number of test points to return. + */ + getPoints(project, planId, suiteId, witFields, configurationId, testCaseId, testPointIds, includePointDetails, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + planId: planId, + suiteId: suiteId + }; + let queryValues = { + witFields: witFields, + configurationId: configurationId, + testCaseId: testCaseId, + testPointIds: testPointIds, + includePointDetails: includePointDetails, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test points. + * + * @param {TestInterfaces.PointUpdateModel} pointUpdateModel - Data to update. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan. + * @param {number} suiteId - ID of the suite that contains the points. + * @param {string} pointIds - ID of the test point to get. Use a comma-separated list of IDs to update multiple test points. + */ + updateTestPoints(pointUpdateModel, project, planId, suiteId, pointIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + planId: planId, + suiteId: suiteId, + pointIds: pointIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "3bcfd5c8-be62-488e-b1da-b8289ce9299c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, pointUpdateModel, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPoint, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test points using query. + * + * @param {TestInterfaces.TestPointsQuery} query - TestPointsQuery to get test points. + * @param {string} project - Project ID or project name + * @param {number} skip - Number of test points to skip.. + * @param {number} top - Number of test points to return. + */ + getPointsByQuery(query, project, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "b4264fd0-a5d1-43e2-82a5-b9c46b7da9ce", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestPointsQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress + */ + getTestResultDetailsForBuild(project, buildId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + groupBy: groupBy, + '$filter': filter, + '$orderby': orderby, + shouldIncludeResults: shouldIncludeResults, + queryRunSummaryForInProgress: queryRunSummaryForInProgress, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "efb387b0-10d5-42e7-be40-95e06ee9430f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {string} groupBy + * @param {string} filter + * @param {string} orderby + * @param {boolean} shouldIncludeResults + * @param {boolean} queryRunSummaryForInProgress + */ + getTestResultDetailsForRelease(project, releaseId, releaseEnvId, publishContext, groupBy, filter, orderby, shouldIncludeResults, queryRunSummaryForInProgress) { + return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + groupBy: groupBy, + '$filter': filter, + '$orderby': orderby, + shouldIncludeResults: shouldIncludeResults, + queryRunSummaryForInProgress: queryRunSummaryForInProgress, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "b834ec7e-35bb-450f-a3c8-802e70ca40dd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsDetails, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultDocument} document + * @param {string} project - Project ID or project name + * @param {number} runId + */ + publishTestResultDocument(document, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "370ca04b-8eec-4ca8-8ba3-d24dca228791", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {string[]} fields + * @param {string} continuationToken + */ + getResultGroupsByBuild(project, buildId, publishContext, fields, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + if (publishContext == null) { + throw new TypeError('publishContext can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + fields: fields && fields.join(","), + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "d279d052-c55a-4204-b913-42f733b52958", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {string} publishContext + * @param {number} releaseEnvId + * @param {string[]} fields + * @param {string} continuationToken + */ + getResultGroupsByRelease(project, releaseId, publishContext, releaseEnvId, fields, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (publishContext == null) { + throw new TypeError('publishContext can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + releaseId: releaseId, + publishContext: publishContext, + releaseEnvId: releaseEnvId, + fields: fields && fields.join(","), + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "ef5ce5d4-a4e5-47ee-804c-354518f8d03f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of test Result meta data details for corresponding testcasereferenceId + * + * @param {string[]} testReferenceIds - TestCaseReference Ids of the test Result to be queried, comma separated list of valid ids (limit no. of ids 200). + * @param {string} project - Project ID or project name + */ + queryTestResultsMetaData(testReferenceIds, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "afa7830e-67a7-4336-8090-2b448ca80295", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testReferenceIds, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test result retention settings + * + * @param {string} project - Project ID or project name + */ + getResultRetentionSettings(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a3206d9e-fa8d-42d3-88cb-f75c51e69cde", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test result retention settings + * + * @param {TestInterfaces.ResultRetentionSettings} retentionSettings - Test result retention settings details to be updated + * @param {string} project - Project ID or project name + */ + updateResultRetentionSettings(retentionSettings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "a3206d9e-fa8d-42d3-88cb-f75c51e69cde", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, retentionSettings, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.ResultRetentionSettings, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add test results to a test run. + * + * @param {TestInterfaces.TestCaseResult[]} results - List of test results to add. + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID into which test results to add. + */ + addTestResultsToTestRun(results, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, results, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a test result for a test run. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID of a test result to fetch. + * @param {number} testCaseResultId - Test result ID. + * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations, WorkItems and SubResults. + */ + getTestResultById(project, runId, testCaseResultId, detailsToInclude) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId, + testCaseResultId: testCaseResultId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test results for a test run. + * + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID of test results to fetch. + * @param {TestInterfaces.ResultDetails} detailsToInclude - Details to include with test results. Default is None. Other values are Iterations and WorkItems. + * @param {number} skip - Number of test results to skip from beginning. + * @param {number} top - Number of test results to return. Maximum is 1000 when detailsToInclude is None and 200 otherwise. + * @param {TestInterfaces.TestOutcome[]} outcomes - Comma separated list of test outcomes to filter test results. + */ + getTestResults(project, runId, detailsToInclude, skip, top, outcomes) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + let queryValues = { + detailsToInclude: detailsToInclude, + '$skip': skip, + '$top': top, + outcomes: outcomes && outcomes.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test results in a test run. + * + * @param {TestInterfaces.TestCaseResult[]} results - List of test results to update. + * @param {string} project - Project ID or project name + * @param {number} runId - Test run ID whose test results to update. + */ + updateTestResults(results, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "4637d869-3a76-4468-8057-0bb02aa385cf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, results, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestCaseResult, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * This API will return results by Ids with fields specified/trend for particular automated test method. We are still improving this API and have not finalized proper signature and contract. + * + * @param {TestInterfaces.TestResultsQuery} query + * @param {string} project - Project ID or project name + */ + getTestResultsByQuery(query, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.6", "Test", "6711da49-8e6f-4d35-9f73-cef7a3c81a5b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, query, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultsQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken + */ + getTestResultsByBuild(project, buildId, publishContext, outcomes, top, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "3c191b88-615b-4be2-b7d9-5ff9141e91d4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvid + * @param {string} publishContext + * @param {TestInterfaces.TestOutcome[]} outcomes + * @param {number} top + * @param {string} continuationToken + */ + getTestResultsByRelease(project, releaseId, releaseEnvid, publishContext, outcomes, top, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + releaseId: releaseId, + releaseEnvid: releaseEnvid, + publishContext: publishContext, + outcomes: outcomes && outcomes.join(","), + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "ce01820b-83f3-4c15-a583-697a43292c4e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} buildId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.BuildReference} buildToCompare + */ + queryTestResultsReportForBuild(project, buildId, publishContext, includeFailureDetails, buildToCompare) { + return __awaiter(this, void 0, void 0, function* () { + if (buildId == null) { + throw new TypeError('buildId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildId: buildId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + buildToCompare: buildToCompare, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "000ef77b-fea2-498d-a10d-ad1a037f559f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} releaseId + * @param {number} releaseEnvId + * @param {string} publishContext + * @param {boolean} includeFailureDetails + * @param {TestInterfaces.ReleaseReference} releaseToCompare + */ + queryTestResultsReportForRelease(project, releaseId, releaseEnvId, publishContext, includeFailureDetails, releaseToCompare) { + return __awaiter(this, void 0, void 0, function* () { + if (releaseId == null) { + throw new TypeError('releaseId can not be null or undefined'); + } + if (releaseEnvId == null) { + throw new TypeError('releaseEnvId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + releaseId: releaseId, + releaseEnvId: releaseEnvId, + publishContext: publishContext, + includeFailureDetails: includeFailureDetails, + releaseToCompare: releaseToCompare, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "85765790-ac68-494e-b268-af36c3929744", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.ReleaseReference[]} releases + * @param {string} project - Project ID or project name + */ + queryTestResultsSummaryForReleases(releases, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "85765790-ac68-494e-b268-af36c3929744", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, releases, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestResultSummary, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultsContext} resultsContext + * @param {string} project - Project ID or project name + * @param {number[]} workItemIds + */ + queryTestSummaryByRequirement(resultsContext, project, workItemIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + workItemIds: workItemIds && workItemIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "cd08294e-308d-4460-a46e-4cfdefba0b4b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, resultsContext, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSummaryForWorkItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + queryResultTrendForBuild(filter, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "fbc82a85-0786-4442-88bb-eb0fda6b01b0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestResultTrendFilter} filter + * @param {string} project - Project ID or project name + */ + queryResultTrendForRelease(filter, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "dd178e93-d8dd-4887-9635-d6b9560b7b6e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.AggregatedDataForResultTrend, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get test run statistics , used when we want to get summary of a run by outcome. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + */ + getTestRunStatistics(project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "0a42c424-d764-4a16-a2d5-5c85f87d0ae8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRunStatistic, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create new test run. + * + * @param {TestInterfaces.RunCreateModel} testRun - Run details RunCreateModel + * @param {string} project - Project ID or project name + */ + createTestRun(testRun, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testRun, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test run by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to delete. + */ + deleteTestRun(project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a test run by its ID. + * + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to get. + * @param {boolean} includeDetails - Default value is true. It includes details like run statistics, release, build, test environment, post process state, and more. + */ + getTestRunById(project, runId, includeDetails) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + let queryValues = { + includeDetails: includeDetails, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test runs. + * + * @param {string} project - Project ID or project name + * @param {string} buildUri - URI of the build that the runs used. + * @param {string} owner - Team foundation ID of the owner of the runs. + * @param {string} tmiRunId + * @param {number} planId - ID of the test plan that the runs are a part of. + * @param {boolean} includeRunDetails - If true, include all the properties of the runs. + * @param {boolean} automated - If true, only returns automated runs. + * @param {number} skip - Number of test runs to skip. + * @param {number} top - Number of test runs to return. + */ + getTestRuns(project, buildUri, owner, tmiRunId, planId, includeRunDetails, automated, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + buildUri: buildUri, + owner: owner, + tmiRunId: tmiRunId, + planId: planId, + includeRunDetails: includeRunDetails, + automated: automated, + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Query Test Runs based on filters. Mandatory fields are minLastUpdatedDate and maxLastUpdatedDate. + * + * @param {string} project - Project ID or project name + * @param {Date} minLastUpdatedDate - Minimum Last Modified Date of run to be queried (Mandatory). + * @param {Date} maxLastUpdatedDate - Maximum Last Modified Date of run to be queried (Mandatory, difference between min and max date can be atmost 7 days). + * @param {TestInterfaces.TestRunState} state - Current state of the Runs to be queried. + * @param {number[]} planIds - Plan Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {boolean} isAutomated - Automation type of the Runs to be queried. + * @param {TestInterfaces.TestRunPublishContext} publishContext - PublishContext of the Runs to be queried. + * @param {number[]} buildIds - Build Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} buildDefIds - Build Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {string} branchName - Source Branch name of the Runs to be queried. + * @param {number[]} releaseIds - Release Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseDefIds - Release Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseEnvIds - Release Environment Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {number[]} releaseEnvDefIds - Release Environment Definition Ids of the Runs to be queried, comma separated list of valid ids (limit no. of ids 10). + * @param {string} runTitle - Run Title of the Runs to be queried. + * @param {number} top - Number of runs to be queried. Limit is 100 + * @param {string} continuationToken - continuationToken received from previous batch or null for first batch. It is not supposed to be created (or altered, if received from last batch) by user. + */ + queryTestRuns(project, minLastUpdatedDate, maxLastUpdatedDate, state, planIds, isAutomated, publishContext, buildIds, buildDefIds, branchName, releaseIds, releaseDefIds, releaseEnvIds, releaseEnvDefIds, runTitle, top, continuationToken) { + return __awaiter(this, void 0, void 0, function* () { + if (minLastUpdatedDate == null) { + throw new TypeError('minLastUpdatedDate can not be null or undefined'); + } + if (maxLastUpdatedDate == null) { + throw new TypeError('maxLastUpdatedDate can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + minLastUpdatedDate: minLastUpdatedDate, + maxLastUpdatedDate: maxLastUpdatedDate, + state: state, + planIds: planIds && planIds.join(","), + isAutomated: isAutomated, + publishContext: publishContext, + buildIds: buildIds && buildIds.join(","), + buildDefIds: buildDefIds && buildDefIds.join(","), + branchName: branchName, + releaseIds: releaseIds && releaseIds.join(","), + releaseDefIds: releaseDefIds && releaseDefIds.join(","), + releaseEnvIds: releaseEnvIds && releaseEnvIds.join(","), + releaseEnvDefIds: releaseEnvDefIds && releaseEnvDefIds.join(","), + runTitle: runTitle, + '$top': top, + continuationToken: continuationToken, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update test run by its ID. + * + * @param {TestInterfaces.RunUpdateModel} runUpdateModel - Run details RunUpdateModel + * @param {string} project - Project ID or project name + * @param {number} runId - ID of the run to update. + */ + updateTestRun(runUpdateModel, project, runId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + runId: runId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "cadb3810-d47d-4a3c-a234-fe5f3be50138", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, runUpdateModel, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestRun, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a test session + * + * @param {TestInterfaces.TestSession} testSession - Test session details for creation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createTestSession(testSession, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testSession, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of test sessions + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {number} period - Period in days from now, for which test sessions are fetched. + * @param {boolean} allSessions - If false, returns test sessions for current user. Otherwise, it returns test sessions for all users + * @param {boolean} includeAllProperties - If true, it returns all properties of the test sessions. Otherwise, it returns the skinny version. + * @param {TestInterfaces.TestSessionSource} source - Source of the test session. + * @param {boolean} includeOnlyCompletedSessions - If true, it returns test sessions in completed state. Otherwise, it returns test sessions for all states + */ + getTestSessions(teamContext, period, allSessions, includeAllProperties, source, includeOnlyCompletedSessions) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + let queryValues = { + period: period, + allSessions: allSessions, + includeAllProperties: includeAllProperties, + source: source, + includeOnlyCompletedSessions: includeOnlyCompletedSessions, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a test session + * + * @param {TestInterfaces.TestSession} testSession - Test session details for update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTestSession(testSession, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "1500b4b4-6c69-4ca6-9b18-35e9e97fe2ac", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, testSession, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestSession, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} sharedParameterId + */ + deleteSharedParameter(project, sharedParameterId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + sharedParameterId: sharedParameterId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8300eeca-0f8c-4eff-a089-d2dda409c41f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} sharedStepId + */ + deleteSharedStep(project, sharedStepId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + sharedStepId: sharedStepId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "fabb3cc9-e3f8-40b7-8b62-24cc4b73fccf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add test cases to suite. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the test suite to which the test cases must be added. + * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. + */ + addTestCasesToSuite(project, planId, suiteId, testCaseIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a specific test case in a test suite with test case id. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suites. + * @param {number} suiteId - ID of the suite that contains the test case. + * @param {number} testCaseIds - ID of the test case to get. + */ + getTestCaseById(project, planId, suiteId, testCaseIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all test cases in a suite. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suites. + * @param {number} suiteId - ID of the suite to get. + */ + getTestCases(project, planId, suiteId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * The test points associated with the test cases are removed from the test suite. The test case work item is not deleted from the system. See test cases resource to delete a test case permanently. + * + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the suite to get. + * @param {string} testCaseIds - IDs of the test cases to remove from the suite. + */ + removeTestCasesFromSuiteUrl(project, planId, suiteId, testCaseIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the properties of the test case association in a suite. + * + * @param {TestInterfaces.SuiteTestCaseUpdateModel} suiteTestCaseUpdateModel - Model for updation of the properties of test case suite association. + * @param {string} project - Project ID or project name + * @param {number} planId - ID of the test plan that contains the suite. + * @param {number} suiteId - ID of the test suite to which the test cases must be added. + * @param {string} testCaseIds - IDs of the test cases to add to the suite. Ids are specified in comma separated format. + */ + updateSuiteTestCases(suiteTestCaseUpdateModel, project, planId, suiteId, testCaseIds) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + action: "TestCases", + project: project, + planId: planId, + suiteId: suiteId, + testCaseIds: testCaseIds + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "Test", "a4a1ec1c-b03f-41ca-8857-704594ecf58e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, suiteTestCaseUpdateModel, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a test case. + * + * @param {string} project - Project ID or project name + * @param {number} testCaseId - Id of test case to delete. + */ + deleteTestCase(project, testCaseId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testCaseId: testCaseId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "4d472e0f-e32c-4ef8-adf4-a4078772889c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get history of a test method using TestHistoryQuery + * + * @param {TestInterfaces.TestHistoryQuery} filter - TestHistoryQuery to get history + * @param {string} project - Project ID or project name + */ + queryTestHistory(filter, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "Test", "929fd86c-3e38-4d8c-b4b6-90df256e5971", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.TestHistoryQuery, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.TestSettings} testSettings + * @param {string} project - Project ID or project name + */ + createTestSettings(testSettings, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, testSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + deleteTestSettings(project, testSettingsId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testSettingsId: testSettingsId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} testSettingsId + */ + getTestSettingsById(project, testSettingsId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + testSettingsId: testSettingsId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "8133ce14-962f-42af-a5f9-6aa9defcb9c8", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TestInterfaces.WorkItemToTestLinks} workItemToTestLinks + * @param {string} project - Project ID or project name + */ + addWorkItemToTestLinks(workItemToTestLinks, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "371b1655-ce05-412e-a113-64cc77bb78d2", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, workItemToTestLinks, options); + let ret = this.formatResponse(res.result, TestInterfaces.TypeInfo.WorkItemToTestLinks, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} testName + * @param {number} workItemId + */ + deleteTestMethodToWorkItemLink(project, testName, workItemId) { + return __awaiter(this, void 0, void 0, function* () { + if (testName == null) { + throw new TypeError('testName can not be null or undefined'); + } + if (workItemId == null) { + throw new TypeError('workItemId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + testName: testName, + workItemId: workItemId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "7b0bdee3-a354-47f9-a42c-89018d7808d5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} testName + */ + queryTestMethodLinkedWorkItems(project, testName) { + return __awaiter(this, void 0, void 0, function* () { + if (testName == null) { + throw new TypeError('testName can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + testName: testName, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "7b0bdee3-a354-47f9-a42c-89018d7808d5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} workItemCategory + * @param {string} automatedTestName + * @param {number} testCaseId + * @param {Date} maxCompleteDate + * @param {number} days + * @param {number} workItemCount + */ + queryTestResultWorkItems(project, workItemCategory, automatedTestName, testCaseId, maxCompleteDate, days, workItemCount) { + return __awaiter(this, void 0, void 0, function* () { + if (workItemCategory == null) { + throw new TypeError('workItemCategory can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + workItemCategory: workItemCategory, + automatedTestName: automatedTestName, + testCaseId: testCaseId, + maxCompleteDate: maxCompleteDate, + days: days, + '$workItemCount': workItemCount, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "Test", "926ff5dc-137f-45f0-bd51-9412fa9810ce", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +TestApi.RESOURCE_AREA_ID = "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"; +exports.TestApi = TestApi; diff --git a/node_modules/azure-devops-node-api/TfvcApi.d.ts b/node_modules/azure-devops-node-api/TfvcApi.d.ts new file mode 100644 index 0000000..39ab1bd --- /dev/null +++ b/node_modules/azure-devops-node-api/TfvcApi.d.ts @@ -0,0 +1,253 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import TfvcInterfaces = require("./interfaces/TfvcInterfaces"); +export interface ITfvcApi extends basem.ClientApiBase { + getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; + getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; + getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; + getChangesetChanges(id?: number, skip?: number, top?: number): Promise; + createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; + getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + getChangesets(project?: string, maxCommentLength?: number, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; + getChangesetWorkItems(id?: number): Promise; + getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + getLabelItems(labelId: string, top?: number, skip?: number): Promise; + getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; + getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; + getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; + getShelveset(shelvesetId: string, requestData?: TfvcInterfaces.TfvcShelvesetRequestData): Promise; + getShelvesets(requestData?: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; + getShelvesetWorkItems(shelvesetId: string): Promise; + getTfvcStatistics(project?: string, scopePath?: string): Promise; +} +export declare class TfvcApi extends basem.ClientApiBase implements ITfvcApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "8aa40520-446d-40e6-89f6-9c9f9ce44c48"; + /** + * Get a single branch hierarchy at the given path with parents or children as specified. + * + * @param {string} path - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. + * @param {string} project - Project ID or project name + * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False + * @param {boolean} includeChildren - Return child branches, if there are any. Default: False + */ + getBranch(path: string, project?: string, includeParent?: boolean, includeChildren?: boolean): Promise; + /** + * Get a collection of branch roots -- first-level children, branches with no parents. + * + * @param {string} project - Project ID or project name + * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False + * @param {boolean} includeChildren - Return the child branches for each root branch. Default: False + * @param {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False + */ + getBranches(project?: string, includeParent?: boolean, includeChildren?: boolean, includeDeleted?: boolean, includeLinks?: boolean): Promise; + /** + * Get branch hierarchies below the specified scopePath + * + * @param {string} scopePath - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. + * @param {string} project - Project ID or project name + * @param {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False + */ + getBranchRefs(scopePath: string, project?: string, includeDeleted?: boolean, includeLinks?: boolean): Promise; + /** + * Retrieve Tfvc changes for a given changeset. + * + * @param {number} id - ID of the changeset. Default: null + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + */ + getChangesetChanges(id?: number, skip?: number, top?: number): Promise; + /** + * Create a new changeset. + * + * @param {TfvcInterfaces.TfvcChangeset} changeset + * @param {string} project - Project ID or project name + */ + createChangeset(changeset: TfvcInterfaces.TfvcChangeset, project?: string): Promise; + /** + * Retrieve a Tfvc Changeset + * + * @param {number} id - Changeset Id to retrieve. + * @param {string} project - Project ID or project name + * @param {number} maxChangeCount - Number of changes to return (maximum 100 changes) Default: 0 + * @param {boolean} includeDetails - Include policy details and check-in notes in the response. Default: false + * @param {boolean} includeWorkItems - Include workitems. Default: false + * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null + * @param {boolean} includeSourceRename - Include renames. Default: false + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + */ + getChangeset(id: number, project?: string, maxChangeCount?: number, includeDetails?: boolean, includeWorkItems?: boolean, maxCommentLength?: number, includeSourceRename?: boolean, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + /** + * Retrieve Tfvc Changesets + * + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + */ + getChangesets(project?: string, maxCommentLength?: number, skip?: number, top?: number, orderby?: string, searchCriteria?: TfvcInterfaces.TfvcChangesetSearchCriteria): Promise; + /** + * Returns changesets for a given list of changeset Ids. + * + * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs. + */ + getBatchedChangesets(changesetsRequestData: TfvcInterfaces.TfvcChangesetsRequestData): Promise; + /** + * Retrieves the work items associated with a particular changeset. + * + * @param {number} id - ID of the changeset. + */ + getChangesetWorkItems(id?: number): Promise; + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + */ + getItemsBatch(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + */ + getItemsBatchZip(itemRequestData: TfvcInterfaces.TfvcItemRequestData, project?: string): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItem(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItemContent(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + /** + * Get a list of Tfvc items + * + * @param {string} project - Project ID or project name + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {boolean} includeLinks - True to include links. + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItems(project?: string, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, includeLinks?: boolean, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItemText(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItemZip(path: string, project?: string, fileName?: string, download?: boolean, scopePath?: string, recursionLevel?: TfvcInterfaces.VersionControlRecursionType, versionDescriptor?: TfvcInterfaces.TfvcVersionDescriptor, includeContent?: boolean): Promise; + /** + * Get items under a label. + * + * @param {string} labelId - Unique identifier of label + * @param {number} top - Max number of items to return + * @param {number} skip - Number of items to skip + */ + getLabelItems(labelId: string, top?: number, skip?: number): Promise; + /** + * Get a single deep label. + * + * @param {string} labelId - Unique identifier of label + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount + * @param {string} project - Project ID or project name + */ + getLabel(labelId: string, requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string): Promise; + /** + * Get a collection of shallow label references. + * + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter + * @param {string} project - Project ID or project name + * @param {number} top - Max number of labels to return, defaults to 100 when undefined + * @param {number} skip - Number of labels to skip + */ + getLabels(requestData: TfvcInterfaces.TfvcLabelRequestData, project?: string, top?: number, skip?: number): Promise; + /** + * Get changes included in a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {number} top - Max number of changes to return + * @param {number} skip - Number of changes to skip + */ + getShelvesetChanges(shelvesetId: string, top?: number, skip?: number): Promise; + /** + * Get a single deep shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + */ + getShelveset(shelvesetId: string, requestData?: TfvcInterfaces.TfvcShelvesetRequestData): Promise; + /** + * Return a collection of shallow shelveset references. + * + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength + * @param {number} top - Max number of shelvesets to return + * @param {number} skip - Number of shelvesets to skip + */ + getShelvesets(requestData?: TfvcInterfaces.TfvcShelvesetRequestData, top?: number, skip?: number): Promise; + /** + * Get work items associated with a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + */ + getShelvesetWorkItems(shelvesetId: string): Promise; + /** + * Provides File Count and Uncompressed Bytes for a Collection/Project at a particular scope for TFVC. + * + * @param {string} project - Project ID or project name + * @param {string} scopePath - '$/' for collection, '$/project' for specific project + */ + getTfvcStatistics(project?: string, scopePath?: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/TfvcApi.js b/node_modules/azure-devops-node-api/TfvcApi.js new file mode 100644 index 0000000..e2a1e70 --- /dev/null +++ b/node_modules/azure-devops-node-api/TfvcApi.js @@ -0,0 +1,856 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const TfvcInterfaces = require("./interfaces/TfvcInterfaces"); +class TfvcApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Tfvc-api', options); + } + /** + * Get a single branch hierarchy at the given path with parents or children as specified. + * + * @param {string} path - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. + * @param {string} project - Project ID or project name + * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False + * @param {boolean} includeChildren - Return child branches, if there are any. Default: False + */ + getBranch(path, project, includeParent, includeChildren) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + includeParent: includeParent, + includeChildren: includeChildren, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of branch roots -- first-level children, branches with no parents. + * + * @param {string} project - Project ID or project name + * @param {boolean} includeParent - Return the parent branch, if there is one. Default: False + * @param {boolean} includeChildren - Return the child branches for each root branch. Default: False + * @param {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False + */ + getBranches(project, includeParent, includeChildren, includeDeleted, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + includeParent: includeParent, + includeChildren: includeChildren, + includeDeleted: includeDeleted, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranch, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get branch hierarchies below the specified scopePath + * + * @param {string} scopePath - Full path to the branch. Default: $/ Examples: $/, $/MyProject, $/MyProject/SomeFolder. + * @param {string} project - Project ID or project name + * @param {boolean} includeDeleted - Return deleted branches. Default: False + * @param {boolean} includeLinks - Return links. Default: False + */ + getBranchRefs(scopePath, project, includeDeleted, includeLinks) { + return __awaiter(this, void 0, void 0, function* () { + if (scopePath == null) { + throw new TypeError('scopePath can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + scopePath: scopePath, + includeDeleted: includeDeleted, + includeLinks: includeLinks, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "bc1f417e-239d-42e7-85e1-76e80cb2d6eb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcBranchRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve Tfvc changes for a given changeset. + * + * @param {number} id - ID of the changeset. Default: null + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + */ + getChangesetChanges(id, skip, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + let queryValues = { + '$skip': skip, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "f32b86f2-15b9-4fe6-81b1-6f8938617ee5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new changeset. + * + * @param {TfvcInterfaces.TfvcChangeset} changeset + * @param {string} project - Project ID or project name + */ + createChangeset(changeset, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, changeset, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve a Tfvc Changeset + * + * @param {number} id - Changeset Id to retrieve. + * @param {string} project - Project ID or project name + * @param {number} maxChangeCount - Number of changes to return (maximum 100 changes) Default: 0 + * @param {boolean} includeDetails - Include policy details and check-in notes in the response. Default: false + * @param {boolean} includeWorkItems - Include workitems. Default: false + * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null + * @param {boolean} includeSourceRename - Include renames. Default: false + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + */ + getChangeset(id, project, maxChangeCount, includeDetails, includeWorkItems, maxCommentLength, includeSourceRename, skip, top, orderby, searchCriteria) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + maxChangeCount: maxChangeCount, + includeDetails: includeDetails, + includeWorkItems: includeWorkItems, + maxCommentLength: maxCommentLength, + includeSourceRename: includeSourceRename, + '$skip': skip, + '$top': top, + '$orderby': orderby, + searchCriteria: searchCriteria, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangeset, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieve Tfvc Changesets + * + * @param {string} project - Project ID or project name + * @param {number} maxCommentLength - Include details about associated work items in the response. Default: null + * @param {number} skip - Number of results to skip. Default: null + * @param {number} top - The maximum number of results to return. Default: null + * @param {string} orderby - Results are sorted by ID in descending order by default. Use id asc to sort by ID in ascending order. + * @param {TfvcInterfaces.TfvcChangesetSearchCriteria} searchCriteria - Following criteria available (.itemPath, .version, .versionType, .versionOption, .author, .fromId, .toId, .fromDate, .toDate) Default: null + */ + getChangesets(project, maxCommentLength, skip, top, orderby, searchCriteria) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + maxCommentLength: maxCommentLength, + '$skip': skip, + '$top': top, + '$orderby': orderby, + searchCriteria: searchCriteria, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "tfvc", "0bc8f0a4-6bfb-42a9-ba84-139da7b99c49", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns changesets for a given list of changeset Ids. + * + * @param {TfvcInterfaces.TfvcChangesetsRequestData} changesetsRequestData - List of changeset IDs. + */ + getBatchedChangesets(changesetsRequestData) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "b7e7c173-803c-4fea-9ec8-31ee35c5502a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, changesetsRequestData, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChangesetRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves the work items associated with a particular changeset. + * + * @param {number} id - ID of the changeset. + */ + getChangesetWorkItems(id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "64ae0bea-1d71-47c9-a9e5-fe73f5ea0ff4", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + */ + getItemsBatch(itemRequestData, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, itemRequestData, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Post for retrieving a set of items given a list of paths or a long path. Allows for specifying the recursionLevel and version descriptors for each path. + * + * @param {TfvcInterfaces.TfvcItemRequestData} itemRequestData + * @param {string} project - Project ID or project name + */ + getItemsBatchZip(itemRequestData, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "fe6f827b-5f64-480f-b8af-1eca3b80e833", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItem(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItemContent(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of Tfvc items + * + * @param {string} project - Project ID or project name + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {boolean} includeLinks - True to include links. + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor + */ + getItems(project, scopePath, recursionLevel, includeLinks, versionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + scopePath: scopePath, + recursionLevel: recursionLevel, + includeLinks: includeLinks, + versionDescriptor: versionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItemText(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a download or just sent as a stream in the response. Doesn't apply to zipped content which is always returned as a download. + * + * @param {string} path - Version control path of an individual item to return. + * @param {string} project - Project ID or project name + * @param {string} fileName - file name of item returned. + * @param {boolean} download - If true, create a downloadable attachment. + * @param {string} scopePath - Version control path of a folder to return multiple items. + * @param {TfvcInterfaces.VersionControlRecursionType} recursionLevel - None (just the item), or OneLevel (contents of a folder). + * @param {TfvcInterfaces.TfvcVersionDescriptor} versionDescriptor - Version descriptor. Default is null. + * @param {boolean} includeContent - Set to true to include item content when requesting json. Default is false. + */ + getItemZip(path, project, fileName, download, scopePath, recursionLevel, versionDescriptor, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + path: path, + fileName: fileName, + download: download, + scopePath: scopePath, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "ba9fc436-9a38-4578-89d6-e4f3241f5040", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get items under a label. + * + * @param {string} labelId - Unique identifier of label + * @param {number} top - Max number of items to return + * @param {number} skip - Number of items to skip + */ + getLabelItems(labelId, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + labelId: labelId + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "06166e34-de17-4b60-8cd1-23182a346fda", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single deep label. + * + * @param {string} labelId - Unique identifier of label + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - maxItemCount + * @param {string} project - Project ID or project name + */ + getLabel(labelId, requestData, project) { + return __awaiter(this, void 0, void 0, function* () { + if (requestData == null) { + throw new TypeError('requestData can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + labelId: labelId + }; + let queryValues = { + requestData: requestData, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of shallow label references. + * + * @param {TfvcInterfaces.TfvcLabelRequestData} requestData - labelScope, name, owner, and itemLabelFilter + * @param {string} project - Project ID or project name + * @param {number} top - Max number of labels to return, defaults to 100 when undefined + * @param {number} skip - Number of labels to skip + */ + getLabels(requestData, project, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + if (requestData == null) { + throw new TypeError('requestData can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + requestData: requestData, + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a5d9bd7f-b661-4d0e-b9be-d9c16affae54", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcLabelRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get changes included in a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {number} top - Max number of changes to return + * @param {number} skip - Number of changes to skip + */ + getShelvesetChanges(shelvesetId, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + if (shelvesetId == null) { + throw new TypeError('shelvesetId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + shelvesetId: shelvesetId, + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "dbaf075b-0445-4c34-9e5b-82292f856522", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcChange, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single deep shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - includeDetails, includeWorkItems, maxChangeCount, and maxCommentLength + */ + getShelveset(shelvesetId, requestData) { + return __awaiter(this, void 0, void 0, function* () { + if (shelvesetId == null) { + throw new TypeError('shelvesetId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + shelvesetId: shelvesetId, + requestData: requestData, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelveset, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Return a collection of shallow shelveset references. + * + * @param {TfvcInterfaces.TfvcShelvesetRequestData} requestData - name, owner, and maxCommentLength + * @param {number} top - Max number of shelvesets to return + * @param {number} skip - Number of shelvesets to skip + */ + getShelvesets(requestData, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + requestData: requestData, + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e36d44fb-e907-4b0a-b194-f83f1ed32ad3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, TfvcInterfaces.TypeInfo.TfvcShelvesetRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get work items associated with a shelveset. + * + * @param {string} shelvesetId - Shelveset's unique ID + */ + getShelvesetWorkItems(shelvesetId) { + return __awaiter(this, void 0, void 0, function* () { + if (shelvesetId == null) { + throw new TypeError('shelvesetId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + shelvesetId: shelvesetId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "a7a0c1c1-373e-425a-b031-a519474d743d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Provides File Count and Uncompressed Bytes for a Collection/Project at a particular scope for TFVC. + * + * @param {string} project - Project ID or project name + * @param {string} scopePath - '$/' for collection, '$/project' for specific project + */ + getTfvcStatistics(project, scopePath) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + scopePath: scopePath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "tfvc", "e15c74c0-3605-40e0-aed4-4cc61e549ed8", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +TfvcApi.RESOURCE_AREA_ID = "8aa40520-446d-40e6-89f6-9c9f9ce44c48"; +exports.TfvcApi = TfvcApi; diff --git a/node_modules/azure-devops-node-api/ThirdPartyNotice.txt b/node_modules/azure-devops-node-api/ThirdPartyNotice.txt new file mode 100644 index 0000000..607063e --- /dev/null +++ b/node_modules/azure-devops-node-api/ThirdPartyNotice.txt @@ -0,0 +1,686 @@ + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +This Visual Studio Team Services extension (vsts-task-lib) is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Visual Studio Team Services extension. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. + +1. @types/events (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +2. @types/glob (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +3. @types/minimatch (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +4. @types/node (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +5. @types/shelljs (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +6. balanced-match (git://github.com/juliangruber/balanced-match.git) +7. brace-expansion (git://github.com/juliangruber/brace-expansion.git) +8. concat-map (git://github.com/substack/node-concat-map.git) +9. fs.realpath (git+https://github.com/isaacs/fs.realpath.git) +10. glob (git://github.com/isaacs/node-glob.git) +11. inflight (git+https://github.com/npm/inflight.git) +12. inherits (git://github.com/isaacs/inherits.git) +13. interpret (git://github.com/tkellen/node-interpret.git) +14. minimatch (git://github.com/isaacs/minimatch.git) +15. once (git://github.com/isaacs/once.git) +16. path-is-absolute (git+https://github.com/sindresorhus/path-is-absolute.git) +17. path-parse (git+https://github.com/jbgutierrez/path-parse.git) +18. rechoir (git://github.com/tkellen/node-rechoir.git) +19. resolve (git://github.com/browserify/node-resolve.git) +20. shelljs (git://github.com/shelljs/shelljs.git) +21. tunnel (git+https://github.com/koichik/node-tunnel.git) +22. typed-rest-client (git+https://github.com/Microsoft/typed-rest-client.git) +23. typescript (git+https://github.com/Microsoft/TypeScript.git) +24. underscore (git://github.com/jashkenas/underscore.git) +25. wrappy (git+https://github.com/npm/wrappy.git) + + +%% @types/events NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE +========================================= +END OF @types/events NOTICES, INFORMATION, AND LICENSE + +%% @types/glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE +========================================= +END OF @types/glob NOTICES, INFORMATION, AND LICENSE + +%% @types/minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE +========================================= +END OF @types/minimatch NOTICES, INFORMATION, AND LICENSE + +%% @types/node NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE +========================================= +END OF @types/node NOTICES, INFORMATION, AND LICENSE + +%% @types/shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE +========================================= +END OF @types/shelljs NOTICES, INFORMATION, AND LICENSE + +%% balanced-match NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF balanced-match NOTICES, INFORMATION, AND LICENSE + +%% brace-expansion NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF brace-expansion NOTICES, INFORMATION, AND LICENSE + +%% concat-map NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF concat-map NOTICES, INFORMATION, AND LICENSE + +%% fs.realpath NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +---- + +This library bundles a version of the `fs.realpath` and `fs.realpathSync` +methods from Node.js v0.10 under the terms of the Node.js MIT license. + +Node's license follows, also included at the header of `old.js` which contains +the licensed code: + + Copyright Joyent, Inc. and other Node contributors. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +========================================= +END OF fs.realpath NOTICES, INFORMATION, AND LICENSE + +%% glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF glob NOTICES, INFORMATION, AND LICENSE + +%% inflight NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF inflight NOTICES, INFORMATION, AND LICENSE + +%% inherits NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF inherits NOTICES, INFORMATION, AND LICENSE + +%% interpret NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2014 Tyler Kellen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF interpret NOTICES, INFORMATION, AND LICENSE + +%% minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF minimatch NOTICES, INFORMATION, AND LICENSE + +%% once NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF once NOTICES, INFORMATION, AND LICENSE + +%% path-is-absolute NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF path-is-absolute NOTICES, INFORMATION, AND LICENSE + +%% path-parse NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +No license text available. +========================================= +END OF path-parse NOTICES, INFORMATION, AND LICENSE + +%% rechoir NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2015 Tyler Kellen + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF rechoir NOTICES, INFORMATION, AND LICENSE + +%% resolve NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF resolve NOTICES, INFORMATION, AND LICENSE + +%% shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Artur Adib nor the + names of the contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF shelljs NOTICES, INFORMATION, AND LICENSE + +%% tunnel NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2012 Koichi Kobayashi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF tunnel NOTICES, INFORMATION, AND LICENSE + +%% typed-rest-client NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Visual Studio Team Services Client for Node.js + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF typed-rest-client NOTICES, INFORMATION, AND LICENSE + +%% typescript NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS +========================================= +END OF typescript NOTICES, INFORMATION, AND LICENSE + +%% underscore NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative +Reporters & Editors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF underscore NOTICES, INFORMATION, AND LICENSE + +%% wrappy NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF wrappy NOTICES, INFORMATION, AND LICENSE + diff --git a/node_modules/azure-devops-node-api/VsoClient.d.ts b/node_modules/azure-devops-node-api/VsoClient.d.ts new file mode 100644 index 0000000..4559159 --- /dev/null +++ b/node_modules/azure-devops-node-api/VsoClient.d.ts @@ -0,0 +1,53 @@ +import * as restm from 'typed-rest-client/RestClient'; +import ifm = require("./interfaces/common/VsoBaseInterfaces"); +export interface ClientVersioningData { + /** + * The api version string to send in the request (e.g. "1.0" or "2.0-preview.2") + */ + apiVersion?: string; + /** + * The request path string to send the request to. Looked up via an options request with the location id. + */ + requestUrl?: string; +} +export declare class InvalidApiResourceVersionError implements Error { + name: string; + message: string; + constructor(message?: string); +} +/** + * Base class that should be used (derived from) to make requests to VSS REST apis + */ +export declare class VsoClient { + private static APIS_RELATIVE_PATH; + private static PREVIEW_INDICATOR; + private _locationsByAreaPromises; + private _initializationPromise; + restClient: restm.RestClient; + baseUrl: string; + basePath: string; + constructor(baseUrl: string, restClient: restm.RestClient); + protected autoNegotiateApiVersion(location: ifm.ApiResourceLocation, requestedVersion: string): string; + /** + * Gets the route template for a resource based on its location ID and negotiates the api version + */ + getVersioningData(apiVersion: string, area: string, locationId: string, routeValues: any, queryParams?: any): Promise; + /** + * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously + * set the request url and auth token manager. + */ + _setInitializationPromise(promise: Promise): void; + /** + * Gets information about an API resource location (route template, supported versions, etc.) + * + * @param area resource area name + * @param locationId Guid of the location to get + */ + beginGetLocation(area: string, locationId: string): Promise; + private beginGetAreaLocations; + resolveUrl(relativeUrl: string): string; + private queryParamsToStringHelper; + private queryParamsToString; + protected getRequestUrl(routeTemplate: string, area: string, resource: string, routeValues: any, queryParams?: any): string; + private replaceRouteValues; +} diff --git a/node_modules/azure-devops-node-api/VsoClient.js b/node_modules/azure-devops-node-api/VsoClient.js new file mode 100644 index 0000000..e7b2623 --- /dev/null +++ b/node_modules/azure-devops-node-api/VsoClient.js @@ -0,0 +1,253 @@ +"use strict"; +//******************************************************************************************************* +// significant portions of this file copied from: VSO\src\Vssf\WebPlatform\Platform\Scripts\VSS\WebApi\RestClient.ts +//******************************************************************************************************* +Object.defineProperty(exports, "__esModule", { value: true }); +/// Imports of 3rd Party /// +const url = require("url"); +const path = require("path"); +class InvalidApiResourceVersionError { + constructor(message) { + this.name = "Invalid resource version"; + this.message = message; + } +} +exports.InvalidApiResourceVersionError = InvalidApiResourceVersionError; +/** + * Base class that should be used (derived from) to make requests to VSS REST apis + */ +class VsoClient { + constructor(baseUrl, restClient) { + this.baseUrl = baseUrl; + this.basePath = url.parse(baseUrl).pathname; + this.restClient = restClient; + this._locationsByAreaPromises = {}; + this._initializationPromise = Promise.resolve(true); + } + autoNegotiateApiVersion(location, requestedVersion) { + let negotiatedVersion; + let apiVersion; + let apiVersionString; + if (requestedVersion) { + let apiVersionRegEx = new RegExp('(\\d+(\\.\\d+)?)(-preview(\\.(\\d+))?)?'); + // Need to handle 3 types of api versions + invalid apiversion + // '2.1-preview.1' = ["2.1-preview.1", "2.1", ".1", -preview.1", ".1", "1"] + // '2.1-preview' = ["2.1-preview", "2.1", ".1", "-preview", undefined, undefined] + // '2.1' = ["2.1", "2.1", ".1", undefined, undefined, undefined] + let isPreview = false; + let resourceVersion; + let regExExecArray = apiVersionRegEx.exec(requestedVersion); + if (regExExecArray) { + if (regExExecArray[1]) { + // we have an api version + apiVersion = +regExExecArray[1]; + apiVersionString = regExExecArray[1]; + if (regExExecArray[3]) { + // requesting preview + isPreview = true; + if (regExExecArray[5]) { + // we have a resource version + resourceVersion = +regExExecArray[5]; + } + } + // compare the location version and requestedversion + if (apiVersion <= +location.releasedVersion + || (!resourceVersion && apiVersion <= +location.maxVersion && isPreview) + || (resourceVersion && apiVersion <= +location.maxVersion && resourceVersion <= +location.resourceVersion)) { + negotiatedVersion = requestedVersion; + } + // else fall back to latest version of the resource from location + } + } + } + if (!negotiatedVersion) { + // Use the latest version of the resource if the api version was not specified in the request or if the requested version is higher then the location's supported version + if (apiVersion < +location.maxVersion) { + negotiatedVersion = apiVersionString + "-preview"; + } + else if (location.maxVersion === location.releasedVersion) { + negotiatedVersion = location.maxVersion; + } + else { + negotiatedVersion = location.maxVersion + "-preview." + location.resourceVersion; + } + } + return negotiatedVersion; + } + /** + * Gets the route template for a resource based on its location ID and negotiates the api version + */ + getVersioningData(apiVersion, area, locationId, routeValues, queryParams) { + let requestUrl; + return this.beginGetLocation(area, locationId) + .then((location) => { + if (!location) { + throw new Error("Failed to find api location for area: " + area + " id: " + locationId); + } + apiVersion = this.autoNegotiateApiVersion(location, apiVersion); + requestUrl = this.getRequestUrl(location.routeTemplate, location.area, location.resourceName, routeValues, queryParams); + return { + apiVersion: apiVersion, + requestUrl: requestUrl + }; + }); + } + /** + * Sets a promise that is waited on before any requests are issued. Can be used to asynchronously + * set the request url and auth token manager. + */ + _setInitializationPromise(promise) { + if (promise) { + this._initializationPromise = promise; + } + } + /** + * Gets information about an API resource location (route template, supported versions, etc.) + * + * @param area resource area name + * @param locationId Guid of the location to get + */ + beginGetLocation(area, locationId) { + return this._initializationPromise.then(() => { + return this.beginGetAreaLocations(area); + }).then((areaLocations) => { + return areaLocations[(locationId || "").toLowerCase()]; + }); + } + beginGetAreaLocations(area) { + let areaLocationsPromise = this._locationsByAreaPromises[area]; + if (!areaLocationsPromise) { + let requestUrl = this.resolveUrl(VsoClient.APIS_RELATIVE_PATH + "/" + area); + areaLocationsPromise = this.restClient.options(requestUrl) + .then((res) => { + let locationsLookup = {}; + let resourceLocations = res.result.value; + let i; + for (i = 0; i < resourceLocations.length; i++) { + let resourceLocation = resourceLocations[i]; + locationsLookup[resourceLocation.id.toLowerCase()] = resourceLocation; + } + // If we have completed successfully, cache the response. + this._locationsByAreaPromises[area] = areaLocationsPromise; + return locationsLookup; + }); + } + return areaLocationsPromise; + } + resolveUrl(relativeUrl) { + return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl)); + } + queryParamsToStringHelper(queryParams, prefix) { + if (queryParams == null || queryParams.length === 0) { + return ''; + } + let queryString = ''; + if (typeof (queryParams) !== 'string') { + for (let property in queryParams) { + if (queryParams.hasOwnProperty(property)) { + const prop = queryParams[property]; + const newPrefix = prefix + encodeURIComponent(property.toString()) + '.'; + queryString += this.queryParamsToStringHelper(prop, newPrefix); + } + } + } + if (queryString === '' && prefix.length > 0) { + // Date.prototype.toString() returns a string that is not valid for the REST API. + // Need to specially call `toUTCString()` instead for such cases + const queryValue = typeof queryParams === 'object' && 'toUTCString' in queryParams ? queryParams.toUTCString() : queryParams.toString(); + // Will always need to chop period off of end of prefix + queryString = prefix.slice(0, -1) + '=' + encodeURIComponent(queryValue) + '&'; + } + return queryString; + } + queryParamsToString(queryParams) { + const queryString = '?' + this.queryParamsToStringHelper(queryParams, ''); + // Will always need to slice either a ? or & off of the end + return queryString.slice(0, -1); + } + getRequestUrl(routeTemplate, area, resource, routeValues, queryParams) { + // Add area/resource route values (based on the location) + routeValues = routeValues || {}; + if (!routeValues.area) { + routeValues.area = area; + } + if (!routeValues.resource) { + routeValues.resource = resource; + } + // Replace templated route values + let relativeUrl = this.replaceRouteValues(routeTemplate, routeValues); + // Append query parameters to the end + if (queryParams) { + relativeUrl += this.queryParamsToString(queryParams); + } + // Resolve the relative url with the base + return url.resolve(this.baseUrl, path.join(this.basePath, relativeUrl)); + } + // helper method copied directly from VSS\WebAPI\restclient.ts + replaceRouteValues(routeTemplate, routeValues) { + let result = "", currentPathPart = "", paramName = "", insideParam = false, charIndex, routeTemplateLength = routeTemplate.length, c; + for (charIndex = 0; charIndex < routeTemplateLength; charIndex++) { + c = routeTemplate[charIndex]; + if (insideParam) { + if (c == "}") { + insideParam = false; + if (routeValues[paramName]) { + currentPathPart += encodeURIComponent(routeValues[paramName]); + } + else { + // Normalize param name in order to capture wild-card routes + let strippedParamName = paramName.replace(/[^a-z0-9]/ig, ''); + if (routeValues[strippedParamName]) { + currentPathPart += encodeURIComponent(routeValues[strippedParamName]); + } + } + paramName = ""; + } + else { + paramName += c; + } + } + else { + if (c == "/") { + if (currentPathPart) { + if (result) { + result += "/"; + } + result += currentPathPart; + currentPathPart = ""; + } + } + else if (c == "{") { + if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "{") { + // Escaped '{' + currentPathPart += c; + charIndex++; + } + else { + insideParam = true; + } + } + else if (c == '}') { + currentPathPart += c; + if ((charIndex + 1) < routeTemplateLength && routeTemplate[charIndex + 1] == "}") { + // Escaped '}' + charIndex++; + } + } + else { + currentPathPart += c; + } + } + } + if (currentPathPart) { + if (result) { + result += "/"; + } + result += currentPathPart; + } + return result; + } +} +VsoClient.APIS_RELATIVE_PATH = "_apis"; +VsoClient.PREVIEW_INDICATOR = "-preview."; +exports.VsoClient = VsoClient; diff --git a/node_modules/azure-devops-node-api/WebApi.d.ts b/node_modules/azure-devops-node-api/WebApi.d.ts new file mode 100644 index 0000000..ce357d5 --- /dev/null +++ b/node_modules/azure-devops-node-api/WebApi.d.ts @@ -0,0 +1,92 @@ +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import buildm = require('./BuildApi'); +import corem = require('./CoreApi'); +import dashboardm = require('./DashboardApi'); +import extmgmtm = require("./ExtensionManagementApi"); +import featuremgmtm = require("./FeatureManagementApi"); +import filecontainerm = require('./FileContainerApi'); +import gallerym = require('./GalleryApi'); +import gitm = require('./GitApi'); +import locationsm = require('./LocationsApi'); +import notificationm = require('./NotificationApi'); +import policym = require('./PolicyApi'); +import profilem = require('./ProfileApi'); +import projectm = require('./ProjectAnalysisApi'); +import releasem = require('./ReleaseApi'); +import securityrolesm = require('./SecurityRolesApi'); +import taskagentm = require('./TaskAgentApi'); +import taskm = require('./TaskApi'); +import testm = require('./TestApi'); +import tfvcm = require('./TfvcApi'); +import wikim = require('./WikiApi'); +import workm = require('./WorkApi'); +import workitemtrackingm = require('./WorkItemTrackingApi'); +import workitemtrackingprocessm = require('./WorkItemTrackingProcessApi'); +import workitemtrackingprocessdefinitionm = require('./WorkItemTrackingProcessDefinitionsApi'); +import * as rm from 'typed-rest-client/RestClient'; +import vsom = require('./VsoClient'); +import lim = require("./interfaces/LocationsInterfaces"); +/** + * Methods to return handler objects (see handlers folder) + */ +export declare function getBasicHandler(username: string, password: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler; +export declare function getNtlmHandler(username: string, password: string, workstation?: string, domain?: string): VsoBaseInterfaces.IRequestHandler; +export declare function getBearerHandler(token: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler; +export declare function getPersonalAccessTokenHandler(token: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler; +export declare function getHandlerFromToken(token: string, allowCrossOriginAuthentication?: boolean): VsoBaseInterfaces.IRequestHandler; +export interface IWebApiRequestSettings { + productName: string; + productVersion: string; +} +export declare class WebApi { + serverUrl: string; + authHandler: VsoBaseInterfaces.IRequestHandler; + rest: rm.RestClient; + vsoClient: vsom.VsoClient; + options: VsoBaseInterfaces.IRequestOptions; + private _resourceAreas; + constructor(defaultUrl: string, authHandler: VsoBaseInterfaces.IRequestHandler, options?: VsoBaseInterfaces.IRequestOptions, requestSettings?: IWebApiRequestSettings); + /** + * Convenience factory to create with a bearer token. + * @param defaultServerUrl default server url to use when creating new apis from factory methods + * @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods + */ + static createWithBearerToken(defaultUrl: string, token: string, options?: VsoBaseInterfaces.IRequestOptions): WebApi; + connect(): Promise; + /** + * Each factory method can take a serverUrl and a list of handlers + * if these aren't provided, the default url and auth handler given to the constructor for this class will be used + */ + getBuildApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getCoreApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getDashboardApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getExtensionManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getFeatureManagementApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getFileContainerApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getGalleryApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getGitApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getLocationsApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getNotificationApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getPolicyApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getProfileApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getProjectAnalysisApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getSecurityRolesApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getReleaseApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getTaskApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getTaskAgentApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getTestApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getTfvcApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getWikiApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getWorkApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getWorkItemTrackingApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getWorkItemTrackingProcessApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + getWorkItemTrackingProcessDefinitionApi(serverUrl?: string, handlers?: VsoBaseInterfaces.IRequestHandler[]): Promise; + /** + * Determines if the domain is exluded for proxy via the no_proxy env var + * @param url: the server url + */ + isNoProxyHost: (_url: string) => boolean; + private _getResourceAreaUrl; + private _getResourceAreas; + private _readTaskLibSecrets; +} diff --git a/node_modules/azure-devops-node-api/WebApi.js b/node_modules/azure-devops-node-api/WebApi.js new file mode 100644 index 0000000..df1ed8a --- /dev/null +++ b/node_modules/azure-devops-node-api/WebApi.js @@ -0,0 +1,437 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const buildm = require("./BuildApi"); +const corem = require("./CoreApi"); +const dashboardm = require("./DashboardApi"); +const extmgmtm = require("./ExtensionManagementApi"); +const featuremgmtm = require("./FeatureManagementApi"); +const filecontainerm = require("./FileContainerApi"); +const gallerym = require("./GalleryApi"); +const gitm = require("./GitApi"); +const locationsm = require("./LocationsApi"); +const notificationm = require("./NotificationApi"); +const policym = require("./PolicyApi"); +const profilem = require("./ProfileApi"); +const projectm = require("./ProjectAnalysisApi"); +const releasem = require("./ReleaseApi"); +const securityrolesm = require("./SecurityRolesApi"); +const taskagentm = require("./TaskAgentApi"); +const taskm = require("./TaskApi"); +const testm = require("./TestApi"); +const tfvcm = require("./TfvcApi"); +const wikim = require("./WikiApi"); +const workm = require("./WorkApi"); +const workitemtrackingm = require("./WorkItemTrackingApi"); +const workitemtrackingprocessm = require("./WorkItemTrackingProcessApi"); +const workitemtrackingprocessdefinitionm = require("./WorkItemTrackingProcessDefinitionsApi"); +const basicm = require("./handlers/basiccreds"); +const bearm = require("./handlers/bearertoken"); +const ntlmm = require("./handlers/ntlm"); +const patm = require("./handlers/personalaccesstoken"); +const rm = require("typed-rest-client/RestClient"); +const vsom = require("./VsoClient"); +const crypto = require("crypto"); +const fs = require("fs"); +const os = require("os"); +const url = require("url"); +const path = require("path"); +const isBrowser = typeof window !== 'undefined'; +/** + * Methods to return handler objects (see handlers folder) + */ +function getBasicHandler(username, password, allowCrossOriginAuthentication) { + return new basicm.BasicCredentialHandler(username, password, allowCrossOriginAuthentication); +} +exports.getBasicHandler = getBasicHandler; +function getNtlmHandler(username, password, workstation, domain) { + return new ntlmm.NtlmCredentialHandler(username, password, workstation, domain); +} +exports.getNtlmHandler = getNtlmHandler; +function getBearerHandler(token, allowCrossOriginAuthentication) { + return new bearm.BearerCredentialHandler(token, allowCrossOriginAuthentication); +} +exports.getBearerHandler = getBearerHandler; +function getPersonalAccessTokenHandler(token, allowCrossOriginAuthentication) { + return new patm.PersonalAccessTokenCredentialHandler(token, allowCrossOriginAuthentication); +} +exports.getPersonalAccessTokenHandler = getPersonalAccessTokenHandler; +function getHandlerFromToken(token, allowCrossOriginAuthentication) { + if (token.length === 52) { + return getPersonalAccessTokenHandler(token, allowCrossOriginAuthentication); + } + else { + return getBearerHandler(token, allowCrossOriginAuthentication); + } +} +exports.getHandlerFromToken = getHandlerFromToken; +; +// --------------------------------------------------------------------------- +// Factory to return client apis +// When new APIs are added, a method must be added here to instantiate the API +//---------------------------------------------------------------------------- +class WebApi { + /* + * Factory to return client apis and handlers + * @param defaultUrl default server url to use when creating new apis from factory methods + * @param authHandler default authentication credentials to use when creating new apis from factory methods + */ + constructor(defaultUrl, authHandler, options, requestSettings) { + /** + * Determines if the domain is exluded for proxy via the no_proxy env var + * @param url: the server url + */ + this.isNoProxyHost = function (_url) { + if (!process.env.no_proxy) { + return false; + } + const noProxyDomains = (process.env.no_proxy || '') + .split(',') + .map(v => v.toLowerCase()); + const serverUrl = url.parse(_url).host.toLowerCase(); + // return true if the no_proxy includes the host + return noProxyDomains.indexOf(serverUrl) !== -1; + }; + this.serverUrl = defaultUrl; + this.authHandler = authHandler; + this.options = options || {}; + if (!this.isNoProxyHost(this.serverUrl)) { + // try to get proxy setting from environment variable set by VSTS-Task-Lib if there is no proxy setting in the options + if (!this.options.proxy || !this.options.proxy.proxyUrl) { + if (global['_vsts_task_lib_proxy']) { + let proxyFromEnv = { + proxyUrl: global['_vsts_task_lib_proxy_url'], + proxyUsername: global['_vsts_task_lib_proxy_username'], + proxyPassword: this._readTaskLibSecrets(global['_vsts_task_lib_proxy_password']), + proxyBypassHosts: JSON.parse(global['_vsts_task_lib_proxy_bypass'] || "[]"), + }; + this.options.proxy = proxyFromEnv; + } + } + } + // try get cert setting from environment variable set by VSTS-Task-Lib if there is no cert setting in the options + if (!this.options.cert) { + if (global['_vsts_task_lib_cert']) { + let certFromEnv = { + caFile: global['_vsts_task_lib_cert_ca'], + certFile: global['_vsts_task_lib_cert_clientcert'], + keyFile: global['_vsts_task_lib_cert_key'], + passphrase: this._readTaskLibSecrets(global['_vsts_task_lib_cert_passphrase']), + }; + this.options.cert = certFromEnv; + } + } + // try get ignore SSL error setting from environment variable set by VSTS-Task-Lib if there is no ignore SSL error setting in the options + if (!this.options.ignoreSslError) { + this.options.ignoreSslError = !!global['_vsts_task_lib_skip_cert_validation']; + } + let userAgent; + const nodeApiName = 'azure-devops-node-api'; + if (isBrowser) { + if (requestSettings) { + userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName}; ${window.navigator.userAgent})`; + } + else { + userAgent = `${nodeApiName} (${window.navigator.userAgent})`; + } + } + else { + let nodeApiVersion = 'unknown'; + const packageJsonPath = path.resolve(__dirname, 'package.json'); + if (fs.existsSync(packageJsonPath)) { + nodeApiVersion = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')).version; + } + const osName = os.platform(); + const osVersion = os.release(); + if (requestSettings) { + userAgent = `${requestSettings.productName}/${requestSettings.productVersion} (${nodeApiName} ${nodeApiVersion}; ${osName} ${osVersion})`; + } + else { + userAgent = `${nodeApiName}/${nodeApiVersion} (${osName} ${osVersion})`; + } + } + this.rest = new rm.RestClient(userAgent, null, [this.authHandler], this.options); + this.vsoClient = new vsom.VsoClient(defaultUrl, this.rest); + } + /** + * Convenience factory to create with a bearer token. + * @param defaultServerUrl default server url to use when creating new apis from factory methods + * @param defaultAuthHandler default authentication credentials to use when creating new apis from factory methods + */ + static createWithBearerToken(defaultUrl, token, options) { + let bearerHandler = getBearerHandler(token); + return new this(defaultUrl, bearerHandler, options); + } + connect() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + try { + let res; + res = yield this.rest.get(this.vsoClient.resolveUrl('/_apis/connectionData')); + resolve(res.result); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Each factory method can take a serverUrl and a list of handlers + * if these aren't provided, the default url and auth handler given to the constructor for this class will be used + */ + getBuildApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, buildm.BuildApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new buildm.BuildApi(serverUrl, handlers, this.options); + }); + } + getCoreApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "79134c72-4a58-4b42-976c-04e7115f32bf"); + handlers = handlers || [this.authHandler]; + return new corem.CoreApi(serverUrl, handlers, this.options); + }); + } + getDashboardApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "31c84e0a-3ece-48fd-a29d-100849af99ba"); + handlers = handlers || [this.authHandler]; + return new dashboardm.DashboardApi(serverUrl, handlers, this.options); + }); + } + getExtensionManagementApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "6c2b0933-3600-42ae-bf8b-93d4f7e83594"); + handlers = handlers || [this.authHandler]; + return new extmgmtm.ExtensionManagementApi(serverUrl, handlers, this.options); + }); + } + getFeatureManagementApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new featuremgmtm.FeatureManagementApi(serverUrl, handlers, this.options); + }); + } + getFileContainerApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new filecontainerm.FileContainerApi(serverUrl, handlers, this.options); + }); + } + getGalleryApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gallerym.GalleryApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new gallerym.GalleryApi(serverUrl, handlers, this.options); + }); + } + getGitApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, gitm.GitApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new gitm.GitApi(serverUrl, handlers, this.options); + }); + } + // TODO: Don't call resource area here? Will cause infinite loop? + getLocationsApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + let optionsClone = Object.assign({}, this.options); + optionsClone.allowRetries = true; + optionsClone.maxRetries = 5; + serverUrl = (yield serverUrl) || this.serverUrl; + handlers = handlers || [this.authHandler]; + return new locationsm.LocationsApi(serverUrl, handlers, optionsClone); + }); + } + getNotificationApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new notificationm.NotificationApi(serverUrl, handlers, this.options); + }); + } + getPolicyApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "fb13a388-40dd-4a04-b530-013a739c72ef"); + handlers = handlers || [this.authHandler]; + return new policym.PolicyApi(serverUrl, handlers, this.options); + }); + } + getProfileApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8ccfef3d-2b87-4e99-8ccb-66e343d2daa8"); + handlers = handlers || [this.authHandler]; + return new profilem.ProfileApi(serverUrl, handlers, this.options); + }); + } + getProjectAnalysisApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "7658fa33-b1bf-4580-990f-fac5896773d3"); + handlers = handlers || [this.authHandler]; + return new projectm.ProjectAnalysisApi(serverUrl, handlers, this.options); + }); + } + getSecurityRolesApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new securityrolesm.SecurityRolesApi(serverUrl, handlers, this.options); + }); + } + getReleaseApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "efc2f575-36ef-48e9-b672-0c6fb4a48ac5"); + handlers = handlers || [this.authHandler]; + return new releasem.ReleaseApi(serverUrl, handlers, this.options); + }); + } + getTaskApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, ""); + handlers = handlers || [this.authHandler]; + return new taskm.TaskApi(serverUrl, handlers, this.options); + }); + } + getTaskAgentApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "a85b8835-c1a1-4aac-ae97-1c3d0ba72dbd"); + handlers = handlers || [this.authHandler]; + return new taskagentm.TaskAgentApi(serverUrl, handlers, this.options); + }); + } + getTestApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "c2aa639c-3ccc-4740-b3b6-ce2a1e1d984e"); + handlers = handlers || [this.authHandler]; + return new testm.TestApi(serverUrl, handlers, this.options); + }); + } + getTfvcApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "8aa40520-446d-40e6-89f6-9c9f9ce44c48"); + handlers = handlers || [this.authHandler]; + return new tfvcm.TfvcApi(serverUrl, handlers, this.options); + }); + } + getWikiApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"); + handlers = handlers || [this.authHandler]; + return new wikim.WikiApi(serverUrl, handlers, this.options); + }); + } + getWorkApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"); + handlers = handlers || [this.authHandler]; + return new workm.WorkApi(serverUrl, handlers, this.options); + }); + } + getWorkItemTrackingApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, workitemtrackingm.WorkItemTrackingApi.RESOURCE_AREA_ID); + handlers = handlers || [this.authHandler]; + return new workitemtrackingm.WorkItemTrackingApi(serverUrl, handlers, this.options); + }); + } + getWorkItemTrackingProcessApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5"); + handlers = handlers || [this.authHandler]; + return new workitemtrackingprocessm.WorkItemTrackingProcessApi(serverUrl, handlers, this.options); + }); + } + getWorkItemTrackingProcessDefinitionApi(serverUrl, handlers) { + return __awaiter(this, void 0, void 0, function* () { + // TODO: Load RESOURCE_AREA_ID correctly. + serverUrl = yield this._getResourceAreaUrl(serverUrl || this.serverUrl, "5264459e-e5e0-4bd8-b118-0985e68a4ec5"); + handlers = handlers || [this.authHandler]; + return new workitemtrackingprocessdefinitionm.WorkItemTrackingProcessDefinitionsApi(serverUrl, handlers, this.options); + }); + } + _getResourceAreaUrl(serverUrl, resourceId) { + return __awaiter(this, void 0, void 0, function* () { + if (!resourceId) { + return serverUrl; + } + // This must be of type any, see comment just below. + const resourceAreas = yield this._getResourceAreas(); + if (resourceAreas === undefined) { + throw new Error((`Failed to retrieve resource areas ' + 'from server: ${serverUrl}`)); + } + // The response type differs based on whether or not there are resource areas. When we are on prem we get: + // {"count":0,"value":null} and when we are on VSTS we get an array of resource areas. + // Due to this strangeness the type of resourceAreas needs to be any and we need to check .count + // When going against vsts count will be undefined. On prem it will be 0 + if (!resourceAreas || resourceAreas.length === 0 || resourceAreas.count === 0) { + // For on prem environments we get an empty list + return serverUrl; + } + for (var resourceArea of resourceAreas) { + if (resourceArea.id.toLowerCase() === resourceId.toLowerCase()) { + return resourceArea.locationUrl; + } + } + throw new Error((`Could not find information for resource area ${resourceId} ' + 'from server: ${serverUrl}`)); + }); + } + _getResourceAreas() { + return __awaiter(this, void 0, void 0, function* () { + if (!this._resourceAreas) { + const locationClient = yield this.getLocationsApi(); + this._resourceAreas = yield locationClient.getResourceAreas(); + } + return this._resourceAreas; + }); + } + _readTaskLibSecrets(lookupKey) { + if (isBrowser) { + throw new Error("Browsers can't securely keep secrets"); + } + // the lookupKey should has following format + // base64encoded:base64encoded + if (lookupKey && lookupKey.indexOf(':') > 0) { + let lookupInfo = lookupKey.split(':', 2); + // file contains encryption key + let keyFile = new Buffer(lookupInfo[0], 'base64').toString('utf8'); + let encryptKey = new Buffer(fs.readFileSync(keyFile, 'utf8'), 'base64'); + let encryptedContent = new Buffer(lookupInfo[1], 'base64').toString('utf8'); + let decipher = crypto.createDecipher("aes-256-ctr", encryptKey); + let decryptedContent = decipher.update(encryptedContent, 'hex', 'utf8'); + decryptedContent += decipher.final('utf8'); + return decryptedContent; + } + } +} +exports.WebApi = WebApi; diff --git a/node_modules/azure-devops-node-api/WikiApi.d.ts b/node_modules/azure-devops-node-api/WikiApi.d.ts new file mode 100644 index 0000000..97976cc --- /dev/null +++ b/node_modules/azure-devops-node-api/WikiApi.d.ts @@ -0,0 +1,243 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import Comments_Contracts = require("./interfaces/CommentsInterfaces"); +import GitInterfaces = require("./interfaces/GitInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +import WikiInterfaces = require("./interfaces/WikiInterfaces"); +export interface IWikiApi extends basem.ClientApiBase { + createCommentAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, project: string, wikiIdentifier: string, pageId: number): Promise; + getAttachmentContent(project: string, wikiIdentifier: string, pageId: number, attachmentId: string): Promise; + addCommentReaction(project: string, wikiIdentifier: string, pageId: number, commentId: number, type: Comments_Contracts.CommentReactionType): Promise; + deleteCommentReaction(project: string, wikiIdentifier: string, pageId: number, commentId: number, type: Comments_Contracts.CommentReactionType): Promise; + getEngagedUsers(project: string, wikiIdentifier: string, pageId: number, commentId: number, type: Comments_Contracts.CommentReactionType, top?: number, skip?: number): Promise; + addComment(request: Comments_Contracts.CommentCreateParameters, project: string, wikiIdentifier: string, pageId: number): Promise; + deleteComment(project: string, wikiIdentifier: string, pageId: number, id: number): Promise; + getComment(project: string, wikiIdentifier: string, pageId: number, id: number, excludeDeleted?: boolean, expand?: Comments_Contracts.CommentExpandOptions): Promise; + listComments(project: string, wikiIdentifier: string, pageId: number, top?: number, continuationToken?: string, excludeDeleted?: boolean, expand?: Comments_Contracts.CommentExpandOptions, order?: Comments_Contracts.CommentSortOrder, parentId?: number): Promise; + updateComment(comment: Comments_Contracts.CommentUpdateParameters, project: string, wikiIdentifier: string, pageId: number, id: number): Promise; + getPageText(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise; + getPageZip(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise; + getPageByIdText(project: string, wikiIdentifier: string, id: number, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContent?: boolean): Promise; + getPageByIdZip(project: string, wikiIdentifier: string, id: number, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContent?: boolean): Promise; + getPagesBatch(pagesBatchRequest: WikiInterfaces.WikiPagesBatchRequest, project: string, wikiIdentifier: string, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + getPageData(project: string, wikiIdentifier: string, pageId: number, pageViewsForDays?: number): Promise; + createOrUpdatePageViewStats(project: string, wikiIdentifier: string, wikiVersion: GitInterfaces.GitVersionDescriptor, path: string, oldPath?: string): Promise; + createWiki(wikiCreateParams: WikiInterfaces.WikiCreateParametersV2, project?: string): Promise; + deleteWiki(wikiIdentifier: string, project?: string): Promise; + getAllWikis(project?: string): Promise; + getWiki(wikiIdentifier: string, project?: string): Promise; + updateWiki(updateParameters: WikiInterfaces.WikiUpdateParameters, wikiIdentifier: string, project?: string): Promise; +} +export declare class WikiApi extends basem.ClientApiBase implements IWikiApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"; + /** + * Uploads an attachment on a comment on a wiki page. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + */ + createCommentAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, project: string, wikiIdentifier: string, pageId: number): Promise; + /** + * Downloads an attachment on a comment on a wiki page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {string} attachmentId - Attachment ID. + */ + getAttachmentContent(project: string, wikiIdentifier: string, pageId: number, attachmentId: string): Promise; + /** + * Add a reaction on a wiki page comment. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name + * @param {number} pageId - Wiki page ID + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being added + */ + addCommentReaction(project: string, wikiIdentifier: string, pageId: number, commentId: number, type: Comments_Contracts.CommentReactionType): Promise; + /** + * Delete a reaction on a wiki page comment. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or name + * @param {number} pageId - Wiki page ID + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being deleted + */ + deleteCommentReaction(project: string, wikiIdentifier: string, pageId: number, commentId: number, type: Comments_Contracts.CommentReactionType): Promise; + /** + * Gets a list of users who have reacted for the given wiki comment with a given reaction type. Supports paging, with a default page size of 100 users at a time. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction for which the engaged users are being requested + * @param {number} top - Number of enagaged users to be returned in a given page. Optional, defaults to 100 + * @param {number} skip - Number of engaged users to be skipped to page the next set of engaged users, defaults to 0 + */ + getEngagedUsers(project: string, wikiIdentifier: string, pageId: number, commentId: number, type: Comments_Contracts.CommentReactionType, top?: number, skip?: number): Promise; + /** + * Add a comment on a wiki page. + * + * @param {Comments_Contracts.CommentCreateParameters} request - Comment create request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + */ + addComment(request: Comments_Contracts.CommentCreateParameters, project: string, wikiIdentifier: string, pageId: number): Promise; + /** + * Delete a comment on a wiki page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - Comment ID. + */ + deleteComment(project: string, wikiIdentifier: string, pageId: number, id: number): Promise; + /** + * Returns a comment associated with the Wiki Page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - ID of the comment to return. + * @param {boolean} excludeDeleted - Specify if the deleted comment should be skipped. + * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. + */ + getComment(project: string, wikiIdentifier: string, pageId: number, id: number, excludeDeleted?: boolean, expand?: Comments_Contracts.CommentExpandOptions): Promise; + /** + * Returns a pageable list of comments. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} top - Max number of comments to return. + * @param {string} continuationToken - Used to query for the next page of comments. + * @param {boolean} excludeDeleted - Specify if the deleted comments should be skipped. + * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. + * @param {Comments_Contracts.CommentSortOrder} order - Order in which the comments should be returned. + * @param {number} parentId - CommentId of the parent comment. + */ + listComments(project: string, wikiIdentifier: string, pageId: number, top?: number, continuationToken?: string, excludeDeleted?: boolean, expand?: Comments_Contracts.CommentExpandOptions, order?: Comments_Contracts.CommentSortOrder, parentId?: number): Promise; + /** + * Update a comment on a wiki page. + * + * @param {Comments_Contracts.CommentUpdateParameters} comment - Comment update request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - Comment ID. + */ + updateComment(comment: Comments_Contracts.CommentUpdateParameters, project: string, wikiIdentifier: string, pageId: number, id: number): Promise; + /** + * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} path - Wiki page path. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageText(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise; + /** + * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} path - Wiki page path. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageZip(project: string, wikiIdentifier: string, path?: string, recursionLevel?: GitInterfaces.VersionControlRecursionType, versionDescriptor?: GitInterfaces.GitVersionDescriptor, includeContent?: boolean): Promise; + /** + * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name.. + * @param {number} id - Wiki page ID. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageByIdText(project: string, wikiIdentifier: string, id: number, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContent?: boolean): Promise; + /** + * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name.. + * @param {number} id - Wiki page ID. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageByIdZip(project: string, wikiIdentifier: string, id: number, recursionLevel?: GitInterfaces.VersionControlRecursionType, includeContent?: boolean): Promise; + /** + * Returns pageable list of Wiki Pages + * + * @param {WikiInterfaces.WikiPagesBatchRequest} pagesBatchRequest - Wiki batch page request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + */ + getPagesBatch(pagesBatchRequest: WikiInterfaces.WikiPagesBatchRequest, project: string, wikiIdentifier: string, versionDescriptor?: GitInterfaces.GitVersionDescriptor): Promise; + /** + * Returns page detail corresponding to Page ID. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} pageViewsForDays - last N days from the current day for which page views is to be returned. It's inclusive of current day. + */ + getPageData(project: string, wikiIdentifier: string, pageId: number, pageViewsForDays?: number): Promise; + /** + * Creates a new page view stats resource or updates an existing page view stats resource. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {GitInterfaces.GitVersionDescriptor} wikiVersion - Wiki version. + * @param {string} path - Wiki page path. + * @param {string} oldPath - Old page path. This is optional and required to rename path in existing page view stats. + */ + createOrUpdatePageViewStats(project: string, wikiIdentifier: string, wikiVersion: GitInterfaces.GitVersionDescriptor, path: string, oldPath?: string): Promise; + /** + * Creates the wiki resource. + * + * @param {WikiInterfaces.WikiCreateParametersV2} wikiCreateParams - Parameters for the wiki creation. + * @param {string} project - Project ID or project name + */ + createWiki(wikiCreateParams: WikiInterfaces.WikiCreateParametersV2, project?: string): Promise; + /** + * Deletes the wiki corresponding to the wiki ID or wiki name provided. + * + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name + */ + deleteWiki(wikiIdentifier: string, project?: string): Promise; + /** + * Gets all wikis in a project or collection. + * + * @param {string} project - Project ID or project name + */ + getAllWikis(project?: string): Promise; + /** + * Gets the wiki corresponding to the wiki ID or wiki name provided. + * + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name + */ + getWiki(wikiIdentifier: string, project?: string): Promise; + /** + * Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. + * + * @param {WikiInterfaces.WikiUpdateParameters} updateParameters - Update parameters. + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name + */ + updateWiki(updateParameters: WikiInterfaces.WikiUpdateParameters, wikiIdentifier: string, project?: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/WikiApi.js b/node_modules/azure-devops-node-api/WikiApi.js new file mode 100644 index 0000000..84c6907 --- /dev/null +++ b/node_modules/azure-devops-node-api/WikiApi.js @@ -0,0 +1,766 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const Comments_Contracts = require("./interfaces/CommentsInterfaces"); +const WikiInterfaces = require("./interfaces/WikiInterfaces"); +class WikiApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Wiki-api', options); + } + /** + * Uploads an attachment on a comment on a wiki page. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + */ + createCommentAttachment(customHeaders, contentStream, project, wikiIdentifier, pageId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "5100d976-363d-42e7-a19d-4171ecb44782", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentAttachment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Downloads an attachment on a comment on a wiki page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {string} attachmentId - Attachment ID. + */ + getAttachmentContent(project, wikiIdentifier, pageId, attachmentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + attachmentId: attachmentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "5100d976-363d-42e7-a19d-4171ecb44782", routeValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a reaction on a wiki page comment. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name + * @param {number} pageId - Wiki page ID + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being added + */ + addCommentReaction(project, wikiIdentifier, pageId, commentId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + commentId: commentId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "7a5bc693-aab7-4d48-8f34-36f373022063", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentReaction, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a reaction on a wiki page comment. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or name + * @param {number} pageId - Wiki page ID + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction being deleted + */ + deleteCommentReaction(project, wikiIdentifier, pageId, commentId, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + commentId: commentId, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "7a5bc693-aab7-4d48-8f34-36f373022063", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentReaction, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of users who have reacted for the given wiki comment with a given reaction type. Supports paging, with a default page size of 100 users at a time. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} commentId - ID of the associated comment + * @param {Comments_Contracts.CommentReactionType} type - Type of the reaction for which the engaged users are being requested + * @param {number} top - Number of enagaged users to be returned in a given page. Optional, defaults to 100 + * @param {number} skip - Number of engaged users to be skipped to page the next set of engaged users, defaults to 0 + */ + getEngagedUsers(project, wikiIdentifier, pageId, commentId, type, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + commentId: commentId, + type: type + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "598a5268-41a7-4162-b7dc-344131e4d1fa", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a comment on a wiki page. + * + * @param {Comments_Contracts.CommentCreateParameters} request - Comment create request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + */ + addComment(request, project, wikiIdentifier, pageId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a comment on a wiki page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - Comment ID. + */ + deleteComment(project, wikiIdentifier, pageId, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a comment associated with the Wiki Page. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - ID of the comment to return. + * @param {boolean} excludeDeleted - Specify if the deleted comment should be skipped. + * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. + */ + getComment(project, wikiIdentifier, pageId, id, excludeDeleted, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + id: id + }; + let queryValues = { + excludeDeleted: excludeDeleted, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a pageable list of comments. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} top - Max number of comments to return. + * @param {string} continuationToken - Used to query for the next page of comments. + * @param {boolean} excludeDeleted - Specify if the deleted comments should be skipped. + * @param {Comments_Contracts.CommentExpandOptions} expand - Specifies the additional data retrieval options for comments. + * @param {Comments_Contracts.CommentSortOrder} order - Order in which the comments should be returned. + * @param {number} parentId - CommentId of the parent comment. + */ + listComments(project, wikiIdentifier, pageId, top, continuationToken, excludeDeleted, expand, order, parentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + excludeDeleted: excludeDeleted, + '$expand': expand, + order: order, + parentId: parentId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.CommentList, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a comment on a wiki page. + * + * @param {Comments_Contracts.CommentUpdateParameters} comment - Comment update request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} id - Comment ID. + */ + updateComment(comment, project, wikiIdentifier, pageId, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "9b394e93-7db5-46cb-9c26-09a36aa5c895", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, comment, options); + let ret = this.formatResponse(res.result, Comments_Contracts.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} path - Wiki page path. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageText(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + let queryValues = { + path: path, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets metadata or content of the wiki page for the provided path. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} path - Wiki page path. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. Defaults to the default branch (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageZip(project, wikiIdentifier, path, recursionLevel, versionDescriptor, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + let queryValues = { + path: path, + recursionLevel: recursionLevel, + versionDescriptor: versionDescriptor, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "25d3fbc7-fe3d-46cb-b5a5-0b6f79caf27b", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name.. + * @param {number} id - Wiki page ID. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageByIdText(project, wikiIdentifier, id, recursionLevel, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + id: id + }; + let queryValues = { + recursionLevel: recursionLevel, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "ceddcf75-1068-452d-8b13-2d4d76e1f970", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("text/plain", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets metadata or content of the wiki page for the provided page id. Content negotiation is done based on the `Accept` header sent in the request. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name.. + * @param {number} id - Wiki page ID. + * @param {GitInterfaces.VersionControlRecursionType} recursionLevel - Recursion level for subpages retrieval. Defaults to `None` (Optional). + * @param {boolean} includeContent - True to include the content of the page in the response for Json content type. Defaults to false (Optional) + */ + getPageByIdZip(project, wikiIdentifier, id, recursionLevel, includeContent) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + id: id + }; + let queryValues = { + recursionLevel: recursionLevel, + includeContent: includeContent, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "ceddcf75-1068-452d-8b13-2d4d76e1f970", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns pageable list of Wiki Pages + * + * @param {WikiInterfaces.WikiPagesBatchRequest} pagesBatchRequest - Wiki batch page request. + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {GitInterfaces.GitVersionDescriptor} versionDescriptor - GitVersionDescriptor for the page. (Optional in case of ProjectWiki). + */ + getPagesBatch(pagesBatchRequest, project, wikiIdentifier, versionDescriptor) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + let queryValues = { + versionDescriptor: versionDescriptor, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "71323c46-2592-4398-8771-ced73dd87207", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, pagesBatchRequest, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageDetail, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns page detail corresponding to Page ID. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {number} pageId - Wiki page ID. + * @param {number} pageViewsForDays - last N days from the current day for which page views is to be returned. It's inclusive of current day. + */ + getPageData(project, wikiIdentifier, pageId, pageViewsForDays) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier, + pageId: pageId + }; + let queryValues = { + pageViewsForDays: pageViewsForDays, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "81c4e0fe-7663-4d62-ad46-6ab78459f274", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageDetail, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a new page view stats resource or updates an existing page view stats resource. + * + * @param {string} project - Project ID or project name + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {GitInterfaces.GitVersionDescriptor} wikiVersion - Wiki version. + * @param {string} path - Wiki page path. + * @param {string} oldPath - Old page path. This is optional and required to rename path in existing page view stats. + */ + createOrUpdatePageViewStats(project, wikiIdentifier, wikiVersion, path, oldPath) { + return __awaiter(this, void 0, void 0, function* () { + if (wikiVersion == null) { + throw new TypeError('wikiVersion can not be null or undefined'); + } + if (path == null) { + throw new TypeError('path can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + let queryValues = { + wikiVersion: wikiVersion, + path: path, + oldPath: oldPath, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wiki", "1087b746-5d15-41b9-bea6-14e325e7f880", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, null, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiPageViewStats, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates the wiki resource. + * + * @param {WikiInterfaces.WikiCreateParametersV2} wikiCreateParams - Parameters for the wiki creation. + * @param {string} project - Project ID or project name + */ + createWiki(wikiCreateParams, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, wikiCreateParams, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the wiki corresponding to the wiki ID or wiki name provided. + * + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name + */ + deleteWiki(wikiIdentifier, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets all wikis in a project or collection. + * + * @param {string} project - Project ID or project name + */ + getAllWikis(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the wiki corresponding to the wiki ID or wiki name provided. + * + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name + */ + getWiki(wikiIdentifier, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates the wiki corresponding to the wiki ID or wiki name provided using the update parameters. + * + * @param {WikiInterfaces.WikiUpdateParameters} updateParameters - Update parameters. + * @param {string} wikiIdentifier - Wiki ID or wiki name. + * @param {string} project - Project ID or project name + */ + updateWiki(updateParameters, wikiIdentifier, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + wikiIdentifier: wikiIdentifier + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wiki", "288d122c-dbd4-451d-aa5f-7dbbba070728", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateParameters, options); + let ret = this.formatResponse(res.result, WikiInterfaces.TypeInfo.WikiV2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +WikiApi.RESOURCE_AREA_ID = "bf7d82a0-8aa5-4613-94ef-6172a5ea01f3"; +exports.WikiApi = WikiApi; diff --git a/node_modules/azure-devops-node-api/WorkApi.d.ts b/node_modules/azure-devops-node-api/WorkApi.d.ts new file mode 100644 index 0000000..f0a31d7 --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkApi.d.ts @@ -0,0 +1,478 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); +import WorkInterfaces = require("./interfaces/WorkInterfaces"); +export interface IWorkApi extends basem.ClientApiBase { + getBacklogConfigurations(teamContext: TfsCoreInterfaces.TeamContext): Promise; + getBacklogLevelWorkItems(teamContext: TfsCoreInterfaces.TeamContext, backlogId: string): Promise; + getBacklog(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + getBacklogs(teamContext: TfsCoreInterfaces.TeamContext): Promise; + getBoardBadge(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; + getBoardBadgeData(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; + getColumnSuggestedValues(project?: string): Promise; + getBoardMappingParentItems(teamContext: TfsCoreInterfaces.TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise; + getRowSuggestedValues(project?: string): Promise; + getBoard(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + getBoards(teamContext: TfsCoreInterfaces.TeamContext): Promise; + setBoardOptions(options: { + [key: string]: string; + }, teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<{ + [key: string]: string; + }>; + getBoardUserSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateBoardUserSettings(boardUserSettings: { + [key: string]: string; + }, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + getCapacitiesWithIdentityRefAndTotals(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + getCapacityWithIdentityRef(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; + replaceCapacitiesWithIdentityRef(capacities: WorkInterfaces.TeamMemberCapacityIdentityRef[], teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + updateCapacityWithIdentityRef(patch: WorkInterfaces.CapacityPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; + getBoardCardRuleSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateBoardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateTaskboardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; + getBoardCardSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateBoardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateTaskboardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; + getBoardChart(teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; + getBoardCharts(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateBoardChart(chart: WorkInterfaces.BoardChart, teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; + getBoardColumns(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateBoardColumns(boardColumns: WorkInterfaces.BoardColumn[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise; + getTotalIterationCapacities(project: string, iterationId: string): Promise; + deleteTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + getTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + getTeamIterations(teamContext: TfsCoreInterfaces.TeamContext, timeframe?: string): Promise; + postTeamIteration(iteration: WorkInterfaces.TeamSettingsIteration, teamContext: TfsCoreInterfaces.TeamContext): Promise; + createPlan(postedPlan: WorkInterfaces.CreatePlan, project: string): Promise; + deletePlan(project: string, id: string): Promise; + getPlan(project: string, id: string): Promise; + getPlans(project: string): Promise; + updatePlan(updatedPlan: WorkInterfaces.UpdatePlan, project: string, id: string): Promise; + getProcessConfiguration(project: string): Promise; + getBoardRows(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + updateBoardRows(boardRows: WorkInterfaces.BoardRow[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + getColumns(teamContext: TfsCoreInterfaces.TeamContext): Promise; + updateColumns(updateColumns: WorkInterfaces.UpdateTaskboardColumn[], teamContext: TfsCoreInterfaces.TeamContext): Promise; + getWorkItemColumns(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + updateWorkItemColumn(updateColumn: WorkInterfaces.UpdateTaskboardWorkItemColumn, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, workItemId: number): Promise; + getTeamDaysOff(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + updateTeamDaysOff(daysOffPatch: WorkInterfaces.TeamSettingsDaysOffPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + getTeamFieldValues(teamContext: TfsCoreInterfaces.TeamContext): Promise; + updateTeamFieldValues(patch: WorkInterfaces.TeamFieldValuesPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; + getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise; + updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; + getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + reorderBacklogWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext): Promise; + reorderIterationWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; +} +export declare class WorkApi extends basem.ClientApiBase implements IWorkApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"; + /** + * Gets backlog configuration for a team + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getBacklogConfigurations(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Get a list of work items within a backlog level + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} backlogId + */ + getBacklogLevelWorkItems(teamContext: TfsCoreInterfaces.TeamContext, backlogId: string): Promise; + /** + * Get a backlog level + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the backlog level + */ + getBacklog(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + /** + * List all backlog levels + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getBacklogs(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Gets a badge that displays the status of columns on the board. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the board. + * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. + * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. + */ + getBoardBadge(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; + /** + * Gets a badge that displays the status of columns on the board. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the board. + * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. + * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. + */ + getBoardBadgeData(teamContext: TfsCoreInterfaces.TeamContext, id: string, columnOptions?: WorkInterfaces.BoardBadgeColumnOptions, columns?: string[]): Promise; + /** + * Get available board columns in a project + * + * @param {string} project - Project ID or project name + */ + getColumnSuggestedValues(project?: string): Promise; + /** + * Returns the list of parent field filter model for the given list of workitem ids + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} childBacklogContextCategoryRefName + * @param {number[]} workitemIds + */ + getBoardMappingParentItems(teamContext: TfsCoreInterfaces.TeamContext, childBacklogContextCategoryRefName: string, workitemIds: number[]): Promise; + /** + * Get available board rows in a project + * + * @param {string} project - Project ID or project name + */ + getRowSuggestedValues(project?: string): Promise; + /** + * Get board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - identifier for board, either board's backlog level name (Eg:"Stories") or Id + */ + getBoard(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + /** + * Get boards + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getBoards(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Update board options + * + * @param {{ [key: string] : string; }} options - options to updated + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - identifier for board, either category plural name (Eg:"Stories") or guid + */ + setBoardOptions(options: { + [key: string]: string; + }, teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise<{ + [key: string]: string; + }>; + /** + * Get board user settings for a board id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Board ID or Name + */ + getBoardUserSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update board user settings for the board id + * + * @param {{ [key: string] : string; }} boardUserSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + updateBoardUserSettings(boardUserSettings: { + [key: string]: string; + }, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Get a team's capacity including total capacity and days off + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + getCapacitiesWithIdentityRefAndTotals(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + /** + * Get a team member's capacity + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + * @param {string} teamMemberId - ID of the team member + */ + getCapacityWithIdentityRef(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; + /** + * Replace a team's capacity + * + * @param {WorkInterfaces.TeamMemberCapacityIdentityRef[]} capacities - Team capacity to replace + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + replaceCapacitiesWithIdentityRef(capacities: WorkInterfaces.TeamMemberCapacityIdentityRef[], teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + /** + * Update a team member's capacity + * + * @param {WorkInterfaces.CapacityPatch} patch - Updated capacity + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + * @param {string} teamMemberId - ID of the team member + */ + updateCapacityWithIdentityRef(patch: WorkInterfaces.CapacityPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, teamMemberId: string): Promise; + /** + * Get board card Rule settings for the board id or board by name + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + getBoardCardRuleSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update board card Rule settings for the board id or board by name + * + * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + updateBoardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update taskboard card Rule settings + * + * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTaskboardCardRuleSettings(boardCardRuleSettings: WorkInterfaces.BoardCardRuleSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Get board card settings for the board id or board by name + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + getBoardCardSettings(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update board card settings for the board id or board by name + * + * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + updateBoardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update taskboard card settings + * + * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTaskboardCardSettings(boardCardSettingsToSave: WorkInterfaces.BoardCardSettings, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Get a board chart + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + * @param {string} name - The chart name + */ + getBoardChart(teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; + /** + * Get board charts + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + */ + getBoardCharts(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update a board chart + * + * @param {WorkInterfaces.BoardChart} chart + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + * @param {string} name - The chart name + */ + updateBoardChart(chart: WorkInterfaces.BoardChart, teamContext: TfsCoreInterfaces.TeamContext, board: string, name: string): Promise; + /** + * Get columns on a board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + getBoardColumns(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update columns on a board + * + * @param {WorkInterfaces.BoardColumn[]} boardColumns - List of board columns to update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + updateBoardColumns(boardColumns: WorkInterfaces.BoardColumn[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Get Delivery View Data + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier for delivery view + * @param {number} revision - Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. + * @param {Date} startDate - The start date of timeline + * @param {Date} endDate - The end date of timeline + */ + getDeliveryTimelineData(project: string, id: string, revision?: number, startDate?: Date, endDate?: Date): Promise; + /** + * Get an iteration's capacity for all teams in iteration + * + * @param {string} project - Project ID or project name + * @param {string} iterationId - ID of the iteration + */ + getTotalIterationCapacities(project: string, iterationId: string): Promise; + /** + * Delete a team's iteration by iterationId + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration + */ + deleteTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + /** + * Get team's iteration by iterationId + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration + */ + getTeamIteration(teamContext: TfsCoreInterfaces.TeamContext, id: string): Promise; + /** + * Get a team's iterations using timeframe filter + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} timeframe - A filter for which iterations are returned based on relative time. Only Current is supported currently. + */ + getTeamIterations(teamContext: TfsCoreInterfaces.TeamContext, timeframe?: string): Promise; + /** + * Add an iteration to the team + * + * @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + postTeamIteration(iteration: WorkInterfaces.TeamSettingsIteration, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Add a new plan for the team + * + * @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition + * @param {string} project - Project ID or project name + */ + createPlan(postedPlan: WorkInterfaces.CreatePlan, project: string): Promise; + /** + * Delete the specified plan + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + deletePlan(project: string, id: string): Promise; + /** + * Get the information for the specified plan + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + getPlan(project: string, id: string): Promise; + /** + * Get the information for all the plans configured for the given team + * + * @param {string} project - Project ID or project name + */ + getPlans(project: string): Promise; + /** + * Update the information for the specified plan + * + * @param {WorkInterfaces.UpdatePlan} updatedPlan - Plan definition to be updated + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + updatePlan(updatedPlan: WorkInterfaces.UpdatePlan, project: string, id: string): Promise; + /** + * Get process configuration + * + * @param {string} project - Project ID or project name + */ + getProcessConfiguration(project: string): Promise; + /** + * Get rows on a board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + getBoardRows(teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * Update rows on a board + * + * @param {WorkInterfaces.BoardRow[]} boardRows - List of board rows to update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + updateBoardRows(boardRows: WorkInterfaces.BoardRow[], teamContext: TfsCoreInterfaces.TeamContext, board: string): Promise; + /** + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getColumns(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * @param {WorkInterfaces.UpdateTaskboardColumn[]} updateColumns + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateColumns(updateColumns: WorkInterfaces.UpdateTaskboardColumn[], teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + */ + getWorkItemColumns(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + /** + * @param {WorkInterfaces.UpdateTaskboardWorkItemColumn} updateColumn + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + * @param {number} workItemId + */ + updateWorkItemColumn(updateColumn: WorkInterfaces.UpdateTaskboardWorkItemColumn, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string, workItemId: number): Promise; + /** + * Get team's days off for an iteration + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + getTeamDaysOff(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + /** + * Set a team's days off for an iteration + * + * @param {WorkInterfaces.TeamSettingsDaysOffPatch} daysOffPatch - Team's days off patch containing a list of start and end dates + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + updateTeamDaysOff(daysOffPatch: WorkInterfaces.TeamSettingsDaysOffPatch, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + /** + * Get a collection of team field values + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getTeamFieldValues(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Update team field values + * + * @param {WorkInterfaces.TeamFieldValuesPatch} patch + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTeamFieldValues(patch: WorkInterfaces.TeamFieldValuesPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Get a team's settings + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getTeamSettings(teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Update a team's settings + * + * @param {WorkInterfaces.TeamSettingsPatch} teamSettingsPatch - TeamSettings changes + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTeamSettings(teamSettingsPatch: WorkInterfaces.TeamSettingsPatch, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Get work items for iteration + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + getIterationWorkItems(teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; + /** + * Reorder Product Backlog/Boards Work Items + * + * @param {WorkInterfaces.ReorderOperation} operation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + reorderBacklogWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Reorder Sprint Backlog/Taskboard Work Items + * + * @param {WorkInterfaces.ReorderOperation} operation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - The id of the iteration + */ + reorderIterationWorkItems(operation: WorkInterfaces.ReorderOperation, teamContext: TfsCoreInterfaces.TeamContext, iterationId: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/WorkApi.js b/node_modules/azure-devops-node-api/WorkApi.js new file mode 100644 index 0000000..0c02575 --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkApi.js @@ -0,0 +1,1937 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const WorkInterfaces = require("./interfaces/WorkInterfaces"); +class WorkApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-Work-api', options); + } + /** + * Gets backlog configuration for a team + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getBacklogConfigurations(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "7799f497-3cb5-4f16-ad4f-5cd06012db64", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of work items within a backlog level + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} backlogId + */ + getBacklogLevelWorkItems(teamContext, backlogId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + backlogId: backlogId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "7c468d96-ab1d-4294-a360-92f07e9ccd98", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a backlog level + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the backlog level + */ + getBacklog(teamContext, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "a93726f9-7867-4e38-b4f2-0bfafc2f6a94", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogLevelConfiguration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * List all backlog levels + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getBacklogs(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "a93726f9-7867-4e38-b4f2-0bfafc2f6a94", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BacklogLevelConfiguration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that displays the status of columns on the board. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the board. + * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. + * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. + */ + getBoardBadge(teamContext, id, columnOptions, columns) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + let queryValues = { + columnOptions: columnOptions, + columns: columns && columns.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0120b002-ab6c-4ca0-98cf-a8d7492f865c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a badge that displays the status of columns on the board. + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - The id of the board. + * @param {WorkInterfaces.BoardBadgeColumnOptions} columnOptions - Determines what columns to show. + * @param {string[]} columns - If columnOptions is set to custom, specify the list of column names. + */ + getBoardBadgeData(teamContext, id, columnOptions, columns) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + let queryValues = { + columnOptions: columnOptions, + columns: columns && columns.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0120b002-ab6c-4ca0-98cf-a8d7492f865c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get available board columns in a project + * + * @param {string} project - Project ID or project name + */ + getColumnSuggestedValues(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "eb7ec5a3-1ba3-4fd1-b834-49a5a387e57d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the list of parent field filter model for the given list of workitem ids + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} childBacklogContextCategoryRefName + * @param {number[]} workitemIds + */ + getBoardMappingParentItems(teamContext, childBacklogContextCategoryRefName, workitemIds) { + return __awaiter(this, void 0, void 0, function* () { + if (childBacklogContextCategoryRefName == null) { + throw new TypeError('childBacklogContextCategoryRefName can not be null or undefined'); + } + if (workitemIds == null) { + throw new TypeError('workitemIds can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + let queryValues = { + childBacklogContextCategoryRefName: childBacklogContextCategoryRefName, + workitemIds: workitemIds && workitemIds.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "186abea3-5c35-432f-9e28-7a15b4312a0e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get available board rows in a project + * + * @param {string} project - Project ID or project name + */ + getRowSuggestedValues(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "bb494cc6-a0f5-4c6c-8dca-ea6912e79eb9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - identifier for board, either board's backlog level name (Eg:"Stories") or Id + */ + getBoard(teamContext, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Board, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get boards + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getBoards(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update board options + * + * @param {{ [key: string] : string; }} options - options to updated + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - identifier for board, either category plural name (Eg:"Stories") or guid + */ + setBoardOptions(options, teamContext, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "23ad19fc-3b8e-4877-8462-b3f92bc06b40", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, options, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get board user settings for a board id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Board ID or Name + */ + getBoardUserSettings(teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "b30d9f58-1891-4b0a-b168-c46408f919b0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update board user settings for the board id + * + * @param {{ [key: string] : string; }} boardUserSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + updateBoardUserSettings(boardUserSettings, teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "b30d9f58-1891-4b0a-b168-c46408f919b0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, boardUserSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a team's capacity including total capacity and days off + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + getCapacitiesWithIdentityRefAndTotals(teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamCapacity, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a team member's capacity + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + * @param {string} teamMemberId - ID of the team member + */ + getCapacityWithIdentityRef(teamContext, iterationId, teamMemberId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId, + teamMemberId: teamMemberId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replace a team's capacity + * + * @param {WorkInterfaces.TeamMemberCapacityIdentityRef[]} capacities - Team capacity to replace + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + replaceCapacitiesWithIdentityRef(capacities, teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, capacities, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a team member's capacity + * + * @param {WorkInterfaces.CapacityPatch} patch - Updated capacity + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + * @param {string} teamMemberId - ID of the team member + */ + updateCapacityWithIdentityRef(patch, teamContext, iterationId, teamMemberId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId, + teamMemberId: teamMemberId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "work", "74412d15-8c1a-4352-a48d-ef1ed5587d57", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, patch, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamMemberCapacityIdentityRef, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get board card Rule settings for the board id or board by name + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + getBoardCardRuleSettings(teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "b044a3d9-02ea-49c7-91a1-b730949cc896", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update board card Rule settings for the board id or board by name + * + * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + updateBoardCardRuleSettings(boardCardRuleSettings, teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "b044a3d9-02ea-49c7-91a1-b730949cc896", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, boardCardRuleSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update taskboard card Rule settings + * + * @param {WorkInterfaces.BoardCardRuleSettings} boardCardRuleSettings + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTaskboardCardRuleSettings(boardCardRuleSettings, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "3f84a8d1-1aab-423e-a94b-6dcbdcca511f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, boardCardRuleSettings, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get board card settings for the board id or board by name + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + getBoardCardSettings(teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "07c3b467-bc60-4f05-8e34-599ce288fafc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update board card settings for the board id or board by name + * + * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board + */ + updateBoardCardSettings(boardCardSettingsToSave, teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "07c3b467-bc60-4f05-8e34-599ce288fafc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, boardCardSettingsToSave, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update taskboard card settings + * + * @param {WorkInterfaces.BoardCardSettings} boardCardSettingsToSave + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTaskboardCardSettings(boardCardSettingsToSave, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "work", "0d63745f-31f3-4cf3-9056-2a064e567637", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, boardCardSettingsToSave, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a board chart + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + * @param {string} name - The chart name + */ + getBoardChart(teamContext, board, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get board charts + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + */ + getBoardCharts(teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a board chart + * + * @param {WorkInterfaces.BoardChart} chart + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Identifier for board, either board's backlog level name (Eg:"Stories") or Id + * @param {string} name - The chart name + */ + updateBoardChart(chart, teamContext, board, name) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board, + name: name + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "45fe888c-239e-49fd-958c-df1a1ab21d97", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, chart, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get columns on a board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + getBoardColumns(teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c555d7ff-84e1-47df-9923-a3fe0cd8751b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BoardColumn, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update columns on a board + * + * @param {WorkInterfaces.BoardColumn[]} boardColumns - List of board columns to update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + updateBoardColumns(boardColumns, teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c555d7ff-84e1-47df-9923-a3fe0cd8751b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, boardColumns, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.BoardColumn, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get Delivery View Data + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier for delivery view + * @param {number} revision - Revision of the plan for which you want data. If the current plan is a different revision you will get an ViewRevisionMismatchException exception. If you do not supply a revision you will get data for the latest revision. + * @param {Date} startDate - The start date of timeline + * @param {Date} endDate - The end date of timeline + */ + getDeliveryTimelineData(project, id, revision, startDate, endDate) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + revision: revision, + startDate: startDate, + endDate: endDate, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "bdd0834e-101f-49f0-a6ae-509f384a12b4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.DeliveryViewData, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get an iteration's capacity for all teams in iteration + * + * @param {string} project - Project ID or project name + * @param {string} iterationId - ID of the iteration + */ + getTotalIterationCapacities(project, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1e385ce0-396b-4273-8171-d64562c18d37", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a team's iteration by iterationId + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration + */ + deleteTeamIteration(teamContext, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get team's iteration by iterationId + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} id - ID of the iteration + */ + getTeamIteration(teamContext, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a team's iterations using timeframe filter + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} timeframe - A filter for which iterations are returned based on relative time. Only Current is supported currently. + */ + getTeamIterations(teamContext, timeframe) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + let queryValues = { + '$timeframe': timeframe, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add an iteration to the team + * + * @param {WorkInterfaces.TeamSettingsIteration} iteration - Iteration to add + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + postTeamIteration(iteration, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c9175577-28a1-4b06-9197-8636af9f64ad", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, iteration, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsIteration, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a new plan for the team + * + * @param {WorkInterfaces.CreatePlan} postedPlan - Plan definition + * @param {string} project - Project ID or project name + */ + createPlan(postedPlan, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, postedPlan, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete the specified plan + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + deletePlan(project, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the information for the specified plan + * + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + getPlan(project, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the information for all the plans configured for the given team + * + * @param {string} project - Project ID or project name + */ + getPlans(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update the information for the specified plan + * + * @param {WorkInterfaces.UpdatePlan} updatedPlan - Plan definition to be updated + * @param {string} project - Project ID or project name + * @param {string} id - Identifier of the plan + */ + updatePlan(updatedPlan, project, id) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0b42cb47-cd73-4810-ac90-19c9ba147453", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, updatedPlan, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.Plan, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get process configuration + * + * @param {string} project - Project ID or project name + */ + getProcessConfiguration(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "f901ba42-86d2-4b0c-89c1-3f86d06daa84", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get rows on a board + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + getBoardRows(teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0863355d-aefd-4d63-8669-984c9b7b0e78", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update rows on a board + * + * @param {WorkInterfaces.BoardRow[]} boardRows - List of board rows to update + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} board - Name or ID of the specific board + */ + updateBoardRows(boardRows, teamContext, board) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + board: board + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "0863355d-aefd-4d63-8669-984c9b7b0e78", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, boardRows, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getColumns(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c6815dbe-8e7e-4ffe-9a79-e83ee712aa92", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {WorkInterfaces.UpdateTaskboardColumn[]} updateColumns + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateColumns(updateColumns, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c6815dbe-8e7e-4ffe-9a79-e83ee712aa92", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, updateColumns, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + */ + getWorkItemColumns(teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1be23c36-8872-4abc-b57d-402cd6c669d9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {WorkInterfaces.UpdateTaskboardWorkItemColumn} updateColumn + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId + * @param {number} workItemId + */ + updateWorkItemColumn(updateColumn, teamContext, iterationId, workItemId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId, + workItemId: workItemId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1be23c36-8872-4abc-b57d-402cd6c669d9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateColumn, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get team's days off for an iteration + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + getTeamDaysOff(teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "2d4faa2e-9150-4cbf-a47a-932b1b4a0773", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsDaysOff, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Set a team's days off for an iteration + * + * @param {WorkInterfaces.TeamSettingsDaysOffPatch} daysOffPatch - Team's days off patch containing a list of start and end dates + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + updateTeamDaysOff(daysOffPatch, teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "2d4faa2e-9150-4cbf-a47a-932b1b4a0773", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, daysOffPatch, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSettingsDaysOff, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a collection of team field values + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getTeamFieldValues(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "07ced576-58ed-49e6-9c1e-5cb53ab8bf2a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update team field values + * + * @param {WorkInterfaces.TeamFieldValuesPatch} patch + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTeamFieldValues(patch, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "07ced576-58ed-49e6-9c1e-5cb53ab8bf2a", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, patch, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a team's settings + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + getTeamSettings(teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c3c1012b-bea7-49d7-b45e-1664e566f84c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSetting, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a team's settings + * + * @param {WorkInterfaces.TeamSettingsPatch} teamSettingsPatch - TeamSettings changes + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + updateTeamSettings(teamSettingsPatch, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "c3c1012b-bea7-49d7-b45e-1664e566f84c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, teamSettingsPatch, options); + let ret = this.formatResponse(res.result, WorkInterfaces.TypeInfo.TeamSetting, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get work items for iteration + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - ID of the iteration + */ + getIterationWorkItems(teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "5b3ef1a6-d3ab-44cd-bafd-c7f45db850fa", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Reorder Product Backlog/Boards Work Items + * + * @param {WorkInterfaces.ReorderOperation} operation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + reorderBacklogWorkItems(operation, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "1c22b714-e7e4-41b9-85e0-56ee13ef55ed", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, operation, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Reorder Sprint Backlog/Taskboard Work Items + * + * @param {WorkInterfaces.ReorderOperation} operation + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} iterationId - The id of the iteration + */ + reorderIterationWorkItems(operation, teamContext, iterationId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + iterationId: iterationId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "work", "47755db2-d7eb-405a-8c25-675401525fc9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, operation, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +WorkApi.RESOURCE_AREA_ID = "1d4f49f9-02b9-4e26-b826-2cdb6195f2a9"; +exports.WorkApi = WorkApi; diff --git a/node_modules/azure-devops-node-api/WorkItemTrackingApi.d.ts b/node_modules/azure-devops-node-api/WorkItemTrackingApi.d.ts new file mode 100644 index 0000000..30948e5 --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkItemTrackingApi.d.ts @@ -0,0 +1,829 @@ +/// +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import TfsCoreInterfaces = require("./interfaces/CoreInterfaces"); +import VSSInterfaces = require("./interfaces/common/VSSInterfaces"); +import WorkItemTrackingInterfaces = require("./interfaces/WorkItemTrackingInterfaces"); +export interface IWorkItemTrackingApi extends basem.ClientApiBase { + getAccountMyWorkData(queryOption?: WorkItemTrackingInterfaces.QueryOption): Promise; + getRecentActivityData(): Promise; + getRecentMentions(): Promise; + getWorkArtifactLinkTypes(): Promise; + queryWorkItemsForArtifactUris(artifactUriQuery: WorkItemTrackingInterfaces.ArtifactUriQuery, project?: string): Promise; + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string, project?: string, areaPath?: string): Promise; + getAttachmentContent(id: string, fileName?: string, project?: string, download?: boolean): Promise; + getAttachmentZip(id: string, fileName?: string, project?: string, download?: boolean): Promise; + getClassificationNodes(project: string, ids: number[], depth?: number, errorPolicy?: WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy): Promise; + getRootNodes(project: string, depth?: number): Promise; + createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; + getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; + updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + getEngagedUsers(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType, top?: number, skip?: number): Promise; + addComment(request: WorkItemTrackingInterfaces.CommentCreate, project: string, workItemId: number): Promise; + deleteComment(project: string, workItemId: number, commentId: number): Promise; + getComment(project: string, workItemId: number, commentId: number, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise; + getComments(project: string, workItemId: number, top?: number, continuationToken?: string, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions, order?: WorkItemTrackingInterfaces.CommentSortOrder): Promise; + getCommentsBatch(project: string, workItemId: number, ids: number[], includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise; + updateComment(request: WorkItemTrackingInterfaces.CommentUpdate, project: string, workItemId: number, commentId: number): Promise; + createCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise; + deleteCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise; + getCommentReactions(project: string, workItemId: number, commentId: number): Promise; + getCommentVersion(project: string, workItemId: number, commentId: number, version: number): Promise; + getCommentVersions(project: string, workItemId: number, commentId: number): Promise; + createField(workItemField: WorkItemTrackingInterfaces.WorkItemField, project?: string): Promise; + deleteField(fieldNameOrRefName: string, project?: string): Promise; + getField(fieldNameOrRefName: string, project?: string): Promise; + getFields(project?: string, expand?: WorkItemTrackingInterfaces.GetFieldsExpand): Promise; + updateField(payload: WorkItemTrackingInterfaces.UpdateWorkItemField, fieldNameOrRefName: string, project?: string): Promise; + migrateProjectsProcess(newProcess: WorkItemTrackingInterfaces.ProcessIdModel, project: string): Promise; + createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, validateWiqlOnly?: boolean): Promise; + deleteQuery(project: string, query: string): Promise; + getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; + getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean, useIsoDateFormat?: boolean): Promise; + searchQueries(project: string, filter: string, top?: number, expand?: WorkItemTrackingInterfaces.QueryExpand, includeDeleted?: boolean): Promise; + updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; + getQueriesBatch(queryGetRequest: WorkItemTrackingInterfaces.QueryBatchGetRequest, project: string): Promise; + destroyWorkItem(id: number, project?: string): Promise; + getDeletedWorkItem(id: number, project?: string): Promise; + getDeletedWorkItems(ids: number[], project?: string): Promise; + getDeletedWorkItemShallowReferences(project?: string): Promise; + restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; + getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise; + getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise; + sendMail(body: WorkItemTrackingInterfaces.SendMailBody, project?: string): Promise; + deleteTag(project: string, tagIdOrName: string): Promise; + getTag(project: string, tagIdOrName: string): Promise; + getTags(project: string): Promise; + updateTag(tagData: WorkItemTrackingInterfaces.WorkItemTagDefinition, project: string, tagIdOrName: string): Promise; + createTemplate(template: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext): Promise; + getTemplates(teamContext: TfsCoreInterfaces.TeamContext, workitemtypename?: string): Promise; + deleteTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise; + getTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise; + replaceTemplate(templateContent: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise; + getUpdate(id: number, updateNumber: number, project?: string): Promise; + getUpdates(id: number, top?: number, skip?: number, project?: string): Promise; + queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise; + queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise; + getWorkItemIconJson(icon: string, color?: string, v?: number): Promise; + getWorkItemIcons(): Promise; + getWorkItemIconSvg(icon: string, color?: string, v?: number): Promise; + getWorkItemIconXaml(icon: string, color?: string, v?: number): Promise; + getReportingLinksByLinkType(project?: string, linkTypes?: string[], types?: string[], continuationToken?: string, startDateTime?: Date): Promise; + getRelationType(relation: string): Promise; + getRelationTypes(): Promise; + readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean, includeLatestOnly?: boolean, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand, includeDiscussionChangesOnly?: boolean, maxPageSize?: number): Promise; + readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand): Promise; + readReportingDiscussions(project?: string, continuationToken?: string, maxPageSize?: number): Promise; + createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + deleteWorkItem(id: number, project?: string, destroy?: boolean): Promise; + getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise; + getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, errorPolicy?: WorkItemTrackingInterfaces.WorkItemErrorPolicy, project?: string): Promise; + updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, project?: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + getWorkItemsBatch(workItemGetRequest: WorkItemTrackingInterfaces.WorkItemBatchGetRequest, project?: string): Promise; + getWorkItemStateColors(projectNames: string[]): Promise; + getWorkItemNextStatesOnCheckinAction(ids: number[], action?: string): Promise; + getWorkItemTypeCategories(project: string): Promise; + getWorkItemTypeCategory(project: string, category: string): Promise; + getWorkItemTypeColors(projectNames: string[]): Promise<{ + key: string; + value: WorkItemTrackingInterfaces.WorkItemTypeColor[]; + }[]>; + getWorkItemTypeColorAndIcons(projectNames: string[]): Promise<{ + key: string; + value: WorkItemTrackingInterfaces.WorkItemTypeColorAndIcon[]; + }[]>; + getWorkItemType(project: string, type: string): Promise; + getWorkItemTypes(project: string): Promise; + getWorkItemTypeFieldsWithReferences(project: string, type: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise; + getWorkItemTypeFieldWithReferences(project: string, type: string, field: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise; + getWorkItemTypeStates(project: string, type: string): Promise; + exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; + updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; +} +export declare class WorkItemTrackingApi extends basem.ClientApiBase implements IWorkItemTrackingApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; + /** + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details. + * + * @param {WorkItemTrackingInterfaces.QueryOption} queryOption + */ + getAccountMyWorkData(queryOption?: WorkItemTrackingInterfaces.QueryOption): Promise; + /** + * Gets recent work item activities + * + */ + getRecentActivityData(): Promise; + /** + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. + * + */ + getRecentMentions(): Promise; + /** + * Get the list of work item tracking outbound artifact link types. + * + */ + getWorkArtifactLinkTypes(): Promise; + /** + * Queries work items linked to a given list of artifact URI. + * + * @param {WorkItemTrackingInterfaces.ArtifactUriQuery} artifactUriQuery - Defines a list of artifact URI for querying work items. + * @param {string} project - Project ID or project name + */ + queryWorkItemsForArtifactUris(artifactUriQuery: WorkItemTrackingInterfaces.ArtifactUriQuery, project?: string): Promise; + /** + * Uploads an attachment. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName - The name of the file + * @param {string} uploadType - Attachment upload type: Simple or Chunked + * @param {string} project - Project ID or project name + * @param {string} areaPath - Target project Area Path + */ + createAttachment(customHeaders: any, contentStream: NodeJS.ReadableStream, fileName?: string, uploadType?: string, project?: string, areaPath?: string): Promise; + /** + * Downloads an attachment. + * + * @param {string} id - Attachment ID + * @param {string} fileName - Name of the file + * @param {string} project - Project ID or project name + * @param {boolean} download - If set to true always download attachment + */ + getAttachmentContent(id: string, fileName?: string, project?: string, download?: boolean): Promise; + /** + * Downloads an attachment. + * + * @param {string} id - Attachment ID + * @param {string} fileName - Name of the file + * @param {string} project - Project ID or project name + * @param {boolean} download - If set to true always download attachment + */ + getAttachmentZip(id: string, fileName?: string, project?: string, download?: boolean): Promise; + /** + * Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. + * + * @param {string} project - Project ID or project name + * @param {number[]} ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes. + * @param {number} depth - Depth of children to fetch. + * @param {WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy} errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit. + */ + getClassificationNodes(project: string, ids: number[], depth?: number, errorPolicy?: WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy): Promise; + /** + * Gets root classification nodes under the project. + * + * @param {string} project - Project ID or project name + * @param {number} depth - Depth of children to fetch. + */ + getRootNodes(project: string, depth?: number): Promise; + /** + * Create new or update an existing classification node. + * + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + */ + createOrUpdateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + /** + * Delete an existing classification node. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + * @param {number} reclassifyId - Id of the target classification node for reclassification. + */ + deleteClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, reclassifyId?: number): Promise; + /** + * Gets the classification node for a given node path. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + * @param {number} depth - Depth of children to fetch. + */ + getClassificationNode(project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string, depth?: number): Promise; + /** + * Update an existing classification node. + * + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + */ + updateClassificationNode(postedNode: WorkItemTrackingInterfaces.WorkItemClassificationNode, project: string, structureGroup: WorkItemTrackingInterfaces.TreeStructureGroup, path?: string): Promise; + /** + * Get users who reacted on the comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID. + * @param {number} commentId - Comment ID. + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction. + * @param {number} top + * @param {number} skip + */ + getEngagedUsers(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType, top?: number, skip?: number): Promise; + /** + * Add a comment on a work item. + * + * @param {WorkItemTrackingInterfaces.CommentCreate} request - Comment create request. + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item. + */ + addComment(request: WorkItemTrackingInterfaces.CommentCreate, project: string, workItemId: number): Promise; + /** + * Delete a comment on a work item. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item. + * @param {number} commentId + */ + deleteComment(project: string, workItemId: number, commentId: number): Promise; + /** + * Returns a work item comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item to get the comment. + * @param {number} commentId - Id of the comment to return. + * @param {boolean} includeDeleted - Specify if the deleted comment should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + */ + getComment(project: string, workItemId: number, commentId: number, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise; + /** + * Returns a list of work item comments, pageable. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item to get comments for. + * @param {number} top - Max number of comments to return. + * @param {string} continuationToken - Used to query for the next page of comments. + * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + * @param {WorkItemTrackingInterfaces.CommentSortOrder} order - Order in which the comments should be returned. + */ + getComments(project: string, workItemId: number, top?: number, continuationToken?: string, includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions, order?: WorkItemTrackingInterfaces.CommentSortOrder): Promise; + /** + * Returns a list of work item comments by ids. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item to get comments for. + * @param {number[]} ids - Comma-separated list of comment ids to return. + * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + */ + getCommentsBatch(project: string, workItemId: number, ids: number[], includeDeleted?: boolean, expand?: WorkItemTrackingInterfaces.CommentExpandOptions): Promise; + /** + * Update a comment on a work item. + * + * @param {WorkItemTrackingInterfaces.CommentUpdate} request - Comment update request. + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item. + * @param {number} commentId + */ + updateComment(request: WorkItemTrackingInterfaces.CommentUpdate, project: string, workItemId: number, commentId: number): Promise; + /** + * Adds a new reaction to a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction + */ + createCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise; + /** + * Deletes an existing reaction on a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction + */ + deleteCommentReaction(project: string, workItemId: number, commentId: number, reactionType: WorkItemTrackingInterfaces.CommentReactionType): Promise; + /** + * Gets reactions of a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + */ + getCommentReactions(project: string, workItemId: number, commentId: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} workItemId + * @param {number} commentId + * @param {number} version + */ + getCommentVersion(project: string, workItemId: number, commentId: number, version: number): Promise; + /** + * @param {string} project - Project ID or project name + * @param {number} workItemId + * @param {number} commentId + */ + getCommentVersions(project: string, workItemId: number, commentId: number): Promise; + /** + * Create a new field. + * + * @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition + * @param {string} project - Project ID or project name + */ + createField(workItemField: WorkItemTrackingInterfaces.WorkItemField, project?: string): Promise; + /** + * Deletes the field. To undelete a filed, see "Update Field" API. + * + * @param {string} fieldNameOrRefName - Field simple name or reference name + * @param {string} project - Project ID or project name + */ + deleteField(fieldNameOrRefName: string, project?: string): Promise; + /** + * Gets information on a specific field. + * + * @param {string} fieldNameOrRefName - Field simple name or reference name + * @param {string} project - Project ID or project name + */ + getField(fieldNameOrRefName: string, project?: string): Promise; + /** + * Returns information for all fields. The project ID/name parameter is optional. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.GetFieldsExpand} expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. + */ + getFields(project?: string, expand?: WorkItemTrackingInterfaces.GetFieldsExpand): Promise; + /** + * Update a field. + * + * @param {WorkItemTrackingInterfaces.UpdateWorkItemField} payload - Payload contains desired value of the field's properties + * @param {string} fieldNameOrRefName - Name/reference name of the field to be updated + * @param {string} project - Project ID or project name + */ + updateField(payload: WorkItemTrackingInterfaces.UpdateWorkItemField, fieldNameOrRefName: string, project?: string): Promise; + /** + * Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile. + * + * @param {WorkItemTrackingInterfaces.ProcessIdModel} newProcess + * @param {string} project - Project ID or project name + */ + migrateProjectsProcess(newProcess: WorkItemTrackingInterfaces.ProcessIdModel, project: string): Promise; + /** + * Creates a query, or moves a query. + * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. + * @param {string} project - Project ID or project name + * @param {string} query - The parent id or path under which the query is to be created. + * @param {boolean} validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. + */ + createQuery(postedQuery: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, validateWiqlOnly?: boolean): Promise; + /** + * Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. + * + * @param {string} project - Project ID or project name + * @param {string} query - ID or path of the query or folder to delete. + */ + deleteQuery(project: string, query: string): Promise; + /** + * Gets the root queries and their children + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. + * @param {number} depth - In the folder of queries, return child queries and folders to this depth. + * @param {boolean} includeDeleted - Include deleted queries and folders + */ + getQueries(project: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean): Promise; + /** + * Retrieves an individual query and its children + * + * @param {string} project - Project ID or project name + * @param {string} query - ID or path of the query. + * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. + * @param {number} depth - In the folder of queries, return child queries and folders to this depth. + * @param {boolean} includeDeleted - Include deleted queries and folders + * @param {boolean} useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format + */ + getQuery(project: string, query: string, expand?: WorkItemTrackingInterfaces.QueryExpand, depth?: number, includeDeleted?: boolean, useIsoDateFormat?: boolean): Promise; + /** + * Searches all queries the user has access to in the current project + * + * @param {string} project - Project ID or project name + * @param {string} filter - The text to filter the queries with. + * @param {number} top - The number of queries to return (Default is 50 and maximum is 200). + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {boolean} includeDeleted - Include deleted queries and folders + */ + searchQueries(project: string, filter: string, top?: number, expand?: WorkItemTrackingInterfaces.QueryExpand, includeDeleted?: boolean): Promise; + /** + * Update a query or a folder. This allows you to update, rename and move queries and folders. + * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - The query to update. + * @param {string} project - Project ID or project name + * @param {string} query - The ID or path for the query to update. + * @param {boolean} undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants. + */ + updateQuery(queryUpdate: WorkItemTrackingInterfaces.QueryHierarchyItem, project: string, query: string, undeleteDescendants?: boolean): Promise; + /** + * Gets a list of queries by ids (Maximum 1000) + * + * @param {WorkItemTrackingInterfaces.QueryBatchGetRequest} queryGetRequest + * @param {string} project - Project ID or project name + */ + getQueriesBatch(queryGetRequest: WorkItemTrackingInterfaces.QueryBatchGetRequest, project: string): Promise; + /** + * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. + * + * @param {number} id - ID of the work item to be destroyed permanently + * @param {string} project - Project ID or project name + */ + destroyWorkItem(id: number, project?: string): Promise; + /** + * Gets a deleted work item from Recycle Bin. + * + * @param {number} id - ID of the work item to be returned + * @param {string} project - Project ID or project name + */ + getDeletedWorkItem(id: number, project?: string): Promise; + /** + * Gets the work items from the recycle bin, whose IDs have been specified in the parameters + * + * @param {number[]} ids - Comma separated list of IDs of the deleted work items to be returned + * @param {string} project - Project ID or project name + */ + getDeletedWorkItems(ids: number[], project?: string): Promise; + /** + * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. + * + * @param {string} project - Project ID or project name + */ + getDeletedWorkItemShallowReferences(project?: string): Promise; + /** + * Restores the deleted work item from Recycle Bin. + * + * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - Paylod with instructions to update the IsDeleted flag to false + * @param {number} id - ID of the work item to be restored + * @param {string} project - Project ID or project name + */ + restoreWorkItem(payload: WorkItemTrackingInterfaces.WorkItemDeleteUpdate, id: number, project?: string): Promise; + /** + * Returns a fully hydrated work item for the requested revision + * + * @param {number} id + * @param {number} revisionNumber + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param {string} project - Project ID or project name + */ + getRevision(id: number, revisionNumber: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise; + /** + * Returns the list of fully hydrated work item revisions, paged. + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param {string} project - Project ID or project name + */ + getRevisions(id: number, top?: number, skip?: number, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise; + /** + * RESTful method to send mail for selected/queried work items. + * + * @param {WorkItemTrackingInterfaces.SendMailBody} body + * @param {string} project - Project ID or project name + */ + sendMail(body: WorkItemTrackingInterfaces.SendMailBody, project?: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + deleteTag(project: string, tagIdOrName: string): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + getTag(project: string, tagIdOrName: string): Promise; + /** + * @param {string} project - Project ID or project name + */ + getTags(project: string): Promise; + /** + * @param {WorkItemTrackingInterfaces.WorkItemTagDefinition} tagData + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + updateTag(tagData: WorkItemTrackingInterfaces.WorkItemTagDefinition, project: string, tagIdOrName: string): Promise; + /** + * Creates a template + * + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createTemplate(template: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext): Promise; + /** + * Gets template + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} workitemtypename - Optional, When specified returns templates for given Work item type. + */ + getTemplates(teamContext: TfsCoreInterfaces.TeamContext, workitemtypename?: string): Promise; + /** + * Deletes the template with given id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id + */ + deleteTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise; + /** + * Gets the template with specified id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template Id + */ + getTemplate(teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise; + /** + * Replace template contents + * + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} templateContent - Template contents to replace with + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id + */ + replaceTemplate(templateContent: WorkItemTrackingInterfaces.WorkItemTemplate, teamContext: TfsCoreInterfaces.TeamContext, templateId: string): Promise; + /** + * Returns a single update for a work item + * + * @param {number} id + * @param {number} updateNumber + * @param {string} project - Project ID or project name + */ + getUpdate(id: number, updateNumber: number, project?: string): Promise; + /** + * Returns a the deltas between work item revisions + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {string} project - Project ID or project name + */ + getUpdates(id: number, top?: number, skip?: number, project?: string): Promise; + /** + * Gets the results of the query given its WIQL. + * + * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the WIQL. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision - Whether or not to use time precision. + * @param {number} top - The max number of results to return. + */ + queryByWiql(wiql: WorkItemTrackingInterfaces.Wiql, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise; + /** + * Gets the results of the query given the query ID. + * + * @param {string} id - The query ID. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision - Whether or not to use time precision. + * @param {number} top - The max number of results to return. + */ + queryById(id: string, teamContext?: TfsCoreInterfaces.TeamContext, timePrecision?: boolean, top?: number): Promise; + /** + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) + */ + getWorkItemIconJson(icon: string, color?: string, v?: number): Promise; + /** + * Get a list of all work item icons. + * + */ + getWorkItemIcons(): Promise; + /** + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) + */ + getWorkItemIconSvg(icon: string, color?: string, v?: number): Promise; + /** + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) + */ + getWorkItemIconXaml(icon: string, color?: string, v?: number): Promise; + /** + * Get a batch of work item links + * + * @param {string} project - Project ID or project name + * @param {string[]} linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. + * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. + * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. + */ + getReportingLinksByLinkType(project?: string, linkTypes?: string[], types?: string[], continuationToken?: string, startDateTime?: Date): Promise; + /** + * Gets the work item relation type definition. + * + * @param {string} relation - The relation name + */ + getRelationType(relation: string): Promise; + /** + * Gets the work item relation types. + * + */ + getRelationTypes(): Promise; + /** + * Get a batch of work item revisions with the option of including deleted items + * + * @param {string} project - Project ID or project name + * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. + * @param {boolean} includeDeleted - Specify if the deleted item should be returned. + * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. + * @param {boolean} includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions + * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand - Return all the fields in work item revisions, including long text fields which are not returned by default + * @param {boolean} includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed + * @param {number} maxPageSize - The maximum number of results to return in this batch + */ + readReportingRevisionsGet(project?: string, fields?: string[], types?: string[], continuationToken?: string, startDateTime?: Date, includeIdentityRef?: boolean, includeDeleted?: boolean, includeTagRef?: boolean, includeLatestOnly?: boolean, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand, includeDiscussionChangesOnly?: boolean, maxPageSize?: number): Promise; + /** + * Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. + * + * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format + * @param {string} project - Project ID or project name + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand + */ + readReportingRevisionsPost(filter: WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter, project?: string, continuationToken?: string, startDateTime?: Date, expand?: WorkItemTrackingInterfaces.ReportingRevisionsExpand): Promise; + /** + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} maxPageSize + */ + readReportingDiscussions(project?: string, continuationToken?: string, maxPageSize?: number): Promise; + /** + * Creates a single work item. + * + * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the work item + * @param {string} project - Project ID or project name + * @param {string} type - The work item type of the work item to create + * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item + * @param {boolean} bypassRules - Do not enforce the work item type rules on this update + * @param {boolean} suppressNotifications - Do not fire any notifications for this change + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + */ + createWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, project: string, type: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * Returns a single work item from a template. + * + * @param {string} project - Project ID or project name + * @param {string} type - The work item type name + * @param {string} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + */ + getWorkItemTemplate(project: string, type: string, fields?: string, asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution. + * + * @param {number} id - ID of the work item to be deleted + * @param {string} project - Project ID or project name + * @param {boolean} destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. + */ + deleteWorkItem(id: number, project?: string, destroy?: boolean): Promise; + /** + * Returns a single work item. + * + * @param {number} id - The work item id + * @param {string[]} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * @param {string} project - Project ID or project name + */ + getWorkItem(id: number, fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, project?: string): Promise; + /** + * Returns a list of work items (Maximum 200) + * + * @param {number[]} ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed). + * @param {string[]} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * @param {WorkItemTrackingInterfaces.WorkItemErrorPolicy} errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}. + * @param {string} project - Project ID or project name + */ + getWorkItems(ids: number[], fields?: string[], asOf?: Date, expand?: WorkItemTrackingInterfaces.WorkItemExpand, errorPolicy?: WorkItemTrackingInterfaces.WorkItemErrorPolicy, project?: string): Promise; + /** + * Updates a single work item. + * + * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the update + * @param {number} id - The id of the work item to update + * @param {string} project - Project ID or project name + * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item + * @param {boolean} bypassRules - Do not enforce the work item type rules on this update + * @param {boolean} suppressNotifications - Do not fire any notifications for this change + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + */ + updateWorkItem(customHeaders: any, document: VSSInterfaces.JsonPatchDocument, id: number, project?: string, validateOnly?: boolean, bypassRules?: boolean, suppressNotifications?: boolean, expand?: WorkItemTrackingInterfaces.WorkItemExpand): Promise; + /** + * Gets work items for a list of work item ids (Maximum 200) + * + * @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest + * @param {string} project - Project ID or project name + */ + getWorkItemsBatch(workItemGetRequest: WorkItemTrackingInterfaces.WorkItemBatchGetRequest, project?: string): Promise; + /** + * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects + * + * @param {string[]} projectNames + */ + getWorkItemStateColors(projectNames: string[]): Promise; + /** + * Returns the next state on the given work item IDs. + * + * @param {number[]} ids - list of work item ids + * @param {string} action - possible actions. Currently only supports checkin + */ + getWorkItemNextStatesOnCheckinAction(ids: number[], action?: string): Promise; + /** + * Get all work item type categories. + * + * @param {string} project - Project ID or project name + */ + getWorkItemTypeCategories(project: string): Promise; + /** + * Get specific work item type category by name. + * + * @param {string} project - Project ID or project name + * @param {string} category - The category name + */ + getWorkItemTypeCategory(project: string, category: string): Promise; + /** + * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects + * + * @param {string[]} projectNames + */ + getWorkItemTypeColors(projectNames: string[]): Promise<{ + key: string; + value: WorkItemTrackingInterfaces.WorkItemTypeColor[]; + }[]>; + /** + * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects + * + * @param {string[]} projectNames + */ + getWorkItemTypeColorAndIcons(projectNames: string[]): Promise<{ + key: string; + value: WorkItemTrackingInterfaces.WorkItemTypeColorAndIcon[]; + }[]>; + /** + * Returns a work item type definition. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type name + */ + getWorkItemType(project: string, type: string): Promise; + /** + * Returns the list of work item types + * + * @param {string} project - Project ID or project name + */ + getWorkItemTypes(project: string): Promise; + /** + * Get a list of fields for a work item type with detailed references. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type. + * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + */ + getWorkItemTypeFieldsWithReferences(project: string, type: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise; + /** + * Get a field for a work item type with detailed references. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type. + * @param {string} field + * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + */ + getWorkItemTypeFieldWithReferences(project: string, type: string, field: string, expand?: WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel): Promise; + /** + * Returns the state names and colors for a work item type. + * + * @param {string} project - Project ID or project name + * @param {string} type - The state name + */ + getWorkItemTypeStates(project: string, type: string): Promise; + /** + * Export work item type + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} exportGlobalLists + */ + exportWorkItemTypeDefinition(project?: string, type?: string, exportGlobalLists?: boolean): Promise; + /** + * Add/updates a work item type + * + * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel + * @param {string} project - Project ID or project name + */ + updateWorkItemTypeDefinition(updateModel: WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel, project?: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/WorkItemTrackingApi.js b/node_modules/azure-devops-node-api/WorkItemTrackingApi.js new file mode 100644 index 0000000..3b2d446 --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkItemTrackingApi.js @@ -0,0 +1,2848 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const WorkItemTrackingInterfaces = require("./interfaces/WorkItemTrackingInterfaces"); +class WorkItemTrackingApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); + } + /** + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. This returns Doing, Done, Follows and activity work items details. + * + * @param {WorkItemTrackingInterfaces.QueryOption} queryOption + */ + getAccountMyWorkData(queryOption) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$queryOption': queryOption, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "def3d688-ddf5-4096-9024-69beea15cdbd", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountMyWorkResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets recent work item activities + * + */ + getRecentActivityData() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "1bc988f4-c15f-4072-ad35-497c87e3a909", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountRecentActivityWorkItemModel2, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * INTERNAL ONLY: USED BY ACCOUNT MY WORK PAGE. + * + */ + getRecentMentions() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "d60eeb6e-e18c-4478-9e94-a0094e28f41c", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.AccountRecentMentionWorkItemModel, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get the list of work item tracking outbound artifact link types. + * + */ + getWorkArtifactLinkTypes() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "1a31de40-e318-41cd-a6c6-881077df52e3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Queries work items linked to a given list of artifact URI. + * + * @param {WorkItemTrackingInterfaces.ArtifactUriQuery} artifactUriQuery - Defines a list of artifact URI for querying work items. + * @param {string} project - Project ID or project name + */ + queryWorkItemsForArtifactUris(artifactUriQuery, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "a9a9aa7a-8c09-44d3-ad1b-46e855c1e3d3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, artifactUriQuery, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Uploads an attachment. + * + * @param {NodeJS.ReadableStream} contentStream - Content to upload + * @param {string} fileName - The name of the file + * @param {string} uploadType - Attachment upload type: Simple or Chunked + * @param {string} project - Project ID or project name + * @param {string} areaPath - Target project Area Path + */ + createAttachment(customHeaders, contentStream, fileName, uploadType, project, areaPath) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fileName: fileName, + uploadType: uploadType, + areaPath: areaPath, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/octet-stream"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.uploadStream("POST", url, contentStream, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Downloads an attachment. + * + * @param {string} id - Attachment ID + * @param {string} fileName - Name of the file + * @param {string} project - Project ID or project name + * @param {boolean} download - If set to true always download attachment + */ + getAttachmentContent(id, fileName, project, download) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + fileName: fileName, + download: download, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/octet-stream", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Downloads an attachment. + * + * @param {string} id - Attachment ID + * @param {string} fileName - Name of the file + * @param {string} project - Project ID or project name + * @param {boolean} download - If set to true always download attachment + */ + getAttachmentZip(id, fileName, project, download) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + fileName: fileName, + download: download, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "e07b5fa4-1499-494d-a496-64b860fd64ff", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("application/zip", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets root classification nodes or list of classification nodes for a given list of nodes ids, for a given project. In case ids parameter is supplied you will get list of classification nodes for those ids. Otherwise you will get root classification nodes for this project. + * + * @param {string} project - Project ID or project name + * @param {number[]} ids - Comma separated integer classification nodes ids. It's not required, if you want root nodes. + * @param {number} depth - Depth of children to fetch. + * @param {WorkItemTrackingInterfaces.ClassificationNodesErrorPolicy} errorPolicy - Flag to handle errors in getting some nodes. Possible options are Fail and Omit. + */ + getClassificationNodes(project, ids, depth, errorPolicy) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + '$depth': depth, + errorPolicy: errorPolicy, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a70579d1-f53a-48ee-a5be-7be8659023b9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets root classification nodes under the project. + * + * @param {string} project - Project ID or project name + * @param {number} depth - Depth of children to fetch. + */ + getRootNodes(project, depth) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$depth': depth, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a70579d1-f53a-48ee-a5be-7be8659023b9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create new or update an existing classification node. + * + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + */ + createOrUpdateClassificationNode(postedNode, project, structureGroup, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + structureGroup: structureGroup, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, postedNode, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete an existing classification node. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + * @param {number} reclassifyId - Id of the target classification node for reclassification. + */ + deleteClassificationNode(project, structureGroup, path, reclassifyId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + structureGroup: structureGroup, + path: path + }; + let queryValues = { + '$reclassifyId': reclassifyId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the classification node for a given node path. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + * @param {number} depth - Depth of children to fetch. + */ + getClassificationNode(project, structureGroup, path, depth) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + structureGroup: structureGroup, + path: path + }; + let queryValues = { + '$depth': depth, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update an existing classification node. + * + * @param {WorkItemTrackingInterfaces.WorkItemClassificationNode} postedNode - Node to create or update. + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.TreeStructureGroup} structureGroup - Structure group of the classification node, area or iteration. + * @param {string} path - Path of the classification node. + */ + updateClassificationNode(postedNode, project, structureGroup, path) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + structureGroup: structureGroup, + path: path + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "5a172953-1b41-49d3-840a-33f79c3ce89f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, postedNode, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemClassificationNode, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get users who reacted on the comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID. + * @param {number} commentId - Comment ID. + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction. + * @param {number} top + * @param {number} skip + */ + getEngagedUsers(project, workItemId, commentId, reactionType, top, skip) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId, + reactionType: reactionType + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "e33ca5e0-2349-4285-af3d-d72d86781c35", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add a comment on a work item. + * + * @param {WorkItemTrackingInterfaces.CommentCreate} request - Comment create request. + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item. + */ + addComment(request, project, workItemId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, request, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a comment on a work item. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item. + * @param {number} commentId + */ + deleteComment(project, workItemId, commentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a work item comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item to get the comment. + * @param {number} commentId - Id of the comment to return. + * @param {boolean} includeDeleted - Specify if the deleted comment should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + */ + getComment(project, workItemId, commentId, includeDeleted, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId + }; + let queryValues = { + includeDeleted: includeDeleted, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of work item comments, pageable. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item to get comments for. + * @param {number} top - Max number of comments to return. + * @param {string} continuationToken - Used to query for the next page of comments. + * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + * @param {WorkItemTrackingInterfaces.CommentSortOrder} order - Order in which the comments should be returned. + */ + getComments(project, workItemId, top, continuationToken, includeDeleted, expand, order) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId + }; + let queryValues = { + '$top': top, + continuationToken: continuationToken, + includeDeleted: includeDeleted, + '$expand': expand, + order: order, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentList, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of work item comments by ids. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item to get comments for. + * @param {number[]} ids - Comma-separated list of comment ids to return. + * @param {boolean} includeDeleted - Specify if the deleted comments should be retrieved. + * @param {WorkItemTrackingInterfaces.CommentExpandOptions} expand - Specifies the additional data retrieval options for work item comments. + */ + getCommentsBatch(project, workItemId, ids, includeDeleted, expand) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId + }; + let queryValues = { + ids: ids && ids.join(","), + includeDeleted: includeDeleted, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentList, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a comment on a work item. + * + * @param {WorkItemTrackingInterfaces.CommentUpdate} request - Comment update request. + * @param {string} project - Project ID or project name + * @param {number} workItemId - Id of a work item. + * @param {number} commentId + */ + updateComment(request, project, workItemId, commentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "608aac0a-32e1-4493-a863-b9cf4566d257", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, request, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.Comment, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a new reaction to a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction + */ + createCommentReaction(project, workItemId, commentId, reactionType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId, + reactionType: reactionType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, null, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes an existing reaction on a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + * @param {WorkItemTrackingInterfaces.CommentReactionType} reactionType - Type of the reaction + */ + deleteCommentReaction(project, workItemId, commentId, reactionType) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId, + reactionType: reactionType + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets reactions of a comment. + * + * @param {string} project - Project ID or project name + * @param {number} workItemId - WorkItem ID + * @param {number} commentId - Comment ID + */ + getCommentReactions(project, workItemId, commentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f6cb3f27-1028-4851-af96-887e570dc21f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentReaction, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} workItemId + * @param {number} commentId + * @param {number} version + */ + getCommentVersion(project, workItemId, commentId, version) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId, + version: version + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "49e03b34-3be0-42e3-8a5d-e8dfb88ac954", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentVersion, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {number} workItemId + * @param {number} commentId + */ + getCommentVersions(project, workItemId, commentId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + workItemId: workItemId, + commentId: commentId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "49e03b34-3be0-42e3-8a5d-e8dfb88ac954", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.CommentVersion, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Create a new field. + * + * @param {WorkItemTrackingInterfaces.WorkItemField} workItemField - New field definition + * @param {string} project - Project ID or project name + */ + createField(workItemField, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, workItemField, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the field. To undelete a filed, see "Update Field" API. + * + * @param {string} fieldNameOrRefName - Field simple name or reference name + * @param {string} project - Project ID or project name + */ + deleteField(fieldNameOrRefName, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fieldNameOrRefName: fieldNameOrRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets information on a specific field. + * + * @param {string} fieldNameOrRefName - Field simple name or reference name + * @param {string} project - Project ID or project name + */ + getField(fieldNameOrRefName, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fieldNameOrRefName: fieldNameOrRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns information for all fields. The project ID/name parameter is optional. + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.GetFieldsExpand} expand - Use ExtensionFields to include extension fields, otherwise exclude them. Unless the feature flag for this parameter is enabled, extension fields are always included. + */ + getFields(project, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a field. + * + * @param {WorkItemTrackingInterfaces.UpdateWorkItemField} payload - Payload contains desired value of the field's properties + * @param {string} fieldNameOrRefName - Name/reference name of the field to be updated + * @param {string} project - Project ID or project name + */ + updateField(payload, fieldNameOrRefName, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + fieldNameOrRefName: fieldNameOrRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b51fd764-e5c2-4b9b-aaf7-3395cf4bdd94", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, payload, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemField, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Migrates a project to a different process within the same OOB type. For example, you can only migrate a project from agile/custom-agile to agile/custom-agile. + * + * @param {WorkItemTrackingInterfaces.ProcessIdModel} newProcess + * @param {string} project - Project ID or project name + */ + migrateProjectsProcess(newProcess, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "19801631-d4e5-47e9-8166-0330de0ff1e6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, newProcess, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a query, or moves a query. + * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} postedQuery - The query to create. + * @param {string} project - Project ID or project name + * @param {string} query - The parent id or path under which the query is to be created. + * @param {boolean} validateWiqlOnly - If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. + */ + createQuery(postedQuery, project, query, validateWiqlOnly) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + query: query + }; + let queryValues = { + validateWiqlOnly: validateWiqlOnly, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, postedQuery, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder. + * + * @param {string} project - Project ID or project name + * @param {string} query - ID or path of the query or folder to delete. + */ + deleteQuery(project, query) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + query: query + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the root queries and their children + * + * @param {string} project - Project ID or project name + * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. + * @param {number} depth - In the folder of queries, return child queries and folders to this depth. + * @param {boolean} includeDeleted - Include deleted queries and folders + */ + getQueries(project, expand, depth, includeDeleted) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$expand': expand, + '$depth': depth, + '$includeDeleted': includeDeleted, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Retrieves an individual query and its children + * + * @param {string} project - Project ID or project name + * @param {string} query - ID or path of the query. + * @param {WorkItemTrackingInterfaces.QueryExpand} expand - Include the query string (wiql), clauses, query result columns, and sort options in the results. + * @param {number} depth - In the folder of queries, return child queries and folders to this depth. + * @param {boolean} includeDeleted - Include deleted queries and folders + * @param {boolean} useIsoDateFormat - DateTime query clauses will be formatted using a ISO 8601 compliant format + */ + getQuery(project, query, expand, depth, includeDeleted, useIsoDateFormat) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + query: query + }; + let queryValues = { + '$expand': expand, + '$depth': depth, + '$includeDeleted': includeDeleted, + '$useIsoDateFormat': useIsoDateFormat, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Searches all queries the user has access to in the current project + * + * @param {string} project - Project ID or project name + * @param {string} filter - The text to filter the queries with. + * @param {number} top - The number of queries to return (Default is 50 and maximum is 200). + * @param {WorkItemTrackingInterfaces.QueryExpand} expand + * @param {boolean} includeDeleted - Include deleted queries and folders + */ + searchQueries(project, filter, top, expand, includeDeleted) { + return __awaiter(this, void 0, void 0, function* () { + if (filter == null) { + throw new TypeError('filter can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + '$filter': filter, + '$top': top, + '$expand': expand, + '$includeDeleted': includeDeleted, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItemsResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Update a query or a folder. This allows you to update, rename and move queries and folders. + * + * @param {WorkItemTrackingInterfaces.QueryHierarchyItem} queryUpdate - The query to update. + * @param {string} project - Project ID or project name + * @param {string} query - The ID or path for the query to update. + * @param {boolean} undeleteDescendants - Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants. + */ + updateQuery(queryUpdate, project, query, undeleteDescendants) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + query: query + }; + let queryValues = { + '$undeleteDescendants': undeleteDescendants, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a67d190c-c41f-424b-814d-0e906f659301", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, queryUpdate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of queries by ids (Maximum 1000) + * + * @param {WorkItemTrackingInterfaces.QueryBatchGetRequest} queryGetRequest + * @param {string} project - Project ID or project name + */ + getQueriesBatch(queryGetRequest, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "549816f9-09b0-4e75-9e81-01fbfcd07426", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, queryGetRequest, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.QueryHierarchyItem, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Destroys the specified work item permanently from the Recycle Bin. This action can not be undone. + * + * @param {number} id - ID of the work item to be destroyed permanently + * @param {string} project - Project ID or project name + */ + destroyWorkItem(id, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a deleted work item from Recycle Bin. + * + * @param {number} id - ID of the work item to be returned + * @param {string} project - Project ID or project name + */ + getDeletedWorkItem(id, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work items from the recycle bin, whose IDs have been specified in the parameters + * + * @param {number[]} ids - Comma separated list of IDs of the deleted work items to be returned + * @param {string} project - Project ID or project name + */ + getDeletedWorkItems(ids, project) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets a list of the IDs and the URLs of the deleted the work items in the Recycle Bin. + * + * @param {string} project - Project ID or project name + */ + getDeletedWorkItemShallowReferences(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Restores the deleted work item from Recycle Bin. + * + * @param {WorkItemTrackingInterfaces.WorkItemDeleteUpdate} payload - Paylod with instructions to update the IsDeleted flag to false + * @param {number} id - ID of the work item to be restored + * @param {string} project - Project ID or project name + */ + restoreWorkItem(payload, id, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "b70d8d39-926c-465e-b927-b1bf0e5ca0e0", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, payload, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a fully hydrated work item for the requested revision + * + * @param {number} id + * @param {number} revisionNumber + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param {string} project - Project ID or project name + */ + getRevision(id, revisionNumber, expand, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id, + revisionNumber: revisionNumber + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "a00c85a5-80fa-4565-99c3-bcd2181434bb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the list of fully hydrated work item revisions, paged. + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand + * @param {string} project - Project ID or project name + */ + getRevisions(id, top, skip, expand, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + '$top': top, + '$skip': skip, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "a00c85a5-80fa-4565-99c3-bcd2181434bb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * RESTful method to send mail for selected/queried work items. + * + * @param {WorkItemTrackingInterfaces.SendMailBody} body + * @param {string} project - Project ID or project name + */ + sendMail(body, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "12438500-2f84-4fa7-9f1a-c31871b4959d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, body, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + deleteTag(project, tagIdOrName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + tagIdOrName: tagIdOrName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + getTag(project, tagIdOrName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + tagIdOrName: tagIdOrName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + */ + getTags(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {WorkItemTrackingInterfaces.WorkItemTagDefinition} tagData + * @param {string} project - Project ID or project name + * @param {string} tagIdOrName + */ + updateTag(tagData, project, tagIdOrName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + tagIdOrName: tagIdOrName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "bc15bc60-e7a8-43cb-ab01-2106be3983a1", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, tagData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a template + * + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} template - Template contents + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + */ + createTemplate(template, teamContext) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "6a90345f-a676-4969-afce-8e163e1d5642", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, template, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets template + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} workitemtypename - Optional, When specified returns templates for given Work item type. + */ + getTemplates(teamContext, workitemtypename) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + let queryValues = { + workitemtypename: workitemtypename, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "6a90345f-a676-4969-afce-8e163e1d5642", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the template with given id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id + */ + deleteTemplate(teamContext, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the template with specified id + * + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template Id + */ + getTemplate(teamContext, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replace template contents + * + * @param {WorkItemTrackingInterfaces.WorkItemTemplate} templateContent - Template contents to replace with + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {string} templateId - Template id + */ + replaceTemplate(templateContent, teamContext, templateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + templateId: templateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "fb10264a-8836-48a0-8033-1b0ccd2748d5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, templateContent, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single update for a work item + * + * @param {number} id + * @param {number} updateNumber + * @param {string} project - Project ID or project name + */ + getUpdate(id, updateNumber, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id, + updateNumber: updateNumber + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "6570bf97-d02c-4a91-8d93-3abe9895b1a9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemUpdate, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a the deltas between work item revisions + * + * @param {number} id + * @param {number} top + * @param {number} skip + * @param {string} project - Project ID or project name + */ + getUpdates(id, top, skip, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + '$top': top, + '$skip': skip, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "6570bf97-d02c-4a91-8d93-3abe9895b1a9", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemUpdate, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the results of the query given its WIQL. + * + * @param {WorkItemTrackingInterfaces.Wiql} wiql - The query containing the WIQL. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision - Whether or not to use time precision. + * @param {number} top - The max number of results to return. + */ + queryByWiql(wiql, teamContext, timePrecision, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team + }; + let queryValues = { + timePrecision: timePrecision, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "1a9c53f7-f243-4447-b110-35ef023636e4", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, wiql, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the results of the query given the query ID. + * + * @param {string} id - The query ID. + * @param {TfsCoreInterfaces.TeamContext} teamContext - The team context for the operation + * @param {boolean} timePrecision - Whether or not to use time precision. + * @param {number} top - The max number of results to return. + */ + queryById(id, teamContext, timePrecision, top) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let project = null; + let team = null; + if (teamContext) { + project = teamContext.projectId || teamContext.project; + team = teamContext.teamId || teamContext.team; + } + let routeValues = { + project: project, + team: team, + id: id + }; + let queryValues = { + timePrecision: timePrecision, + '$top': top, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "a02355f5-5f8a-4671-8e32-369d23aac83d", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingInterfaces.TypeInfo.WorkItemQueryResult, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) + */ + getWorkItemIconJson(icon, color, v) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + icon: icon + }; + let queryValues = { + color: color, + v: v, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of all work item icons. + * + */ + getWorkItemIcons() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) + */ + getWorkItemIconSvg(icon, color, v) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + icon: icon + }; + let queryValues = { + color: color, + v: v, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("image/svg+xml", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a work item icon given the friendly name and icon color. + * + * @param {string} icon - The name of the icon + * @param {string} color - The 6-digit hex color for the icon + * @param {number} v - The version of the icon (used only for cache invalidation) + */ + getWorkItemIconXaml(icon, color, v) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + icon: icon + }; + let queryValues = { + color: color, + v: v, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4e1eb4a5-1970-4228-a682-ec48eb2dca30", routeValues, queryValues); + let url = verData.requestUrl; + let apiVersion = verData.apiVersion; + let accept = this.createAcceptHeader("image/xaml+xml", apiVersion); + resolve((yield this.http.get(url, { "Accept": accept })).message); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a batch of work item links + * + * @param {string} project - Project ID or project name + * @param {string[]} linkTypes - A list of types to filter the results to specific link types. Omit this parameter to get work item links of all link types. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item links of all work item types. + * @param {string} continuationToken - Specifies the continuationToken to start the batch from. Omit this parameter to get the first batch of links. + * @param {Date} startDateTime - Date/time to use as a starting point for link changes. Only link changes that occurred after that date/time will be returned. Cannot be used in conjunction with 'watermark' parameter. + */ + getReportingLinksByLinkType(project, linkTypes, types, continuationToken, startDateTime) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + linkTypes: linkTypes && linkTypes.join(","), + types: types && types.join(","), + continuationToken: continuationToken, + startDateTime: startDateTime, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "b5b5b6d0-0308-40a1-b3f4-b9bb3c66878f", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work item relation type definition. + * + * @param {string} relation - The relation name + */ + getRelationType(relation) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + relation: relation + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the work item relation types. + * + */ + getRelationTypes() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f5d33bc9-5b49-4a3c-a9bd-f3cd46dd2165", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a batch of work item revisions with the option of including deleted items + * + * @param {string} project - Project ID or project name + * @param {string[]} fields - A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + * @param {string[]} types - A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {boolean} includeIdentityRef - Return an identity reference instead of a string value for identity fields. + * @param {boolean} includeDeleted - Specify if the deleted item should be returned. + * @param {boolean} includeTagRef - Specify if the tag objects should be returned for System.Tags field. + * @param {boolean} includeLatestOnly - Return only the latest revisions of work items, skipping all historical revisions + * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand - Return all the fields in work item revisions, including long text fields which are not returned by default + * @param {boolean} includeDiscussionChangesOnly - Return only the those revisions of work items, where only history field was changed + * @param {number} maxPageSize - The maximum number of results to return in this batch + */ + readReportingRevisionsGet(project, fields, types, continuationToken, startDateTime, includeIdentityRef, includeDeleted, includeTagRef, includeLatestOnly, expand, includeDiscussionChangesOnly, maxPageSize) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + fields: fields && fields.join(","), + types: types && types.join(","), + continuationToken: continuationToken, + startDateTime: startDateTime, + includeIdentityRef: includeIdentityRef, + includeDeleted: includeDeleted, + includeTagRef: includeTagRef, + includeLatestOnly: includeLatestOnly, + '$expand': expand, + includeDiscussionChangesOnly: includeDiscussionChangesOnly, + '$maxPageSize': maxPageSize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f828fe59-dd87-495d-a17c-7a8d6211ca6c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a batch of work item revisions. This request may be used if your list of fields is large enough that it may run the URL over the length limit. + * + * @param {WorkItemTrackingInterfaces.ReportingWorkItemRevisionsFilter} filter - An object that contains request settings: field filter, type filter, identity format + * @param {string} project - Project ID or project name + * @param {string} continuationToken - Specifies the watermark to start the batch from. Omit this parameter to get the first batch of revisions. + * @param {Date} startDateTime - Date/time to use as a starting point for revisions, all revisions will occur after this date/time. Cannot be used in conjunction with 'watermark' parameter. + * @param {WorkItemTrackingInterfaces.ReportingRevisionsExpand} expand + */ + readReportingRevisionsPost(filter, project, continuationToken, startDateTime, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + continuationToken: continuationToken, + startDateTime: startDateTime, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "f828fe59-dd87-495d-a17c-7a8d6211ca6c", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, filter, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * @param {string} project - Project ID or project name + * @param {string} continuationToken + * @param {number} maxPageSize + */ + readReportingDiscussions(project, continuationToken, maxPageSize) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + continuationToken: continuationToken, + '$maxPageSize': maxPageSize, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "4a644469-90c5-4fcc-9a9f-be0827d369ec", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a single work item. + * + * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the work item + * @param {string} project - Project ID or project name + * @param {string} type - The work item type of the work item to create + * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item + * @param {boolean} bypassRules - Do not enforce the work item type rules on this update + * @param {boolean} suppressNotifications - Do not fire any notifications for this change + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + */ + createWorkItem(customHeaders, document, project, type, validateOnly, bypassRules, suppressNotifications, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type + }; + let queryValues = { + validateOnly: validateOnly, + bypassRules: bypassRules, + suppressNotifications: suppressNotifications, + '$expand': expand, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "62d3d110-0047-428c-ad3c-4fe872c91c74", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.create(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single work item from a template. + * + * @param {string} project - Project ID or project name + * @param {string} type - The work item type name + * @param {string} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + */ + getWorkItemTemplate(project, type, fields, asOf, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type + }; + let queryValues = { + fields: fields, + asOf: asOf, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "62d3d110-0047-428c-ad3c-4fe872c91c74", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution. + * + * @param {number} id - ID of the work item to be deleted + * @param {string} project - Project ID or project name + * @param {boolean} destroy - Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone. + */ + deleteWorkItem(id, project, destroy) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + destroy: destroy, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single work item. + * + * @param {number} id - The work item id + * @param {string[]} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * @param {string} project - Project ID or project name + */ + getWorkItem(id, fields, asOf, expand, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + fields: fields && fields.join(","), + asOf: asOf, + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of work items (Maximum 200) + * + * @param {number[]} ids - The comma-separated list of requested work item ids. (Maximum 200 ids allowed). + * @param {string[]} fields - Comma-separated list of requested fields + * @param {Date} asOf - AsOf UTC date time string + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + * @param {WorkItemTrackingInterfaces.WorkItemErrorPolicy} errorPolicy - The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}. + * @param {string} project - Project ID or project name + */ + getWorkItems(ids, fields, asOf, expand, errorPolicy, project) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + let queryValues = { + ids: ids && ids.join(","), + fields: fields && fields.join(","), + asOf: asOf, + '$expand': expand, + errorPolicy: errorPolicy, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a single work item. + * + * @param {VSSInterfaces.JsonPatchDocument} document - The JSON Patch document representing the update + * @param {number} id - The id of the work item to update + * @param {string} project - Project ID or project name + * @param {boolean} validateOnly - Indicate if you only want to validate the changes without saving the work item + * @param {boolean} bypassRules - Do not enforce the work item type rules on this update + * @param {boolean} suppressNotifications - Do not fire any notifications for this change + * @param {WorkItemTrackingInterfaces.WorkItemExpand} expand - The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All }. + */ + updateWorkItem(customHeaders, document, id, project, validateOnly, bypassRules, suppressNotifications, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + id: id + }; + let queryValues = { + validateOnly: validateOnly, + bypassRules: bypassRules, + suppressNotifications: suppressNotifications, + '$expand': expand, + }; + customHeaders = customHeaders || {}; + customHeaders["Content-Type"] = "application/json-patch+json"; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "72c7ddf8-2cdc-4f60-90cd-ab71c14a399b", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + options.additionalHeaders = customHeaders; + let res; + res = yield this.rest.update(url, document, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets work items for a list of work item ids (Maximum 200) + * + * @param {WorkItemTrackingInterfaces.WorkItemBatchGetRequest} workItemGetRequest + * @param {string} project - Project ID or project name + */ + getWorkItemsBatch(workItemGetRequest, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "908509b6-4248-4475-a1cd-829139ba419f", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, workItemGetRequest, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * INTERNAL ONLY: It will be used for My account work experience. Get the work item type state color for multiple projects + * + * @param {string[]} projectNames + */ + getWorkItemStateColors(projectNames) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "0b83df8a-3496-4ddb-ba44-63634f4cda61", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, projectNames, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the next state on the given work item IDs. + * + * @param {number[]} ids - list of work item ids + * @param {string} action - possible actions. Currently only supports checkin + */ + getWorkItemNextStatesOnCheckinAction(ids, action) { + return __awaiter(this, void 0, void 0, function* () { + if (ids == null) { + throw new TypeError('ids can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + ids: ids && ids.join(","), + action: action, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "afae844b-e2f6-44c2-8053-17b3bb936a40", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get all work item type categories. + * + * @param {string} project - Project ID or project name + */ + getWorkItemTypeCategories(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "9b9f5734-36c8-415e-ba67-f83b45c31408", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get specific work item type category by name. + * + * @param {string} project - Project ID or project name + * @param {string} category - The category name + */ + getWorkItemTypeCategory(project, category) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + category: category + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "9b9f5734-36c8-415e-ba67-f83b45c31408", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * INTERNAL ONLY: It will be used for My account work experience. Get the wit type color for multiple projects + * + * @param {string[]} projectNames + */ + getWorkItemTypeColors(projectNames) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "958fde80-115e-43fb-bd65-749c48057faf", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, projectNames, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * INTERNAL ONLY: It is used for color and icon providers. Get the wit type color for multiple projects + * + * @param {string[]} projectNames + */ + getWorkItemTypeColorAndIcons(projectNames) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "f0f8dc62-3975-48ce-8051-f636b68b52e3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, projectNames, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a work item type definition. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type name + */ + getWorkItemType(project, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the list of work item types + * + * @param {string} project - Project ID or project name + */ + getWorkItemTypes(project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "wit", "7c8d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a list of fields for a work item type with detailed references. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type. + * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + */ + getWorkItemTypeFieldsWithReferences(project, type, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "bd293ce5-3d25-4192-8e67-e8092e879efb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a field for a work item type with detailed references. + * + * @param {string} project - Project ID or project name + * @param {string} type - Work item type. + * @param {string} field + * @param {WorkItemTrackingInterfaces.WorkItemTypeFieldsExpandLevel} expand - Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. + */ + getWorkItemTypeFieldWithReferences(project, type, field, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type, + field: field + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.3", "wit", "bd293ce5-3d25-4192-8e67-e8092e879efb", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns the state names and colors for a work item type. + * + * @param {string} project - Project ID or project name + * @param {string} type - The state name + */ + getWorkItemTypeStates(project, type) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "7c9d7a76-4a09-43e8-b5df-bd792f4ac6aa", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Export work item type + * + * @param {string} project - Project ID or project name + * @param {string} type + * @param {boolean} exportGlobalLists + */ + exportWorkItemTypeDefinition(project, type, exportGlobalLists) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project, + type: type + }; + let queryValues = { + exportGlobalLists: exportGlobalLists, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "8637ac8b-5eb6-4f90-b3f7-4f2ff576a459", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Add/updates a work item type + * + * @param {WorkItemTrackingInterfaces.WorkItemTypeTemplateUpdateModel} updateModel + * @param {string} project - Project ID or project name + */ + updateWorkItemTypeDefinition(updateModel, project) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + project: project + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "wit", "8637ac8b-5eb6-4f90-b3f7-4f2ff576a459", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, updateModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +WorkItemTrackingApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; +exports.WorkItemTrackingApi = WorkItemTrackingApi; diff --git a/node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.d.ts b/node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.d.ts new file mode 100644 index 0000000..1cef8a1 --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.d.ts @@ -0,0 +1,521 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import WorkItemTrackingProcessInterfaces = require("./interfaces/WorkItemTrackingProcessInterfaces"); +export interface IWorkItemTrackingProcessApi extends basem.ClientApiBase { + createProcessBehavior(behavior: WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest, processId: string): Promise; + deleteProcessBehavior(processId: string, behaviorRefName: string): Promise; + getProcessBehavior(processId: string, behaviorRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise; + getProcessBehaviors(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise; + updateProcessBehavior(behaviorData: WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest, processId: string, behaviorRefName: string): Promise; + createControlInGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise; + moveControlToGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise; + removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise; + updateControl(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise; + addFieldToWorkItemType(field: WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest, processId: string, witRefName: string): Promise; + getAllWorkItemTypeFields(processId: string, witRefName: string): Promise; + getWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string, expand?: WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeFieldsExpandLevel): Promise; + removeWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string): Promise; + updateWorkItemTypeField(field: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest, processId: string, witRefName: string, fieldRefName: string): Promise; + addGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise; + moveGroupToPage(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise; + moveGroupToSection(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise; + removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + updateGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + getFormLayout(processId: string, witRefName: string): Promise; + createList(picklist: WorkItemTrackingProcessInterfaces.PickList): Promise; + deleteList(listId: string): Promise; + getList(listId: string): Promise; + getListsMetadata(): Promise; + updateList(picklist: WorkItemTrackingProcessInterfaces.PickList, listId: string): Promise; + addPage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise; + removePage(processId: string, witRefName: string, pageId: string): Promise; + updatePage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise; + createNewProcess(createRequest: WorkItemTrackingProcessInterfaces.CreateProcessModel): Promise; + deleteProcessById(processTypeId: string): Promise; + editProcess(updateRequest: WorkItemTrackingProcessInterfaces.UpdateProcessModel, processTypeId: string): Promise; + getListOfProcesses(expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise; + getProcessByItsId(processTypeId: string, expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise; + addProcessWorkItemTypeRule(processRuleCreate: WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest, processId: string, witRefName: string): Promise; + deleteProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise; + getProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise; + getProcessWorkItemTypeRules(processId: string, witRefName: string): Promise; + updateProcessWorkItemTypeRule(processRule: WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest, processId: string, witRefName: string, ruleId: string): Promise; + createStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise; + deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + getStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + getStateDefinitions(processId: string, witRefName: string): Promise; + hideStateDefinition(hideStateModel: WorkItemTrackingProcessInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise; + updateStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise; + deleteSystemControl(processId: string, witRefName: string, controlId: string): Promise; + getSystemControls(processId: string, witRefName: string): Promise; + updateSystemControl(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, controlId: string): Promise; + createProcessWorkItemType(workItemType: WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest, processId: string): Promise; + deleteProcessWorkItemType(processId: string, witRefName: string): Promise; + getProcessWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise; + getProcessWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise; + updateProcessWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest, processId: string, witRefName: string): Promise; + addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; + getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise; + removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; +} +export declare class WorkItemTrackingProcessApi extends basem.ClientApiBase implements IWorkItemTrackingProcessApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; + /** + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest} behavior + * @param {string} processId - The ID of the process + */ + createProcessBehavior(behavior: WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest, processId: string): Promise; + /** + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + */ + deleteProcessBehavior(processId: string, behaviorRefName: string): Promise; + /** + * Returns a behavior of the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + */ + getProcessBehavior(processId: string, behaviorRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise; + /** + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + */ + getProcessBehaviors(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetBehaviorsExpand): Promise; + /** + * Replaces a behavior in the process. + * + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest} behaviorData + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + */ + updateProcessBehavior(behaviorData: WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest, processId: string, behaviorRefName: string): Promise; + /** + * Creates a control in a group. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group to add the control to. + */ + createControlInGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise; + /** + * Moves a control to a specified group. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group to move the control to. + * @param {string} controlId - The ID of the control. + * @param {string} removeFromGroupId - The group ID to remove the control from. + */ + moveControlToGroup(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise; + /** + * Removes a control from the work item form. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group. + * @param {string} controlId - The ID of the control to remove. + */ + removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise; + /** + * Updates a control on the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The updated control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group. + * @param {string} controlId - The ID of the control. + */ + updateControl(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise; + /** + * Adds a field to a work item type. + * + * @param {WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest} field + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + addFieldToWorkItemType(field: WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest, processId: string, witRefName: string): Promise; + /** + * Returns a list of all fields in a work item type. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + getAllWorkItemTypeFields(processId: string, witRefName: string): Promise; + /** + * Returns a field in a work item type. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + * @param {WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeFieldsExpandLevel} expand + */ + getWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string, expand?: WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeFieldsExpandLevel): Promise; + /** + * Removes a field from a work item type. Does not permanently delete the field. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + */ + removeWorkItemTypeField(processId: string, witRefName: string, fieldRefName: string): Promise; + /** + * Updates a field in a work item type. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest} field + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + */ + updateWorkItemTypeField(field: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest, processId: string, witRefName: string, fieldRefName: string): Promise; + /** + * Adds a group to the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page to add the group to. + * @param {string} sectionId - The ID of the section to add the group to. + */ + addGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise; + /** + * Moves a group to a different page and section. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is i.n + * @param {string} groupId - The ID of the group. + * @param {string} removeFromPageId - ID of the page to remove the group from. + * @param {string} removeFromSectionId - ID of the section to remove the group from. + */ + moveGroupToPage(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise; + /** + * Moves a group to a different section. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is in. + * @param {string} groupId - The ID of the group. + * @param {string} removeFromSectionId - ID of the section to remove the group from. + */ + moveGroupToSection(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise; + /** + * Removes a group from the work item form. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section to the group is in + * @param {string} groupId - The ID of the group + */ + removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + /** + * Updates a group in the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is in. + * @param {string} groupId - The ID of the group. + */ + updateGroup(group: WorkItemTrackingProcessInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + /** + * Gets the form layout. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + getFormLayout(processId: string, witRefName: string): Promise; + /** + * Creates a picklist. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist - Picklist + */ + createList(picklist: WorkItemTrackingProcessInterfaces.PickList): Promise; + /** + * Removes a picklist. + * + * @param {string} listId - The ID of the list + */ + deleteList(listId: string): Promise; + /** + * Returns a picklist. + * + * @param {string} listId - The ID of the list + */ + getList(listId: string): Promise; + /** + * Returns meta data of the picklist. + * + */ + getListsMetadata(): Promise; + /** + * Updates a list. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist + * @param {string} listId - The ID of the list + */ + updateList(picklist: WorkItemTrackingProcessInterfaces.PickList, listId: string): Promise; + /** + * Adds a page to the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Page} page - The page. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + addPage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise; + /** + * Removes a page from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page + */ + removePage(processId: string, witRefName: string, pageId: string): Promise; + /** + * Updates a page on the work item form + * + * @param {WorkItemTrackingProcessInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + updatePage(page: WorkItemTrackingProcessInterfaces.Page, processId: string, witRefName: string): Promise; + /** + * Creates a process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessModel} createRequest - CreateProcessModel. + */ + createNewProcess(createRequest: WorkItemTrackingProcessInterfaces.CreateProcessModel): Promise; + /** + * Removes a process of a specific ID. + * + * @param {string} processTypeId + */ + deleteProcessById(processTypeId: string): Promise; + /** + * Edit a process of a specific ID. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessModel} updateRequest + * @param {string} processTypeId + */ + editProcess(updateRequest: WorkItemTrackingProcessInterfaces.UpdateProcessModel, processTypeId: string): Promise; + /** + * Get list of all processes including system and inherited. + * + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + */ + getListOfProcesses(expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise; + /** + * Get a single process of a specified ID. + * + * @param {string} processTypeId + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + */ + getProcessByItsId(processTypeId: string, expand?: WorkItemTrackingProcessInterfaces.GetProcessExpandLevel): Promise; + /** + * Adds a rule to work item type in the process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest} processRuleCreate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + addProcessWorkItemTypeRule(processRuleCreate: WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest, processId: string, witRefName: string): Promise; + /** + * Removes a rule from the work item type in the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule + */ + deleteProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise; + /** + * Returns a single rule in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule + */ + getProcessWorkItemTypeRule(processId: string, witRefName: string, ruleId: string): Promise; + /** + * Returns a list of all rules in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getProcessWorkItemTypeRules(processId: string, witRefName: string): Promise; + /** + * Updates a rule in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest} processRule + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule + */ + updateProcessWorkItemTypeRule(processRule: WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest, processId: string, witRefName: string, ruleId: string): Promise; + /** + * Creates a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + createStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise; + /** + * Removes a state definition in the work item type of the process. + * + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + /** + * Returns a single state definition in a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + getStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + /** + * Returns a list of all state definitions in a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getStateDefinitions(processId: string, witRefName: string): Promise; + /** + * Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. + * + * @param {WorkItemTrackingProcessInterfaces.HideStateModel} hideStateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + hideStateDefinition(hideStateModel: WorkItemTrackingProcessInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise; + /** + * Updates a given state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + updateStateDefinition(stateModel: WorkItemTrackingProcessInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise; + /** + * Deletes a system control modification on the work item form. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} controlId - The ID of the control. + */ + deleteSystemControl(processId: string, witRefName: string, controlId: string): Promise; + /** + * Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + getSystemControls(processId: string, witRefName: string): Promise; + /** + * Updates/adds a system control on the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} controlId - The ID of the control. + */ + updateSystemControl(control: WorkItemTrackingProcessInterfaces.Control, processId: string, witRefName: string, controlId: string): Promise; + /** + * Creates a work item type in the process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest} workItemType + * @param {string} processId - The ID of the process on which to create work item type. + */ + createProcessWorkItemType(workItemType: WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest, processId: string): Promise; + /** + * Removes a work itewm type in the process. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + deleteProcessWorkItemType(processId: string, witRefName: string): Promise; + /** + * Returns a single work item type in a process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return + */ + getProcessWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise; + /** + * Returns a list of all work item types in a process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return + */ + getProcessWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand): Promise; + /** + * Updates a work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest} workItemTypeUpdate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + updateProcessWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest, processId: string, witRefName: string): Promise; + /** + * Adds a behavior to the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; + /** + * Returns a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + /** + * Returns a list of all behaviors for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise; + /** + * Removes a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + /** + * Updates a behavior for the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.js b/node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.js new file mode 100644 index 0000000..c81ae5f --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkItemTrackingProcessApi.js @@ -0,0 +1,1734 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const WorkItemTrackingProcessInterfaces = require("./interfaces/WorkItemTrackingProcessInterfaces"); +class WorkItemTrackingProcessApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); + } + /** + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorCreateRequest} behavior + * @param {string} processId - The ID of the process + */ + createProcessBehavior(behavior, processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + */ + deleteProcessBehavior(processId, behaviorRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + behaviorRefName: behaviorRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a behavior of the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + */ + getProcessBehavior(processId, behaviorRefName, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + behaviorRefName: behaviorRefName + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetBehaviorsExpand} expand + */ + getProcessBehaviors(processId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replaces a behavior in the process. + * + * @param {WorkItemTrackingProcessInterfaces.ProcessBehaviorUpdateRequest} behaviorData + * @param {string} processId - The ID of the process + * @param {string} behaviorRefName - The reference name of the behavior + */ + updateProcessBehavior(behaviorData, processId, behaviorRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + behaviorRefName: behaviorRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "d1800200-f184-4e75-a5f2-ad0b04b4373e", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, behaviorData, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessBehavior, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a control in a group. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group to add the control to. + */ + createControlInGroup(control, processId, witRefName, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Moves a control to a specified group. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group to move the control to. + * @param {string} controlId - The ID of the control. + * @param {string} removeFromGroupId - The group ID to remove the control from. + */ + moveControlToGroup(control, processId, witRefName, groupId, controlId, removeFromGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + let queryValues = { + removeFromGroupId: removeFromGroupId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a control from the work item form. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group. + * @param {string} controlId - The ID of the control to remove. + */ + removeControlFromGroup(processId, witRefName, groupId, controlId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a control on the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control - The updated control. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} groupId - The ID of the group. + * @param {string} controlId - The ID of the control. + */ + updateControl(control, processId, witRefName, groupId, controlId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1f59b363-a2d0-4b7e-9bc6-eb9f5f3f0e58", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a field to a work item type. + * + * @param {WorkItemTrackingProcessInterfaces.AddProcessWorkItemTypeFieldRequest} field + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + addFieldToWorkItemType(field, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all fields in a work item type. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + getAllWorkItemTypeFields(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a field in a work item type. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + * @param {WorkItemTrackingProcessInterfaces.ProcessWorkItemTypeFieldsExpandLevel} expand + */ + getWorkItemTypeField(processId, witRefName, fieldRefName, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + fieldRefName: fieldRefName + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a field from a work item type. Does not permanently delete the field. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + */ + removeWorkItemTypeField(processId, witRefName, fieldRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + fieldRefName: fieldRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a field in a work item type. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeFieldRequest} field + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} fieldRefName - The reference name of the field. + */ + updateWorkItemTypeField(field, processId, witRefName, fieldRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + fieldRefName: fieldRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "bc0ad8dc-e3f3-46b0-b06c-5bf861793196", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemTypeField, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a group to the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page to add the group to. + * @param {string} sectionId - The ID of the section to add the group to. + */ + addGroup(group, processId, witRefName, pageId, sectionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Moves a group to a different page and section. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is i.n + * @param {string} groupId - The ID of the group. + * @param {string} removeFromPageId - ID of the page to remove the group from. + * @param {string} removeFromSectionId - ID of the section to remove the group from. + */ + moveGroupToPage(group, processId, witRefName, pageId, sectionId, groupId, removeFromPageId, removeFromSectionId) { + return __awaiter(this, void 0, void 0, function* () { + if (removeFromPageId == null) { + throw new TypeError('removeFromPageId can not be null or undefined'); + } + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromPageId: removeFromPageId, + removeFromSectionId: removeFromSectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Moves a group to a different section. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is in. + * @param {string} groupId - The ID of the group. + * @param {string} removeFromSectionId - ID of the section to remove the group from. + */ + moveGroupToSection(group, processId, witRefName, pageId, sectionId, groupId, removeFromSectionId) { + return __awaiter(this, void 0, void 0, function* () { + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromSectionId: removeFromSectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a group from the work item form. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section to the group is in + * @param {string} groupId - The ID of the group + */ + removeGroup(processId, witRefName, pageId, sectionId, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a group in the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Group} group - The updated group. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} pageId - The ID of the page the group is in. + * @param {string} sectionId - The ID of the section the group is in. + * @param {string} groupId - The ID of the group. + */ + updateGroup(group, processId, witRefName, pageId, sectionId, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "766e44e1-36a8-41d7-9050-c343ff02f7a5", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the form layout. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + getFormLayout(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "fa8646eb-43cd-4b71-9564-40106fd63e40", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.FormLayout, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a picklist. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist - Picklist + */ + createList(picklist) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a picklist. + * + * @param {string} listId - The ID of the list + */ + deleteList(listId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + listId: listId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a picklist. + * + * @param {string} listId - The ID of the list + */ + getList(listId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + listId: listId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns meta data of the picklist. + * + */ + getListsMetadata() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a list. + * + * @param {WorkItemTrackingProcessInterfaces.PickList} picklist + * @param {string} listId - The ID of the list + */ + updateList(picklist, listId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + listId: listId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "01e15468-e27c-4e20-a974-bd957dcccebc", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a page to the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Page} page - The page. + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + addPage(page, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.Page, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a page from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page + */ + removePage(processId, witRefName, pageId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a page on the work item form + * + * @param {WorkItemTrackingProcessInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + updatePage(page, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "1cc7b29f-6697-4d9d-b0a1-2650d3e1d584", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.Page, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessModel} createRequest - CreateProcessModel. + */ + createNewProcess(createRequest) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, createRequest, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a process of a specific ID. + * + * @param {string} processTypeId + */ + deleteProcessById(processTypeId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processTypeId: processTypeId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Edit a process of a specific ID. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessModel} updateRequest + * @param {string} processTypeId + */ + editProcess(updateRequest, processTypeId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processTypeId: processTypeId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, updateRequest, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get list of all processes including system and inherited. + * + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + */ + getListOfProcesses(expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Get a single process of a specified ID. + * + * @param {string} processTypeId + * @param {WorkItemTrackingProcessInterfaces.GetProcessExpandLevel} expand + */ + getProcessByItsId(processTypeId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processTypeId: processTypeId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "02cc6a73-5cfb-427d-8c8e-b49fb086e8af", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessInfo, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a rule to work item type in the process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessRuleRequest} processRuleCreate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + addProcessWorkItemTypeRule(processRuleCreate, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, processRuleCreate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a rule from the work item type in the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule + */ + deleteProcessWorkItemTypeRule(processId, witRefName, ruleId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + ruleId: ruleId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single rule in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule + */ + getProcessWorkItemTypeRule(processId, witRefName, ruleId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + ruleId: ruleId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all rules in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getProcessWorkItemTypeRules(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a rule in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessRuleRequest} processRule + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} ruleId - The ID of the rule + */ + updateProcessWorkItemTypeRule(processRule, processId, witRefName, ruleId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + ruleId: ruleId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "76fe3432-d825-479d-a5f6-983bbb78b4f3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, processRule, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessRule, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + createStateDefinition(stateModel, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, stateModel, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a state definition in the work item type of the process. + * + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + deleteStateDefinition(processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single state definition in a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + getStateDefinition(processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all state definitions in a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getStateDefinitions(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Hides a state definition in the work item type of the process.Only states with customizationType:System can be hidden. + * + * @param {WorkItemTrackingProcessInterfaces.HideStateModel} hideStateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + hideStateDefinition(hideStateModel, processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, hideStateModel, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a given state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + updateStateDefinition(stateModel, processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "31015d57-2dff-4a46-adb3-2fb4ee3dcec9", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, stateModel, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.WorkItemStateResultModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Deletes a system control modification on the work item form. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} controlId - The ID of the control. + */ + deleteSystemControl(processId, witRefName, controlId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + controlId: controlId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets edited system controls for a work item type in a process. To get all system controls (base + edited) use layout API(s) + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + getSystemControls(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates/adds a system control on the work item form. + * + * @param {WorkItemTrackingProcessInterfaces.Control} control + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + * @param {string} controlId - The ID of the control. + */ + updateSystemControl(control, processId, witRefName, controlId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + controlId: controlId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "ff9a3d2c-32b7-4c6c-991c-d5a251fb9098", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a work item type in the process. + * + * @param {WorkItemTrackingProcessInterfaces.CreateProcessWorkItemTypeRequest} workItemType + * @param {string} processId - The ID of the process on which to create work item type. + */ + createProcessWorkItemType(workItemType, processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, workItemType, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a work itewm type in the process. + * + * @param {string} processId - The ID of the process. + * @param {string} witRefName - The reference name of the work item type. + */ + deleteProcessWorkItemType(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single work item type in a process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return + */ + getProcessWorkItemType(processId, witRefName, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all work item types in a process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessInterfaces.GetWorkItemTypeExpand} expand - Flag to determine what properties of work item type to return + */ + getProcessWorkItemTypes(processId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.UpdateProcessWorkItemTypeRequest} workItemTypeUpdate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + updateProcessWorkItemType(workItemTypeUpdate, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.2", "processes", "e2e9d1a6-432d-4062-8870-bfcb8c324ad7", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, workItemTypeUpdate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessInterfaces.TypeInfo.ProcessWorkItemType, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a behavior to the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + addBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + getBehaviorForWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all behaviors for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + getBehaviorsForWorkItemType(processId, witRefNameForBehaviors) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + removeBehaviorFromWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a behavior for the work item type of the process. + * + * @param {WorkItemTrackingProcessInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + updateBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processes", "6d765a2e-4e1b-4b11-be93-f953be676024", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +WorkItemTrackingProcessApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; +exports.WorkItemTrackingProcessApi = WorkItemTrackingProcessApi; diff --git a/node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.d.ts b/node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.d.ts new file mode 100644 index 0000000..867e4e5 --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.d.ts @@ -0,0 +1,424 @@ +import basem = require('./ClientApiBases'); +import VsoBaseInterfaces = require('./interfaces/common/VsoBaseInterfaces'); +import WorkItemTrackingProcessDefinitionsInterfaces = require("./interfaces/WorkItemTrackingProcessDefinitionsInterfaces"); +export interface IWorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase { + createBehavior(behavior: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel, processId: string): Promise; + deleteBehavior(processId: string, behaviorId: string): Promise; + getBehavior(processId: string, behaviorId: string): Promise; + getBehaviors(processId: string): Promise; + replaceBehavior(behaviorData: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel, processId: string, behaviorId: string): Promise; + addControlToGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise; + editControl(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise; + removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise; + setControlInGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise; + createField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldModel, processId: string): Promise; + updateField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate, processId: string): Promise; + addGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise; + editGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + setGroupInPage(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise; + setGroupInSection(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise; + getFormLayout(processId: string, witRefName: string): Promise; + getListsMetadata(): Promise; + createList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel): Promise; + deleteList(listId: string): Promise; + getList(listId: string): Promise; + updateList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel, listId: string): Promise; + addPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise; + editPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise; + removePage(processId: string, witRefName: string, pageId: string): Promise; + createStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise; + deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + getStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + getStateDefinitions(processId: string, witRefName: string): Promise; + hideStateDefinition(hideStateModel: WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise; + updateStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise; + addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; + getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise; + removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; + createWorkItemType(workItemType: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel, processId: string): Promise; + deleteWorkItemType(processId: string, witRefName: string): Promise; + getWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise; + getWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise; + updateWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel, processId: string, witRefName: string): Promise; + addFieldToWorkItemType(field: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise; + getWorkItemTypeField(processId: string, witRefNameForFields: string, fieldRefName: string): Promise; + getWorkItemTypeFields(processId: string, witRefNameForFields: string): Promise; + removeFieldFromWorkItemType(processId: string, witRefNameForFields: string, fieldRefName: string): Promise; + updateWorkItemTypeField(field: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise; +} +export declare class WorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase implements IWorkItemTrackingProcessDefinitionsApi { + constructor(baseUrl: string, handlers: VsoBaseInterfaces.IRequestHandler[], options?: VsoBaseInterfaces.IRequestOptions); + static readonly RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; + /** + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel} behavior + * @param {string} processId - The ID of the process + */ + createBehavior(behavior: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel, processId: string): Promise; + /** + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + deleteBehavior(processId: string, behaviorId: string): Promise; + /** + * Returns a single behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + getBehavior(processId: string, behaviorId: string): Promise; + /** + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + */ + getBehaviors(processId: string): Promise; + /** + * Replaces a behavior in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel} behaviorData + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + replaceBehavior(behaviorData: WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel, processId: string, behaviorId: string): Promise; + /** + * Creates a control in a group + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group to add the control to + */ + addControlToGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string): Promise; + /** + * Updates a control on the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The updated control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group + * @param {string} controlId - The ID of the control + */ + editControl(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string): Promise; + /** + * Removes a control from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group + * @param {string} controlId - The ID of the control to remove + */ + removeControlFromGroup(processId: string, witRefName: string, groupId: string, controlId: string): Promise; + /** + * Moves a control to a new group + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group to move the control to + * @param {string} controlId - The id of the control + * @param {string} removeFromGroupId - The group to remove the control from + */ + setControlInGroup(control: WorkItemTrackingProcessDefinitionsInterfaces.Control, processId: string, witRefName: string, groupId: string, controlId: string, removeFromGroupId?: string): Promise; + /** + * Creates a single field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldModel} field + * @param {string} processId - The ID of the process + */ + createField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldModel, processId: string): Promise; + /** + * Updates a given field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate} field + * @param {string} processId - The ID of the process + */ + updateField(field: WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate, processId: string): Promise; + /** + * Adds a group to the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page to add the group to + * @param {string} sectionId - The ID of the section to add the group to + */ + addGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string): Promise; + /** + * Updates a group in the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + */ + editGroup(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + /** + * Removes a group from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section to the group is in + * @param {string} groupId - The ID of the group + */ + removeGroup(processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string): Promise; + /** + * Moves a group to a different page and section + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + * @param {string} removeFromPageId - ID of the page to remove the group from + * @param {string} removeFromSectionId - ID of the section to remove the group from + */ + setGroupInPage(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromPageId: string, removeFromSectionId: string): Promise; + /** + * Moves a group to a different section + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + * @param {string} removeFromSectionId - ID of the section to remove the group from + */ + setGroupInSection(group: WorkItemTrackingProcessDefinitionsInterfaces.Group, processId: string, witRefName: string, pageId: string, sectionId: string, groupId: string, removeFromSectionId: string): Promise; + /** + * Gets the form layout + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getFormLayout(processId: string, witRefName: string): Promise; + /** + * Returns meta data of the picklist. + * + */ + getListsMetadata(): Promise; + /** + * Creates a picklist. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + */ + createList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel): Promise; + /** + * Removes a picklist. + * + * @param {string} listId - The ID of the list + */ + deleteList(listId: string): Promise; + /** + * Returns a picklist. + * + * @param {string} listId - The ID of the list + */ + getList(listId: string): Promise; + /** + * Updates a list. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + * @param {string} listId - The ID of the list + */ + updateList(picklist: WorkItemTrackingProcessDefinitionsInterfaces.PickListModel, listId: string): Promise; + /** + * Adds a page to the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + addPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise; + /** + * Updates a page on the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + editPage(page: WorkItemTrackingProcessDefinitionsInterfaces.Page, processId: string, witRefName: string): Promise; + /** + * Removes a page from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page + */ + removePage(processId: string, witRefName: string, pageId: string): Promise; + /** + * Creates a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + createStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string): Promise; + /** + * Removes a state definition in the work item type of the process. + * + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + deleteStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + /** + * Returns a state definition in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + getStateDefinition(processId: string, witRefName: string, stateId: string): Promise; + /** + * Returns a list of all state definitions in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getStateDefinitions(processId: string, witRefName: string): Promise; + /** + * Hides a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel} hideStateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + hideStateDefinition(hideStateModel: WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel, processId: string, witRefName: string, stateId: string): Promise; + /** + * Updates a given state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + updateStateDefinition(stateModel: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel, processId: string, witRefName: string, stateId: string): Promise; + /** + * Adds a behavior to the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + addBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; + /** + * Returns a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + getBehaviorForWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + /** + * Returns a list of all behaviors for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + getBehaviorsForWorkItemType(processId: string, witRefNameForBehaviors: string): Promise; + /** + * Removes a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + removeBehaviorFromWorkItemType(processId: string, witRefNameForBehaviors: string, behaviorRefName: string): Promise; + /** + * Updates default work item type for the behavior of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + updateBehaviorToWorkItemType(behavior: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior, processId: string, witRefNameForBehaviors: string): Promise; + /** + * Creates a work item type in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel} workItemType + * @param {string} processId - The ID of the process + */ + createWorkItemType(workItemType: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel, processId: string): Promise; + /** + * Removes a work itewm type in the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + deleteWorkItemType(processId: string, witRefName: string): Promise; + /** + * Returns a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand + */ + getWorkItemType(processId: string, witRefName: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise; + /** + * Returns a list of all work item types in the process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand + */ + getWorkItemTypes(processId: string, expand?: WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand): Promise; + /** + * Updates a work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel} workItemTypeUpdate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + updateWorkItemType(workItemTypeUpdate: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel, processId: string, witRefName: string): Promise; + /** + * Adds a field to the work item type in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for the field + */ + addFieldToWorkItemType(field: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise; + /** + * Returns a single field in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + * @param {string} fieldRefName - The reference name of the field + */ + getWorkItemTypeField(processId: string, witRefNameForFields: string, fieldRefName: string): Promise; + /** + * Returns a list of all fields in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + */ + getWorkItemTypeFields(processId: string, witRefNameForFields: string): Promise; + /** + * Removes a field in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + * @param {string} fieldRefName - The reference name of the field + */ + removeFieldFromWorkItemType(processId: string, witRefNameForFields: string, fieldRefName: string): Promise; + /** + * Updates a single field in the scope of the given process and work item type. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field - The model with which to update the field + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + */ + updateWorkItemTypeField(field: WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2, processId: string, witRefNameForFields: string): Promise; +} diff --git a/node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.js b/node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.js new file mode 100644 index 0000000..393334f --- /dev/null +++ b/node_modules/azure-devops-node-api/WorkItemTrackingProcessDefinitionsApi.js @@ -0,0 +1,1403 @@ +"use strict"; +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const basem = require("./ClientApiBases"); +const WorkItemTrackingProcessDefinitionsInterfaces = require("./interfaces/WorkItemTrackingProcessDefinitionsInterfaces"); +class WorkItemTrackingProcessDefinitionsApi extends basem.ClientApiBase { + constructor(baseUrl, handlers, options) { + super(baseUrl, handlers, 'node-WorkItemTracking-api', options); + } + /** + * Creates a single behavior in the given process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorCreateModel} behavior + * @param {string} processId - The ID of the process + */ + createBehavior(behavior, processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + deleteBehavior(processId, behaviorId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + behaviorId: behaviorId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single behavior in the process. + * + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + getBehavior(processId, behaviorId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + behaviorId: behaviorId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all behaviors in the process. + * + * @param {string} processId - The ID of the process + */ + getBehaviors(processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Replaces a behavior in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.BehaviorReplaceModel} behaviorData + * @param {string} processId - The ID of the process + * @param {string} behaviorId - The ID of the behavior + */ + replaceBehavior(behaviorData, processId, behaviorId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + behaviorId: behaviorId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "47a651f4-fb70-43bf-b96b-7c0ba947142b", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, behaviorData, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a control in a group + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group to add the control to + */ + addControlToGroup(control, processId, witRefName, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a control on the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The updated control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group + * @param {string} controlId - The ID of the control + */ + editControl(control, processId, witRefName, groupId, controlId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a control from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group + * @param {string} controlId - The ID of the control to remove + */ + removeControlFromGroup(processId, witRefName, groupId, controlId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Moves a control to a new group + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Control} control - The control + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} groupId - The ID of the group to move the control to + * @param {string} controlId - The id of the control + * @param {string} removeFromGroupId - The group to remove the control from + */ + setControlInGroup(control, processId, witRefName, groupId, controlId, removeFromGroupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + groupId: groupId, + controlId: controlId + }; + let queryValues = { + removeFromGroupId: removeFromGroupId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "e2e3166a-627a-4e9b-85b2-d6a097bbd731", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, control, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a single field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldModel} field + * @param {string} processId - The ID of the process + */ + createField(field, processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "f36c66c7-911d-4163-8938-d3c5d0d7f5aa", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FieldModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a given field in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.FieldUpdate} field + * @param {string} processId - The ID of the process + */ + updateField(field, processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "f36c66c7-911d-4163-8938-d3c5d0d7f5aa", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FieldModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a group to the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page to add the group to + * @param {string} sectionId - The ID of the section to add the group to + */ + addGroup(group, processId, witRefName, pageId, sectionId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a group in the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + */ + editGroup(group, processId, witRefName, pageId, sectionId, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a group from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section to the group is in + * @param {string} groupId - The ID of the group + */ + removeGroup(processId, witRefName, pageId, sectionId, groupId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Moves a group to a different page and section + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + * @param {string} removeFromPageId - ID of the page to remove the group from + * @param {string} removeFromSectionId - ID of the section to remove the group from + */ + setGroupInPage(group, processId, witRefName, pageId, sectionId, groupId, removeFromPageId, removeFromSectionId) { + return __awaiter(this, void 0, void 0, function* () { + if (removeFromPageId == null) { + throw new TypeError('removeFromPageId can not be null or undefined'); + } + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromPageId: removeFromPageId, + removeFromSectionId: removeFromSectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Moves a group to a different section + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Group} group - The updated group + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page the group is in + * @param {string} sectionId - The ID of the section the group is in + * @param {string} groupId - The ID of the group + * @param {string} removeFromSectionId - ID of the section to remove the group from + */ + setGroupInSection(group, processId, witRefName, pageId, sectionId, groupId, removeFromSectionId) { + return __awaiter(this, void 0, void 0, function* () { + if (removeFromSectionId == null) { + throw new TypeError('removeFromSectionId can not be null or undefined'); + } + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId, + sectionId: sectionId, + groupId: groupId + }; + let queryValues = { + removeFromSectionId: removeFromSectionId, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "2617828b-e850-4375-a92a-04855704d4c3", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, group, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Gets the form layout + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getFormLayout(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "3eacc80a-ddca-4404-857a-6331aac99063", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.FormLayout, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns meta data of the picklist. + * + */ + getListsMetadata() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "b45cc931-98e3-44a1-b1cd-2e8e9c6dc1c6", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a picklist. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + */ + createList(picklist) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = {}; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a picklist. + * + * @param {string} listId - The ID of the list + */ + deleteList(listId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + listId: listId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a picklist. + * + * @param {string} listId - The ID of the list + */ + getList(listId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + listId: listId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a list. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.PickListModel} picklist + * @param {string} listId - The ID of the list + */ + updateList(picklist, listId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + listId: listId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "0b6179e2-23ce-46b2-b094-2ffa5ee70286", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, picklist, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a page to the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + addPage(page, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.Page, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a page on the work item form + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.Page} page - The page + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + editPage(page, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, page, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.Page, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a page from the work item form + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} pageId - The ID of the page + */ + removePage(processId, witRefName, pageId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + pageId: pageId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1b4ac126-59b2-4f37-b4df-0a48ba807edb", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + createStateDefinition(stateModel, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, stateModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a state definition in the work item type of the process. + * + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + deleteStateDefinition(processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a state definition in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + getStateDefinition(processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all state definitions in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + getStateDefinitions(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Hides a state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.HideStateModel} hideStateModel + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - The ID of the state + */ + hideStateDefinition(hideStateModel, processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.replace(url, hideStateModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a given state definition in the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemStateInputModel} stateModel + * @param {string} processId - ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {string} stateId - ID of the state + */ + updateStateDefinition(stateModel, processId, witRefName, stateId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName, + stateId: stateId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "4303625d-08f4-4461-b14b-32c65bba5599", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, stateModel, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a behavior to the work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + addBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + getBehaviorForWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all behaviors for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + getBehaviorsForWorkItemType(processId, witRefNameForBehaviors) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, null, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a behavior for the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + * @param {string} behaviorRefName - The reference name of the behavior + */ + removeBehaviorFromWorkItemType(processId, witRefNameForBehaviors, behaviorRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors, + behaviorRefName: behaviorRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates default work item type for the behavior of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeBehavior} behavior + * @param {string} processId - The ID of the process + * @param {string} witRefNameForBehaviors - Work item type reference name for the behavior + */ + updateBehaviorToWorkItemType(behavior, processId, witRefNameForBehaviors) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForBehaviors: witRefNameForBehaviors + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "921dfb88-ef57-4c69-94e5-dd7da2d7031d", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, behavior, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Creates a work item type in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeModel} workItemType + * @param {string} processId - The ID of the process + */ + createWorkItemType(workItemType, processId) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, workItemType, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a work itewm type in the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + deleteWorkItemType(processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand + */ + getWorkItemType(processId, witRefName, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all work item types in the process. + * + * @param {string} processId - The ID of the process + * @param {WorkItemTrackingProcessDefinitionsInterfaces.GetWorkItemTypeExpand} expand + */ + getWorkItemTypes(processId, expand) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId + }; + let queryValues = { + '$expand': expand, + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues, queryValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a work item type of the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeUpdateModel} workItemTypeUpdate + * @param {string} processId - The ID of the process + * @param {string} witRefName - The reference name of the work item type + */ + updateWorkItemType(workItemTypeUpdate, processId, witRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefName: witRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "1ce0acad-4638-49c3-969c-04aa65ba6bea", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, workItemTypeUpdate, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeModel, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Adds a field to the work item type in the process. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for the field + */ + addFieldToWorkItemType(field, processId, witRefNameForFields) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForFields: witRefNameForFields + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.create(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a single field in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + * @param {string} fieldRefName - The reference name of the field + */ + getWorkItemTypeField(processId, witRefNameForFields, fieldRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForFields: witRefNameForFields, + fieldRefName: fieldRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Returns a list of all fields in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + */ + getWorkItemTypeFields(processId, witRefNameForFields) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForFields: witRefNameForFields + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.get(url, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, true); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Removes a field in the work item type of the process. + * + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + * @param {string} fieldRefName - The reference name of the field + */ + removeFieldFromWorkItemType(processId, witRefNameForFields, fieldRefName) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForFields: witRefNameForFields, + fieldRefName: fieldRefName + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.del(url, options); + let ret = this.formatResponse(res.result, null, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } + /** + * Updates a single field in the scope of the given process and work item type. + * + * @param {WorkItemTrackingProcessDefinitionsInterfaces.WorkItemTypeFieldModel2} field - The model with which to update the field + * @param {string} processId - The ID of the process + * @param {string} witRefNameForFields - Work item type reference name for fields + */ + updateWorkItemTypeField(field, processId, witRefNameForFields) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + let routeValues = { + processId: processId, + witRefNameForFields: witRefNameForFields + }; + try { + let verData = yield this.vsoClient.getVersioningData("7.1-preview.1", "processDefinitions", "976713b4-a62e-499e-94dc-eeb869ea9126", routeValues); + let url = verData.requestUrl; + let options = this.createRequestOptions('application/json', verData.apiVersion); + let res; + res = yield this.rest.update(url, field, options); + let ret = this.formatResponse(res.result, WorkItemTrackingProcessDefinitionsInterfaces.TypeInfo.WorkItemTypeFieldModel2, false); + resolve(ret); + } + catch (err) { + reject(err); + } + })); + }); + } +} +WorkItemTrackingProcessDefinitionsApi.RESOURCE_AREA_ID = "5264459e-e5e0-4bd8-b118-0985e68a4ec5"; +exports.WorkItemTrackingProcessDefinitionsApi = WorkItemTrackingProcessDefinitionsApi; diff --git a/node_modules/azure-devops-node-api/handlers/basiccreds.d.ts b/node_modules/azure-devops-node-api/handlers/basiccreds.d.ts new file mode 100644 index 0000000..f38ed65 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/basiccreds.d.ts @@ -0,0 +1,5 @@ +import ifm = require('../interfaces/common/VsoBaseInterfaces'); +import * as resthandlers from 'typed-rest-client/Handlers'; +export declare class BasicCredentialHandler extends resthandlers.BasicCredentialHandler implements ifm.IRequestHandler { + constructor(username: string, password: string, allowCrossOriginAuthentication?: boolean); +} diff --git a/node_modules/azure-devops-node-api/handlers/basiccreds.js b/node_modules/azure-devops-node-api/handlers/basiccreds.js new file mode 100644 index 0000000..3f3b950 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/basiccreds.js @@ -0,0 +1,11 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const resthandlers = require("typed-rest-client/Handlers"); +class BasicCredentialHandler extends resthandlers.BasicCredentialHandler { + constructor(username, password, allowCrossOriginAuthentication = true) { + super(username, password, allowCrossOriginAuthentication); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; diff --git a/node_modules/azure-devops-node-api/handlers/bearertoken.d.ts b/node_modules/azure-devops-node-api/handlers/bearertoken.d.ts new file mode 100644 index 0000000..d0de6a5 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/bearertoken.d.ts @@ -0,0 +1,5 @@ +import ifm = require('../interfaces/common/VsoBaseInterfaces'); +import * as resthandlers from 'typed-rest-client/Handlers'; +export declare class BearerCredentialHandler extends resthandlers.BearerCredentialHandler implements ifm.IRequestHandler { + constructor(token: string, allowCrossOriginAuthentication?: boolean); +} diff --git a/node_modules/azure-devops-node-api/handlers/bearertoken.js b/node_modules/azure-devops-node-api/handlers/bearertoken.js new file mode 100644 index 0000000..10370f5 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/bearertoken.js @@ -0,0 +1,11 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const resthandlers = require("typed-rest-client/Handlers"); +class BearerCredentialHandler extends resthandlers.BearerCredentialHandler { + constructor(token, allowCrossOriginAuthentication = true) { + super(token, allowCrossOriginAuthentication); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; diff --git a/node_modules/azure-devops-node-api/handlers/ntlm.d.ts b/node_modules/azure-devops-node-api/handlers/ntlm.d.ts new file mode 100644 index 0000000..fd0a298 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/ntlm.d.ts @@ -0,0 +1,5 @@ +import ifm = require('../interfaces/common/VsoBaseInterfaces'); +import * as resthandlers from 'typed-rest-client/Handlers'; +export declare class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler implements ifm.IRequestHandler { + constructor(username: string, password: string, workstation?: string, domain?: string); +} diff --git a/node_modules/azure-devops-node-api/handlers/ntlm.js b/node_modules/azure-devops-node-api/handlers/ntlm.js new file mode 100644 index 0000000..9cf74ec --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/ntlm.js @@ -0,0 +1,11 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const resthandlers = require("typed-rest-client/Handlers"); +class NtlmCredentialHandler extends resthandlers.NtlmCredentialHandler { + constructor(username, password, workstation, domain) { + super(username, password, workstation, domain); + } +} +exports.NtlmCredentialHandler = NtlmCredentialHandler; diff --git a/node_modules/azure-devops-node-api/handlers/personalaccesstoken.d.ts b/node_modules/azure-devops-node-api/handlers/personalaccesstoken.d.ts new file mode 100644 index 0000000..0aac879 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/personalaccesstoken.d.ts @@ -0,0 +1,5 @@ +import ifm = require('../interfaces/common/VsoBaseInterfaces'); +import * as resthandlers from 'typed-rest-client/Handlers'; +export declare class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler { + constructor(token: string, allowCrossOriginAuthentication?: boolean); +} diff --git a/node_modules/azure-devops-node-api/handlers/personalaccesstoken.js b/node_modules/azure-devops-node-api/handlers/personalaccesstoken.js new file mode 100644 index 0000000..28cf323 --- /dev/null +++ b/node_modules/azure-devops-node-api/handlers/personalaccesstoken.js @@ -0,0 +1,11 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", { value: true }); +const resthandlers = require("typed-rest-client/Handlers"); +class PersonalAccessTokenCredentialHandler extends resthandlers.PersonalAccessTokenCredentialHandler { + constructor(token, allowCrossOriginAuthentication = true) { + super(token, allowCrossOriginAuthentication); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; diff --git a/node_modules/azure-devops-node-api/interfaces/BuildInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/BuildInterfaces.d.ts new file mode 100644 index 0000000..f6ebd0a --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/BuildInterfaces.d.ts @@ -0,0 +1,3509 @@ +import DistributedTaskCommonInterfaces = require("../interfaces/DistributedTaskCommonInterfaces"); +import TFS_SourceControl_Contracts = require("../interfaces/TfvcInterfaces"); +import TFS_TestManagement_Contracts = require("../interfaces/TestInterfaces"); +import TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +/** + * Represents a queue for running builds. + */ +export interface AgentPoolQueue { + _links?: any; + /** + * The ID of the queue. + */ + id?: number; + /** + * The name of the queue. + */ + name?: string; + /** + * The pool used by this queue. + */ + pool?: TaskAgentPoolReference; + /** + * The full http link to the resource. + */ + url?: string; +} +/** + * Represents a reference to an agent queue. + */ +export interface AgentPoolQueueReference extends ResourceReference { + /** + * The ID of the queue. + */ + id?: number; +} +/** + * Describes how a phase should run against an agent queue. + */ +export interface AgentPoolQueueTarget extends PhaseTarget { + /** + * Agent specification of the target. + */ + agentSpecification?: AgentSpecification; + /** + * Enables scripts and other processes launched while executing phase to access the OAuth token + */ + allowScriptsAuthAccessOption?: boolean; + demands?: Demand[]; + /** + * The execution options. + */ + executionOptions?: AgentTargetExecutionOptions; + /** + * The queue. + */ + queue?: AgentPoolQueue; +} +/** + * Specification of the agent defined by the pool provider. + */ +export interface AgentSpecification { + /** + * Agent specification unique identifier. + */ + identifier?: string; +} +export declare enum AgentStatus { + /** + * Indicates that the build agent cannot be contacted. + */ + Unavailable = 0, + /** + * Indicates that the build agent is currently available. + */ + Available = 1, + /** + * Indicates that the build agent has taken itself offline. + */ + Offline = 2 +} +/** + * Additional options for running phases against an agent queue. + */ +export interface AgentTargetExecutionOptions { + /** + * Indicates the type of execution options. + */ + type?: number; +} +export interface ArtifactResource { + _links?: any; + /** + * Type-specific data about the artifact. + */ + data?: string; + /** + * A link to download the resource. + */ + downloadUrl?: string; + /** + * Type-specific properties of the artifact. + */ + properties?: { + [key: string]: string; + }; + /** + * The type of the resource: File container, version control folder, UNC path, etc. + */ + type?: string; + /** + * The full http link to the resource. + */ + url?: string; +} +/** + * Represents an attachment to a build. + */ +export interface Attachment { + _links?: any; + /** + * The name of the attachment. + */ + name?: string; +} +export declare enum AuditAction { + Add = 1, + Update = 2, + Delete = 3 +} +/** + * Data representation of a build. + */ +export interface Build { + _links?: any; + /** + * The agent specification for the build. + */ + agentSpecification?: AgentSpecification; + /** + * The build number/name of the build. + */ + buildNumber?: string; + /** + * The build number revision. + */ + buildNumberRevision?: number; + /** + * The build controller. This is only set if the definition type is Xaml. + */ + controller?: BuildController; + /** + * The definition associated with the build. + */ + definition?: DefinitionReference; + /** + * Indicates whether the build has been deleted. + */ + deleted?: boolean; + /** + * The identity of the process or person that deleted the build. + */ + deletedBy?: VSSInterfaces.IdentityRef; + /** + * The date the build was deleted. + */ + deletedDate?: Date; + /** + * The description of how the build was deleted. + */ + deletedReason?: string; + /** + * A list of demands that represents the agent capabilities required by this build. + */ + demands?: Demand[]; + /** + * The time that the build was completed. + */ + finishTime?: Date; + /** + * The ID of the build. + */ + id?: number; + /** + * Indicates whether the build should be skipped by retention policies. + */ + keepForever?: boolean; + /** + * The identity representing the process or person that last changed the build. + */ + lastChangedBy?: VSSInterfaces.IdentityRef; + /** + * The date the build was last changed. + */ + lastChangedDate?: Date; + /** + * Information about the build logs. + */ + logs?: BuildLogReference; + /** + * The orchestration plan for the build. + */ + orchestrationPlan?: TaskOrchestrationPlanReference; + /** + * The parameters for the build. + */ + parameters?: string; + /** + * Orchestration plans associated with the build (build, cleanup) + */ + plans?: TaskOrchestrationPlanReference[]; + /** + * The build's priority. + */ + priority?: QueuePriority; + /** + * The team project. + */ + project?: TfsCoreInterfaces.TeamProjectReference; + properties?: any; + /** + * The quality of the xaml build (good, bad, etc.) + */ + quality?: string; + /** + * The queue. This is only set if the definition type is Build. WARNING: this field is deprecated and does not corresponds to the jobs queues. + */ + queue?: AgentPoolQueue; + /** + * Additional options for queueing the build. + */ + queueOptions?: QueueOptions; + /** + * The current position of the build in the queue. + */ + queuePosition?: number; + /** + * The time that the build was queued. + */ + queueTime?: Date; + /** + * The reason that the build was created. + */ + reason?: BuildReason; + /** + * The repository. + */ + repository?: BuildRepository; + /** + * The identity that queued the build. + */ + requestedBy?: VSSInterfaces.IdentityRef; + /** + * The identity on whose behalf the build was queued. + */ + requestedFor?: VSSInterfaces.IdentityRef; + /** + * The build result. + */ + result?: BuildResult; + /** + * Indicates whether the build is retained by a release. + */ + retainedByRelease?: boolean; + /** + * The source branch. + */ + sourceBranch?: string; + /** + * The source version. + */ + sourceVersion?: string; + /** + * The time that the build was started. + */ + startTime?: Date; + /** + * The status of the build. + */ + status?: BuildStatus; + tags?: string[]; + /** + * Parameters to template expression evaluation + */ + templateParameters?: { + [key: string]: string; + }; + /** + * The build that triggered this build via a Build completion trigger. + */ + triggeredByBuild?: Build; + /** + * Sourceprovider-specific information about what triggered the build + */ + triggerInfo?: { + [key: string]: string; + }; + /** + * The URI of the build. + */ + uri?: string; + /** + * The REST URL of the build. + */ + url?: string; + validationResults?: BuildRequestValidationResult[]; +} +export interface BuildAgent { + buildDirectory?: string; + controller?: XamlBuildControllerReference; + createdDate?: Date; + description?: string; + enabled?: boolean; + id?: number; + messageQueueUrl?: string; + name?: string; + reservedForBuild?: string; + server?: XamlBuildServerReference; + status?: AgentStatus; + statusMessage?: string; + updatedDate?: Date; + uri?: string; + url?: string; +} +export interface BuildAgentReference { + /** + * Id of the resource + */ + id?: number; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +/** + * Represents an artifact produced by a build. + */ +export interface BuildArtifact { + /** + * The artifact ID. + */ + id?: number; + /** + * The name of the artifact. + */ + name?: string; + /** + * The actual resource. + */ + resource?: ArtifactResource; + /** + * The artifact source, which will be the ID of the job that produced this artifact. If an artifact is associated with multiple sources, this points to the first source. + */ + source?: string; +} +/** + * Represents the desired scope of authorization for a build. + */ +export declare enum BuildAuthorizationScope { + /** + * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. + */ + ProjectCollection = 1, + /** + * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. + */ + Project = 2 +} +/** + * Represents a build badge. + */ +export interface BuildBadge { + /** + * The ID of the build represented by this badge. + */ + buildId?: number; + /** + * A link to the SVG resource. + */ + imageUrl?: string; +} +export interface BuildCompletedEvent extends BuildUpdatedEvent { + /** + * Changes associated with a build used for build notifications + */ + changes?: Change[]; + /** + * Pull request for the build used for build notifications + */ + pullRequest?: PullRequest; + /** + * Test results associated with a build used for build notifications + */ + testResults?: TFS_TestManagement_Contracts.AggregatedResultsAnalysis; + /** + * Timeline records associated with a build used for build notifications + */ + timelineRecords?: TimelineRecord[]; + /** + * Work items associated with a build used for build notifications + */ + workItems?: TFS_SourceControl_Contracts.AssociatedWorkItem[]; +} +/** + * Represents a build completion trigger. + */ +export interface BuildCompletionTrigger extends BuildTrigger { + branchFilters?: string[]; + /** + * A reference to the definition that should trigger builds for this definition. + */ + definition?: DefinitionReference; + requiresSuccessfulBuild?: boolean; +} +export interface BuildController extends XamlBuildControllerReference { + _links?: any; + /** + * The date the controller was created. + */ + createdDate?: Date; + /** + * The description of the controller. + */ + description?: string; + /** + * Indicates whether the controller is enabled. + */ + enabled?: boolean; + /** + * The status of the controller. + */ + status?: ControllerStatus; + /** + * The date the controller was last updated. + */ + updatedDate?: Date; + /** + * The controller's URI. + */ + uri?: string; +} +/** + * Represents a build definition. + */ +export interface BuildDefinition extends BuildDefinitionReference { + /** + * Indicates whether badges are enabled for this definition. + */ + badgeEnabled?: boolean; + /** + * The build number format. + */ + buildNumberFormat?: string; + /** + * A save-time comment for the definition. + */ + comment?: string; + demands?: Demand[]; + /** + * The description. + */ + description?: string; + /** + * The drop location for the definition. + */ + dropLocation?: string; + /** + * The job authorization scope for builds queued against this definition. + */ + jobAuthorizationScope?: BuildAuthorizationScope; + /** + * The job cancel timeout (in minutes) for builds cancelled by user for this definition. + */ + jobCancelTimeoutInMinutes?: number; + /** + * The job execution timeout (in minutes) for builds queued against this definition. + */ + jobTimeoutInMinutes?: number; + options?: BuildOption[]; + /** + * The build process. + */ + process?: BuildProcess; + /** + * The process parameters for this definition. + */ + processParameters?: DistributedTaskCommonInterfaces.ProcessParameters; + properties?: any; + /** + * The repository. + */ + repository?: BuildRepository; + retentionRules?: RetentionPolicy[]; + tags?: string[]; + triggers?: BuildTrigger[]; + variableGroups?: VariableGroup[]; + variables?: { + [key: string]: BuildDefinitionVariable; + }; +} +/** + * For back-compat with extensions that use the old Steps format instead of Process and Phases + */ +export interface BuildDefinition3_2 extends BuildDefinitionReference3_2 { + /** + * Indicates whether badges are enabled for this definition + */ + badgeEnabled?: boolean; + build?: BuildDefinitionStep[]; + /** + * The build number format + */ + buildNumberFormat?: string; + /** + * The comment entered when saving the definition + */ + comment?: string; + demands?: Demand[]; + /** + * The description + */ + description?: string; + /** + * The drop location for the definition + */ + dropLocation?: string; + /** + * The job authorization scope for builds which are queued against this definition + */ + jobAuthorizationScope?: BuildAuthorizationScope; + /** + * The job cancel timeout in minutes for builds which are cancelled by user for this definition + */ + jobCancelTimeoutInMinutes?: number; + /** + * The job execution timeout in minutes for builds which are queued against this definition + */ + jobTimeoutInMinutes?: number; + latestBuild?: Build; + latestCompletedBuild?: Build; + options?: BuildOption[]; + /** + * Process Parameters + */ + processParameters?: DistributedTaskCommonInterfaces.ProcessParameters; + properties?: any; + /** + * The repository + */ + repository?: BuildRepository; + retentionRules?: RetentionPolicy[]; + tags?: string[]; + triggers?: BuildTrigger[]; + variables?: { + [key: string]: BuildDefinitionVariable; + }; +} +/** + * Represents a reference to a build definition. + */ +export interface BuildDefinitionReference extends DefinitionReference { + _links?: any; + /** + * The author of the definition. + */ + authoredBy?: VSSInterfaces.IdentityRef; + /** + * A reference to the definition that this definition is a draft of, if this is a draft definition. + */ + draftOf?: DefinitionReference; + /** + * The list of drafts associated with this definition, if this is not a draft definition. + */ + drafts?: DefinitionReference[]; + latestBuild?: Build; + latestCompletedBuild?: Build; + metrics?: BuildMetric[]; + /** + * The quality of the definition document (draft, etc.) + */ + quality?: DefinitionQuality; + /** + * The default queue for builds run against this definition. + */ + queue?: AgentPoolQueue; +} +/** + * For back-compat with extensions that use the old Steps format instead of Process and Phases + */ +export interface BuildDefinitionReference3_2 extends DefinitionReference { + _links?: any; + /** + * The author of the definition. + */ + authoredBy?: VSSInterfaces.IdentityRef; + /** + * A reference to the definition that this definition is a draft of, if this is a draft definition. + */ + draftOf?: DefinitionReference; + /** + * The list of drafts associated with this definition, if this is not a draft definition. + */ + drafts?: DefinitionReference[]; + metrics?: BuildMetric[]; + /** + * The quality of the definition document (draft, etc.) + */ + quality?: DefinitionQuality; + /** + * The default queue for builds run against this definition. + */ + queue?: AgentPoolQueue; +} +/** + * Represents a revision of a build definition. + */ +export interface BuildDefinitionRevision { + /** + * The identity of the person or process that changed the definition. + */ + changedBy?: VSSInterfaces.IdentityRef; + /** + * The date and time that the definition was changed. + */ + changedDate?: Date; + /** + * The change type (add, edit, delete). + */ + changeType?: AuditAction; + /** + * The comment associated with the change. + */ + comment?: string; + /** + * A link to the definition at this revision. + */ + definitionUrl?: string; + /** + * The name of the definition. + */ + name?: string; + /** + * The revision number. + */ + revision?: number; +} +export interface BuildDefinitionSourceProvider { + /** + * Uri of the associated definition + */ + definitionUri?: string; + /** + * fields associated with this build definition + */ + fields?: { + [key: string]: string; + }; + /** + * Id of this source provider + */ + id?: number; + /** + * The lst time this source provider was modified + */ + lastModified?: Date; + /** + * Name of the source provider + */ + name?: string; + /** + * Which trigger types are supported by this definition source provider + */ + supportedTriggerTypes?: DefinitionTriggerType; +} +/** + * Represents a step in a build phase. + */ +export interface BuildDefinitionStep { + /** + * Indicates whether this step should run even if a previous step fails. + */ + alwaysRun?: boolean; + /** + * A condition that determines whether this step should run. + */ + condition?: string; + /** + * Indicates whether the phase should continue even if this step fails. + */ + continueOnError?: boolean; + /** + * The display name for this step. + */ + displayName?: string; + /** + * Indicates whether the step is enabled. + */ + enabled?: boolean; + environment?: { + [key: string]: string; + }; + inputs?: { + [key: string]: string; + }; + /** + * The reference name for this step. + */ + refName?: string; + /** + * Number of retries. + */ + retryCountOnTaskFailure?: number; + /** + * The task associated with this step. + */ + task: TaskDefinitionReference; + /** + * The time, in minutes, that this step is allowed to run. + */ + timeoutInMinutes?: number; +} +/** + * Represents a template from which new build definitions can be created. + */ +export interface BuildDefinitionTemplate { + /** + * Indicates whether the template can be deleted. + */ + canDelete?: boolean; + /** + * The template category. + */ + category?: string; + /** + * An optional hosted agent queue for the template to use by default. + */ + defaultHostedQueue?: string; + /** + * A description of the template. + */ + description?: string; + icons?: { + [key: string]: string; + }; + /** + * The ID of the task whose icon is used when showing this template in the UI. + */ + iconTaskId?: string; + /** + * The ID of the template. + */ + id: string; + /** + * The name of the template. + */ + name: string; + /** + * The actual template. + */ + template?: BuildDefinition; +} +/** + * For back-compat with extensions that use the old Steps format instead of Process and Phases + */ +export interface BuildDefinitionTemplate3_2 { + canDelete?: boolean; + category?: string; + defaultHostedQueue?: string; + description?: string; + icons?: { + [key: string]: string; + }; + iconTaskId?: string; + id: string; + name: string; + template?: BuildDefinition3_2; +} +/** + * Represents a variable used by a build definition. + */ +export interface BuildDefinitionVariable { + /** + * Indicates whether the value can be set at queue time. + */ + allowOverride?: boolean; + /** + * Indicates whether the variable's value is a secret. + */ + isSecret?: boolean; + /** + * The value of the variable. + */ + value?: string; +} +export interface BuildDeletedEvent extends RealtimeBuildEvent { + build: Build; +} +export interface BuildDeployment { + deployment?: BuildSummary; + sourceBuild?: XamlBuildReference; +} +export interface BuildEvent { + data?: string[]; + identifier?: string; +} +/** + * Represents a build log. + */ +export interface BuildLog extends BuildLogReference { + /** + * The date and time the log was created. + */ + createdOn?: Date; + /** + * The date and time the log was last changed. + */ + lastChangedOn?: Date; + /** + * The number of lines in the log. + */ + lineCount?: number; +} +/** + * Represents a reference to a build log. + */ +export interface BuildLogReference { + /** + * The ID of the log. + */ + id?: number; + /** + * The type of the log location. + */ + type?: string; + /** + * A full link to the log resource. + */ + url?: string; +} +/** + * Represents metadata about builds in the system. + */ +export interface BuildMetric { + /** + * The date for the scope. + */ + date?: Date; + /** + * The value. + */ + intValue?: number; + /** + * The name of the metric. + */ + name?: string; + /** + * The scope. + */ + scope?: string; +} +/** + * Represents the application of an optional behavior to a build definition. + */ +export interface BuildOption { + /** + * A reference to the build option. + */ + definition: BuildOptionDefinitionReference; + /** + * Indicates whether the behavior is enabled. + */ + enabled?: boolean; + inputs?: { + [key: string]: string; + }; +} +/** + * Represents an optional behavior that can be applied to a build definition. + */ +export interface BuildOptionDefinition extends BuildOptionDefinitionReference { + /** + * The description. + */ + description?: string; + /** + * The list of input groups defined for the build option. + */ + groups?: BuildOptionGroupDefinition[]; + /** + * The list of inputs defined for the build option. + */ + inputs?: BuildOptionInputDefinition[]; + /** + * The name of the build option. + */ + name?: string; + /** + * A value that indicates the relative order in which the behavior should be applied. + */ + ordinal?: number; +} +/** + * Represents a reference to a build option definition. + */ +export interface BuildOptionDefinitionReference { + /** + * The ID of the referenced build option. + */ + id: string; +} +/** + * Represents a group of inputs for a build option. + */ +export interface BuildOptionGroupDefinition { + /** + * The name of the group to display in the UI. + */ + displayName?: string; + /** + * Indicates whether the group is initially displayed as expanded in the UI. + */ + isExpanded?: boolean; + /** + * The internal name of the group. + */ + name?: string; +} +/** + * Represents an input for a build option. + */ +export interface BuildOptionInputDefinition { + /** + * The default value. + */ + defaultValue?: string; + /** + * The name of the input group that this input belongs to. + */ + groupName?: string; + help?: { + [key: string]: string; + }; + /** + * The label for the input. + */ + label?: string; + /** + * The name of the input. + */ + name?: string; + options?: { + [key: string]: string; + }; + /** + * Indicates whether the input is required to have a value. + */ + required?: boolean; + /** + * Indicates the type of the input value. + */ + type?: BuildOptionInputType; + /** + * The rule that is applied to determine whether the input is visible in the UI. + */ + visibleRule?: string; +} +export declare enum BuildOptionInputType { + String = 0, + Boolean = 1, + StringList = 2, + Radio = 3, + PickList = 4, + MultiLine = 5, + BranchFilter = 6 +} +export declare enum BuildPhaseStatus { + /** + * The state is not known. + */ + Unknown = 0, + /** + * The build phase completed unsuccessfully. + */ + Failed = 1, + /** + * The build phase completed successfully. + */ + Succeeded = 2 +} +/** + * Represents a build process. + */ +export interface BuildProcess { + /** + * The type of the process. + */ + type?: number; +} +/** + * Represents resources used by a build process. + */ +export interface BuildProcessResources { + endpoints?: ServiceEndpointReference[]; + files?: SecureFileReference[]; + queues?: AgentPoolQueueReference[]; + variableGroups?: VariableGroupReference[]; +} +export interface BuildProcessTemplate { + description?: string; + fileExists?: boolean; + id?: number; + parameters?: string; + serverPath?: string; + supportedReasons?: BuildReason; + teamProject?: string; + templateType?: ProcessTemplateType; + url?: string; + version?: string; +} +/** + * Specifies the desired ordering of builds. + */ +export declare enum BuildQueryOrder { + /** + * Order by finish time ascending. + */ + FinishTimeAscending = 2, + /** + * Order by finish time descending. + */ + FinishTimeDescending = 3, + /** + * Order by queue time descending. + */ + QueueTimeDescending = 4, + /** + * Order by queue time ascending. + */ + QueueTimeAscending = 5, + /** + * Order by start time descending. + */ + StartTimeDescending = 6, + /** + * Order by start time ascending. + */ + StartTimeAscending = 7 +} +export interface BuildQueuedEvent extends BuildUpdatedEvent { +} +export declare enum BuildReason { + /** + * No reason. This value should not be used. + */ + None = 0, + /** + * The build was started manually. + */ + Manual = 1, + /** + * The build was started for the trigger TriggerType.ContinuousIntegration. + */ + IndividualCI = 2, + /** + * The build was started for the trigger TriggerType.BatchedContinuousIntegration. + */ + BatchedCI = 4, + /** + * The build was started for the trigger TriggerType.Schedule. + */ + Schedule = 8, + /** + * The build was started for the trigger TriggerType.ScheduleForced. + */ + ScheduleForced = 16, + /** + * The build was created by a user. + */ + UserCreated = 32, + /** + * The build was started manually for private validation. + */ + ValidateShelveset = 64, + /** + * The build was started for the trigger ContinuousIntegrationType.Gated. + */ + CheckInShelveset = 128, + /** + * The build was started by a pull request. Added in resource version 3. + */ + PullRequest = 256, + /** + * The build was started when another build completed. + */ + BuildCompletion = 512, + /** + * The build was started when resources in pipeline triggered it + */ + ResourceTrigger = 1024, + /** + * The build was triggered for retention policy purposes. + */ + Triggered = 1967, + /** + * All reasons. + */ + All = 2031 +} +/** + * Represents a reference to a build. + */ +export interface BuildReference { + _links?: any; + /** + * The build number. + */ + buildNumber?: string; + /** + * Indicates whether the build has been deleted. + */ + deleted?: boolean; + /** + * The time that the build was completed. + */ + finishTime?: Date; + /** + * The ID of the build. + */ + id?: number; + /** + * The time that the build was queued. + */ + queueTime?: Date; + /** + * The identity on whose behalf the build was queued. + */ + requestedFor?: VSSInterfaces.IdentityRef; + /** + * The build result. + */ + result?: BuildResult; + /** + * The time that the build was started. + */ + startTime?: Date; + /** + * The build status. + */ + status?: BuildStatus; +} +/** + * Represents information about a build report. + */ +export interface BuildReportMetadata { + /** + * The Id of the build. + */ + buildId?: number; + /** + * The content of the report. + */ + content?: string; + /** + * The type of the report. + */ + type?: string; +} +/** + * Represents a repository used by a build definition. + */ +export interface BuildRepository { + /** + * Indicates whether to checkout submodules. + */ + checkoutSubmodules?: boolean; + /** + * Indicates whether to clean the target folder when getting code from the repository. + */ + clean?: string; + /** + * The name of the default branch. + */ + defaultBranch?: string; + /** + * The ID of the repository. + */ + id?: string; + /** + * The friendly name of the repository. + */ + name?: string; + properties?: { + [key: string]: string; + }; + /** + * The root folder. + */ + rootFolder?: string; + /** + * The type of the repository. + */ + type?: string; + /** + * The URL of the repository. + */ + url?: string; +} +/** + * Represents the result of validating a build request. + */ +export interface BuildRequestValidationResult { + /** + * The message associated with the result. + */ + message?: string; + /** + * The result. + */ + result?: ValidationResult; +} +/** + * Represents information about resources used by builds in the system. + */ +export interface BuildResourceUsage { + /** + * The number of build agents. + */ + distributedTaskAgents?: number; + /** + * The number of paid private agent slots. + */ + paidPrivateAgentSlots?: number; + /** + * The total usage. + */ + totalUsage?: number; + /** + * The number of XAML controllers. + */ + xamlControllers?: number; +} +/** + * This is not a Flags enum because we don't want to set multiple statuses on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum This will ensure that things that key off multiple result types (like labelling sources) continue to work + */ +export declare enum BuildResult { + /** + * No result + */ + None = 0, + /** + * The build completed successfully. + */ + Succeeded = 2, + /** + * The build completed compilation successfully but had other errors. + */ + PartiallySucceeded = 4, + /** + * The build completed unsuccessfully. + */ + Failed = 8, + /** + * The build was canceled before starting. + */ + Canceled = 32 +} +/** + * A historical overview of build retention information. This includes a list of snapshots taken about build retention usage, and a list of builds that have exceeded the default 30 day retention policy. + */ +export interface BuildRetentionHistory { + /** + * A list of builds that are older than the default retention policy, but are not marked as retained. Something is causing these builds to not get cleaned up. + */ + buildRetentionSamples?: BuildRetentionSample[]; +} +/** + * A snapshot of build retention information. This class takes a sample at the given time. It provides information about retained builds, files associated with those retained builds, and number of files being retained. + */ +export interface BuildRetentionSample { + /** + * Summary of retention by build + */ + builds?: string; + /** + * List of build definitions + */ + definitions?: string; + /** + * Summary of files consumed by retained builds + */ + files?: string; + /** + * The date and time when the sample was taken + */ + sampleTime?: Date; +} +export interface BuildsDeletedEvent extends BuildsDeletedEvent1 { +} +export interface BuildsDeletedEvent1 { + buildIds?: number[]; + /** + * The ID of the definition. + */ + definitionId?: number; + /** + * The ID of the project. + */ + projectId?: string; +} +export interface BuildServer { + agents?: BuildAgentReference[]; + controller?: XamlBuildControllerReference; + id?: number; + isVirtual?: boolean; + messageQueueUrl?: string; + name?: string; + requireClientCertificates?: boolean; + status?: ServiceHostStatus; + statusChangedDate?: Date; + uri?: string; + url?: string; + version?: number; +} +/** + * Represents system-wide build settings. + */ +export interface BuildSettings { + /** + * The number of days to keep records of deleted builds. + */ + daysToKeepDeletedBuildsBeforeDestroy?: number; + /** + * The default retention policy. + */ + defaultRetentionPolicy?: RetentionPolicy; + /** + * The maximum retention policy. + */ + maximumRetentionPolicy?: RetentionPolicy; +} +export declare enum BuildStatus { + /** + * No status. + */ + None = 0, + /** + * The build is currently in progress. + */ + InProgress = 1, + /** + * The build has completed. + */ + Completed = 2, + /** + * The build is cancelling + */ + Cancelling = 4, + /** + * The build is inactive in the queue. + */ + Postponed = 8, + /** + * The build has not yet started. + */ + NotStarted = 32, + /** + * All status. + */ + All = 47 +} +export interface BuildSummary { + build?: XamlBuildReference; + finishTime?: Date; + keepForever?: boolean; + quality?: string; + reason?: BuildReason; + requestedFor?: VSSInterfaces.IdentityRef; + startTime?: Date; + status?: BuildStatus; +} +export interface BuildTagsAddedEvent extends BuildUpdatedEvent { + allTags: string[]; + newTags: string[]; +} +/** + * Represents a trigger for a buld definition. + */ +export interface BuildTrigger { + /** + * The type of the trigger. + */ + triggerType?: DefinitionTriggerType; +} +export interface BuildUpdatedEvent extends RealtimeBuildEvent { + build: Build; +} +/** + * Represents a workspace mapping. + */ +export interface BuildWorkspace { + mappings?: MappingDetails[]; +} +/** + * Represents a change associated with a build. + */ +export interface Change { + /** + * The author of the change. + */ + author?: VSSInterfaces.IdentityRef; + /** + * The location of a user-friendly representation of the resource. + */ + displayUri?: string; + /** + * The identifier for the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset ID. + */ + id?: string; + /** + * The location of the full representation of the resource. + */ + location?: string; + /** + * The description of the change. This might be a commit message or changeset description. + */ + message?: string; + /** + * Indicates whether the message was truncated. + */ + messageTruncated?: boolean; + /** + * The person or process that pushed the change. + */ + pusher?: string; + /** + * The timestamp for the change. + */ + timestamp?: Date; + /** + * The type of change. "commit", "changeset", etc. + */ + type?: string; +} +export interface ConsoleLogEvent extends RealtimeBuildEvent { + lines?: string[]; + stepRecordId?: string; + timelineId: string; + timelineRecordId: string; +} +export interface ContinuousDeploymentDefinition { + /** + * The connected service associated with the continuous deployment + */ + connectedService?: TfsCoreInterfaces.WebApiConnectedServiceRef; + /** + * The definition associated with the continuous deployment + */ + definition?: XamlDefinitionReference; + gitBranch?: string; + hostedServiceName?: string; + project?: TfsCoreInterfaces.TeamProjectReference; + repositoryId?: string; + storageAccountName?: string; + subscriptionId?: string; + website?: string; + webspace?: string; +} +/** + * Represents a continuous integration (CI) trigger. + */ +export interface ContinuousIntegrationTrigger extends BuildTrigger { + /** + * Indicates whether changes should be batched while another CI build is running. + */ + batchChanges?: boolean; + branchFilters?: string[]; + /** + * The maximum number of simultaneous CI builds that will run per branch. + */ + maxConcurrentBuildsPerBranch?: number; + pathFilters?: string[]; + /** + * The polling interval, in seconds. + */ + pollingInterval?: number; + /** + * The ID of the job used to poll an external repository. + */ + pollingJobId?: string; + settingsSourceType?: number; +} +export declare enum ControllerStatus { + /** + * Indicates that the build controller cannot be contacted. + */ + Unavailable = 0, + /** + * Indicates that the build controller is currently available. + */ + Available = 1, + /** + * Indicates that the build controller has taken itself offline. + */ + Offline = 2 +} +export declare enum DefinitionQuality { + Definition = 1, + Draft = 2 +} +/** + * Specifies the desired ordering of definitions. + */ +export declare enum DefinitionQueryOrder { + /** + * No order + */ + None = 0, + /** + * Order by created on/last modified time ascending. + */ + LastModifiedAscending = 1, + /** + * Order by created on/last modified time descending. + */ + LastModifiedDescending = 2, + /** + * Order by definition name ascending. + */ + DefinitionNameAscending = 3, + /** + * Order by definition name descending. + */ + DefinitionNameDescending = 4 +} +export declare enum DefinitionQueueStatus { + /** + * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. + */ + Enabled = 0, + /** + * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. + */ + Paused = 1, + /** + * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. + */ + Disabled = 2 +} +/** + * Represents a reference to a definition. + */ +export interface DefinitionReference { + /** + * The date this version of the definition was created. + */ + createdDate?: Date; + /** + * The ID of the referenced definition. + */ + id?: number; + /** + * The name of the referenced definition. + */ + name?: string; + /** + * The folder path of the definition. + */ + path?: string; + /** + * A reference to the project. + */ + project?: TfsCoreInterfaces.TeamProjectReference; + /** + * A value that indicates whether builds can be queued against this definition. + */ + queueStatus?: DefinitionQueueStatus; + /** + * The definition revision number. + */ + revision?: number; + /** + * The type of the definition. + */ + type?: DefinitionType; + /** + * The definition's URI. + */ + uri?: string; + /** + * The REST URL of the definition. + */ + url?: string; +} +export interface DefinitionResourceReference { + /** + * Indicates whether the resource is authorized for use. + */ + authorized?: boolean; + /** + * The id of the resource. + */ + id?: string; + /** + * A friendly name for the resource. + */ + name?: string; + /** + * The type of the resource. + */ + type?: string; +} +export declare enum DefinitionTriggerType { + /** + * Manual builds only. + */ + None = 1, + /** + * A build should be started for each changeset. + */ + ContinuousIntegration = 2, + /** + * A build should be started for multiple changesets at a time at a specified interval. + */ + BatchedContinuousIntegration = 4, + /** + * A build should be started on a specified schedule whether or not changesets exist. + */ + Schedule = 8, + /** + * A validation build should be started for each check-in. + */ + GatedCheckIn = 16, + /** + * A validation build should be started for each batch of check-ins. + */ + BatchedGatedCheckIn = 32, + /** + * A build should be triggered when a GitHub pull request is created or updated. Added in resource version 3 + */ + PullRequest = 64, + /** + * A build should be triggered when another build completes. + */ + BuildCompletion = 128, + /** + * All types. + */ + All = 255 +} +export declare enum DefinitionType { + Xaml = 1, + Build = 2 +} +export declare enum DeleteOptions { + /** + * No data should be deleted. This value should not be used. + */ + None = 0, + /** + * The drop location should be deleted. + */ + DropLocation = 1, + /** + * The test results should be deleted. + */ + TestResults = 2, + /** + * The version control label should be deleted. + */ + Label = 4, + /** + * The build should be deleted. + */ + Details = 8, + /** + * Published symbols should be deleted. + */ + Symbols = 16, + /** + * All data should be deleted. + */ + All = 31 +} +/** + * Represents a demand used by a definition or build. + */ +export interface Demand { + /** + * The name of the capability referenced by the demand. + */ + name?: string; + /** + * The demanded value. + */ + value?: string; +} +/** + * Represents a dependency. + */ +export interface Dependency { + /** + * The event. The dependency is satisfied when the referenced object emits this event. + */ + event?: string; + /** + * The scope. This names the object referenced by the dependency. + */ + scope?: string; +} +/** + * Represents the data from the build information nodes for type "DeploymentInformation" for xaml builds + */ +export interface Deployment { + type?: string; +} +/** + * Deployment information for type "Build" + */ +export interface DeploymentBuild extends Deployment { + buildId?: number; +} +/** + * Deployment information for type "Deploy" + */ +export interface DeploymentDeploy extends Deployment { + message?: string; +} +/** + * Deployment information for type "Test" + */ +export interface DeploymentTest extends Deployment { + runId?: number; +} +/** + * Represents a build process supported by the build definition designer. + */ +export interface DesignerProcess extends BuildProcess { + phases?: Phase[]; + /** + * The target for the build process. + */ + target?: DesignerProcessTarget; +} +/** + * Represents the target for the build process. + */ +export interface DesignerProcessTarget { + /** + * Agent specification for the build process. + */ + agentSpecification?: AgentSpecification; +} +export interface DockerProcess extends BuildProcess { + target?: DockerProcessTarget; +} +/** + * Represents the target for the docker build process. + */ +export interface DockerProcessTarget extends DesignerProcessTarget { +} +/** + * Represents a folder that contains build definitions. + */ +export interface Folder { + /** + * The process or person who created the folder. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The date the folder was created. + */ + createdOn?: Date; + /** + * The description. + */ + description?: string; + /** + * The process or person that last changed the folder. + */ + lastChangedBy?: VSSInterfaces.IdentityRef; + /** + * The date the folder was last changed. + */ + lastChangedDate?: Date; + /** + * The full path. + */ + path?: string; + /** + * The project. + */ + project?: TfsCoreInterfaces.TeamProjectReference; +} +/** + * Specifies the desired ordering of folders. + */ +export declare enum FolderQueryOrder { + /** + * No order + */ + None = 0, + /** + * Order by folder name and path ascending. + */ + FolderAscending = 1, + /** + * Order by folder name and path descending. + */ + FolderDescending = 2 +} +/** + * Represents the ability to build forks of the selected repository. + */ +export interface Forks { + /** + * Indicates whether a build should allow a full access token or scope it down when building forks of the selected repository. + */ + allowFullAccessToken?: boolean; + /** + * Indicates whether a build should use secrets when building forks of the selected repository. + */ + allowSecrets?: boolean; + /** + * Indicates whether the trigger should queue builds for forks of the selected repository. + */ + enabled?: boolean; +} +/** + * Represents a gated check-in trigger. + */ +export interface GatedCheckInTrigger extends BuildTrigger { + pathFilters?: string[]; + /** + * Indicates whether CI triggers should run after the gated check-in succeeds. + */ + runContinuousIntegration?: boolean; + /** + * Indicates whether to take workspace mappings into account when determining whether a build should run. + */ + useWorkspaceMappings?: boolean; +} +export declare enum GetOption { + /** + * Use the latest changeset at the time the build is queued. + */ + LatestOnQueue = 0, + /** + * Use the latest changeset at the time the build is started. + */ + LatestOnBuild = 1, + /** + * A user-specified version has been supplied. + */ + Custom = 2 +} +/** + * Data representation of an information node associated with a build + */ +export interface InformationNode { + /** + * Fields of the information node + */ + fields?: { + [key: string]: string; + }; + /** + * Process or person that last modified this node + */ + lastModifiedBy?: string; + /** + * Date this node was last modified + */ + lastModifiedDate?: Date; + /** + * Node Id of this information node + */ + nodeId?: number; + /** + * Id of parent node (xml tree) + */ + parentId?: number; + /** + * The type of the information node + */ + type?: string; +} +/** + * Represents an issue (error, warning) associated with a build. + */ +export interface Issue { + /** + * The category. + */ + category?: string; + data?: { + [key: string]: string; + }; + /** + * A description of the issue. + */ + message?: string; + /** + * The type (error, warning) of the issue. + */ + type?: IssueType; +} +export declare enum IssueType { + Error = 1, + Warning = 2 +} +export interface JustInTimeProcess extends BuildProcess { +} +/** + * Represents an entry in a workspace mapping. + */ +export interface MappingDetails { + /** + * The local path. + */ + localPath?: string; + /** + * The mapping type. + */ + mappingType?: string; + /** + * The server path. + */ + serverPath?: string; +} +export interface MinimalRetentionLease { + /** + * The pipeline definition of the run. + */ + definitionId?: number; + /** + * User-provided string that identifies the owner of a retention lease. + */ + ownerId?: string; + /** + * The pipeline run to protect. + */ + runId?: number; +} +/** + * Represents options for running a phase against multiple agents. + */ +export interface MultipleAgentExecutionOptions extends AgentTargetExecutionOptions { + /** + * Indicates whether failure on one agent should prevent the phase from running on other agents. + */ + continueOnError?: boolean; + /** + * The maximum number of agents to use simultaneously. + */ + maxConcurrency?: number; +} +/** + * Required information to create a new retention lease. + */ +export interface NewRetentionLease { + /** + * The number of days to consider the lease valid. A retention lease valid for more than 100 years (36500 days) will display as retaining the build "forever". + */ + daysValid?: number; + /** + * The pipeline definition of the run. + */ + definitionId?: number; + /** + * User-provided string that identifies the owner of a retention lease. + */ + ownerId?: string; + /** + * If set, this lease will also prevent the pipeline from being deleted while the lease is still valid. + */ + protectPipeline?: boolean; + /** + * The pipeline run to protect. + */ + runId?: number; +} +/** + * Represents a phase of a build definition. + */ +export interface Phase { + /** + * The condition that must be true for this phase to execute. + */ + condition?: string; + dependencies?: Dependency[]; + /** + * The job authorization scope for builds queued against this definition. + */ + jobAuthorizationScope?: BuildAuthorizationScope; + /** + * The cancellation timeout, in minutes, for builds queued against this definition. + */ + jobCancelTimeoutInMinutes?: number; + /** + * The job execution timeout, in minutes, for builds queued against this definition. + */ + jobTimeoutInMinutes?: number; + /** + * The name of the phase. + */ + name?: string; + /** + * The unique ref name of the phase. + */ + refName?: string; + steps?: BuildDefinitionStep[]; + /** + * The target (agent, server, etc.) for this phase. + */ + target?: PhaseTarget; + variables?: { + [key: string]: BuildDefinitionVariable; + }; +} +/** + * Represents the target of a phase. + */ +export interface PhaseTarget { + /** + * The type of the target. + */ + type?: number; +} +/** + * Contains pipeline general settings. + */ +export interface PipelineGeneralSettings { + /** + * If enabled, scope of access for all non-release pipelines reduces to the current project. + */ + enforceJobAuthScope?: boolean; + /** + * If enabled, scope of access for all release pipelines reduces to the current project. + */ + enforceJobAuthScopeForReleases?: boolean; + /** + * Restricts the scope of access for all pipelines to only repositories explicitly referenced by the pipeline. + */ + enforceReferencedRepoScopedToken?: boolean; + /** + * If enabled, only those variables that are explicitly marked as "Settable at queue time" can be set at queue time. + */ + enforceSettableVar?: boolean; + /** + * Allows pipelines to record metadata. + */ + publishPipelineMetadata?: boolean; + /** + * Anonymous users can access the status badge API for all pipelines unless this option is enabled. + */ + statusBadgesArePrivate?: boolean; +} +export declare enum ProcessTemplateType { + /** + * Indicates a custom template. + */ + Custom = 0, + /** + * Indicates a default template. + */ + Default = 1, + /** + * Indicates an upgrade template. + */ + Upgrade = 2 +} +/** + * Contains the settings for the retention rules. + */ +export interface ProjectRetentionSetting { + /** + * The rules for artifact retention. Artifacts can not live longer than a run, so will be overridden by a shorter run purge setting. + */ + purgeArtifacts?: RetentionSetting; + /** + * The rules for pull request pipeline run retention. + */ + purgePullRequestRuns?: RetentionSetting; + /** + * The rules for pipeline run retention. + */ + purgeRuns?: RetentionSetting; + /** + * The rules for retaining runs per protected branch. + */ + retainRunsPerProtectedBranch?: RetentionSetting; +} +/** + * Represents a pull request object. These are retrieved from Source Providers. + */ +export interface PullRequest { + /** + * The links to other objects related to this object. + */ + _links?: any; + /** + * Author of the pull request. + */ + author?: VSSInterfaces.IdentityRef; + /** + * Current state of the pull request, e.g. open, merged, closed, conflicts, etc. + */ + currentState?: string; + /** + * Description for the pull request. + */ + description?: string; + /** + * Returns if pull request is draft + */ + draft?: boolean; + /** + * Unique identifier for the pull request + */ + id?: string; + /** + * The name of the provider this pull request is associated with. + */ + providerName?: string; + /** + * Source branch ref of this pull request + */ + sourceBranchRef?: string; + /** + * Owner of the source repository of this pull request + */ + sourceRepositoryOwner?: string; + /** + * Target branch ref of this pull request + */ + targetBranchRef?: string; + /** + * Owner of the target repository of this pull request + */ + targetRepositoryOwner?: string; + /** + * Title of the pull request. + */ + title?: string; +} +/** + * Represents a pull request trigger. + */ +export interface PullRequestTrigger extends BuildTrigger { + /** + * Indicates if an update to a PR should delete current in-progress builds. + */ + autoCancel?: boolean; + branchFilters?: string[]; + forks?: Forks; + isCommentRequiredForPullRequest?: boolean; + pathFilters?: string[]; + requireCommentsForNonTeamMemberAndNonContributors?: boolean; + requireCommentsForNonTeamMembersOnly?: boolean; + settingsSourceType?: number; +} +export declare enum QueryDeletedOption { + /** + * Include only non-deleted builds. + */ + ExcludeDeleted = 0, + /** + * Include deleted and non-deleted builds. + */ + IncludeDeleted = 1, + /** + * Include only deleted builds. + */ + OnlyDeleted = 2 +} +export declare enum QueueOptions { + /** + * No queue options + */ + None = 0, + /** + * Create a plan Id for the build, do not run it + */ + DoNotRun = 1 +} +export declare enum QueuePriority { + /** + * Low priority. + */ + Low = 5, + /** + * Below normal priority. + */ + BelowNormal = 4, + /** + * Normal priority. + */ + Normal = 3, + /** + * Above normal priority. + */ + AboveNormal = 2, + /** + * High priority. + */ + High = 1 +} +export interface RealtimeBuildEvent { + buildId: number; +} +export declare enum RepositoryCleanOptions { + Source = 0, + SourceAndOutputDir = 1, + /** + * Re-create $(build.sourcesDirectory) + */ + SourceDir = 2, + /** + * Re-create $(agnet.buildDirectory) which contains $(build.sourcesDirectory), $(build.binariesDirectory) and any folders that left from previous build. + */ + AllBuildDir = 3 +} +/** + * Represents a repository's webhook returned from a source provider. + */ +export interface RepositoryWebhook { + /** + * The friendly name of the repository. + */ + name?: string; + types?: DefinitionTriggerType[]; + /** + * The URL of the repository. + */ + url?: string; +} +/** + * Represents a reference to a resource. + */ +export interface ResourceReference { + /** + * An alias to be used when referencing the resource. + */ + alias?: string; +} +export declare enum ResultSet { + /** + * Include all repositories + */ + All = 0, + /** + * Include most relevant repositories for user + */ + Top = 1 +} +/** + * A valid retention lease prevents automated systems from deleting a pipeline run. + */ +export interface RetentionLease { + /** + * When the lease was created. + */ + createdOn?: Date; + /** + * The pipeline definition of the run. + */ + definitionId?: number; + /** + * The unique identifier for this lease. + */ + leaseId?: number; + /** + * Non-unique string that identifies the owner of a retention lease. + */ + ownerId?: string; + /** + * If set, this lease will also prevent the pipeline from being deleted while the lease is still valid. + */ + protectPipeline?: boolean; + /** + * The pipeline run protected by this lease. + */ + runId?: number; + /** + * The last day the lease is considered valid. + */ + validUntil?: Date; +} +/** + * An update to the retention parameters of a retention lease. + */ +export interface RetentionLeaseUpdate { + /** + * The number of days to consider the lease valid. A retention lease valid for more than 100 years (36500 days) will display as retaining the build "forever". + */ + daysValid?: number; + /** + * If set, this lease will also prevent the pipeline from being deleted while the lease is still valid. + */ + protectPipeline?: boolean; +} +/** + * Represents a retention policy for a build definition. + */ +export interface RetentionPolicy { + artifacts?: string[]; + artifactTypesToDelete?: string[]; + branches?: string[]; + /** + * The number of days to keep builds. + */ + daysToKeep?: number; + /** + * Indicates whether the build record itself should be deleted. + */ + deleteBuildRecord?: boolean; + /** + * Indicates whether to delete test results associated with the build. + */ + deleteTestResults?: boolean; + /** + * The minimum number of builds to keep. + */ + minimumToKeep?: number; +} +/** + * Contains the minimum, maximum, and current value for a retention setting. + */ +export interface RetentionSetting { + max?: number; + min?: number; + value?: number; +} +export interface Schedule { + branchFilters?: string[]; + /** + * Days for a build (flags enum for days of the week) + */ + daysToBuild?: ScheduleDays; + /** + * The Job Id of the Scheduled job that will queue the scheduled build. Since a single trigger can have multiple schedules and we want a single job to process a single schedule (since each schedule has a list of branches to build), the schedule itself needs to define the Job Id. This value will be filled in when a definition is added or updated. The UI does not provide it or use it. + */ + scheduleJobId?: string; + /** + * Flag to determine if this schedule should only build if the associated source has been changed. + */ + scheduleOnlyWithChanges?: boolean; + /** + * Local timezone hour to start + */ + startHours?: number; + /** + * Local timezone minute to start + */ + startMinutes?: number; + /** + * Time zone of the build schedule (String representation of the time zone ID) + */ + timeZoneId?: string; +} +export declare enum ScheduleDays { + /** + * Do not run. + */ + None = 0, + /** + * Run on Monday. + */ + Monday = 1, + /** + * Run on Tuesday. + */ + Tuesday = 2, + /** + * Run on Wednesday. + */ + Wednesday = 4, + /** + * Run on Thursday. + */ + Thursday = 8, + /** + * Run on Friday. + */ + Friday = 16, + /** + * Run on Saturday. + */ + Saturday = 32, + /** + * Run on Sunday. + */ + Sunday = 64, + /** + * Run on all days of the week. + */ + All = 127 +} +/** + * Represents a schedule trigger. + */ +export interface ScheduleTrigger extends BuildTrigger { + schedules?: Schedule[]; +} +/** + * Represents a reference to a secure file. + */ +export interface SecureFileReference extends ResourceReference { + /** + * The ID of the secure file. + */ + id?: string; +} +/** + * Represents a phase target that runs on the server. + */ +export interface ServerTarget extends PhaseTarget { + /** + * The execution options. + */ + executionOptions?: ServerTargetExecutionOptions; +} +/** + * Represents options for running a phase on the server. + */ +export interface ServerTargetExecutionOptions { + /** + * The type. + */ + type?: number; +} +/** + * Represents a referenec to a service endpoint. + */ +export interface ServiceEndpointReference extends ResourceReference { + /** + * The ID of the service endpoint. + */ + id?: string; +} +export declare enum ServiceHostStatus { + /** + * The service host is currently connected and accepting commands. + */ + Online = 1, + /** + * The service host is currently disconnected and not accepting commands. + */ + Offline = 2 +} +export interface SourceProviderAttributes { + /** + * The name of the source provider. + */ + name?: string; + /** + * The capabilities supported by this source provider. + */ + supportedCapabilities?: { + [key: string]: boolean; + }; + /** + * The types of triggers supported by this source provider. + */ + supportedTriggers?: SupportedTrigger[]; +} +export declare enum SourceProviderAvailability { + /** + * The source provider is available in the hosted environment. + */ + Hosted = 1, + /** + * The source provider is available in the on-premises environment. + */ + OnPremises = 2, + /** + * The source provider is available in all environments. + */ + All = 3 +} +/** + * Represents a work item related to some source item. These are retrieved from Source Providers. + */ +export interface SourceRelatedWorkItem { + _links?: any; + /** + * Identity ref for the person that the work item is assigned to. + */ + assignedTo?: VSSInterfaces.IdentityRef; + /** + * Current state of the work item, e.g. Active, Resolved, Closed, etc. + */ + currentState?: string; + /** + * Long description for the work item. + */ + description?: string; + /** + * Unique identifier for the work item + */ + id?: string; + /** + * The name of the provider the work item is associated with. + */ + providerName?: string; + /** + * Short name for the work item. + */ + title?: string; + /** + * Type of work item, e.g. Bug, Task, User Story, etc. + */ + type?: string; +} +/** + * A set of repositories returned from the source provider. + */ +export interface SourceRepositories { + /** + * A token used to continue this paged request; 'null' if the request is complete + */ + continuationToken?: string; + /** + * The number of repositories requested for each page + */ + pageLength?: number; + /** + * A list of repositories + */ + repositories?: SourceRepository[]; + /** + * The total number of pages, or '-1' if unknown + */ + totalPageCount?: number; +} +/** + * Represents a repository returned from a source provider. + */ +export interface SourceRepository { + /** + * The name of the default branch. + */ + defaultBranch?: string; + /** + * The full name of the repository. + */ + fullName?: string; + /** + * The ID of the repository. + */ + id?: string; + /** + * The friendly name of the repository. + */ + name?: string; + properties?: { + [key: string]: string; + }; + /** + * The name of the source provider the repository is from. + */ + sourceProviderName?: string; + /** + * The URL of the repository. + */ + url?: string; +} +/** + * Represents an item in a repository from a source provider. + */ +export interface SourceRepositoryItem { + /** + * Whether the item is able to have sub-items (e.g., is a folder). + */ + isContainer?: boolean; + /** + * The full path of the item, relative to the root of the repository. + */ + path?: string; + /** + * The type of the item (folder, file, etc). + */ + type?: string; + /** + * The URL of the item. + */ + url?: string; +} +export declare enum StageUpdateType { + Cancel = 0, + Retry = 1 +} +export interface SupportedTrigger { + /** + * The default interval to wait between polls (only relevant when NotificationType is Polling). + */ + defaultPollingInterval?: number; + /** + * How the trigger is notified of changes. + */ + notificationType?: string; + /** + * The capabilities supported by this trigger. + */ + supportedCapabilities?: { + [key: string]: SupportLevel; + }; + /** + * The type of trigger. + */ + type?: DefinitionTriggerType; +} +export declare enum SupportLevel { + /** + * The functionality is not supported. + */ + Unsupported = 0, + /** + * The functionality is supported. + */ + Supported = 1, + /** + * The functionality is required. + */ + Required = 2 +} +/** + * Represents a Subversion mapping entry. + */ +export interface SvnMappingDetails { + /** + * The depth. + */ + depth?: number; + /** + * Indicates whether to ignore externals. + */ + ignoreExternals?: boolean; + /** + * The local path. + */ + localPath?: string; + /** + * The revision. + */ + revision?: string; + /** + * The server path. + */ + serverPath?: string; +} +/** + * Represents a subversion workspace. + */ +export interface SvnWorkspace { + mappings?: SvnMappingDetails[]; +} +/** + * Represents a reference to an agent pool. + */ +export interface TaskAgentPoolReference { + /** + * The pool ID. + */ + id?: number; + /** + * A value indicating whether or not this pool is managed by the service. + */ + isHosted?: boolean; + /** + * The pool name. + */ + name?: string; +} +/** + * A reference to a task definition. + */ +export interface TaskDefinitionReference { + /** + * The type of task (task or task group). + */ + definitionType?: string; + /** + * The ID of the task. + */ + id: string; + /** + * The version of the task. + */ + versionSpec: string; +} +/** + * Represents a reference to a plan group. + */ +export interface TaskOrchestrationPlanGroupReference { + /** + * The name of the plan group. + */ + planGroup?: string; + /** + * The project ID. + */ + projectId?: string; +} +export interface TaskOrchestrationPlanGroupsStartedEvent { + planGroups: TaskOrchestrationPlanGroupReference[]; +} +/** + * Represents a reference to an orchestration plan. + */ +export interface TaskOrchestrationPlanReference { + /** + * The type of the plan. + */ + orchestrationType?: number; + /** + * The ID of the plan. + */ + planId?: string; +} +/** + * Represents a reference to a task. + */ +export interface TaskReference { + /** + * The ID of the task definition. + */ + id?: string; + /** + * The name of the task definition. + */ + name?: string; + /** + * The version of the task definition. + */ + version?: string; +} +export declare enum TaskResult { + Succeeded = 0, + SucceededWithIssues = 1, + Failed = 2, + Canceled = 3, + Skipped = 4, + Abandoned = 5 +} +/** + * Represents the timeline of a build. + */ +export interface Timeline extends TimelineReference { + /** + * The process or person that last changed the timeline. + */ + lastChangedBy?: string; + /** + * The time the timeline was last changed. + */ + lastChangedOn?: Date; + records?: TimelineRecord[]; +} +export interface TimelineAttempt { + /** + * Gets or sets the attempt of the record. + */ + attempt?: number; + /** + * Gets or sets the record identifier located within the specified timeline. + */ + recordId?: string; + /** + * Gets or sets the timeline identifier which owns the record representing this attempt. + */ + timelineId?: string; +} +/** + * Represents an entry in a build's timeline. + */ +export interface TimelineRecord { + _links?: any; + /** + * Attempt number of record. + */ + attempt?: number; + /** + * The change ID. + */ + changeId?: number; + /** + * A string that indicates the current operation. + */ + currentOperation?: string; + /** + * A reference to a sub-timeline. + */ + details?: TimelineReference; + /** + * The number of errors produced by this operation. + */ + errorCount?: number; + /** + * The finish time. + */ + finishTime?: Date; + /** + * The ID of the record. + */ + id?: string; + /** + * String identifier that is consistent across attempts. + */ + identifier?: string; + issues?: Issue[]; + /** + * The time the record was last modified. + */ + lastModified?: Date; + /** + * A reference to the log produced by this operation. + */ + log?: BuildLogReference; + /** + * The name. + */ + name?: string; + /** + * An ordinal value relative to other records. + */ + order?: number; + /** + * The ID of the record's parent. + */ + parentId?: string; + /** + * The current completion percentage. + */ + percentComplete?: number; + previousAttempts?: TimelineAttempt[]; + /** + * The queue ID of the queue that the operation ran on. + */ + queueId?: number; + /** + * The result. + */ + result?: TaskResult; + /** + * The result code. + */ + resultCode?: string; + /** + * The start time. + */ + startTime?: Date; + /** + * The state of the record. + */ + state?: TimelineRecordState; + /** + * A reference to the task represented by this timeline record. + */ + task?: TaskReference; + /** + * The type of the record. + */ + type?: string; + /** + * The REST URL of the timeline record. + */ + url?: string; + /** + * The number of warnings produced by this operation. + */ + warningCount?: number; + /** + * The name of the agent running the operation. + */ + workerName?: string; +} +export declare enum TimelineRecordState { + Pending = 0, + InProgress = 1, + Completed = 2 +} +export interface TimelineRecordsUpdatedEvent extends RealtimeBuildEvent { + timelineRecords: TimelineRecord[]; +} +/** + * Represents a reference to a timeline. + */ +export interface TimelineReference { + /** + * The change ID. + */ + changeId?: number; + /** + * The ID of the timeline. + */ + id?: string; + /** + * The REST URL of the timeline. + */ + url?: string; +} +/** + * Contains members for updating the retention settings values. All fields are optional. + */ +export interface UpdateProjectRetentionSettingModel { + artifactsRetention?: UpdateRetentionSettingModel; + pullRequestRunRetention?: UpdateRetentionSettingModel; + retainRunsPerProtectedBranch?: UpdateRetentionSettingModel; + runRetention?: UpdateRetentionSettingModel; +} +export interface UpdateRetentionSettingModel { + value?: number; +} +export interface UpdateStageParameters { + forceRetryAllJobs?: boolean; + state?: StageUpdateType; +} +export interface UpdateTagParameters { + tagsToAdd?: string[]; + tagsToRemove?: string[]; +} +export declare enum ValidationResult { + OK = 0, + Warning = 1, + Error = 2 +} +/** + * Represents a variable group. + */ +export interface VariableGroup extends VariableGroupReference { + /** + * The description. + */ + description?: string; + /** + * The name of the variable group. + */ + name?: string; + /** + * The type of the variable group. + */ + type?: string; + variables?: { + [key: string]: BuildDefinitionVariable; + }; +} +/** + * Represents a reference to a variable group. + */ +export interface VariableGroupReference { + /** + * The Name of the variable group. + */ + alias?: string; + /** + * The ID of the variable group. + */ + id?: number; +} +/** + * Represents options for running a phase based on values specified by a list of variables. + */ +export interface VariableMultipliersAgentExecutionOptions extends AgentTargetExecutionOptions { + /** + * Indicates whether failure on one agent should prevent the phase from running on other agents. + */ + continueOnError?: boolean; + /** + * The maximum number of agents to use in parallel. + */ + maxConcurrency?: number; + multipliers?: string[]; +} +/** + * Represents options for running a phase based on values specified by a list of variables. + */ +export interface VariableMultipliersServerExecutionOptions extends ServerTargetExecutionOptions { + /** + * Indicates whether failure of one job should prevent the phase from running in other jobs. + */ + continueOnError?: boolean; + /** + * The maximum number of server jobs to run in parallel. + */ + maxConcurrency?: number; + multipliers?: string[]; +} +/** + * Mapping for a workspace + */ +export interface WorkspaceMapping { + /** + * Uri of the associated definition + */ + definitionUri?: string; + /** + * Depth of this mapping + */ + depth?: number; + /** + * local location of the definition + */ + localItem?: string; + /** + * type of workspace mapping + */ + mappingType?: WorkspaceMappingType; + /** + * Server location of the definition + */ + serverItem?: string; + /** + * Id of the workspace + */ + workspaceId?: number; +} +export declare enum WorkspaceMappingType { + /** + * The path is mapped in the workspace. + */ + Map = 0, + /** + * The path is cloaked in the workspace. + */ + Cloak = 1 +} +export interface WorkspaceTemplate { + /** + * Uri of the associated definition + */ + definitionUri?: string; + /** + * The identity that last modified this template + */ + lastModifiedBy?: string; + /** + * The last time this template was modified + */ + lastModifiedDate?: Date; + /** + * List of workspace mappings + */ + mappings?: WorkspaceMapping[]; + /** + * Id of the workspace for this template + */ + workspaceId?: number; +} +export interface XamlBuildControllerReference { + /** + * Id of the resource + */ + id?: number; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +export interface XamlBuildDefinition extends DefinitionReference { + _links?: any; + /** + * Batch size of the definition + */ + batchSize?: number; + buildArgs?: string; + /** + * The continuous integration quiet period + */ + continuousIntegrationQuietPeriod?: number; + /** + * The build controller + */ + controller?: BuildController; + /** + * The date this definition was created + */ + createdOn?: Date; + /** + * Default drop location for builds from this definition + */ + defaultDropLocation?: string; + /** + * Description of the definition + */ + description?: string; + /** + * The last build on this definition + */ + lastBuild?: XamlBuildReference; + /** + * The repository + */ + repository?: BuildRepository; + /** + * The reasons supported by the template + */ + supportedReasons?: BuildReason; + /** + * How builds are triggered from this definition + */ + triggerType?: DefinitionTriggerType; +} +export interface XamlBuildReference { + /** + * Id of the resource + */ + id?: number; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +export interface XamlBuildServerReference { + /** + * Id of the resource + */ + id?: number; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +export interface XamlDefinitionReference { + /** + * Id of the resource + */ + id?: number; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +/** + * Represents a yaml build. + */ +export interface YamlBuild { + /** + * The yaml used to define the build + */ + yaml?: string; +} +/** + * Represents a YAML process. + */ +export interface YamlProcess extends BuildProcess { + errors?: string[]; + /** + * The resources used by the build definition. + */ + resources?: BuildProcessResources; + /** + * The YAML filename. + */ + yamlFilename?: string; +} +export declare var TypeInfo: { + AgentStatus: { + enumValues: { + "unavailable": number; + "available": number; + "offline": number; + }; + }; + AuditAction: { + enumValues: { + "add": number; + "update": number; + "delete": number; + }; + }; + Build: any; + BuildAgent: any; + BuildAuthorizationScope: { + enumValues: { + "projectCollection": number; + "project": number; + }; + }; + BuildCompletedEvent: any; + BuildCompletionTrigger: any; + BuildController: any; + BuildDefinition: any; + BuildDefinition3_2: any; + BuildDefinitionReference: any; + BuildDefinitionReference3_2: any; + BuildDefinitionRevision: any; + BuildDefinitionSourceProvider: any; + BuildDefinitionTemplate: any; + BuildDefinitionTemplate3_2: any; + BuildDeletedEvent: any; + BuildDeployment: any; + BuildLog: any; + BuildMetric: any; + BuildOptionDefinition: any; + BuildOptionInputDefinition: any; + BuildOptionInputType: { + enumValues: { + "string": number; + "boolean": number; + "stringList": number; + "radio": number; + "pickList": number; + "multiLine": number; + "branchFilter": number; + }; + }; + BuildPhaseStatus: { + enumValues: { + "unknown": number; + "failed": number; + "succeeded": number; + }; + }; + BuildProcessTemplate: any; + BuildQueryOrder: { + enumValues: { + "finishTimeAscending": number; + "finishTimeDescending": number; + "queueTimeDescending": number; + "queueTimeAscending": number; + "startTimeDescending": number; + "startTimeAscending": number; + }; + }; + BuildQueuedEvent: any; + BuildReason: { + enumValues: { + "none": number; + "manual": number; + "individualCI": number; + "batchedCI": number; + "schedule": number; + "scheduleForced": number; + "userCreated": number; + "validateShelveset": number; + "checkInShelveset": number; + "pullRequest": number; + "buildCompletion": number; + "resourceTrigger": number; + "triggered": number; + "all": number; + }; + }; + BuildReference: any; + BuildRequestValidationResult: any; + BuildResult: { + enumValues: { + "none": number; + "succeeded": number; + "partiallySucceeded": number; + "failed": number; + "canceled": number; + }; + }; + BuildRetentionHistory: any; + BuildRetentionSample: any; + BuildServer: any; + BuildStatus: { + enumValues: { + "none": number; + "inProgress": number; + "completed": number; + "cancelling": number; + "postponed": number; + "notStarted": number; + "all": number; + }; + }; + BuildSummary: any; + BuildTagsAddedEvent: any; + BuildTrigger: any; + BuildUpdatedEvent: any; + Change: any; + ContinuousDeploymentDefinition: any; + ContinuousIntegrationTrigger: any; + ControllerStatus: { + enumValues: { + "unavailable": number; + "available": number; + "offline": number; + }; + }; + DefinitionQuality: { + enumValues: { + "definition": number; + "draft": number; + }; + }; + DefinitionQueryOrder: { + enumValues: { + "none": number; + "lastModifiedAscending": number; + "lastModifiedDescending": number; + "definitionNameAscending": number; + "definitionNameDescending": number; + }; + }; + DefinitionQueueStatus: { + enumValues: { + "enabled": number; + "paused": number; + "disabled": number; + }; + }; + DefinitionReference: any; + DefinitionTriggerType: { + enumValues: { + "none": number; + "continuousIntegration": number; + "batchedContinuousIntegration": number; + "schedule": number; + "gatedCheckIn": number; + "batchedGatedCheckIn": number; + "pullRequest": number; + "buildCompletion": number; + "all": number; + }; + }; + DefinitionType: { + enumValues: { + "xaml": number; + "build": number; + }; + }; + DeleteOptions: { + enumValues: { + "none": number; + "dropLocation": number; + "testResults": number; + "label": number; + "details": number; + "symbols": number; + "all": number; + }; + }; + DesignerProcess: any; + Folder: any; + FolderQueryOrder: { + enumValues: { + "none": number; + "folderAscending": number; + "folderDescending": number; + }; + }; + GatedCheckInTrigger: any; + GetOption: { + enumValues: { + "latestOnQueue": number; + "latestOnBuild": number; + "custom": number; + }; + }; + InformationNode: any; + Issue: any; + IssueType: { + enumValues: { + "error": number; + "warning": number; + }; + }; + Phase: any; + ProcessTemplateType: { + enumValues: { + "custom": number; + "default": number; + "upgrade": number; + }; + }; + PullRequestTrigger: any; + QueryDeletedOption: { + enumValues: { + "excludeDeleted": number; + "includeDeleted": number; + "onlyDeleted": number; + }; + }; + QueueOptions: { + enumValues: { + "none": number; + "doNotRun": number; + }; + }; + QueuePriority: { + enumValues: { + "low": number; + "belowNormal": number; + "normal": number; + "aboveNormal": number; + "high": number; + }; + }; + RepositoryCleanOptions: { + enumValues: { + "source": number; + "sourceAndOutputDir": number; + "sourceDir": number; + "allBuildDir": number; + }; + }; + RepositoryWebhook: any; + ResultSet: { + enumValues: { + "all": number; + "top": number; + }; + }; + RetentionLease: any; + Schedule: any; + ScheduleDays: { + enumValues: { + "none": number; + "monday": number; + "tuesday": number; + "wednesday": number; + "thursday": number; + "friday": number; + "saturday": number; + "sunday": number; + "all": number; + }; + }; + ScheduleTrigger: any; + ServiceHostStatus: { + enumValues: { + "online": number; + "offline": number; + }; + }; + SourceProviderAttributes: any; + SourceProviderAvailability: { + enumValues: { + "hosted": number; + "onPremises": number; + "all": number; + }; + }; + StageUpdateType: { + enumValues: { + "cancel": number; + "retry": number; + }; + }; + SupportedTrigger: any; + SupportLevel: { + enumValues: { + "unsupported": number; + "supported": number; + "required": number; + }; + }; + TaskResult: { + enumValues: { + "succeeded": number; + "succeededWithIssues": number; + "failed": number; + "canceled": number; + "skipped": number; + "abandoned": number; + }; + }; + Timeline: any; + TimelineRecord: any; + TimelineRecordState: { + enumValues: { + "pending": number; + "inProgress": number; + "completed": number; + }; + }; + TimelineRecordsUpdatedEvent: any; + UpdateStageParameters: any; + ValidationResult: { + enumValues: { + "ok": number; + "warning": number; + "error": number; + }; + }; + WorkspaceMapping: any; + WorkspaceMappingType: { + enumValues: { + "map": number; + "cloak": number; + }; + }; + WorkspaceTemplate: any; + XamlBuildDefinition: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/BuildInterfaces.js b/node_modules/azure-devops-node-api/interfaces/BuildInterfaces.js new file mode 100644 index 0000000..aa3c74b --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/BuildInterfaces.js @@ -0,0 +1,1507 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const TFS_TestManagement_Contracts = require("../interfaces/TestInterfaces"); +const TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +var AgentStatus; +(function (AgentStatus) { + /** + * Indicates that the build agent cannot be contacted. + */ + AgentStatus[AgentStatus["Unavailable"] = 0] = "Unavailable"; + /** + * Indicates that the build agent is currently available. + */ + AgentStatus[AgentStatus["Available"] = 1] = "Available"; + /** + * Indicates that the build agent has taken itself offline. + */ + AgentStatus[AgentStatus["Offline"] = 2] = "Offline"; +})(AgentStatus = exports.AgentStatus || (exports.AgentStatus = {})); +var AuditAction; +(function (AuditAction) { + AuditAction[AuditAction["Add"] = 1] = "Add"; + AuditAction[AuditAction["Update"] = 2] = "Update"; + AuditAction[AuditAction["Delete"] = 3] = "Delete"; +})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); +/** + * Represents the desired scope of authorization for a build. + */ +var BuildAuthorizationScope; +(function (BuildAuthorizationScope) { + /** + * The identity used should have build service account permissions scoped to the project collection. This is useful when resources for a single build are spread across multiple projects. + */ + BuildAuthorizationScope[BuildAuthorizationScope["ProjectCollection"] = 1] = "ProjectCollection"; + /** + * The identity used should have build service account permissions scoped to the project in which the build definition resides. This is useful for isolation of build jobs to a particular team project to avoid any unintentional escalation of privilege attacks during a build. + */ + BuildAuthorizationScope[BuildAuthorizationScope["Project"] = 2] = "Project"; +})(BuildAuthorizationScope = exports.BuildAuthorizationScope || (exports.BuildAuthorizationScope = {})); +var BuildOptionInputType; +(function (BuildOptionInputType) { + BuildOptionInputType[BuildOptionInputType["String"] = 0] = "String"; + BuildOptionInputType[BuildOptionInputType["Boolean"] = 1] = "Boolean"; + BuildOptionInputType[BuildOptionInputType["StringList"] = 2] = "StringList"; + BuildOptionInputType[BuildOptionInputType["Radio"] = 3] = "Radio"; + BuildOptionInputType[BuildOptionInputType["PickList"] = 4] = "PickList"; + BuildOptionInputType[BuildOptionInputType["MultiLine"] = 5] = "MultiLine"; + BuildOptionInputType[BuildOptionInputType["BranchFilter"] = 6] = "BranchFilter"; +})(BuildOptionInputType = exports.BuildOptionInputType || (exports.BuildOptionInputType = {})); +var BuildPhaseStatus; +(function (BuildPhaseStatus) { + /** + * The state is not known. + */ + BuildPhaseStatus[BuildPhaseStatus["Unknown"] = 0] = "Unknown"; + /** + * The build phase completed unsuccessfully. + */ + BuildPhaseStatus[BuildPhaseStatus["Failed"] = 1] = "Failed"; + /** + * The build phase completed successfully. + */ + BuildPhaseStatus[BuildPhaseStatus["Succeeded"] = 2] = "Succeeded"; +})(BuildPhaseStatus = exports.BuildPhaseStatus || (exports.BuildPhaseStatus = {})); +/** + * Specifies the desired ordering of builds. + */ +var BuildQueryOrder; +(function (BuildQueryOrder) { + /** + * Order by finish time ascending. + */ + BuildQueryOrder[BuildQueryOrder["FinishTimeAscending"] = 2] = "FinishTimeAscending"; + /** + * Order by finish time descending. + */ + BuildQueryOrder[BuildQueryOrder["FinishTimeDescending"] = 3] = "FinishTimeDescending"; + /** + * Order by queue time descending. + */ + BuildQueryOrder[BuildQueryOrder["QueueTimeDescending"] = 4] = "QueueTimeDescending"; + /** + * Order by queue time ascending. + */ + BuildQueryOrder[BuildQueryOrder["QueueTimeAscending"] = 5] = "QueueTimeAscending"; + /** + * Order by start time descending. + */ + BuildQueryOrder[BuildQueryOrder["StartTimeDescending"] = 6] = "StartTimeDescending"; + /** + * Order by start time ascending. + */ + BuildQueryOrder[BuildQueryOrder["StartTimeAscending"] = 7] = "StartTimeAscending"; +})(BuildQueryOrder = exports.BuildQueryOrder || (exports.BuildQueryOrder = {})); +var BuildReason; +(function (BuildReason) { + /** + * No reason. This value should not be used. + */ + BuildReason[BuildReason["None"] = 0] = "None"; + /** + * The build was started manually. + */ + BuildReason[BuildReason["Manual"] = 1] = "Manual"; + /** + * The build was started for the trigger TriggerType.ContinuousIntegration. + */ + BuildReason[BuildReason["IndividualCI"] = 2] = "IndividualCI"; + /** + * The build was started for the trigger TriggerType.BatchedContinuousIntegration. + */ + BuildReason[BuildReason["BatchedCI"] = 4] = "BatchedCI"; + /** + * The build was started for the trigger TriggerType.Schedule. + */ + BuildReason[BuildReason["Schedule"] = 8] = "Schedule"; + /** + * The build was started for the trigger TriggerType.ScheduleForced. + */ + BuildReason[BuildReason["ScheduleForced"] = 16] = "ScheduleForced"; + /** + * The build was created by a user. + */ + BuildReason[BuildReason["UserCreated"] = 32] = "UserCreated"; + /** + * The build was started manually for private validation. + */ + BuildReason[BuildReason["ValidateShelveset"] = 64] = "ValidateShelveset"; + /** + * The build was started for the trigger ContinuousIntegrationType.Gated. + */ + BuildReason[BuildReason["CheckInShelveset"] = 128] = "CheckInShelveset"; + /** + * The build was started by a pull request. Added in resource version 3. + */ + BuildReason[BuildReason["PullRequest"] = 256] = "PullRequest"; + /** + * The build was started when another build completed. + */ + BuildReason[BuildReason["BuildCompletion"] = 512] = "BuildCompletion"; + /** + * The build was started when resources in pipeline triggered it + */ + BuildReason[BuildReason["ResourceTrigger"] = 1024] = "ResourceTrigger"; + /** + * The build was triggered for retention policy purposes. + */ + BuildReason[BuildReason["Triggered"] = 1967] = "Triggered"; + /** + * All reasons. + */ + BuildReason[BuildReason["All"] = 2031] = "All"; +})(BuildReason = exports.BuildReason || (exports.BuildReason = {})); +/** + * This is not a Flags enum because we don't want to set multiple statuses on a build. However, when adding values, please stick to powers of 2 as if it were a Flags enum This will ensure that things that key off multiple result types (like labelling sources) continue to work + */ +var BuildResult; +(function (BuildResult) { + /** + * No result + */ + BuildResult[BuildResult["None"] = 0] = "None"; + /** + * The build completed successfully. + */ + BuildResult[BuildResult["Succeeded"] = 2] = "Succeeded"; + /** + * The build completed compilation successfully but had other errors. + */ + BuildResult[BuildResult["PartiallySucceeded"] = 4] = "PartiallySucceeded"; + /** + * The build completed unsuccessfully. + */ + BuildResult[BuildResult["Failed"] = 8] = "Failed"; + /** + * The build was canceled before starting. + */ + BuildResult[BuildResult["Canceled"] = 32] = "Canceled"; +})(BuildResult = exports.BuildResult || (exports.BuildResult = {})); +var BuildStatus; +(function (BuildStatus) { + /** + * No status. + */ + BuildStatus[BuildStatus["None"] = 0] = "None"; + /** + * The build is currently in progress. + */ + BuildStatus[BuildStatus["InProgress"] = 1] = "InProgress"; + /** + * The build has completed. + */ + BuildStatus[BuildStatus["Completed"] = 2] = "Completed"; + /** + * The build is cancelling + */ + BuildStatus[BuildStatus["Cancelling"] = 4] = "Cancelling"; + /** + * The build is inactive in the queue. + */ + BuildStatus[BuildStatus["Postponed"] = 8] = "Postponed"; + /** + * The build has not yet started. + */ + BuildStatus[BuildStatus["NotStarted"] = 32] = "NotStarted"; + /** + * All status. + */ + BuildStatus[BuildStatus["All"] = 47] = "All"; +})(BuildStatus = exports.BuildStatus || (exports.BuildStatus = {})); +var ControllerStatus; +(function (ControllerStatus) { + /** + * Indicates that the build controller cannot be contacted. + */ + ControllerStatus[ControllerStatus["Unavailable"] = 0] = "Unavailable"; + /** + * Indicates that the build controller is currently available. + */ + ControllerStatus[ControllerStatus["Available"] = 1] = "Available"; + /** + * Indicates that the build controller has taken itself offline. + */ + ControllerStatus[ControllerStatus["Offline"] = 2] = "Offline"; +})(ControllerStatus = exports.ControllerStatus || (exports.ControllerStatus = {})); +var DefinitionQuality; +(function (DefinitionQuality) { + DefinitionQuality[DefinitionQuality["Definition"] = 1] = "Definition"; + DefinitionQuality[DefinitionQuality["Draft"] = 2] = "Draft"; +})(DefinitionQuality = exports.DefinitionQuality || (exports.DefinitionQuality = {})); +/** + * Specifies the desired ordering of definitions. + */ +var DefinitionQueryOrder; +(function (DefinitionQueryOrder) { + /** + * No order + */ + DefinitionQueryOrder[DefinitionQueryOrder["None"] = 0] = "None"; + /** + * Order by created on/last modified time ascending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["LastModifiedAscending"] = 1] = "LastModifiedAscending"; + /** + * Order by created on/last modified time descending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["LastModifiedDescending"] = 2] = "LastModifiedDescending"; + /** + * Order by definition name ascending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["DefinitionNameAscending"] = 3] = "DefinitionNameAscending"; + /** + * Order by definition name descending. + */ + DefinitionQueryOrder[DefinitionQueryOrder["DefinitionNameDescending"] = 4] = "DefinitionNameDescending"; +})(DefinitionQueryOrder = exports.DefinitionQueryOrder || (exports.DefinitionQueryOrder = {})); +var DefinitionQueueStatus; +(function (DefinitionQueueStatus) { + /** + * When enabled the definition queue allows builds to be queued by users, the system will queue scheduled, gated and continuous integration builds, and the queued builds will be started by the system. + */ + DefinitionQueueStatus[DefinitionQueueStatus["Enabled"] = 0] = "Enabled"; + /** + * When paused the definition queue allows builds to be queued by users and the system will queue scheduled, gated and continuous integration builds. Builds in the queue will not be started by the system. + */ + DefinitionQueueStatus[DefinitionQueueStatus["Paused"] = 1] = "Paused"; + /** + * When disabled the definition queue will not allow builds to be queued by users and the system will not queue scheduled, gated or continuous integration builds. Builds already in the queue will not be started by the system. + */ + DefinitionQueueStatus[DefinitionQueueStatus["Disabled"] = 2] = "Disabled"; +})(DefinitionQueueStatus = exports.DefinitionQueueStatus || (exports.DefinitionQueueStatus = {})); +var DefinitionTriggerType; +(function (DefinitionTriggerType) { + /** + * Manual builds only. + */ + DefinitionTriggerType[DefinitionTriggerType["None"] = 1] = "None"; + /** + * A build should be started for each changeset. + */ + DefinitionTriggerType[DefinitionTriggerType["ContinuousIntegration"] = 2] = "ContinuousIntegration"; + /** + * A build should be started for multiple changesets at a time at a specified interval. + */ + DefinitionTriggerType[DefinitionTriggerType["BatchedContinuousIntegration"] = 4] = "BatchedContinuousIntegration"; + /** + * A build should be started on a specified schedule whether or not changesets exist. + */ + DefinitionTriggerType[DefinitionTriggerType["Schedule"] = 8] = "Schedule"; + /** + * A validation build should be started for each check-in. + */ + DefinitionTriggerType[DefinitionTriggerType["GatedCheckIn"] = 16] = "GatedCheckIn"; + /** + * A validation build should be started for each batch of check-ins. + */ + DefinitionTriggerType[DefinitionTriggerType["BatchedGatedCheckIn"] = 32] = "BatchedGatedCheckIn"; + /** + * A build should be triggered when a GitHub pull request is created or updated. Added in resource version 3 + */ + DefinitionTriggerType[DefinitionTriggerType["PullRequest"] = 64] = "PullRequest"; + /** + * A build should be triggered when another build completes. + */ + DefinitionTriggerType[DefinitionTriggerType["BuildCompletion"] = 128] = "BuildCompletion"; + /** + * All types. + */ + DefinitionTriggerType[DefinitionTriggerType["All"] = 255] = "All"; +})(DefinitionTriggerType = exports.DefinitionTriggerType || (exports.DefinitionTriggerType = {})); +var DefinitionType; +(function (DefinitionType) { + DefinitionType[DefinitionType["Xaml"] = 1] = "Xaml"; + DefinitionType[DefinitionType["Build"] = 2] = "Build"; +})(DefinitionType = exports.DefinitionType || (exports.DefinitionType = {})); +var DeleteOptions; +(function (DeleteOptions) { + /** + * No data should be deleted. This value should not be used. + */ + DeleteOptions[DeleteOptions["None"] = 0] = "None"; + /** + * The drop location should be deleted. + */ + DeleteOptions[DeleteOptions["DropLocation"] = 1] = "DropLocation"; + /** + * The test results should be deleted. + */ + DeleteOptions[DeleteOptions["TestResults"] = 2] = "TestResults"; + /** + * The version control label should be deleted. + */ + DeleteOptions[DeleteOptions["Label"] = 4] = "Label"; + /** + * The build should be deleted. + */ + DeleteOptions[DeleteOptions["Details"] = 8] = "Details"; + /** + * Published symbols should be deleted. + */ + DeleteOptions[DeleteOptions["Symbols"] = 16] = "Symbols"; + /** + * All data should be deleted. + */ + DeleteOptions[DeleteOptions["All"] = 31] = "All"; +})(DeleteOptions = exports.DeleteOptions || (exports.DeleteOptions = {})); +/** + * Specifies the desired ordering of folders. + */ +var FolderQueryOrder; +(function (FolderQueryOrder) { + /** + * No order + */ + FolderQueryOrder[FolderQueryOrder["None"] = 0] = "None"; + /** + * Order by folder name and path ascending. + */ + FolderQueryOrder[FolderQueryOrder["FolderAscending"] = 1] = "FolderAscending"; + /** + * Order by folder name and path descending. + */ + FolderQueryOrder[FolderQueryOrder["FolderDescending"] = 2] = "FolderDescending"; +})(FolderQueryOrder = exports.FolderQueryOrder || (exports.FolderQueryOrder = {})); +var GetOption; +(function (GetOption) { + /** + * Use the latest changeset at the time the build is queued. + */ + GetOption[GetOption["LatestOnQueue"] = 0] = "LatestOnQueue"; + /** + * Use the latest changeset at the time the build is started. + */ + GetOption[GetOption["LatestOnBuild"] = 1] = "LatestOnBuild"; + /** + * A user-specified version has been supplied. + */ + GetOption[GetOption["Custom"] = 2] = "Custom"; +})(GetOption = exports.GetOption || (exports.GetOption = {})); +var IssueType; +(function (IssueType) { + IssueType[IssueType["Error"] = 1] = "Error"; + IssueType[IssueType["Warning"] = 2] = "Warning"; +})(IssueType = exports.IssueType || (exports.IssueType = {})); +var ProcessTemplateType; +(function (ProcessTemplateType) { + /** + * Indicates a custom template. + */ + ProcessTemplateType[ProcessTemplateType["Custom"] = 0] = "Custom"; + /** + * Indicates a default template. + */ + ProcessTemplateType[ProcessTemplateType["Default"] = 1] = "Default"; + /** + * Indicates an upgrade template. + */ + ProcessTemplateType[ProcessTemplateType["Upgrade"] = 2] = "Upgrade"; +})(ProcessTemplateType = exports.ProcessTemplateType || (exports.ProcessTemplateType = {})); +var QueryDeletedOption; +(function (QueryDeletedOption) { + /** + * Include only non-deleted builds. + */ + QueryDeletedOption[QueryDeletedOption["ExcludeDeleted"] = 0] = "ExcludeDeleted"; + /** + * Include deleted and non-deleted builds. + */ + QueryDeletedOption[QueryDeletedOption["IncludeDeleted"] = 1] = "IncludeDeleted"; + /** + * Include only deleted builds. + */ + QueryDeletedOption[QueryDeletedOption["OnlyDeleted"] = 2] = "OnlyDeleted"; +})(QueryDeletedOption = exports.QueryDeletedOption || (exports.QueryDeletedOption = {})); +var QueueOptions; +(function (QueueOptions) { + /** + * No queue options + */ + QueueOptions[QueueOptions["None"] = 0] = "None"; + /** + * Create a plan Id for the build, do not run it + */ + QueueOptions[QueueOptions["DoNotRun"] = 1] = "DoNotRun"; +})(QueueOptions = exports.QueueOptions || (exports.QueueOptions = {})); +var QueuePriority; +(function (QueuePriority) { + /** + * Low priority. + */ + QueuePriority[QueuePriority["Low"] = 5] = "Low"; + /** + * Below normal priority. + */ + QueuePriority[QueuePriority["BelowNormal"] = 4] = "BelowNormal"; + /** + * Normal priority. + */ + QueuePriority[QueuePriority["Normal"] = 3] = "Normal"; + /** + * Above normal priority. + */ + QueuePriority[QueuePriority["AboveNormal"] = 2] = "AboveNormal"; + /** + * High priority. + */ + QueuePriority[QueuePriority["High"] = 1] = "High"; +})(QueuePriority = exports.QueuePriority || (exports.QueuePriority = {})); +var RepositoryCleanOptions; +(function (RepositoryCleanOptions) { + RepositoryCleanOptions[RepositoryCleanOptions["Source"] = 0] = "Source"; + RepositoryCleanOptions[RepositoryCleanOptions["SourceAndOutputDir"] = 1] = "SourceAndOutputDir"; + /** + * Re-create $(build.sourcesDirectory) + */ + RepositoryCleanOptions[RepositoryCleanOptions["SourceDir"] = 2] = "SourceDir"; + /** + * Re-create $(agnet.buildDirectory) which contains $(build.sourcesDirectory), $(build.binariesDirectory) and any folders that left from previous build. + */ + RepositoryCleanOptions[RepositoryCleanOptions["AllBuildDir"] = 3] = "AllBuildDir"; +})(RepositoryCleanOptions = exports.RepositoryCleanOptions || (exports.RepositoryCleanOptions = {})); +var ResultSet; +(function (ResultSet) { + /** + * Include all repositories + */ + ResultSet[ResultSet["All"] = 0] = "All"; + /** + * Include most relevant repositories for user + */ + ResultSet[ResultSet["Top"] = 1] = "Top"; +})(ResultSet = exports.ResultSet || (exports.ResultSet = {})); +var ScheduleDays; +(function (ScheduleDays) { + /** + * Do not run. + */ + ScheduleDays[ScheduleDays["None"] = 0] = "None"; + /** + * Run on Monday. + */ + ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; + /** + * Run on Tuesday. + */ + ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; + /** + * Run on Wednesday. + */ + ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; + /** + * Run on Thursday. + */ + ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; + /** + * Run on Friday. + */ + ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; + /** + * Run on Saturday. + */ + ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; + /** + * Run on Sunday. + */ + ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; + /** + * Run on all days of the week. + */ + ScheduleDays[ScheduleDays["All"] = 127] = "All"; +})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); +var ServiceHostStatus; +(function (ServiceHostStatus) { + /** + * The service host is currently connected and accepting commands. + */ + ServiceHostStatus[ServiceHostStatus["Online"] = 1] = "Online"; + /** + * The service host is currently disconnected and not accepting commands. + */ + ServiceHostStatus[ServiceHostStatus["Offline"] = 2] = "Offline"; +})(ServiceHostStatus = exports.ServiceHostStatus || (exports.ServiceHostStatus = {})); +var SourceProviderAvailability; +(function (SourceProviderAvailability) { + /** + * The source provider is available in the hosted environment. + */ + SourceProviderAvailability[SourceProviderAvailability["Hosted"] = 1] = "Hosted"; + /** + * The source provider is available in the on-premises environment. + */ + SourceProviderAvailability[SourceProviderAvailability["OnPremises"] = 2] = "OnPremises"; + /** + * The source provider is available in all environments. + */ + SourceProviderAvailability[SourceProviderAvailability["All"] = 3] = "All"; +})(SourceProviderAvailability = exports.SourceProviderAvailability || (exports.SourceProviderAvailability = {})); +var StageUpdateType; +(function (StageUpdateType) { + StageUpdateType[StageUpdateType["Cancel"] = 0] = "Cancel"; + StageUpdateType[StageUpdateType["Retry"] = 1] = "Retry"; +})(StageUpdateType = exports.StageUpdateType || (exports.StageUpdateType = {})); +var SupportLevel; +(function (SupportLevel) { + /** + * The functionality is not supported. + */ + SupportLevel[SupportLevel["Unsupported"] = 0] = "Unsupported"; + /** + * The functionality is supported. + */ + SupportLevel[SupportLevel["Supported"] = 1] = "Supported"; + /** + * The functionality is required. + */ + SupportLevel[SupportLevel["Required"] = 2] = "Required"; +})(SupportLevel = exports.SupportLevel || (exports.SupportLevel = {})); +var TaskResult; +(function (TaskResult) { + TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; + TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; + TaskResult[TaskResult["Failed"] = 2] = "Failed"; + TaskResult[TaskResult["Canceled"] = 3] = "Canceled"; + TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; + TaskResult[TaskResult["Abandoned"] = 5] = "Abandoned"; +})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); +var TimelineRecordState; +(function (TimelineRecordState) { + TimelineRecordState[TimelineRecordState["Pending"] = 0] = "Pending"; + TimelineRecordState[TimelineRecordState["InProgress"] = 1] = "InProgress"; + TimelineRecordState[TimelineRecordState["Completed"] = 2] = "Completed"; +})(TimelineRecordState = exports.TimelineRecordState || (exports.TimelineRecordState = {})); +var ValidationResult; +(function (ValidationResult) { + ValidationResult[ValidationResult["OK"] = 0] = "OK"; + ValidationResult[ValidationResult["Warning"] = 1] = "Warning"; + ValidationResult[ValidationResult["Error"] = 2] = "Error"; +})(ValidationResult = exports.ValidationResult || (exports.ValidationResult = {})); +var WorkspaceMappingType; +(function (WorkspaceMappingType) { + /** + * The path is mapped in the workspace. + */ + WorkspaceMappingType[WorkspaceMappingType["Map"] = 0] = "Map"; + /** + * The path is cloaked in the workspace. + */ + WorkspaceMappingType[WorkspaceMappingType["Cloak"] = 1] = "Cloak"; +})(WorkspaceMappingType = exports.WorkspaceMappingType || (exports.WorkspaceMappingType = {})); +exports.TypeInfo = { + AgentStatus: { + enumValues: { + "unavailable": 0, + "available": 1, + "offline": 2 + } + }, + AuditAction: { + enumValues: { + "add": 1, + "update": 2, + "delete": 3 + } + }, + Build: {}, + BuildAgent: {}, + BuildAuthorizationScope: { + enumValues: { + "projectCollection": 1, + "project": 2 + } + }, + BuildCompletedEvent: {}, + BuildCompletionTrigger: {}, + BuildController: {}, + BuildDefinition: {}, + BuildDefinition3_2: {}, + BuildDefinitionReference: {}, + BuildDefinitionReference3_2: {}, + BuildDefinitionRevision: {}, + BuildDefinitionSourceProvider: {}, + BuildDefinitionTemplate: {}, + BuildDefinitionTemplate3_2: {}, + BuildDeletedEvent: {}, + BuildDeployment: {}, + BuildLog: {}, + BuildMetric: {}, + BuildOptionDefinition: {}, + BuildOptionInputDefinition: {}, + BuildOptionInputType: { + enumValues: { + "string": 0, + "boolean": 1, + "stringList": 2, + "radio": 3, + "pickList": 4, + "multiLine": 5, + "branchFilter": 6 + } + }, + BuildPhaseStatus: { + enumValues: { + "unknown": 0, + "failed": 1, + "succeeded": 2 + } + }, + BuildProcessTemplate: {}, + BuildQueryOrder: { + enumValues: { + "finishTimeAscending": 2, + "finishTimeDescending": 3, + "queueTimeDescending": 4, + "queueTimeAscending": 5, + "startTimeDescending": 6, + "startTimeAscending": 7 + } + }, + BuildQueuedEvent: {}, + BuildReason: { + enumValues: { + "none": 0, + "manual": 1, + "individualCI": 2, + "batchedCI": 4, + "schedule": 8, + "scheduleForced": 16, + "userCreated": 32, + "validateShelveset": 64, + "checkInShelveset": 128, + "pullRequest": 256, + "buildCompletion": 512, + "resourceTrigger": 1024, + "triggered": 1967, + "all": 2031 + } + }, + BuildReference: {}, + BuildRequestValidationResult: {}, + BuildResult: { + enumValues: { + "none": 0, + "succeeded": 2, + "partiallySucceeded": 4, + "failed": 8, + "canceled": 32 + } + }, + BuildRetentionHistory: {}, + BuildRetentionSample: {}, + BuildServer: {}, + BuildStatus: { + enumValues: { + "none": 0, + "inProgress": 1, + "completed": 2, + "cancelling": 4, + "postponed": 8, + "notStarted": 32, + "all": 47 + } + }, + BuildSummary: {}, + BuildTagsAddedEvent: {}, + BuildTrigger: {}, + BuildUpdatedEvent: {}, + Change: {}, + ContinuousDeploymentDefinition: {}, + ContinuousIntegrationTrigger: {}, + ControllerStatus: { + enumValues: { + "unavailable": 0, + "available": 1, + "offline": 2 + } + }, + DefinitionQuality: { + enumValues: { + "definition": 1, + "draft": 2 + } + }, + DefinitionQueryOrder: { + enumValues: { + "none": 0, + "lastModifiedAscending": 1, + "lastModifiedDescending": 2, + "definitionNameAscending": 3, + "definitionNameDescending": 4 + } + }, + DefinitionQueueStatus: { + enumValues: { + "enabled": 0, + "paused": 1, + "disabled": 2 + } + }, + DefinitionReference: {}, + DefinitionTriggerType: { + enumValues: { + "none": 1, + "continuousIntegration": 2, + "batchedContinuousIntegration": 4, + "schedule": 8, + "gatedCheckIn": 16, + "batchedGatedCheckIn": 32, + "pullRequest": 64, + "buildCompletion": 128, + "all": 255 + } + }, + DefinitionType: { + enumValues: { + "xaml": 1, + "build": 2 + } + }, + DeleteOptions: { + enumValues: { + "none": 0, + "dropLocation": 1, + "testResults": 2, + "label": 4, + "details": 8, + "symbols": 16, + "all": 31 + } + }, + DesignerProcess: {}, + Folder: {}, + FolderQueryOrder: { + enumValues: { + "none": 0, + "folderAscending": 1, + "folderDescending": 2 + } + }, + GatedCheckInTrigger: {}, + GetOption: { + enumValues: { + "latestOnQueue": 0, + "latestOnBuild": 1, + "custom": 2 + } + }, + InformationNode: {}, + Issue: {}, + IssueType: { + enumValues: { + "error": 1, + "warning": 2 + } + }, + Phase: {}, + ProcessTemplateType: { + enumValues: { + "custom": 0, + "default": 1, + "upgrade": 2 + } + }, + PullRequestTrigger: {}, + QueryDeletedOption: { + enumValues: { + "excludeDeleted": 0, + "includeDeleted": 1, + "onlyDeleted": 2 + } + }, + QueueOptions: { + enumValues: { + "none": 0, + "doNotRun": 1 + } + }, + QueuePriority: { + enumValues: { + "low": 5, + "belowNormal": 4, + "normal": 3, + "aboveNormal": 2, + "high": 1 + } + }, + RepositoryCleanOptions: { + enumValues: { + "source": 0, + "sourceAndOutputDir": 1, + "sourceDir": 2, + "allBuildDir": 3 + } + }, + RepositoryWebhook: {}, + ResultSet: { + enumValues: { + "all": 0, + "top": 1 + } + }, + RetentionLease: {}, + Schedule: {}, + ScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 + } + }, + ScheduleTrigger: {}, + ServiceHostStatus: { + enumValues: { + "online": 1, + "offline": 2 + } + }, + SourceProviderAttributes: {}, + SourceProviderAvailability: { + enumValues: { + "hosted": 1, + "onPremises": 2, + "all": 3 + } + }, + StageUpdateType: { + enumValues: { + "cancel": 0, + "retry": 1 + } + }, + SupportedTrigger: {}, + SupportLevel: { + enumValues: { + "unsupported": 0, + "supported": 1, + "required": 2 + } + }, + TaskResult: { + enumValues: { + "succeeded": 0, + "succeededWithIssues": 1, + "failed": 2, + "canceled": 3, + "skipped": 4, + "abandoned": 5 + } + }, + Timeline: {}, + TimelineRecord: {}, + TimelineRecordState: { + enumValues: { + "pending": 0, + "inProgress": 1, + "completed": 2 + } + }, + TimelineRecordsUpdatedEvent: {}, + UpdateStageParameters: {}, + ValidationResult: { + enumValues: { + "ok": 0, + "warning": 1, + "error": 2 + } + }, + WorkspaceMapping: {}, + WorkspaceMappingType: { + enumValues: { + "map": 0, + "cloak": 1 + } + }, + WorkspaceTemplate: {}, + XamlBuildDefinition: {}, +}; +exports.TypeInfo.Build.fields = { + controller: { + typeInfo: exports.TypeInfo.BuildController + }, + definition: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + deletedDate: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + }, + priority: { + enumType: exports.TypeInfo.QueuePriority + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueOptions: { + enumType: exports.TypeInfo.QueueOptions + }, + queueTime: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.BuildReason + }, + result: { + enumType: exports.TypeInfo.BuildResult + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.BuildStatus + }, + triggeredByBuild: { + typeInfo: exports.TypeInfo.Build + }, + validationResults: { + isArray: true, + typeInfo: exports.TypeInfo.BuildRequestValidationResult + } +}; +exports.TypeInfo.BuildAgent.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.AgentStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.BuildCompletedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + }, + changes: { + isArray: true, + typeInfo: exports.TypeInfo.Change + }, + testResults: { + typeInfo: TFS_TestManagement_Contracts.TypeInfo.AggregatedResultsAnalysis + }, + timelineRecords: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord + } +}; +exports.TypeInfo.BuildCompletionTrigger.fields = { + definition: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.BuildController.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ControllerStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.BuildDefinition.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + jobAuthorizationScope: { + enumType: exports.TypeInfo.BuildAuthorizationScope + }, + latestBuild: { + typeInfo: exports.TypeInfo.Build + }, + latestCompletedBuild: { + typeInfo: exports.TypeInfo.Build + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.BuildTrigger + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; +exports.TypeInfo.BuildDefinition3_2.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + jobAuthorizationScope: { + enumType: exports.TypeInfo.BuildAuthorizationScope + }, + latestBuild: { + typeInfo: exports.TypeInfo.Build + }, + latestCompletedBuild: { + typeInfo: exports.TypeInfo.Build + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.BuildTrigger + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; +exports.TypeInfo.BuildDefinitionReference.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + latestBuild: { + typeInfo: exports.TypeInfo.Build + }, + latestCompletedBuild: { + typeInfo: exports.TypeInfo.Build + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; +exports.TypeInfo.BuildDefinitionReference3_2.fields = { + createdDate: { + isDate: true, + }, + draftOf: { + typeInfo: exports.TypeInfo.DefinitionReference + }, + drafts: { + isArray: true, + typeInfo: exports.TypeInfo.DefinitionReference + }, + metrics: { + isArray: true, + typeInfo: exports.TypeInfo.BuildMetric + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + quality: { + enumType: exports.TypeInfo.DefinitionQuality + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; +exports.TypeInfo.BuildDefinitionRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } +}; +exports.TypeInfo.BuildDefinitionSourceProvider.fields = { + lastModified: { + isDate: true, + }, + supportedTriggerTypes: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.BuildDefinitionTemplate.fields = { + template: { + typeInfo: exports.TypeInfo.BuildDefinition + } +}; +exports.TypeInfo.BuildDefinitionTemplate3_2.fields = { + template: { + typeInfo: exports.TypeInfo.BuildDefinition3_2 + } +}; +exports.TypeInfo.BuildDeletedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + } +}; +exports.TypeInfo.BuildDeployment.fields = { + deployment: { + typeInfo: exports.TypeInfo.BuildSummary + } +}; +exports.TypeInfo.BuildLog.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.BuildMetric.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.BuildOptionDefinition.fields = { + inputs: { + isArray: true, + typeInfo: exports.TypeInfo.BuildOptionInputDefinition + } +}; +exports.TypeInfo.BuildOptionInputDefinition.fields = { + type: { + enumType: exports.TypeInfo.BuildOptionInputType + } +}; +exports.TypeInfo.BuildProcessTemplate.fields = { + supportedReasons: { + enumType: exports.TypeInfo.BuildReason + }, + templateType: { + enumType: exports.TypeInfo.ProcessTemplateType + } +}; +exports.TypeInfo.BuildQueuedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + } +}; +exports.TypeInfo.BuildReference.fields = { + finishTime: { + isDate: true, + }, + queueTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.BuildResult + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.BuildStatus + } +}; +exports.TypeInfo.BuildRequestValidationResult.fields = { + result: { + enumType: exports.TypeInfo.ValidationResult + } +}; +exports.TypeInfo.BuildRetentionHistory.fields = { + buildRetentionSamples: { + isArray: true, + typeInfo: exports.TypeInfo.BuildRetentionSample + } +}; +exports.TypeInfo.BuildRetentionSample.fields = { + sampleTime: { + isDate: true, + } +}; +exports.TypeInfo.BuildServer.fields = { + status: { + enumType: exports.TypeInfo.ServiceHostStatus + }, + statusChangedDate: { + isDate: true, + } +}; +exports.TypeInfo.BuildSummary.fields = { + finishTime: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.BuildReason + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.BuildStatus + } +}; +exports.TypeInfo.BuildTagsAddedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + } +}; +exports.TypeInfo.BuildTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.BuildUpdatedEvent.fields = { + build: { + typeInfo: exports.TypeInfo.Build + } +}; +exports.TypeInfo.Change.fields = { + timestamp: { + isDate: true, + } +}; +exports.TypeInfo.ContinuousDeploymentDefinition.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.ContinuousIntegrationTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.DefinitionReference.fields = { + createdDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; +exports.TypeInfo.DesignerProcess.fields = { + phases: { + isArray: true, + typeInfo: exports.TypeInfo.Phase + } +}; +exports.TypeInfo.Folder.fields = { + createdOn: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GatedCheckInTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.InformationNode.fields = { + lastModifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.Issue.fields = { + type: { + enumType: exports.TypeInfo.IssueType + } +}; +exports.TypeInfo.Phase.fields = { + jobAuthorizationScope: { + enumType: exports.TypeInfo.BuildAuthorizationScope + } +}; +exports.TypeInfo.PullRequestTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.RepositoryWebhook.fields = { + types: { + isArray: true, + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.RetentionLease.fields = { + createdOn: { + isDate: true, + }, + validUntil: { + isDate: true, + } +}; +exports.TypeInfo.Schedule.fields = { + daysToBuild: { + enumType: exports.TypeInfo.ScheduleDays + } +}; +exports.TypeInfo.ScheduleTrigger.fields = { + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.Schedule + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.SourceProviderAttributes.fields = { + supportedTriggers: { + isArray: true, + typeInfo: exports.TypeInfo.SupportedTrigger + } +}; +exports.TypeInfo.SupportedTrigger.fields = { + supportedCapabilities: { + isDictionary: true, + dictionaryValueEnumType: exports.TypeInfo.SupportLevel + }, + type: { + enumType: exports.TypeInfo.DefinitionTriggerType + } +}; +exports.TypeInfo.Timeline.fields = { + lastChangedOn: { + isDate: true, + }, + records: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord + } +}; +exports.TypeInfo.TimelineRecord.fields = { + finishTime: { + isDate: true, + }, + issues: { + isArray: true, + typeInfo: exports.TypeInfo.Issue + }, + lastModified: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TimelineRecordState + } +}; +exports.TypeInfo.TimelineRecordsUpdatedEvent.fields = { + timelineRecords: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord + } +}; +exports.TypeInfo.UpdateStageParameters.fields = { + state: { + enumType: exports.TypeInfo.StageUpdateType + } +}; +exports.TypeInfo.WorkspaceMapping.fields = { + mappingType: { + enumType: exports.TypeInfo.WorkspaceMappingType + } +}; +exports.TypeInfo.WorkspaceTemplate.fields = { + lastModifiedDate: { + isDate: true, + }, + mappings: { + isArray: true, + typeInfo: exports.TypeInfo.WorkspaceMapping + } +}; +exports.TypeInfo.XamlBuildDefinition.fields = { + controller: { + typeInfo: exports.TypeInfo.BuildController + }, + createdDate: { + isDate: true, + }, + createdOn: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + queueStatus: { + enumType: exports.TypeInfo.DefinitionQueueStatus + }, + supportedReasons: { + enumType: exports.TypeInfo.BuildReason + }, + triggerType: { + enumType: exports.TypeInfo.DefinitionTriggerType + }, + type: { + enumType: exports.TypeInfo.DefinitionType + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.d.ts new file mode 100644 index 0000000..fb0172e --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.d.ts @@ -0,0 +1,355 @@ +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +/** + * Comment on an artifact like Work Item or Wiki, etc. + */ +export interface Comment extends CommentResourceReference { + /** + * The id of the artifact this comment belongs to + */ + artifactId?: string; + /** + * IdentityRef of the creator of the comment. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The creation date of the comment. + */ + createdDate?: Date; + /** + * The id assigned to the comment. + */ + id?: number; + /** + * Indicates if the comment has been deleted. + */ + isDeleted?: boolean; + /** + * The mentions of the comment. + */ + mentions?: CommentMention[]; + /** + * IdentityRef of the user who last modified the comment. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * The last modification date of the comment. + */ + modifiedDate?: Date; + /** + * The comment id of the parent comment, if any + */ + parentId?: number; + /** + * The reactions on the comment. + */ + reactions?: CommentReaction[]; + /** + * The rendered text of the comment + */ + renderedText?: string; + /** + * Replies for this comment + */ + replies?: CommentList; + /** + * Indicates the current state of the comment + */ + state?: CommentState; + /** + * The plaintext/markdown version of the comment + */ + text?: string; + /** + * The current version of the comment + */ + version?: number; +} +/** + * Represents an attachment to a comment. + */ +export interface CommentAttachment extends CommentResourceReference { + /** + * IdentityRef of the creator of the attachment. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The creation date of the attachment. + */ + createdDate?: Date; + /** + * Unique Id of the attachment. + */ + id?: string; +} +/** + * Represents a request to create a work item comment. + */ +export interface CommentCreateParameters { + /** + * Optional CommentId of the parent in order to add a reply for an existing comment + */ + parentId?: number; + text: string; +} +/** + * Specifies the additional data retrieval options for comments. + */ +export declare enum CommentExpandOptions { + /** + * Include comments only, no mentions, reactions or rendered text + */ + None = 0, + /** + * Include comment reactions + */ + Reactions = 1, + /** + * Include the rendered text (html) in addition to markdown text + */ + RenderedText = 8, + RenderedTextOnly = 16, + /** + * If specified, then responses will be expanded in the results + */ + Children = 32, + /** + * Expand everything including Reactions, Mentions and also include RenderedText (HTML) for markdown comments + */ + All = -17 +} +/** + * Format of the comment. Ex. Markdown, Html. + */ +export declare enum CommentFormat { + Markdown = 0, + Html = 1 +} +/** + * Represents a list of comments. + */ +export interface CommentList extends CommentResourceReference { + /** + * List of comments in the current batch. + */ + comments?: Comment[]; + /** + * A string token that can be used to retrieving next page of comments if available. Otherwise null. + */ + continuationToken?: string; + /** + * The count of comments in the current batch. + */ + count?: number; + /** + * Uri to the next page of comments if it is available. Otherwise null. + */ + nextPage?: string; + /** + * Total count of comments on a work item. + */ + totalCount?: number; +} +/** + * Contains information about various artifacts mentioned in the comment + */ +export interface CommentMention extends CommentResourceReference { + /** + * Id of the artifact this mention belongs to + */ + artifactId?: string; + /** + * Id of the comment associated with this mention. Nullable to support legacy mentions which can potentially have null commentId + */ + commentId?: number; + /** + * Value of the mentioned artifact. Expected Value varies by CommentMentionType: Person: VSID associated with the identity Work Item: ID of the work item Pull Request: ID of the Pull Request + */ + mentionedArtifact?: string; + /** + * The context which represent where this mentioned was parsed from + */ + type?: CommentMentionType; +} +export declare enum CommentMentionType { + /** + * An identity was mentioned by using the format @{VSID} + */ + Person = 0, + /** + * A work item was mentioned by using the format #{Work Item ID} + */ + WorkItem = 1, + /** + * A Pull Request was mentioned by using the format !{PR Number} + */ + PullRequest = 2 +} +/** + * Contains information about comment reaction for a particular reaction type. + */ +export interface CommentReaction extends CommentResourceReference { + /** + * The id of the comment this reaction belongs to. + */ + commentId?: number; + /** + * Total number of reactions for the CommentReactionType. + */ + count?: number; + /** + * Flag to indicate if the current user has engaged on this particular EngagementType (e.g. if they liked the associated comment). + */ + isCurrentUserEngaged?: boolean; + /** + * Type of the reaction. + */ + type?: CommentReactionType; +} +/** + * Represents different reaction types for a comment + */ +export declare enum CommentReactionType { + Like = 0, + Dislike = 1, + Heart = 2, + Hooray = 3, + Smile = 4, + Confused = 5 +} +/** + * Base class for comment resource references + */ +export interface CommentResourceReference { + url?: string; +} +export declare enum CommentSortOrder { + /** + * The results will be sorted in Ascending order. + */ + Asc = 1, + /** + * The results will be sorted in Descending order. + */ + Desc = 2 +} +/** + * Represents the possible comment states. + */ +export declare enum CommentState { + Active = 0, + Resolved = 1, + Closed = 2 +} +/** + * Represents a request to update a comment. + */ +export interface CommentUpdateParameters { + /** + * Set the current state of the comment + */ + state?: CommentState; + /** + * The updated text of the comment + */ + text: string; +} +/** + * Represents a specific version of a comment on a work item. + */ +export interface CommentVersion extends CommentResourceReference { + /** + * IdentityRef of the creator of the comment. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The creation date of the comment. + */ + createdDate?: Date; + /** + * The id assigned to the comment. + */ + id?: number; + /** + * Indicates if the comment has been deleted at this version. + */ + isDeleted?: boolean; + /** + * IdentityRef of the user who modified the comment at this version. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * The modification date of the comment for this version. + */ + modifiedDate?: Date; + /** + * The rendered content of the comment at this version. + */ + renderedText?: string; + /** + * Indicates the current state of the comment + */ + state?: CommentState; + /** + * The text of the comment at this version. + */ + text?: string; + /** + * The version number. + */ + version?: number; +} +export declare var TypeInfo: { + Comment: any; + CommentAttachment: any; + CommentExpandOptions: { + enumValues: { + "none": number; + "reactions": number; + "renderedText": number; + "renderedTextOnly": number; + "children": number; + "all": number; + }; + }; + CommentFormat: { + enumValues: { + "markdown": number; + "html": number; + }; + }; + CommentList: any; + CommentMention: any; + CommentMentionType: { + enumValues: { + "person": number; + "workItem": number; + "pullRequest": number; + }; + }; + CommentReaction: any; + CommentReactionType: { + enumValues: { + "like": number; + "dislike": number; + "heart": number; + "hooray": number; + "smile": number; + "confused": number; + }; + }; + CommentSortOrder: { + enumValues: { + "asc": number; + "desc": number; + }; + }; + CommentState: { + enumValues: { + "active": number; + "resolved": number; + "closed": number; + }; + }; + CommentUpdateParameters: any; + CommentVersion: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.js b/node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.js new file mode 100644 index 0000000..31d0fdf --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/CommentsInterfaces.js @@ -0,0 +1,207 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Specifies the additional data retrieval options for comments. + */ +var CommentExpandOptions; +(function (CommentExpandOptions) { + /** + * Include comments only, no mentions, reactions or rendered text + */ + CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None"; + /** + * Include comment reactions + */ + CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions"; + /** + * Include the rendered text (html) in addition to markdown text + */ + CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText"; + CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly"; + /** + * If specified, then responses will be expanded in the results + */ + CommentExpandOptions[CommentExpandOptions["Children"] = 32] = "Children"; + /** + * Expand everything including Reactions, Mentions and also include RenderedText (HTML) for markdown comments + */ + CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All"; +})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {})); +/** + * Format of the comment. Ex. Markdown, Html. + */ +var CommentFormat; +(function (CommentFormat) { + CommentFormat[CommentFormat["Markdown"] = 0] = "Markdown"; + CommentFormat[CommentFormat["Html"] = 1] = "Html"; +})(CommentFormat = exports.CommentFormat || (exports.CommentFormat = {})); +var CommentMentionType; +(function (CommentMentionType) { + /** + * An identity was mentioned by using the format @{VSID} + */ + CommentMentionType[CommentMentionType["Person"] = 0] = "Person"; + /** + * A work item was mentioned by using the format #{Work Item ID} + */ + CommentMentionType[CommentMentionType["WorkItem"] = 1] = "WorkItem"; + /** + * A Pull Request was mentioned by using the format !{PR Number} + */ + CommentMentionType[CommentMentionType["PullRequest"] = 2] = "PullRequest"; +})(CommentMentionType = exports.CommentMentionType || (exports.CommentMentionType = {})); +/** + * Represents different reaction types for a comment + */ +var CommentReactionType; +(function (CommentReactionType) { + CommentReactionType[CommentReactionType["Like"] = 0] = "Like"; + CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike"; + CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart"; + CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray"; + CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile"; + CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused"; +})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {})); +var CommentSortOrder; +(function (CommentSortOrder) { + /** + * The results will be sorted in Ascending order. + */ + CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc"; + /** + * The results will be sorted in Descending order. + */ + CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc"; +})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {})); +/** + * Represents the possible comment states. + */ +var CommentState; +(function (CommentState) { + CommentState[CommentState["Active"] = 0] = "Active"; + CommentState[CommentState["Resolved"] = 1] = "Resolved"; + CommentState[CommentState["Closed"] = 2] = "Closed"; +})(CommentState = exports.CommentState || (exports.CommentState = {})); +exports.TypeInfo = { + Comment: {}, + CommentAttachment: {}, + CommentExpandOptions: { + enumValues: { + "none": 0, + "reactions": 1, + "renderedText": 8, + "renderedTextOnly": 16, + "children": 32, + "all": -17 + } + }, + CommentFormat: { + enumValues: { + "markdown": 0, + "html": 1 + } + }, + CommentList: {}, + CommentMention: {}, + CommentMentionType: { + enumValues: { + "person": 0, + "workItem": 1, + "pullRequest": 2 + } + }, + CommentReaction: {}, + CommentReactionType: { + enumValues: { + "like": 0, + "dislike": 1, + "heart": 2, + "hooray": 3, + "smile": 4, + "confused": 5 + } + }, + CommentSortOrder: { + enumValues: { + "asc": 1, + "desc": 2 + } + }, + CommentState: { + enumValues: { + "active": 0, + "resolved": 1, + "closed": 2 + } + }, + CommentUpdateParameters: {}, + CommentVersion: {}, +}; +exports.TypeInfo.Comment.fields = { + createdDate: { + isDate: true, + }, + mentions: { + isArray: true, + typeInfo: exports.TypeInfo.CommentMention + }, + modifiedDate: { + isDate: true, + }, + reactions: { + isArray: true, + typeInfo: exports.TypeInfo.CommentReaction + }, + replies: { + typeInfo: exports.TypeInfo.CommentList + }, + state: { + enumType: exports.TypeInfo.CommentState + } +}; +exports.TypeInfo.CommentAttachment.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.CommentList.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + } +}; +exports.TypeInfo.CommentMention.fields = { + type: { + enumType: exports.TypeInfo.CommentMentionType + } +}; +exports.TypeInfo.CommentReaction.fields = { + type: { + enumType: exports.TypeInfo.CommentReactionType + } +}; +exports.TypeInfo.CommentUpdateParameters.fields = { + state: { + enumType: exports.TypeInfo.CommentState + } +}; +exports.TypeInfo.CommentVersion.fields = { + createdDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.CommentState + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/CoreInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/CoreInterfaces.d.ts new file mode 100644 index 0000000..9640295 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/CoreInterfaces.d.ts @@ -0,0 +1,568 @@ +import IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export declare enum ConnectedServiceKind { + /** + * Custom or unknown service + */ + Custom = 0, + /** + * Azure Subscription + */ + AzureSubscription = 1, + /** + * Chef Connection + */ + Chef = 2, + /** + * Generic Connection + */ + Generic = 3 +} +export interface IdentityData { + identityIds?: string[]; +} +export interface Process extends ProcessReference { + _links?: any; + description?: string; + id?: string; + isDefault?: boolean; + type?: ProcessType; +} +/** + * Type of process customization on a collection. + */ +export declare enum ProcessCustomizationType { + /** + * Process customization can't be computed. + */ + Unknown = -1, + /** + * Customization based on project-scoped xml customization + */ + Xml = 0, + /** + * Customization based on process inheritance + */ + Inherited = 1 +} +export interface ProcessReference { + name?: string; + url?: string; +} +export declare enum ProcessType { + System = 0, + Custom = 1, + Inherited = 2 +} +/** + * Contains the image data for project avatar. + */ +export interface ProjectAvatar { + /** + * The avatar image represented as a byte array. + */ + image?: number[]; +} +export declare enum ProjectChangeType { + Modified = 0, + Deleted = 1, + Added = 2 +} +/** + * Contains information describing a project. + */ +export interface ProjectInfo { + /** + * The abbreviated name of the project. + */ + abbreviation?: string; + /** + * The description of the project. + */ + description?: string; + /** + * The id of the project. + */ + id?: string; + /** + * The time that this project was last updated. + */ + lastUpdateTime?: Date; + /** + * The name of the project. + */ + name?: string; + /** + * A set of name-value pairs storing additional property data related to the project. + */ + properties?: ProjectProperty[]; + /** + * The current revision of the project. + */ + revision?: number; + /** + * The current state of the project. + */ + state?: any; + /** + * A Uri that can be used to refer to this project. + */ + uri?: string; + /** + * The version number of the project. + */ + version?: number; + /** + * Indicates whom the project is visible to. + */ + visibility?: ProjectVisibility; +} +export interface ProjectMessage { + project?: ProjectInfo; + projectChangeType?: ProjectChangeType; + shouldInvalidateSystemStore?: boolean; +} +export interface ProjectProperties { + /** + * The team project Id + */ + projectId?: string; + /** + * The collection of team project properties + */ + properties?: ProjectProperty[]; +} +/** + * A named value associated with a project. + */ +export interface ProjectProperty { + /** + * The name of the property. + */ + name?: string; + /** + * The value of the property. + */ + value?: any; +} +export declare enum ProjectVisibility { + Unchanged = -1, + /** + * The project is only visible to users with explicit access. + */ + Private = 0, + /** + * Enterprise level project visibility + */ + Organization = 1, + /** + * The project is visible to all. + */ + Public = 2, + SystemPrivate = 3 +} +export interface Proxy { + authorization?: ProxyAuthorization; + /** + * This is a description string + */ + description?: string; + /** + * The friendly name of the server + */ + friendlyName?: string; + globalDefault?: boolean; + /** + * This is a string representation of the site that the proxy server is located in (e.g. "NA-WA-RED") + */ + site?: string; + siteDefault?: boolean; + /** + * The URL of the proxy server + */ + url?: string; +} +export interface ProxyAuthorization { + /** + * Gets or sets the endpoint used to obtain access tokens from the configured token service. + */ + authorizationUrl?: string; + /** + * Gets or sets the client identifier for this proxy. + */ + clientId?: string; + /** + * Gets or sets the user identity to authorize for on-prem. + */ + identity?: IdentitiesInterfaces.IdentityDescriptor; + /** + * Gets or sets the public key used to verify the identity of this proxy. Only specify on hosted. + */ + publicKey?: VSSInterfaces.PublicKey; +} +export declare enum SourceControlTypes { + Tfvc = 1, + Git = 2 +} +/** + * The Team Context for an operation. + */ +export interface TeamContext { + /** + * The team project Id or name. Ignored if ProjectId is set. + */ + project?: string; + /** + * The Team Project ID. Required if Project is not set. + */ + projectId?: string; + /** + * The Team Id or name. Ignored if TeamId is set. + */ + team?: string; + /** + * The Team Id + */ + teamId?: string; +} +/** + * Represents a Team Project object. + */ +export interface TeamProject extends TeamProjectReference { + /** + * The links to other objects related to this object. + */ + _links?: any; + /** + * Set of capabilities this project has (such as process template & version control). + */ + capabilities?: { + [key: string]: { + [key: string]: string; + }; + }; + /** + * The shallow ref to the default team. + */ + defaultTeam?: WebApiTeamRef; +} +/** + * Data contract for a TeamProjectCollection. + */ +export interface TeamProjectCollection extends TeamProjectCollectionReference { + /** + * The links to other objects related to this object. + */ + _links?: any; + /** + * Project collection description. + */ + description?: string; + /** + * Process customization type on this collection. It can be Xml or Inherited. + */ + processCustomizationType?: ProcessCustomizationType; + /** + * Project collection state. + */ + state?: string; +} +/** + * Reference object for a TeamProjectCollection. + */ +export interface TeamProjectCollectionReference { + /** + * Collection Id. + */ + id?: string; + /** + * Collection Name. + */ + name?: string; + /** + * Collection REST Url. + */ + url?: string; +} +/** + * Represents a shallow reference to a TeamProject. + */ +export interface TeamProjectReference { + /** + * Project abbreviation. + */ + abbreviation?: string; + /** + * Url to default team identity image. + */ + defaultTeamImageUrl?: string; + /** + * The project's description (if any). + */ + description?: string; + /** + * Project identifier. + */ + id?: string; + /** + * Project last update time. + */ + lastUpdateTime?: Date; + /** + * Project name. + */ + name?: string; + /** + * Project revision. + */ + revision?: number; + /** + * Project state. + */ + state?: any; + /** + * Url to the full version of the object. + */ + url?: string; + /** + * Project visibility. + */ + visibility?: ProjectVisibility; +} +/** + * A data transfer object that stores the metadata associated with the creation of temporary data. + */ +export interface TemporaryDataCreatedDTO extends TemporaryDataDTO { + expirationDate?: Date; + id?: string; + url?: string; +} +/** + * A data transfer object that stores the metadata associated with the temporary data. + */ +export interface TemporaryDataDTO { + expirationSeconds?: number; + origin?: string; + value?: any; +} +/** + * Updateable properties for a WebApiTeam. + */ +export interface UpdateTeam { + /** + * New description for the team. + */ + description?: string; + /** + * New name for the team. + */ + name?: string; +} +export interface WebApiConnectedService extends WebApiConnectedServiceRef { + /** + * The user who did the OAuth authentication to created this service + */ + authenticatedBy?: VSSInterfaces.IdentityRef; + /** + * Extra description on the service. + */ + description?: string; + /** + * Friendly Name of service connection + */ + friendlyName?: string; + /** + * Id/Name of the connection service. For Ex: Subscription Id for Azure Connection + */ + id?: string; + /** + * The kind of service. + */ + kind?: string; + /** + * The project associated with this service + */ + project?: TeamProjectReference; + /** + * Optional uri to connect directly to the service such as https://windows.azure.com + */ + serviceUri?: string; +} +export interface WebApiConnectedServiceDetails extends WebApiConnectedServiceRef { + /** + * Meta data for service connection + */ + connectedServiceMetaData?: WebApiConnectedService; + /** + * Credential info + */ + credentialsXml?: string; + /** + * Optional uri to connect directly to the service such as https://windows.azure.com + */ + endPoint?: string; +} +export interface WebApiConnectedServiceRef { + id?: string; + url?: string; +} +/** + * The representation of data needed to create a tag definition which is sent across the wire. + */ +export interface WebApiCreateTagRequestData { + /** + * Name of the tag definition that will be created. + */ + name: string; +} +export interface WebApiProject extends TeamProjectReference { + /** + * Set of capabilities this project has + */ + capabilities?: { + [key: string]: { + [key: string]: string; + }; + }; + /** + * Reference to collection which contains this project + */ + collection?: WebApiProjectCollectionRef; + /** + * Default team for this project + */ + defaultTeam?: WebApiTeamRef; +} +export interface WebApiProjectCollection extends WebApiProjectCollectionRef { + /** + * Project collection description + */ + description?: string; + /** + * Project collection state + */ + state?: string; +} +export interface WebApiProjectCollectionRef { + /** + * Collection Tfs Url (Host Url) + */ + collectionUrl?: string; + /** + * Collection Guid + */ + id?: string; + /** + * Collection Name + */ + name?: string; + /** + * Collection REST Url + */ + url?: string; +} +/** + * The representation of a tag definition which is sent across the wire. + */ +export interface WebApiTagDefinition { + /** + * Whether or not the tag definition is active. + */ + active?: boolean; + /** + * ID of the tag definition. + */ + id?: string; + /** + * The name of the tag definition. + */ + name?: string; + /** + * Resource URL for the Tag Definition. + */ + url?: string; +} +export interface WebApiTeam extends WebApiTeamRef { + /** + * Team description + */ + description?: string; + /** + * Team identity. + */ + identity?: IdentitiesInterfaces.Identity; + /** + * Identity REST API Url to this team + */ + identityUrl?: string; + projectId?: string; + projectName?: string; +} +export interface WebApiTeamRef { + /** + * Team (Identity) Guid. A Team Foundation ID. + */ + id?: string; + /** + * Team name + */ + name?: string; + /** + * Team REST API Url + */ + url?: string; +} +export declare var TypeInfo: { + ConnectedServiceKind: { + enumValues: { + "custom": number; + "azureSubscription": number; + "chef": number; + "generic": number; + }; + }; + Process: any; + ProcessCustomizationType: { + enumValues: { + "unknown": number; + "xml": number; + "inherited": number; + }; + }; + ProcessType: { + enumValues: { + "system": number; + "custom": number; + "inherited": number; + }; + }; + ProjectChangeType: { + enumValues: { + "modified": number; + "deleted": number; + "added": number; + }; + }; + ProjectInfo: any; + ProjectMessage: any; + ProjectVisibility: { + enumValues: { + "private": number; + "organization": number; + "public": number; + }; + }; + SourceControlTypes: { + enumValues: { + "tfvc": number; + "git": number; + }; + }; + TeamProject: any; + TeamProjectCollection: any; + TeamProjectReference: any; + TemporaryDataCreatedDTO: any; + WebApiConnectedService: any; + WebApiConnectedServiceDetails: any; + WebApiProject: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/CoreInterfaces.js b/node_modules/azure-devops-node-api/interfaces/CoreInterfaces.js new file mode 100644 index 0000000..747e084 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/CoreInterfaces.js @@ -0,0 +1,201 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var ConnectedServiceKind; +(function (ConnectedServiceKind) { + /** + * Custom or unknown service + */ + ConnectedServiceKind[ConnectedServiceKind["Custom"] = 0] = "Custom"; + /** + * Azure Subscription + */ + ConnectedServiceKind[ConnectedServiceKind["AzureSubscription"] = 1] = "AzureSubscription"; + /** + * Chef Connection + */ + ConnectedServiceKind[ConnectedServiceKind["Chef"] = 2] = "Chef"; + /** + * Generic Connection + */ + ConnectedServiceKind[ConnectedServiceKind["Generic"] = 3] = "Generic"; +})(ConnectedServiceKind = exports.ConnectedServiceKind || (exports.ConnectedServiceKind = {})); +/** + * Type of process customization on a collection. + */ +var ProcessCustomizationType; +(function (ProcessCustomizationType) { + /** + * Process customization can't be computed. + */ + ProcessCustomizationType[ProcessCustomizationType["Unknown"] = -1] = "Unknown"; + /** + * Customization based on project-scoped xml customization + */ + ProcessCustomizationType[ProcessCustomizationType["Xml"] = 0] = "Xml"; + /** + * Customization based on process inheritance + */ + ProcessCustomizationType[ProcessCustomizationType["Inherited"] = 1] = "Inherited"; +})(ProcessCustomizationType = exports.ProcessCustomizationType || (exports.ProcessCustomizationType = {})); +var ProcessType; +(function (ProcessType) { + ProcessType[ProcessType["System"] = 0] = "System"; + ProcessType[ProcessType["Custom"] = 1] = "Custom"; + ProcessType[ProcessType["Inherited"] = 2] = "Inherited"; +})(ProcessType = exports.ProcessType || (exports.ProcessType = {})); +var ProjectChangeType; +(function (ProjectChangeType) { + ProjectChangeType[ProjectChangeType["Modified"] = 0] = "Modified"; + ProjectChangeType[ProjectChangeType["Deleted"] = 1] = "Deleted"; + ProjectChangeType[ProjectChangeType["Added"] = 2] = "Added"; +})(ProjectChangeType = exports.ProjectChangeType || (exports.ProjectChangeType = {})); +var ProjectVisibility; +(function (ProjectVisibility) { + ProjectVisibility[ProjectVisibility["Unchanged"] = -1] = "Unchanged"; + /** + * The project is only visible to users with explicit access. + */ + ProjectVisibility[ProjectVisibility["Private"] = 0] = "Private"; + /** + * Enterprise level project visibility + */ + ProjectVisibility[ProjectVisibility["Organization"] = 1] = "Organization"; + /** + * The project is visible to all. + */ + ProjectVisibility[ProjectVisibility["Public"] = 2] = "Public"; + ProjectVisibility[ProjectVisibility["SystemPrivate"] = 3] = "SystemPrivate"; +})(ProjectVisibility = exports.ProjectVisibility || (exports.ProjectVisibility = {})); +var SourceControlTypes; +(function (SourceControlTypes) { + SourceControlTypes[SourceControlTypes["Tfvc"] = 1] = "Tfvc"; + SourceControlTypes[SourceControlTypes["Git"] = 2] = "Git"; +})(SourceControlTypes = exports.SourceControlTypes || (exports.SourceControlTypes = {})); +exports.TypeInfo = { + ConnectedServiceKind: { + enumValues: { + "custom": 0, + "azureSubscription": 1, + "chef": 2, + "generic": 3 + } + }, + Process: {}, + ProcessCustomizationType: { + enumValues: { + "unknown": -1, + "xml": 0, + "inherited": 1 + } + }, + ProcessType: { + enumValues: { + "system": 0, + "custom": 1, + "inherited": 2 + } + }, + ProjectChangeType: { + enumValues: { + "modified": 0, + "deleted": 1, + "added": 2 + } + }, + ProjectInfo: {}, + ProjectMessage: {}, + ProjectVisibility: { + enumValues: { + "private": 0, + "organization": 1, + "public": 2 + } + }, + SourceControlTypes: { + enumValues: { + "tfvc": 1, + "git": 2 + } + }, + TeamProject: {}, + TeamProjectCollection: {}, + TeamProjectReference: {}, + TemporaryDataCreatedDTO: {}, + WebApiConnectedService: {}, + WebApiConnectedServiceDetails: {}, + WebApiProject: {}, +}; +exports.TypeInfo.Process.fields = { + type: { + enumType: exports.TypeInfo.ProcessType + } +}; +exports.TypeInfo.ProjectInfo.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.ProjectMessage.fields = { + project: { + typeInfo: exports.TypeInfo.ProjectInfo + }, + projectChangeType: { + enumType: exports.TypeInfo.ProjectChangeType + } +}; +exports.TypeInfo.TeamProject.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.TeamProjectCollection.fields = { + processCustomizationType: { + enumType: exports.TypeInfo.ProcessCustomizationType + } +}; +exports.TypeInfo.TeamProjectReference.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.TemporaryDataCreatedDTO.fields = { + expirationDate: { + isDate: true, + } +}; +exports.TypeInfo.WebApiConnectedService.fields = { + project: { + typeInfo: exports.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.WebApiConnectedServiceDetails.fields = { + connectedServiceMetaData: { + typeInfo: exports.TypeInfo.WebApiConnectedService + } +}; +exports.TypeInfo.WebApiProject.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: exports.TypeInfo.ProjectVisibility + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.d.ts new file mode 100644 index 0000000..64842d8 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.d.ts @@ -0,0 +1,417 @@ +/** + * Copy options of a Dashboard. + */ +export interface CopyDashboardOptions { + /** + * Dashboard Scope. Can be either Project or Project_Team + */ + copyDashboardScope: DashboardScope; + /** + * When this flag is set to true,option to select the folder to copy Queries of copy dashboard will appear. + */ + copyQueriesFlag?: boolean; + /** + * Description of the dashboard + */ + description?: string; + /** + * Name of the dashboard + */ + name?: string; + /** + * ID of the project. Provided by service at creation time. + */ + projectId: string; + /** + * Path to which the queries should be copied of copy dashboard + */ + queryFolderPath?: string; + /** + * Refresh interval of dashboard + */ + refreshInterval?: number; + /** + * ID of the team. Provided by service at creation time + */ + teamId?: string; +} +export interface CopyDashboardResponse { + /** + * Copied Dashboard + */ + copiedDashboard?: Dashboard; + /** + * Copy Dashboard options + */ + copyDashboardOptions: CopyDashboardOptions; +} +/** + * Model of a Dashboard. + */ +export interface Dashboard { + _links?: any; + /** + * Entity to which the dashboard is scoped. + */ + dashboardScope?: DashboardScope; + /** + * Description of the dashboard. + */ + description?: string; + /** + * Server defined version tracking value, used for edit collision detection. + */ + eTag?: string; + /** + * ID of the group for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards this property is empty. + */ + groupId?: string; + /** + * ID of the Dashboard. Provided by service at creation time. + */ + id?: string; + /** + * Name of the Dashboard. + */ + name?: string; + /** + * ID of the owner for a dashboard. For team-scoped dashboards, this is the unique identifier for the team associated with the dashboard. For project-scoped dashboards, this is the unique identifier for the user identity associated with the dashboard. + */ + ownerId?: string; + /** + * Position of the dashboard, within a dashboard group. If unset at creation time, position is decided by the service. + */ + position?: number; + /** + * Interval for client to automatically refresh the dashboard. Expressed in minutes. + */ + refreshInterval?: number; + url?: string; + /** + * The set of Widgets on the dashboard. + */ + widgets?: Widget[]; +} +/** + * Describes a list of dashboards associated to an owner. Currently, teams own dashboard groups. + */ +export interface DashboardGroup { + _links?: any; + /** + * A list of Dashboards held by the Dashboard Group + */ + dashboardEntries?: DashboardGroupEntry[]; + /** + * Deprecated: The old permission model describing the level of permissions for the current team. Pre-M125. + */ + permission?: GroupMemberPermission; + /** + * A permissions bit mask describing the security permissions of the current team for dashboards. When this permission is the value None, use GroupMemberPermission. Permissions are evaluated based on the presence of a value other than None, else the GroupMemberPermission will be saved. + */ + teamDashboardPermission?: TeamDashboardPermission; + url?: string; +} +/** + * Dashboard group entry, wrapping around Dashboard (needed?) + */ +export interface DashboardGroupEntry extends Dashboard { +} +/** + * Response from RestAPI when saving and editing DashboardGroupEntry + */ +export interface DashboardGroupEntryResponse extends DashboardGroupEntry { +} +export interface DashboardResponse extends DashboardGroupEntry { +} +/** + * identifies the scope of dashboard storage and permissions. + */ +export declare enum DashboardScope { + /** + * [DEPRECATED] Dashboard is scoped to the collection user. + */ + Collection_User = 0, + /** + * Dashboard is scoped to the team. + */ + Project_Team = 1, + /** + * Dashboard is scoped to the project. + */ + Project = 2 +} +export declare enum GroupMemberPermission { + None = 0, + Edit = 1, + Manage = 2, + ManagePermissions = 3 +} +/** + * Lightbox configuration + */ +export interface LightboxOptions { + /** + * Height of desired lightbox, in pixels + */ + height?: number; + /** + * True to allow lightbox resizing, false to disallow lightbox resizing, defaults to false. + */ + resizable?: boolean; + /** + * Width of desired lightbox, in pixels + */ + width?: number; +} +/** + * versioning for an artifact as described at: http://semver.org/, of the form major.minor.patch. + */ +export interface SemanticVersion { + /** + * Major version when you make incompatible API changes + */ + major?: number; + /** + * Minor version when you add functionality in a backwards-compatible manner + */ + minor?: number; + /** + * Patch version when you make backwards-compatible bug fixes + */ + patch?: number; +} +export declare enum TeamDashboardPermission { + None = 0, + Read = 1, + Create = 2, + Edit = 4, + Delete = 8, + ManagePermissions = 16 +} +/** + * Widget data + */ +export interface Widget { + _links?: any; + /** + * Refers to the allowed sizes for the widget. This gets populated when user wants to configure the widget + */ + allowedSizes?: WidgetSize[]; + /** + * Read-Only Property from Dashboard Service. Indicates if settings are blocked for the current user. + */ + areSettingsBlockedForUser?: boolean; + /** + * Refers to unique identifier of a feature artifact. Used for pinning+unpinning a specific artifact. + */ + artifactId?: string; + configurationContributionId?: string; + configurationContributionRelativeId?: string; + contentUri?: string; + /** + * The id of the underlying contribution defining the supplied Widget Configuration. + */ + contributionId?: string; + /** + * Optional partial dashboard content, to support exchanging dashboard-level version ETag for widget-level APIs + */ + dashboard?: Dashboard; + eTag?: string; + id?: string; + isEnabled?: boolean; + isNameConfigurable?: boolean; + lightboxOptions?: LightboxOptions; + loadingImageUrl?: string; + name?: string; + position?: WidgetPosition; + settings?: string; + settingsVersion?: SemanticVersion; + size?: WidgetSize; + typeId?: string; + url?: string; +} +/** + * Contribution based information describing Dashboard Widgets. + */ +export interface WidgetMetadata { + /** + * Sizes supported by the Widget. + */ + allowedSizes?: WidgetSize[]; + /** + * Opt-in boolean that indicates if the widget requires the Analytics Service to function. Widgets requiring the analytics service are hidden from the catalog if the Analytics Service is not available. + */ + analyticsServiceRequired?: boolean; + /** + * Resource for an icon in the widget catalog. + */ + catalogIconUrl?: string; + /** + * Opt-in URL string pointing at widget information. Defaults to extension marketplace URL if omitted + */ + catalogInfoUrl?: string; + /** + * The id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. + */ + configurationContributionId?: string; + /** + * The relative id of the underlying contribution defining the supplied Widget custom configuration UI. Null if custom configuration UI is not available. + */ + configurationContributionRelativeId?: string; + /** + * Indicates if the widget requires configuration before being added to dashboard. + */ + configurationRequired?: boolean; + /** + * Uri for the widget content to be loaded from . + */ + contentUri?: string; + /** + * The id of the underlying contribution defining the supplied Widget. + */ + contributionId?: string; + /** + * Optional default settings to be copied into widget settings. + */ + defaultSettings?: string; + /** + * Summary information describing the widget. + */ + description?: string; + /** + * Widgets can be disabled by the app store. We'll need to gracefully handle for: - persistence (Allow) - Requests (Tag as disabled, and provide context) + */ + isEnabled?: boolean; + /** + * Opt-out boolean that indicates if the widget supports widget name/title configuration. Widgets ignoring the name should set it to false in the manifest. + */ + isNameConfigurable?: boolean; + /** + * Opt-out boolean indicating if the widget is hidden from the catalog. Commonly, this is used to allow developers to disable creation of a deprecated widget. A widget must have a functional default state, or have a configuration experience, in order to be visible from the catalog. + */ + isVisibleFromCatalog?: boolean; + /** + * Keywords associated with this widget, non-filterable and invisible + */ + keywords?: string[]; + /** + * Opt-in properties for customizing widget presentation in a "lightbox" dialog. + */ + lightboxOptions?: LightboxOptions; + /** + * Resource for a loading placeholder image on dashboard + */ + loadingImageUrl?: string; + /** + * User facing name of the widget type. Each widget must use a unique value here. + */ + name?: string; + /** + * Publisher Name of this kind of widget. + */ + publisherName?: string; + /** + * Data contract required for the widget to function and to work in its container. + */ + supportedScopes?: WidgetScope[]; + /** + * Tags associated with this widget, visible on each widget and filterable. + */ + tags?: string[]; + /** + * Contribution target IDs + */ + targets?: string[]; + /** + * Deprecated: locally unique developer-facing id of this kind of widget. ContributionId provides a globally unique identifier for widget types. + */ + typeId?: string; +} +export interface WidgetMetadataResponse { + uri?: string; + widgetMetadata?: WidgetMetadata; +} +export interface WidgetPosition { + column?: number; + row?: number; +} +/** + * Response from RestAPI when saving and editing Widget + */ +export interface WidgetResponse extends Widget { +} +/** + * data contract required for the widget to function in a webaccess area or page. + */ +export declare enum WidgetScope { + Collection_User = 0, + Project_Team = 1 +} +export interface WidgetSize { + /** + * The Width of the widget, expressed in dashboard grid columns. + */ + columnSpan?: number; + /** + * The height of the widget, expressed in dashboard grid rows. + */ + rowSpan?: number; +} +/** + * Wrapper class to support HTTP header generation using CreateResponse, ClientHeaderParameter and ClientResponseType in WidgetV2Controller + */ +export interface WidgetsVersionedList { + eTag?: string[]; + widgets?: Widget[]; +} +export interface WidgetTypesResponse { + _links?: any; + uri?: string; + widgetTypes?: WidgetMetadata[]; +} +export declare var TypeInfo: { + CopyDashboardOptions: any; + CopyDashboardResponse: any; + Dashboard: any; + DashboardGroup: any; + DashboardGroupEntry: any; + DashboardGroupEntryResponse: any; + DashboardResponse: any; + DashboardScope: { + enumValues: { + "collection_User": number; + "project_Team": number; + "project": number; + }; + }; + GroupMemberPermission: { + enumValues: { + "none": number; + "edit": number; + "manage": number; + "managePermissions": number; + }; + }; + TeamDashboardPermission: { + enumValues: { + "none": number; + "read": number; + "create": number; + "edit": number; + "delete": number; + "managePermissions": number; + }; + }; + Widget: any; + WidgetMetadata: any; + WidgetMetadataResponse: any; + WidgetResponse: any; + WidgetScope: { + enumValues: { + "collection_User": number; + "project_Team": number; + }; + }; + WidgetsVersionedList: any; + WidgetTypesResponse: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.js b/node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.js new file mode 100644 index 0000000..22e9f99 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/DashboardInterfaces.js @@ -0,0 +1,193 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * identifies the scope of dashboard storage and permissions. + */ +var DashboardScope; +(function (DashboardScope) { + /** + * [DEPRECATED] Dashboard is scoped to the collection user. + */ + DashboardScope[DashboardScope["Collection_User"] = 0] = "Collection_User"; + /** + * Dashboard is scoped to the team. + */ + DashboardScope[DashboardScope["Project_Team"] = 1] = "Project_Team"; + /** + * Dashboard is scoped to the project. + */ + DashboardScope[DashboardScope["Project"] = 2] = "Project"; +})(DashboardScope = exports.DashboardScope || (exports.DashboardScope = {})); +var GroupMemberPermission; +(function (GroupMemberPermission) { + GroupMemberPermission[GroupMemberPermission["None"] = 0] = "None"; + GroupMemberPermission[GroupMemberPermission["Edit"] = 1] = "Edit"; + GroupMemberPermission[GroupMemberPermission["Manage"] = 2] = "Manage"; + GroupMemberPermission[GroupMemberPermission["ManagePermissions"] = 3] = "ManagePermissions"; +})(GroupMemberPermission = exports.GroupMemberPermission || (exports.GroupMemberPermission = {})); +var TeamDashboardPermission; +(function (TeamDashboardPermission) { + TeamDashboardPermission[TeamDashboardPermission["None"] = 0] = "None"; + TeamDashboardPermission[TeamDashboardPermission["Read"] = 1] = "Read"; + TeamDashboardPermission[TeamDashboardPermission["Create"] = 2] = "Create"; + TeamDashboardPermission[TeamDashboardPermission["Edit"] = 4] = "Edit"; + TeamDashboardPermission[TeamDashboardPermission["Delete"] = 8] = "Delete"; + TeamDashboardPermission[TeamDashboardPermission["ManagePermissions"] = 16] = "ManagePermissions"; +})(TeamDashboardPermission = exports.TeamDashboardPermission || (exports.TeamDashboardPermission = {})); +/** + * data contract required for the widget to function in a webaccess area or page. + */ +var WidgetScope; +(function (WidgetScope) { + WidgetScope[WidgetScope["Collection_User"] = 0] = "Collection_User"; + WidgetScope[WidgetScope["Project_Team"] = 1] = "Project_Team"; +})(WidgetScope = exports.WidgetScope || (exports.WidgetScope = {})); +exports.TypeInfo = { + CopyDashboardOptions: {}, + CopyDashboardResponse: {}, + Dashboard: {}, + DashboardGroup: {}, + DashboardGroupEntry: {}, + DashboardGroupEntryResponse: {}, + DashboardResponse: {}, + DashboardScope: { + enumValues: { + "collection_User": 0, + "project_Team": 1, + "project": 2 + } + }, + GroupMemberPermission: { + enumValues: { + "none": 0, + "edit": 1, + "manage": 2, + "managePermissions": 3 + } + }, + TeamDashboardPermission: { + enumValues: { + "none": 0, + "read": 1, + "create": 2, + "edit": 4, + "delete": 8, + "managePermissions": 16 + } + }, + Widget: {}, + WidgetMetadata: {}, + WidgetMetadataResponse: {}, + WidgetResponse: {}, + WidgetScope: { + enumValues: { + "collection_User": 0, + "project_Team": 1 + } + }, + WidgetsVersionedList: {}, + WidgetTypesResponse: {}, +}; +exports.TypeInfo.CopyDashboardOptions.fields = { + copyDashboardScope: { + enumType: exports.TypeInfo.DashboardScope + } +}; +exports.TypeInfo.CopyDashboardResponse.fields = { + copiedDashboard: { + typeInfo: exports.TypeInfo.Dashboard + }, + copyDashboardOptions: { + typeInfo: exports.TypeInfo.CopyDashboardOptions + } +}; +exports.TypeInfo.Dashboard.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardGroup.fields = { + dashboardEntries: { + isArray: true, + typeInfo: exports.TypeInfo.DashboardGroupEntry + }, + permission: { + enumType: exports.TypeInfo.GroupMemberPermission + }, + teamDashboardPermission: { + enumType: exports.TypeInfo.TeamDashboardPermission + } +}; +exports.TypeInfo.DashboardGroupEntry.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardGroupEntryResponse.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.DashboardResponse.fields = { + dashboardScope: { + enumType: exports.TypeInfo.DashboardScope + }, + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.Widget.fields = { + dashboard: { + typeInfo: exports.TypeInfo.Dashboard + } +}; +exports.TypeInfo.WidgetMetadata.fields = { + supportedScopes: { + isArray: true, + enumType: exports.TypeInfo.WidgetScope + } +}; +exports.TypeInfo.WidgetMetadataResponse.fields = { + widgetMetadata: { + typeInfo: exports.TypeInfo.WidgetMetadata + } +}; +exports.TypeInfo.WidgetResponse.fields = { + dashboard: { + typeInfo: exports.TypeInfo.Dashboard + } +}; +exports.TypeInfo.WidgetsVersionedList.fields = { + widgets: { + isArray: true, + typeInfo: exports.TypeInfo.Widget + } +}; +exports.TypeInfo.WidgetTypesResponse.fields = { + widgetTypes: { + isArray: true, + typeInfo: exports.TypeInfo.WidgetMetadata + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.d.ts new file mode 100644 index 0000000..e755073 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.d.ts @@ -0,0 +1,103 @@ +export interface AuthorizationHeader { + name?: string; + value?: string; +} +/** + * Represents binding of data source for the service endpoint request. + */ +export interface DataSourceBindingBase { + /** + * Pagination format supported by this data source(ContinuationToken/SkipTop). + */ + callbackContextTemplate?: string; + /** + * Subsequent calls needed? + */ + callbackRequiredTemplate?: string; + /** + * Gets or sets the name of the data source. + */ + dataSourceName?: string; + /** + * Gets or sets the endpoint Id. + */ + endpointId?: string; + /** + * Gets or sets the url of the service endpoint. + */ + endpointUrl?: string; + /** + * Gets or sets the authorization headers. + */ + headers?: AuthorizationHeader[]; + /** + * Defines the initial value of the query params + */ + initialContextTemplate?: string; + /** + * Gets or sets the parameters for the data source. + */ + parameters?: { + [key: string]: string; + }; + /** + * Gets or sets http request body + */ + requestContent?: string; + /** + * Gets or sets http request verb + */ + requestVerb?: string; + /** + * Gets or sets the result selector. + */ + resultSelector?: string; + /** + * Gets or sets the result template. + */ + resultTemplate?: string; + /** + * Gets or sets the target of the data source. + */ + target?: string; +} +export interface ProcessParameters { + dataSourceBindings?: DataSourceBindingBase[]; + inputs?: TaskInputDefinitionBase[]; + sourceDefinitions?: TaskSourceDefinitionBase[]; +} +export interface TaskInputDefinitionBase { + aliases?: string[]; + defaultValue?: string; + groupName?: string; + helpMarkDown?: string; + label?: string; + name?: string; + options?: { + [key: string]: string; + }; + properties?: { + [key: string]: string; + }; + required?: boolean; + type?: string; + validation?: TaskInputValidation; + visibleRule?: string; +} +export interface TaskInputValidation { + /** + * Conditional expression + */ + expression?: string; + /** + * Message explaining how user can correct if validation fails + */ + message?: string; +} +export interface TaskSourceDefinitionBase { + authKey?: string; + endpoint?: string; + keySelector?: string; + selector?: string; + target?: string; +} diff --git a/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.js b/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.js new file mode 100644 index 0000000..f9153e1 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/DistributedTaskCommonInterfaces.js @@ -0,0 +1,11 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.d.ts new file mode 100644 index 0000000..293d047 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.d.ts @@ -0,0 +1,1287 @@ +import GalleryInterfaces = require("../interfaces/GalleryInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +/** + * How the acquisition is assigned + */ +export declare enum AcquisitionAssignmentType { + None = 0, + /** + * Just assign for me + */ + Me = 1, + /** + * Assign for all users in the account + */ + All = 2 +} +export interface AcquisitionOperation { + /** + * State of the the AcquisitionOperation for the current user + */ + operationState?: AcquisitionOperationState; + /** + * AcquisitionOperationType: install, request, buy, etc... + */ + operationType?: AcquisitionOperationType; + /** + * Optional reason to justify current state. Typically used with Disallow state. + */ + reason?: string; + /** + * List of reasons indicating why the operation is not allowed. + */ + reasons?: AcquisitionOperationDisallowReason[]; +} +export interface AcquisitionOperationDisallowReason { + /** + * User-friendly message clarifying the reason for disallowance + */ + message?: string; + /** + * Type of reason for disallowance - AlreadyInstalled, UnresolvedDemand, etc. + */ + type?: string; +} +export declare enum AcquisitionOperationState { + /** + * Not allowed to use this AcquisitionOperation + */ + Disallow = 0, + /** + * Allowed to use this AcquisitionOperation + */ + Allow = 1, + /** + * Operation has already been completed and is no longer available + */ + Completed = 3 +} +/** + * Set of different types of operations that can be requested. + */ +export declare enum AcquisitionOperationType { + /** + * Not yet used + */ + Get = 0, + /** + * Install this extension into the host provided + */ + Install = 1, + /** + * Buy licenses for this extension and install into the host provided + */ + Buy = 2, + /** + * Try this extension + */ + Try = 3, + /** + * Request this extension for installation + */ + Request = 4, + /** + * No action found + */ + None = 5, + /** + * Request admins for purchasing extension + */ + PurchaseRequest = 6 +} +/** + * Market item acquisition options (install, buy, etc) for an installation target. + */ +export interface AcquisitionOptions { + /** + * Default Operation for the ItemId in this target + */ + defaultOperation?: AcquisitionOperation; + /** + * The item id that this options refer to + */ + itemId?: string; + /** + * Operations allowed for the ItemId in this target + */ + operations?: AcquisitionOperation[]; + /** + * Additional properties which can be added to the request. + */ + properties?: any; + /** + * The target that this options refer to + */ + target?: string; +} +/** + * Representation of a ContributionNode that can be used for serialized to clients. + */ +export interface ClientContribution { + /** + * Description of the contribution/type + */ + description?: string; + /** + * Fully qualified identifier of the contribution/type + */ + id?: string; + /** + * Includes is a set of contributions that should have this contribution included in their targets list. + */ + includes?: string[]; + /** + * Properties/attributes of this contribution + */ + properties?: any; + /** + * The ids of the contribution(s) that this contribution targets. (parent contributions) + */ + targets?: string[]; + /** + * Id of the Contribution Type + */ + type?: string; +} +/** + * Representation of a ContributionNode that can be used for serialized to clients. + */ +export interface ClientContributionNode { + /** + * List of ids for contributions which are children to the current contribution. + */ + children?: string[]; + /** + * Contribution associated with this node. + */ + contribution?: ClientContribution; + /** + * List of ids for contributions which are parents to the current contribution. + */ + parents?: string[]; +} +export interface ClientContributionProviderDetails { + /** + * Friendly name for the provider. + */ + displayName?: string; + /** + * Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes + */ + name?: string; + /** + * Properties associated with the provider + */ + properties?: { + [key: string]: string; + }; + /** + * Version of contributions associated with this contribution provider. + */ + version?: string; +} +/** + * A client data provider are the details needed to make the data provider request from the client. + */ +export interface ClientDataProviderQuery extends DataProviderQuery { + /** + * The Id of the service instance type that should be communicated with in order to resolve the data providers from the client given the query values. + */ + queryServiceInstanceType?: string; +} +/** + * An individual contribution made by an extension + */ +export interface Contribution extends ContributionBase { + /** + * List of constraints (filters) that should be applied to the availability of this contribution + */ + constraints?: ContributionConstraint[]; + /** + * Includes is a set of contributions that should have this contribution included in their targets list. + */ + includes?: string[]; + /** + * Properties/attributes of this contribution + */ + properties?: any; + /** + * List of demanded claims in order for the user to see this contribution (like anonymous, public, member...). + */ + restrictedTo?: string[]; + /** + * The ids of the contribution(s) that this contribution targets. (parent contributions) + */ + targets?: string[]; + /** + * Id of the Contribution Type + */ + type?: string; +} +/** + * Base class shared by contributions and contribution types + */ +export interface ContributionBase { + /** + * Description of the contribution/type + */ + description?: string; + /** + * Fully qualified identifier of the contribution/type + */ + id?: string; + /** + * VisibleTo can be used to restrict whom can reference a given contribution/type. This value should be a list of publishers or extensions access is restricted too. Examples: "ms" - Means only the "ms" publisher can reference this. "ms.vss-web" - Means only the "vss-web" extension from the "ms" publisher can reference this. + */ + visibleTo?: string[]; +} +/** + * Specifies a constraint that can be used to dynamically include/exclude a given contribution + */ +export interface ContributionConstraint { + /** + * An optional property that can be specified to group constraints together. All constraints within a group are AND'd together (all must be evaluate to True in order for the contribution to be included). Different groups of constraints are OR'd (only one group needs to evaluate to True for the contribution to be included). + */ + group?: number; + /** + * Fully qualified identifier of a shared constraint + */ + id?: string; + /** + * If true, negate the result of the filter (include the contribution if the applied filter returns false instead of true) + */ + inverse?: boolean; + /** + * Name of the IContributionFilter plugin + */ + name?: string; + /** + * Properties that are fed to the contribution filter class + */ + properties?: any; + /** + * Constraints can be optionally be applied to one or more of the relationships defined in the contribution. If no relationships are defined then all relationships are associated with the constraint. This means the default behaviour will eliminate the contribution from the tree completely if the constraint is applied. + */ + relationships?: string[]; +} +/** + * Represents different ways of including contributions based on licensing + */ +export declare enum ContributionLicensingBehaviorType { + /** + * Default value - only include the contribution if the user is licensed for the extension + */ + OnlyIfLicensed = 0, + /** + * Only include the contribution if the user is NOT licensed for the extension + */ + OnlyIfUnlicensed = 1, + /** + * Always include the contribution regardless of whether or not the user is licensed for the extension + */ + AlwaysInclude = 2 +} +/** + * A query that can be issued for contribution nodes + */ +export interface ContributionNodeQuery { + /** + * The contribution ids of the nodes to find. + */ + contributionIds?: string[]; + /** + * Contextual information that can be leveraged by contribution constraints + */ + dataProviderContext?: DataProviderContext; + /** + * Indicator if contribution provider details should be included in the result. + */ + includeProviderDetails?: boolean; + /** + * Query options tpo be used when fetching ContributionNodes + */ + queryOptions?: ContributionQueryOptions; +} +/** + * Result of a contribution node query. Wraps the resulting contribution nodes and provider details. + */ +export interface ContributionNodeQueryResult { + /** + * Map of contribution ids to corresponding node. + */ + nodes?: { + [key: string]: ClientContributionNode; + }; + /** + * Map of provider ids to the corresponding provider details object. + */ + providerDetails?: { + [key: string]: ClientContributionProviderDetails; + }; +} +/** + * Description about a property of a contribution type + */ +export interface ContributionPropertyDescription { + /** + * Description of the property + */ + description?: string; + /** + * Name of the property + */ + name?: string; + /** + * True if this property is required + */ + required?: boolean; + /** + * The type of value used for this property + */ + type?: ContributionPropertyType; +} +/** + * The type of value used for a property + */ +export declare enum ContributionPropertyType { + /** + * Contribution type is unknown (value may be anything) + */ + Unknown = 0, + /** + * Value is a string + */ + String = 1, + /** + * Value is a Uri + */ + Uri = 2, + /** + * Value is a GUID + */ + Guid = 4, + /** + * Value is True or False + */ + Boolean = 8, + /** + * Value is an integer + */ + Integer = 16, + /** + * Value is a double + */ + Double = 32, + /** + * Value is a DateTime object + */ + DateTime = 64, + /** + * Value is a generic Dictionary/JObject/property bag + */ + Dictionary = 128, + /** + * Value is an array + */ + Array = 256, + /** + * Value is an arbitrary/custom object + */ + Object = 512 +} +export interface ContributionProviderDetails { + /** + * Friendly name for the provider. + */ + displayName?: string; + /** + * Unique identifier for this provider. The provider name can be used to cache the contribution data and refer back to it when looking for changes + */ + name?: string; + /** + * Properties associated with the provider + */ + properties?: { + [key: string]: string; + }; + /** + * Version of contributions associated with this contribution provider. + */ + version?: string; +} +/** + * Options that control the contributions to include in a query + */ +export declare enum ContributionQueryOptions { + None = 0, + /** + * Include the direct contributions that have the ids queried. + */ + IncludeSelf = 16, + /** + * Include the contributions that directly target the contributions queried. + */ + IncludeChildren = 32, + /** + * Include the contributions from the entire sub-tree targeting the contributions queried. + */ + IncludeSubTree = 96, + /** + * Include the contribution being queried as well as all contributions that target them recursively. + */ + IncludeAll = 112, + /** + * Some callers may want the entire tree back without constraint evaluation being performed. + */ + IgnoreConstraints = 256 +} +/** + * A contribution type, given by a json schema + */ +export interface ContributionType extends ContributionBase { + /** + * Controls whether or not contributions of this type have the type indexed for queries. This allows clients to find all extensions that have a contribution of this type. NOTE: Only TrustedPartners are allowed to specify indexed contribution types. + */ + indexed?: boolean; + /** + * Friendly name of the contribution/type + */ + name?: string; + /** + * Describes the allowed properties for this contribution type + */ + properties?: { + [key: string]: ContributionPropertyDescription; + }; +} +/** + * Contextual information that data providers can examine when populating their data + */ +export interface DataProviderContext { + /** + * Generic property bag that contains context-specific properties that data providers can use when populating their data dictionary + */ + properties?: { + [key: string]: any; + }; +} +export interface DataProviderExceptionDetails { + /** + * The type of the exception that was thrown. + */ + exceptionType?: string; + /** + * Message that is associated with the exception. + */ + message?: string; + /** + * The StackTrace from the exception turned into a string. + */ + stackTrace?: string; +} +/** + * A query that can be issued for data provider data + */ +export interface DataProviderQuery { + /** + * Contextual information to pass to the data providers + */ + context?: DataProviderContext; + /** + * The contribution ids of the data providers to resolve + */ + contributionIds?: string[]; +} +/** + * Result structure from calls to GetDataProviderData + */ +export interface DataProviderResult { + /** + * This is the set of data providers that were requested, but either they were defined as client providers, or as remote providers that failed and may be retried by the client. + */ + clientProviders?: { + [key: string]: ClientDataProviderQuery; + }; + /** + * Property bag of data keyed off of the data provider contribution id + */ + data?: { + [key: string]: any; + }; + /** + * Set of exceptions that occurred resolving the data providers. + */ + exceptions?: { + [key: string]: DataProviderExceptionDetails; + }; + /** + * List of data providers resolved in the data-provider query + */ + resolvedProviders?: ResolvedDataProvider[]; + /** + * Scope name applied to this data provider result. + */ + scopeName?: string; + /** + * Scope value applied to this data provider result. + */ + scopeValue?: string; + /** + * Property bag of shared data that was contributed to by any of the individual data providers + */ + sharedData?: { + [key: string]: any; + }; +} +/** + * Data bag that any data provider can contribute to. This shared dictionary is returned in the data provider result. + */ +export interface DataProviderSharedData { +} +/** + * Contract for handling the extension acquisition process + */ +export interface ExtensionAcquisitionRequest { + /** + * How the item is being assigned + */ + assignmentType?: AcquisitionAssignmentType; + /** + * The id of the subscription used for purchase + */ + billingId?: string; + /** + * The marketplace id (publisherName.extensionName) for the item + */ + itemId?: string; + /** + * The type of operation, such as install, request, purchase + */ + operationType?: AcquisitionOperationType; + /** + * Additional properties which can be added to the request. + */ + properties?: any; + /** + * How many licenses should be purchased + */ + quantity?: number; +} +/** + * Audit log for an extension + */ +export interface ExtensionAuditLog { + /** + * Collection of audit log entries + */ + entries?: ExtensionAuditLogEntry[]; + /** + * Extension that the change was made for + */ + extensionName?: string; + /** + * Publisher that the extension is part of + */ + publisherName?: string; +} +/** + * An audit log entry for an extension + */ +export interface ExtensionAuditLogEntry { + /** + * Change that was made to extension + */ + auditAction?: string; + /** + * Date at which the change was made + */ + auditDate?: Date; + /** + * Extra information about the change + */ + comment?: string; + /** + * Represents the user who made the change + */ + updatedBy?: VSSInterfaces.IdentityRef; +} +export interface ExtensionAuthorization { + id?: string; + scopes?: string[]; +} +/** + * Represents a single collection for extension data documents + */ +export interface ExtensionDataCollection { + /** + * The name of the collection + */ + collectionName?: string; + /** + * A list of documents belonging to the collection + */ + documents?: any[]; + /** + * The type of the collection's scope, such as Default or User + */ + scopeType?: string; + /** + * The value of the collection's scope, such as Current or Me + */ + scopeValue?: string; +} +/** + * Represents a query to receive a set of extension data collections + */ +export interface ExtensionDataCollectionQuery { + /** + * A list of collections to query + */ + collections?: ExtensionDataCollection[]; +} +export interface ExtensionEvent { + /** + * The extension which has been updated + */ + extension?: GalleryInterfaces.PublishedExtension; + /** + * The current version of the extension that was updated + */ + extensionVersion?: string; + /** + * Name of the collection for which the extension was requested + */ + host?: ExtensionHost; + /** + * Gallery host url + */ + links?: ExtensionEventUrls; + /** + * Represents the user who initiated the update + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * The type of update that was made + */ + updateType?: ExtensionUpdateType; +} +/** + * Base class for an event callback for an extension + */ +export interface ExtensionEventCallback { + /** + * The uri of the endpoint that is hit when an event occurs + */ + uri?: string; +} +/** + * Collection of event callbacks - endpoints called when particular extension events occur. + */ +export interface ExtensionEventCallbackCollection { + /** + * Optional. Defines an endpoint that gets called via a POST request to notify that an extension disable has occurred. + */ + postDisable?: ExtensionEventCallback; + /** + * Optional. Defines an endpoint that gets called via a POST request to notify that an extension enable has occurred. + */ + postEnable?: ExtensionEventCallback; + /** + * Optional. Defines an endpoint that gets called via a POST request to notify that an extension install has completed. + */ + postInstall?: ExtensionEventCallback; + /** + * Optional. Defines an endpoint that gets called via a POST request to notify that an extension uninstall has occurred. + */ + postUninstall?: ExtensionEventCallback; + /** + * Optional. Defines an endpoint that gets called via a POST request to notify that an extension update has occurred. + */ + postUpdate?: ExtensionEventCallback; + /** + * Optional. Defines an endpoint that gets called via a POST request to notify that an extension install is about to occur. Response indicates whether to proceed or abort. + */ + preInstall?: ExtensionEventCallback; + /** + * For multi-version extensions, defines an endpoint that gets called via an OPTIONS request to determine the particular version of the extension to be used + */ + versionCheck?: ExtensionEventCallback; +} +export interface ExtensionEventUrls extends ExtensionUrls { + /** + * Url of the extension management page + */ + manageExtensionsPage?: string; +} +/** + * Set of flags applied to extensions that are relevant to contribution consumers + */ +export declare enum ExtensionFlags { + /** + * A built-in extension is installed for all VSTS accounts by default + */ + BuiltIn = 1, + /** + * The extension comes from a fully-trusted publisher + */ + Trusted = 2 +} +export interface ExtensionHost { + id?: string; + name?: string; +} +/** + * How an extension should handle including contributions based on licensing + */ +export interface ExtensionLicensing { + /** + * A list of contributions which deviate from the default licensing behavior + */ + overrides?: LicensingOverride[]; +} +/** + * Base class for extension properties which are shared by the extension manifest and the extension model + */ +export interface ExtensionManifest { + /** + * Uri used as base for other relative uri's defined in extension + */ + baseUri?: string; + /** + * List of shared constraints defined by this extension + */ + constraints?: ContributionConstraint[]; + /** + * List of contributions made by this extension + */ + contributions?: Contribution[]; + /** + * List of contribution types defined by this extension + */ + contributionTypes?: ContributionType[]; + /** + * List of explicit demands required by this extension + */ + demands?: string[]; + /** + * Collection of endpoints that get called when particular extension events occur + */ + eventCallbacks?: ExtensionEventCallbackCollection; + /** + * Secondary location that can be used as base for other relative uri's defined in extension + */ + fallbackBaseUri?: string; + /** + * Language Culture Name set by the Gallery + */ + language?: string; + /** + * How this extension behaves with respect to licensing + */ + licensing?: ExtensionLicensing; + /** + * Version of the extension manifest format/content + */ + manifestVersion?: number; + /** + * Default user claims applied to all contributions (except the ones which have been specified restrictedTo explicitly) to control the visibility of a contribution. + */ + restrictedTo?: string[]; + /** + * List of all oauth scopes required by this extension + */ + scopes?: string[]; + /** + * The ServiceInstanceType(Guid) of the VSTS service that must be available to an account in order for the extension to be installed + */ + serviceInstanceType?: string; +} +/** + * A request for an extension (to be installed or have a license assigned) + */ +export interface ExtensionRequest { + /** + * Required message supplied if the request is rejected + */ + rejectMessage?: string; + /** + * Date at which the request was made + */ + requestDate?: Date; + /** + * Represents the user who made the request + */ + requestedBy?: VSSInterfaces.IdentityRef; + /** + * Optional message supplied by the requester justifying the request + */ + requestMessage?: string; + /** + * Represents the state of the request + */ + requestState?: ExtensionRequestState; + /** + * Date at which the request was resolved + */ + resolveDate?: Date; + /** + * Represents the user who resolved the request + */ + resolvedBy?: VSSInterfaces.IdentityRef; +} +export interface ExtensionRequestEvent { + /** + * The extension which has been requested + */ + extension?: GalleryInterfaces.PublishedExtension; + /** + * Information about the host for which this extension is requested + */ + host?: ExtensionHost; + /** + * Name of the collection for which the extension was requested + */ + hostName?: string; + /** + * Gallery host url + */ + links?: ExtensionRequestUrls; + /** + * The extension request object + */ + request?: ExtensionRequest; + /** + * The type of update that was made + */ + updateType?: ExtensionRequestUpdateType; +} +export interface ExtensionRequestsEvent { + /** + * The extension which has been requested + */ + extension?: GalleryInterfaces.PublishedExtension; + /** + * Information about the host for which this extension is requested + */ + host?: ExtensionHost; + /** + * Gallery host url + */ + links?: ExtensionRequestUrls; + /** + * The extension request object + */ + requests?: ExtensionRequest[]; + /** + * The type of update that was made + */ + updateType?: ExtensionRequestUpdateType; +} +/** + * Represents the state of an extension request + */ +export declare enum ExtensionRequestState { + /** + * The request has been opened, but not yet responded to + */ + Open = 0, + /** + * The request was accepted (extension installed or license assigned) + */ + Accepted = 1, + /** + * The request was rejected (extension not installed or license not assigned) + */ + Rejected = 2 +} +export declare enum ExtensionRequestUpdateType { + Created = 1, + Approved = 2, + Rejected = 3, + Deleted = 4 +} +export interface ExtensionRequestUrls extends ExtensionUrls { + /** + * Link to view the extension request + */ + requestPage?: string; +} +/** + * The state of an extension + */ +export interface ExtensionState extends InstalledExtensionState { + extensionName?: string; + /** + * The time at which the version was last checked + */ + lastVersionCheck?: Date; + publisherName?: string; + version?: string; +} +/** + * States of an extension Note: If you add value to this enum, you need to do 2 other things. First add the back compat enum in value src\Vssf\Sdk\Server\Contributions\InstalledExtensionMessage.cs. Second, you can not send the new value on the message bus. You need to remove it from the message bus event prior to being sent. + */ +export declare enum ExtensionStateFlags { + /** + * No flags set + */ + None = 0, + /** + * Extension is disabled + */ + Disabled = 1, + /** + * Extension is a built in + */ + BuiltIn = 2, + /** + * Extension has multiple versions + */ + MultiVersion = 4, + /** + * Extension is not installed. This is for builtin extensions only and can not otherwise be set. + */ + UnInstalled = 8, + /** + * Error performing version check + */ + VersionCheckError = 16, + /** + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. + */ + Trusted = 32, + /** + * Extension is currently in an error state + */ + Error = 64, + /** + * Extension scopes have changed and the extension requires re-authorization + */ + NeedsReauthorization = 128, + /** + * Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded. + */ + AutoUpgradeError = 256, + /** + * Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported. + */ + Warning = 512 +} +export declare enum ExtensionUpdateType { + Installed = 1, + Uninstalled = 2, + Enabled = 3, + Disabled = 4, + VersionUpdated = 5, + ActionRequired = 6, + ActionResolved = 7 +} +export interface ExtensionUrls { + /** + * Url of the extension icon + */ + extensionIcon?: string; + /** + * Link to view the extension details page + */ + extensionPage?: string; +} +/** + * Represents a VSTS extension along with its installation state + */ +export interface InstalledExtension extends ExtensionManifest { + /** + * The friendly extension id for this extension - unique for a given publisher. + */ + extensionId?: string; + /** + * The display name of the extension. + */ + extensionName?: string; + /** + * This is the set of files available from the extension. + */ + files?: GalleryInterfaces.ExtensionFile[]; + /** + * Extension flags relevant to contribution consumers + */ + flags?: ExtensionFlags; + /** + * Information about this particular installation of the extension + */ + installState?: InstalledExtensionState; + /** + * This represents the date/time the extensions was last updated in the gallery. This doesnt mean this version was updated the value represents changes to any and all versions of the extension. + */ + lastPublished?: Date; + /** + * Unique id of the publisher of this extension + */ + publisherId?: string; + /** + * The display name of the publisher + */ + publisherName?: string; + /** + * Unique id for this extension (the same id is used for all versions of a single extension) + */ + registrationId?: string; + /** + * Version of this extension + */ + version?: string; +} +export interface InstalledExtensionQuery { + assetTypes?: string[]; + monikers?: GalleryInterfaces.ExtensionIdentifier[]; +} +/** + * The state of an installed extension + */ +export interface InstalledExtensionState { + /** + * States of an installed extension + */ + flags?: ExtensionStateFlags; + /** + * List of installation issues + */ + installationIssues?: InstalledExtensionStateIssue[]; + /** + * The time at which this installation was last updated + */ + lastUpdated?: Date; +} +/** + * Represents an installation issue + */ +export interface InstalledExtensionStateIssue { + /** + * The error message + */ + message?: string; + /** + * Source of the installation issue, for example "Demands" + */ + source?: string; + /** + * Installation issue type (Warning, Error) + */ + type?: InstalledExtensionStateIssueType; +} +/** + * Installation issue type (Warning, Error) + */ +export declare enum InstalledExtensionStateIssueType { + /** + * Represents an installation warning, for example an implicit demand not supported + */ + Warning = 0, + /** + * Represents an installation error, for example an explicit demand not supported + */ + Error = 1 +} +/** + * Maps a contribution to a licensing behavior + */ +export interface LicensingOverride { + /** + * How the inclusion of this contribution should change based on licensing + */ + behavior?: ContributionLicensingBehaviorType; + /** + * Fully qualified contribution id which we want to define licensing behavior for + */ + id?: string; +} +/** + * A request for an extension (to be installed or have a license assigned) + */ +export interface RequestedExtension { + /** + * The unique name of the extension + */ + extensionName?: string; + /** + * A list of each request for the extension + */ + extensionRequests?: ExtensionRequest[]; + /** + * DisplayName of the publisher that owns the extension being published. + */ + publisherDisplayName?: string; + /** + * Represents the Publisher of the requested extension + */ + publisherName?: string; + /** + * The total number of requests for an extension + */ + requestCount?: number; +} +/** + * Entry for a specific data provider's resulting data + */ +export interface ResolvedDataProvider { + /** + * The total time the data provider took to resolve its data (in milliseconds) + */ + duration?: number; + error?: string; + id?: string; +} +export interface Scope { + description?: string; + title?: string; + value?: string; +} +/** + * Information about the extension + */ +export interface SupportedExtension { + /** + * Unique Identifier for this extension + */ + extension?: string; + /** + * Unique Identifier for this publisher + */ + publisher?: string; + /** + * Supported version for this extension + */ + version?: string; +} +export declare var TypeInfo: { + AcquisitionAssignmentType: { + enumValues: { + "none": number; + "me": number; + "all": number; + }; + }; + AcquisitionOperation: any; + AcquisitionOperationState: { + enumValues: { + "disallow": number; + "allow": number; + "completed": number; + }; + }; + AcquisitionOperationType: { + enumValues: { + "get": number; + "install": number; + "buy": number; + "try": number; + "request": number; + "none": number; + "purchaseRequest": number; + }; + }; + AcquisitionOptions: any; + ContributionLicensingBehaviorType: { + enumValues: { + "onlyIfLicensed": number; + "onlyIfUnlicensed": number; + "alwaysInclude": number; + }; + }; + ContributionNodeQuery: any; + ContributionPropertyDescription: any; + ContributionPropertyType: { + enumValues: { + "unknown": number; + "string": number; + "uri": number; + "guid": number; + "boolean": number; + "integer": number; + "double": number; + "dateTime": number; + "dictionary": number; + "array": number; + "object": number; + }; + }; + ContributionQueryOptions: { + enumValues: { + "none": number; + "includeSelf": number; + "includeChildren": number; + "includeSubTree": number; + "includeAll": number; + "ignoreConstraints": number; + }; + }; + ContributionType: any; + ExtensionAcquisitionRequest: any; + ExtensionAuditLog: any; + ExtensionAuditLogEntry: any; + ExtensionEvent: any; + ExtensionFlags: { + enumValues: { + "builtIn": number; + "trusted": number; + }; + }; + ExtensionLicensing: any; + ExtensionManifest: any; + ExtensionRequest: any; + ExtensionRequestEvent: any; + ExtensionRequestsEvent: any; + ExtensionRequestState: { + enumValues: { + "open": number; + "accepted": number; + "rejected": number; + }; + }; + ExtensionRequestUpdateType: { + enumValues: { + "created": number; + "approved": number; + "rejected": number; + "deleted": number; + }; + }; + ExtensionState: any; + ExtensionStateFlags: { + enumValues: { + "none": number; + "disabled": number; + "builtIn": number; + "multiVersion": number; + "unInstalled": number; + "versionCheckError": number; + "trusted": number; + "error": number; + "needsReauthorization": number; + "autoUpgradeError": number; + "warning": number; + }; + }; + ExtensionUpdateType: { + enumValues: { + "installed": number; + "uninstalled": number; + "enabled": number; + "disabled": number; + "versionUpdated": number; + "actionRequired": number; + "actionResolved": number; + }; + }; + InstalledExtension: any; + InstalledExtensionState: any; + InstalledExtensionStateIssue: any; + InstalledExtensionStateIssueType: { + enumValues: { + "warning": number; + "error": number; + }; + }; + LicensingOverride: any; + RequestedExtension: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.js b/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.js new file mode 100644 index 0000000..dd697d5 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ExtensionManagementInterfaces.js @@ -0,0 +1,586 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const GalleryInterfaces = require("../interfaces/GalleryInterfaces"); +/** + * How the acquisition is assigned + */ +var AcquisitionAssignmentType; +(function (AcquisitionAssignmentType) { + AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None"; + /** + * Just assign for me + */ + AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me"; + /** + * Assign for all users in the account + */ + AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All"; +})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {})); +var AcquisitionOperationState; +(function (AcquisitionOperationState) { + /** + * Not allowed to use this AcquisitionOperation + */ + AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow"; + /** + * Allowed to use this AcquisitionOperation + */ + AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow"; + /** + * Operation has already been completed and is no longer available + */ + AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed"; +})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {})); +/** + * Set of different types of operations that can be requested. + */ +var AcquisitionOperationType; +(function (AcquisitionOperationType) { + /** + * Not yet used + */ + AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get"; + /** + * Install this extension into the host provided + */ + AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install"; + /** + * Buy licenses for this extension and install into the host provided + */ + AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy"; + /** + * Try this extension + */ + AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try"; + /** + * Request this extension for installation + */ + AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request"; + /** + * No action found + */ + AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None"; + /** + * Request admins for purchasing extension + */ + AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest"; +})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {})); +/** + * Represents different ways of including contributions based on licensing + */ +var ContributionLicensingBehaviorType; +(function (ContributionLicensingBehaviorType) { + /** + * Default value - only include the contribution if the user is licensed for the extension + */ + ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfLicensed"] = 0] = "OnlyIfLicensed"; + /** + * Only include the contribution if the user is NOT licensed for the extension + */ + ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["OnlyIfUnlicensed"] = 1] = "OnlyIfUnlicensed"; + /** + * Always include the contribution regardless of whether or not the user is licensed for the extension + */ + ContributionLicensingBehaviorType[ContributionLicensingBehaviorType["AlwaysInclude"] = 2] = "AlwaysInclude"; +})(ContributionLicensingBehaviorType = exports.ContributionLicensingBehaviorType || (exports.ContributionLicensingBehaviorType = {})); +/** + * The type of value used for a property + */ +var ContributionPropertyType; +(function (ContributionPropertyType) { + /** + * Contribution type is unknown (value may be anything) + */ + ContributionPropertyType[ContributionPropertyType["Unknown"] = 0] = "Unknown"; + /** + * Value is a string + */ + ContributionPropertyType[ContributionPropertyType["String"] = 1] = "String"; + /** + * Value is a Uri + */ + ContributionPropertyType[ContributionPropertyType["Uri"] = 2] = "Uri"; + /** + * Value is a GUID + */ + ContributionPropertyType[ContributionPropertyType["Guid"] = 4] = "Guid"; + /** + * Value is True or False + */ + ContributionPropertyType[ContributionPropertyType["Boolean"] = 8] = "Boolean"; + /** + * Value is an integer + */ + ContributionPropertyType[ContributionPropertyType["Integer"] = 16] = "Integer"; + /** + * Value is a double + */ + ContributionPropertyType[ContributionPropertyType["Double"] = 32] = "Double"; + /** + * Value is a DateTime object + */ + ContributionPropertyType[ContributionPropertyType["DateTime"] = 64] = "DateTime"; + /** + * Value is a generic Dictionary/JObject/property bag + */ + ContributionPropertyType[ContributionPropertyType["Dictionary"] = 128] = "Dictionary"; + /** + * Value is an array + */ + ContributionPropertyType[ContributionPropertyType["Array"] = 256] = "Array"; + /** + * Value is an arbitrary/custom object + */ + ContributionPropertyType[ContributionPropertyType["Object"] = 512] = "Object"; +})(ContributionPropertyType = exports.ContributionPropertyType || (exports.ContributionPropertyType = {})); +/** + * Options that control the contributions to include in a query + */ +var ContributionQueryOptions; +(function (ContributionQueryOptions) { + ContributionQueryOptions[ContributionQueryOptions["None"] = 0] = "None"; + /** + * Include the direct contributions that have the ids queried. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeSelf"] = 16] = "IncludeSelf"; + /** + * Include the contributions that directly target the contributions queried. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeChildren"] = 32] = "IncludeChildren"; + /** + * Include the contributions from the entire sub-tree targeting the contributions queried. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeSubTree"] = 96] = "IncludeSubTree"; + /** + * Include the contribution being queried as well as all contributions that target them recursively. + */ + ContributionQueryOptions[ContributionQueryOptions["IncludeAll"] = 112] = "IncludeAll"; + /** + * Some callers may want the entire tree back without constraint evaluation being performed. + */ + ContributionQueryOptions[ContributionQueryOptions["IgnoreConstraints"] = 256] = "IgnoreConstraints"; +})(ContributionQueryOptions = exports.ContributionQueryOptions || (exports.ContributionQueryOptions = {})); +/** + * Set of flags applied to extensions that are relevant to contribution consumers + */ +var ExtensionFlags; +(function (ExtensionFlags) { + /** + * A built-in extension is installed for all VSTS accounts by default + */ + ExtensionFlags[ExtensionFlags["BuiltIn"] = 1] = "BuiltIn"; + /** + * The extension comes from a fully-trusted publisher + */ + ExtensionFlags[ExtensionFlags["Trusted"] = 2] = "Trusted"; +})(ExtensionFlags = exports.ExtensionFlags || (exports.ExtensionFlags = {})); +/** + * Represents the state of an extension request + */ +var ExtensionRequestState; +(function (ExtensionRequestState) { + /** + * The request has been opened, but not yet responded to + */ + ExtensionRequestState[ExtensionRequestState["Open"] = 0] = "Open"; + /** + * The request was accepted (extension installed or license assigned) + */ + ExtensionRequestState[ExtensionRequestState["Accepted"] = 1] = "Accepted"; + /** + * The request was rejected (extension not installed or license not assigned) + */ + ExtensionRequestState[ExtensionRequestState["Rejected"] = 2] = "Rejected"; +})(ExtensionRequestState = exports.ExtensionRequestState || (exports.ExtensionRequestState = {})); +var ExtensionRequestUpdateType; +(function (ExtensionRequestUpdateType) { + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Created"] = 1] = "Created"; + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Approved"] = 2] = "Approved"; + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Rejected"] = 3] = "Rejected"; + ExtensionRequestUpdateType[ExtensionRequestUpdateType["Deleted"] = 4] = "Deleted"; +})(ExtensionRequestUpdateType = exports.ExtensionRequestUpdateType || (exports.ExtensionRequestUpdateType = {})); +/** + * States of an extension Note: If you add value to this enum, you need to do 2 other things. First add the back compat enum in value src\Vssf\Sdk\Server\Contributions\InstalledExtensionMessage.cs. Second, you can not send the new value on the message bus. You need to remove it from the message bus event prior to being sent. + */ +var ExtensionStateFlags; +(function (ExtensionStateFlags) { + /** + * No flags set + */ + ExtensionStateFlags[ExtensionStateFlags["None"] = 0] = "None"; + /** + * Extension is disabled + */ + ExtensionStateFlags[ExtensionStateFlags["Disabled"] = 1] = "Disabled"; + /** + * Extension is a built in + */ + ExtensionStateFlags[ExtensionStateFlags["BuiltIn"] = 2] = "BuiltIn"; + /** + * Extension has multiple versions + */ + ExtensionStateFlags[ExtensionStateFlags["MultiVersion"] = 4] = "MultiVersion"; + /** + * Extension is not installed. This is for builtin extensions only and can not otherwise be set. + */ + ExtensionStateFlags[ExtensionStateFlags["UnInstalled"] = 8] = "UnInstalled"; + /** + * Error performing version check + */ + ExtensionStateFlags[ExtensionStateFlags["VersionCheckError"] = 16] = "VersionCheckError"; + /** + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. + */ + ExtensionStateFlags[ExtensionStateFlags["Trusted"] = 32] = "Trusted"; + /** + * Extension is currently in an error state + */ + ExtensionStateFlags[ExtensionStateFlags["Error"] = 64] = "Error"; + /** + * Extension scopes have changed and the extension requires re-authorization + */ + ExtensionStateFlags[ExtensionStateFlags["NeedsReauthorization"] = 128] = "NeedsReauthorization"; + /** + * Error performing auto-upgrade. For example, if the new version has demands not supported the extension cannot be auto-upgraded. + */ + ExtensionStateFlags[ExtensionStateFlags["AutoUpgradeError"] = 256] = "AutoUpgradeError"; + /** + * Extension is currently in a warning state, that can cause a degraded experience. The degraded experience can be caused for example by some installation issues detected such as implicit demands not supported. + */ + ExtensionStateFlags[ExtensionStateFlags["Warning"] = 512] = "Warning"; +})(ExtensionStateFlags = exports.ExtensionStateFlags || (exports.ExtensionStateFlags = {})); +var ExtensionUpdateType; +(function (ExtensionUpdateType) { + ExtensionUpdateType[ExtensionUpdateType["Installed"] = 1] = "Installed"; + ExtensionUpdateType[ExtensionUpdateType["Uninstalled"] = 2] = "Uninstalled"; + ExtensionUpdateType[ExtensionUpdateType["Enabled"] = 3] = "Enabled"; + ExtensionUpdateType[ExtensionUpdateType["Disabled"] = 4] = "Disabled"; + ExtensionUpdateType[ExtensionUpdateType["VersionUpdated"] = 5] = "VersionUpdated"; + ExtensionUpdateType[ExtensionUpdateType["ActionRequired"] = 6] = "ActionRequired"; + ExtensionUpdateType[ExtensionUpdateType["ActionResolved"] = 7] = "ActionResolved"; +})(ExtensionUpdateType = exports.ExtensionUpdateType || (exports.ExtensionUpdateType = {})); +/** + * Installation issue type (Warning, Error) + */ +var InstalledExtensionStateIssueType; +(function (InstalledExtensionStateIssueType) { + /** + * Represents an installation warning, for example an implicit demand not supported + */ + InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Warning"] = 0] = "Warning"; + /** + * Represents an installation error, for example an explicit demand not supported + */ + InstalledExtensionStateIssueType[InstalledExtensionStateIssueType["Error"] = 1] = "Error"; +})(InstalledExtensionStateIssueType = exports.InstalledExtensionStateIssueType || (exports.InstalledExtensionStateIssueType = {})); +exports.TypeInfo = { + AcquisitionAssignmentType: { + enumValues: { + "none": 0, + "me": 1, + "all": 2 + } + }, + AcquisitionOperation: {}, + AcquisitionOperationState: { + enumValues: { + "disallow": 0, + "allow": 1, + "completed": 3 + } + }, + AcquisitionOperationType: { + enumValues: { + "get": 0, + "install": 1, + "buy": 2, + "try": 3, + "request": 4, + "none": 5, + "purchaseRequest": 6 + } + }, + AcquisitionOptions: {}, + ContributionLicensingBehaviorType: { + enumValues: { + "onlyIfLicensed": 0, + "onlyIfUnlicensed": 1, + "alwaysInclude": 2 + } + }, + ContributionNodeQuery: {}, + ContributionPropertyDescription: {}, + ContributionPropertyType: { + enumValues: { + "unknown": 0, + "string": 1, + "uri": 2, + "guid": 4, + "boolean": 8, + "integer": 16, + "double": 32, + "dateTime": 64, + "dictionary": 128, + "array": 256, + "object": 512 + } + }, + ContributionQueryOptions: { + enumValues: { + "none": 0, + "includeSelf": 16, + "includeChildren": 32, + "includeSubTree": 96, + "includeAll": 112, + "ignoreConstraints": 256 + } + }, + ContributionType: {}, + ExtensionAcquisitionRequest: {}, + ExtensionAuditLog: {}, + ExtensionAuditLogEntry: {}, + ExtensionEvent: {}, + ExtensionFlags: { + enumValues: { + "builtIn": 1, + "trusted": 2 + } + }, + ExtensionLicensing: {}, + ExtensionManifest: {}, + ExtensionRequest: {}, + ExtensionRequestEvent: {}, + ExtensionRequestsEvent: {}, + ExtensionRequestState: { + enumValues: { + "open": 0, + "accepted": 1, + "rejected": 2 + } + }, + ExtensionRequestUpdateType: { + enumValues: { + "created": 1, + "approved": 2, + "rejected": 3, + "deleted": 4 + } + }, + ExtensionState: {}, + ExtensionStateFlags: { + enumValues: { + "none": 0, + "disabled": 1, + "builtIn": 2, + "multiVersion": 4, + "unInstalled": 8, + "versionCheckError": 16, + "trusted": 32, + "error": 64, + "needsReauthorization": 128, + "autoUpgradeError": 256, + "warning": 512 + } + }, + ExtensionUpdateType: { + enumValues: { + "installed": 1, + "uninstalled": 2, + "enabled": 3, + "disabled": 4, + "versionUpdated": 5, + "actionRequired": 6, + "actionResolved": 7 + } + }, + InstalledExtension: {}, + InstalledExtensionState: {}, + InstalledExtensionStateIssue: {}, + InstalledExtensionStateIssueType: { + enumValues: { + "warning": 0, + "error": 1 + } + }, + LicensingOverride: {}, + RequestedExtension: {}, +}; +exports.TypeInfo.AcquisitionOperation.fields = { + operationState: { + enumType: exports.TypeInfo.AcquisitionOperationState + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.AcquisitionOptions.fields = { + defaultOperation: { + typeInfo: exports.TypeInfo.AcquisitionOperation + }, + operations: { + isArray: true, + typeInfo: exports.TypeInfo.AcquisitionOperation + } +}; +exports.TypeInfo.ContributionNodeQuery.fields = { + queryOptions: { + enumType: exports.TypeInfo.ContributionQueryOptions + } +}; +exports.TypeInfo.ContributionPropertyDescription.fields = { + type: { + enumType: exports.TypeInfo.ContributionPropertyType + } +}; +exports.TypeInfo.ContributionType.fields = { + properties: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.ContributionPropertyDescription + } +}; +exports.TypeInfo.ExtensionAcquisitionRequest.fields = { + assignmentType: { + enumType: exports.TypeInfo.AcquisitionAssignmentType + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.ExtensionAuditLog.fields = { + entries: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionAuditLogEntry + } +}; +exports.TypeInfo.ExtensionAuditLogEntry.fields = { + auditDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionEvent.fields = { + extension: { + typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension + }, + updateType: { + enumType: exports.TypeInfo.ExtensionUpdateType + } +}; +exports.TypeInfo.ExtensionLicensing.fields = { + overrides: { + isArray: true, + typeInfo: exports.TypeInfo.LicensingOverride + } +}; +exports.TypeInfo.ExtensionManifest.fields = { + contributionTypes: { + isArray: true, + typeInfo: exports.TypeInfo.ContributionType + }, + licensing: { + typeInfo: exports.TypeInfo.ExtensionLicensing + } +}; +exports.TypeInfo.ExtensionRequest.fields = { + requestDate: { + isDate: true, + }, + requestState: { + enumType: exports.TypeInfo.ExtensionRequestState + }, + resolveDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionRequestEvent.fields = { + extension: { + typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension + }, + request: { + typeInfo: exports.TypeInfo.ExtensionRequest + }, + updateType: { + enumType: exports.TypeInfo.ExtensionRequestUpdateType + } +}; +exports.TypeInfo.ExtensionRequestsEvent.fields = { + extension: { + typeInfo: GalleryInterfaces.TypeInfo.PublishedExtension + }, + requests: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionRequest + }, + updateType: { + enumType: exports.TypeInfo.ExtensionRequestUpdateType + } +}; +exports.TypeInfo.ExtensionState.fields = { + flags: { + enumType: exports.TypeInfo.ExtensionStateFlags + }, + installationIssues: { + isArray: true, + typeInfo: exports.TypeInfo.InstalledExtensionStateIssue + }, + lastUpdated: { + isDate: true, + }, + lastVersionCheck: { + isDate: true, + } +}; +exports.TypeInfo.InstalledExtension.fields = { + contributionTypes: { + isArray: true, + typeInfo: exports.TypeInfo.ContributionType + }, + flags: { + enumType: exports.TypeInfo.ExtensionFlags + }, + installState: { + typeInfo: exports.TypeInfo.InstalledExtensionState + }, + lastPublished: { + isDate: true, + }, + licensing: { + typeInfo: exports.TypeInfo.ExtensionLicensing + } +}; +exports.TypeInfo.InstalledExtensionState.fields = { + flags: { + enumType: exports.TypeInfo.ExtensionStateFlags + }, + installationIssues: { + isArray: true, + typeInfo: exports.TypeInfo.InstalledExtensionStateIssue + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.InstalledExtensionStateIssue.fields = { + type: { + enumType: exports.TypeInfo.InstalledExtensionStateIssueType + } +}; +exports.TypeInfo.LicensingOverride.fields = { + behavior: { + enumType: exports.TypeInfo.ContributionLicensingBehaviorType + } +}; +exports.TypeInfo.RequestedExtension.fields = { + extensionRequests: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionRequest + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.d.ts new file mode 100644 index 0000000..9e3ad2d --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.d.ts @@ -0,0 +1,172 @@ +/** + * A feature that can be enabled or disabled + */ +export interface ContributedFeature { + /** + * Named links describing the feature + */ + _links?: any; + /** + * If true, the feature is enabled unless overridden at some scope + */ + defaultState?: boolean; + /** + * Rules for setting the default value if not specified by any setting/scope. Evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) + */ + defaultValueRules?: ContributedFeatureValueRule[]; + /** + * The description of the feature + */ + description?: string; + /** + * Extra properties for the feature + */ + featureProperties?: { + [key: string]: any; + }; + /** + * Handler for listening to setter calls on feature value. These listeners are only invoked after a successful set has occurred + */ + featureStateChangedListeners?: ContributedFeatureListener[]; + /** + * The full contribution id of the feature + */ + id?: string; + /** + * If this is set to true, then the id for this feature will be added to the list of claims for the request. + */ + includeAsClaim?: boolean; + /** + * The friendly name of the feature + */ + name?: string; + /** + * Suggested order to display feature in. + */ + order?: number; + /** + * Rules for overriding a feature value. These rules are run before explicit user/host state values are checked. They are evaluated in order until a rule returns an Enabled or Disabled state (not Undefined) + */ + overrideRules?: ContributedFeatureValueRule[]; + /** + * The scopes/levels at which settings can set the enabled/disabled state of this feature + */ + scopes?: ContributedFeatureSettingScope[]; + /** + * The service instance id of the service that owns this feature + */ + serviceInstanceType?: string; + /** + * Tags associated with the feature. + */ + tags?: string[]; +} +/** + * The current state of a feature within a given scope + */ +export declare enum ContributedFeatureEnabledValue { + /** + * The state of the feature is not set for the specified scope + */ + Undefined = -1, + /** + * The feature is disabled at the specified scope + */ + Disabled = 0, + /** + * The feature is enabled at the specified scope + */ + Enabled = 1 +} +export interface ContributedFeatureHandlerSettings { + /** + * Name of the handler to run + */ + name?: string; + /** + * Properties to feed to the handler + */ + properties?: { + [key: string]: any; + }; +} +/** + * An identifier and properties used to pass into a handler for a listener or plugin + */ +export interface ContributedFeatureListener extends ContributedFeatureHandlerSettings { +} +/** + * The scope to which a feature setting applies + */ +export interface ContributedFeatureSettingScope { + /** + * The name of the settings scope to use when reading/writing the setting + */ + settingScope?: string; + /** + * Whether this is a user-scope or this is a host-wide (all users) setting + */ + userScoped?: boolean; +} +/** + * A contributed feature/state pair + */ +export interface ContributedFeatureState { + /** + * The full contribution id of the feature + */ + featureId?: string; + /** + * True if the effective state was set by an override rule (indicating that the state cannot be managed by the end user) + */ + overridden?: boolean; + /** + * Reason that the state was set (by a plugin/rule). + */ + reason?: string; + /** + * The scope at which this state applies + */ + scope?: ContributedFeatureSettingScope; + /** + * The current state of this feature + */ + state?: ContributedFeatureEnabledValue; +} +/** + * A query for the effective contributed feature states for a list of feature ids + */ +export interface ContributedFeatureStateQuery { + /** + * The list of feature ids to query + */ + featureIds?: string[]; + /** + * The query result containing the current feature states for each of the queried feature ids + */ + featureStates?: { + [key: string]: ContributedFeatureState; + }; + /** + * A dictionary of scope values (project name, etc.) to use in the query (if querying across scopes) + */ + scopeValues?: { + [key: string]: string; + }; +} +/** + * A rule for dynamically getting the enabled/disabled state of a feature + */ +export interface ContributedFeatureValueRule extends ContributedFeatureHandlerSettings { +} +export declare var TypeInfo: { + ContributedFeatureEnabledValue: { + enumValues: { + "undefined": number; + "disabled": number; + "enabled": number; + }; + }; + ContributedFeatureState: any; + ContributedFeatureStateQuery: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.js b/node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.js new file mode 100644 index 0000000..22aa1c1 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/FeatureManagementInterfaces.js @@ -0,0 +1,51 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * The current state of a feature within a given scope + */ +var ContributedFeatureEnabledValue; +(function (ContributedFeatureEnabledValue) { + /** + * The state of the feature is not set for the specified scope + */ + ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Undefined"] = -1] = "Undefined"; + /** + * The feature is disabled at the specified scope + */ + ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Disabled"] = 0] = "Disabled"; + /** + * The feature is enabled at the specified scope + */ + ContributedFeatureEnabledValue[ContributedFeatureEnabledValue["Enabled"] = 1] = "Enabled"; +})(ContributedFeatureEnabledValue = exports.ContributedFeatureEnabledValue || (exports.ContributedFeatureEnabledValue = {})); +exports.TypeInfo = { + ContributedFeatureEnabledValue: { + enumValues: { + "undefined": -1, + "disabled": 0, + "enabled": 1 + } + }, + ContributedFeatureState: {}, + ContributedFeatureStateQuery: {}, +}; +exports.TypeInfo.ContributedFeatureState.fields = { + state: { + enumType: exports.TypeInfo.ContributedFeatureEnabledValue + } +}; +exports.TypeInfo.ContributedFeatureStateQuery.fields = { + featureStates: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.ContributedFeatureState + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.d.ts new file mode 100644 index 0000000..2cd03f4 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.d.ts @@ -0,0 +1,222 @@ +/** + * Compression type for file stored in Blobstore + */ +export declare enum BlobCompressionType { + None = 0, + GZip = 1 +} +/** + * Represents an reference to a file in Blobstore + */ +export interface ContainerItemBlobReference { + artifactHash?: string; + artifactId?: number; + compressionType?: BlobCompressionType; + scopeIdentifier?: string; + sessionId?: string; +} +/** + * Status of a container item. + */ +export declare enum ContainerItemStatus { + /** + * Item is created. + */ + Created = 1, + /** + * Item is a file pending for upload. + */ + PendingUpload = 2 +} +/** + * Type of a container item. + */ +export declare enum ContainerItemType { + /** + * Any item type. + */ + Any = 0, + /** + * Item is a folder which can have child items. + */ + Folder = 1, + /** + * Item is a file which is stored in the file service. + */ + File = 2 +} +/** + * Options a container can have. + */ +export declare enum ContainerOptions { + /** + * No option. + */ + None = 0 +} +/** + * Represents a container that encapsulates a hierarchical file system. + */ +export interface FileContainer { + /** + * Uri of the artifact associated with the container. + */ + artifactUri: string; + /** + * Download Url for the content of this item. + */ + contentLocation?: string; + /** + * Owner. + */ + createdBy?: string; + /** + * Creation date. + */ + dateCreated?: Date; + /** + * Description. + */ + description?: string; + /** + * Id. + */ + id: number; + /** + * Location of the item resource. + */ + itemLocation?: string; + /** + * ItemStore Locator for this container. + */ + locatorPath?: string; + /** + * Name. + */ + name?: string; + /** + * Options the container can have. + */ + options?: ContainerOptions; + /** + * Project Id. + */ + scopeIdentifier?: string; + /** + * Security token of the artifact associated with the container. + */ + securityToken?: string; + /** + * Identifier of the optional encryption key. + */ + signingKeyId?: string; + /** + * Total size of the files in bytes. + */ + size?: number; +} +/** + * Represents an item in a container. + */ +export interface FileContainerItem { + /** + * Id for Blobstore reference + */ + artifactId?: number; + blobMetadata?: ContainerItemBlobReference; + /** + * Container Id. + */ + containerId: number; + contentId?: number[]; + /** + * Download Url for the content of this item. + */ + contentLocation?: string; + /** + * Creator. + */ + createdBy?: string; + /** + * Creation date. + */ + dateCreated?: Date; + /** + * Last modified date. + */ + dateLastModified?: Date; + /** + * Encoding of the file. Zero if not a file. + */ + fileEncoding?: number; + /** + * Hash value of the file. Null if not a file. + */ + fileHash?: number[]; + /** + * Id of the file content. + */ + fileId?: number; + /** + * Length of the file. Zero if not of a file. + */ + fileLength?: number; + /** + * Type of the file. Zero if not a file. + */ + fileType?: number; + /** + * Location of the item resource. + */ + itemLocation?: string; + /** + * Type of the item: Folder, File or String. + */ + itemType: ContainerItemType; + /** + * Modifier. + */ + lastModifiedBy?: string; + /** + * Unique path that identifies the item. + */ + path: string; + /** + * Project Id. + */ + scopeIdentifier?: string; + /** + * Status of the item: Created or Pending Upload. + */ + status: ContainerItemStatus; + ticket?: string; +} +export declare var TypeInfo: { + BlobCompressionType: { + enumValues: { + "none": number; + "gZip": number; + }; + }; + ContainerItemBlobReference: any; + ContainerItemStatus: { + enumValues: { + "created": number; + "pendingUpload": number; + }; + }; + ContainerItemType: { + enumValues: { + "any": number; + "folder": number; + "file": number; + }; + }; + ContainerOptions: { + enumValues: { + "none": number; + }; + }; + FileContainer: any; + FileContainerItem: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.js b/node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.js new file mode 100644 index 0000000..46e41c5 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/FileContainerInterfaces.js @@ -0,0 +1,120 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Compression type for file stored in Blobstore + */ +var BlobCompressionType; +(function (BlobCompressionType) { + BlobCompressionType[BlobCompressionType["None"] = 0] = "None"; + BlobCompressionType[BlobCompressionType["GZip"] = 1] = "GZip"; +})(BlobCompressionType = exports.BlobCompressionType || (exports.BlobCompressionType = {})); +/** + * Status of a container item. + */ +var ContainerItemStatus; +(function (ContainerItemStatus) { + /** + * Item is created. + */ + ContainerItemStatus[ContainerItemStatus["Created"] = 1] = "Created"; + /** + * Item is a file pending for upload. + */ + ContainerItemStatus[ContainerItemStatus["PendingUpload"] = 2] = "PendingUpload"; +})(ContainerItemStatus = exports.ContainerItemStatus || (exports.ContainerItemStatus = {})); +/** + * Type of a container item. + */ +var ContainerItemType; +(function (ContainerItemType) { + /** + * Any item type. + */ + ContainerItemType[ContainerItemType["Any"] = 0] = "Any"; + /** + * Item is a folder which can have child items. + */ + ContainerItemType[ContainerItemType["Folder"] = 1] = "Folder"; + /** + * Item is a file which is stored in the file service. + */ + ContainerItemType[ContainerItemType["File"] = 2] = "File"; +})(ContainerItemType = exports.ContainerItemType || (exports.ContainerItemType = {})); +/** + * Options a container can have. + */ +var ContainerOptions; +(function (ContainerOptions) { + /** + * No option. + */ + ContainerOptions[ContainerOptions["None"] = 0] = "None"; +})(ContainerOptions = exports.ContainerOptions || (exports.ContainerOptions = {})); +exports.TypeInfo = { + BlobCompressionType: { + enumValues: { + "none": 0, + "gZip": 1 + } + }, + ContainerItemBlobReference: {}, + ContainerItemStatus: { + enumValues: { + "created": 1, + "pendingUpload": 2 + } + }, + ContainerItemType: { + enumValues: { + "any": 0, + "folder": 1, + "file": 2 + } + }, + ContainerOptions: { + enumValues: { + "none": 0 + } + }, + FileContainer: {}, + FileContainerItem: {}, +}; +exports.TypeInfo.ContainerItemBlobReference.fields = { + compressionType: { + enumType: exports.TypeInfo.BlobCompressionType + } +}; +exports.TypeInfo.FileContainer.fields = { + dateCreated: { + isDate: true, + }, + options: { + enumType: exports.TypeInfo.ContainerOptions + } +}; +exports.TypeInfo.FileContainerItem.fields = { + blobMetadata: { + typeInfo: exports.TypeInfo.ContainerItemBlobReference + }, + dateCreated: { + isDate: true, + }, + dateLastModified: { + isDate: true, + }, + itemType: { + enumType: exports.TypeInfo.ContainerItemType + }, + status: { + enumType: exports.TypeInfo.ContainerItemStatus + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.d.ts new file mode 100644 index 0000000..d22b1ce --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.d.ts @@ -0,0 +1,2220 @@ +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +/** + * How the acquisition is assigned + */ +export declare enum AcquisitionAssignmentType { + None = 0, + /** + * Just assign for me + */ + Me = 1, + /** + * Assign for all users in the account + */ + All = 2 +} +export interface AcquisitionOperation { + /** + * State of the the AcquisitionOperation for the current user + */ + operationState?: AcquisitionOperationState; + /** + * AcquisitionOperationType: install, request, buy, etc... + */ + operationType?: AcquisitionOperationType; + /** + * Optional reason to justify current state. Typically used with Disallow state. + */ + reason?: string; +} +export declare enum AcquisitionOperationState { + /** + * Not allowed to use this AcquisitionOperation + */ + Disallow = 0, + /** + * Allowed to use this AcquisitionOperation + */ + Allow = 1, + /** + * Operation has already been completed and is no longer available + */ + Completed = 3 +} +/** + * Set of different types of operations that can be requested. + */ +export declare enum AcquisitionOperationType { + /** + * Not yet used + */ + Get = 0, + /** + * Install this extension into the host provided + */ + Install = 1, + /** + * Buy licenses for this extension and install into the host provided + */ + Buy = 2, + /** + * Try this extension + */ + Try = 3, + /** + * Request this extension for installation + */ + Request = 4, + /** + * No action found + */ + None = 5, + /** + * Request admins for purchasing extension + */ + PurchaseRequest = 6 +} +/** + * Market item acquisition options (install, buy, etc) for an installation target. + */ +export interface AcquisitionOptions { + /** + * Default Operation for the ItemId in this target + */ + defaultOperation?: AcquisitionOperation; + /** + * The item id that this options refer to + */ + itemId?: string; + /** + * Operations allowed for the ItemId in this target + */ + operations?: AcquisitionOperation[]; + /** + * The target that this options refer to + */ + target?: string; +} +export interface Answers { + /** + * Gets or sets the vs marketplace extension name + */ + vSMarketplaceExtensionName?: string; + /** + * Gets or sets the vs marketplace publisher name + */ + vSMarketplacePublisherName?: string; +} +export interface AssetDetails { + /** + * Gets or sets the Answers, which contains vs marketplace extension name and publisher name + */ + answers?: Answers; + /** + * Gets or sets the VS publisher Id + */ + publisherNaturalIdentifier?: string; +} +export interface AzurePublisher { + azurePublisherId?: string; + publisherName?: string; +} +export interface AzureRestApiRequestModel { + /** + * Gets or sets the Asset details + */ + assetDetails?: AssetDetails; + /** + * Gets or sets the asset id + */ + assetId?: string; + /** + * Gets or sets the asset version + */ + assetVersion?: number; + /** + * Gets or sets the customer support email + */ + customerSupportEmail?: string; + /** + * Gets or sets the integration contact email + */ + integrationContactEmail?: string; + /** + * Gets or sets the asset version + */ + operation?: string; + /** + * Gets or sets the plan identifier if any. + */ + planId?: string; + /** + * Gets or sets the publisher id + */ + publisherId?: string; + /** + * Gets or sets the resource type + */ + type?: string; +} +export interface AzureRestApiResponseModel extends AzureRestApiRequestModel { + /** + * Gets or sets the Asset operation status + */ + operationStatus?: RestApiResponseStatusModel; +} +/** + * This is the set of categories in response to the get category query + */ +export interface CategoriesResult { + categories?: ExtensionCategory[]; +} +/** + * Definition of one title of a category + */ +export interface CategoryLanguageTitle { + /** + * The language for which the title is applicable + */ + lang?: string; + /** + * The language culture id of the lang parameter + */ + lcid?: number; + /** + * Actual title to be shown on the UI + */ + title?: string; +} +/** + * The structure of a Concern Rather than defining a separate data structure having same fields as QnAItem, we are inheriting from the QnAItem. + */ +export interface Concern extends QnAItem { + /** + * Category of the concern + */ + category?: ConcernCategory; +} +export declare enum ConcernCategory { + General = 1, + Abusive = 2, + Spam = 4 +} +/** + * Stores Last Contact Date + */ +export interface CustomerLastContact { + /** + * account for which customer was last contacted + */ + account?: string; + /** + * Date on which the customer was last contacted + */ + lastContactDate?: Date; +} +/** + * An entity representing the data required to create a Customer Support Request. + */ +export interface CustomerSupportRequest { + /** + * Display name of extension in concern + */ + displayName?: string; + /** + * Email of user making the support request + */ + emailId?: string; + /** + * Extension name + */ + extensionName?: string; + /** + * Link to the extension details page + */ + extensionURL?: string; + /** + * User-provided support request message. + */ + message?: string; + /** + * Publisher name + */ + publisherName?: string; + /** + * Reason for support request + */ + reason?: string; + reCaptchaToken?: string; + /** + * VSID of the user making the support request + */ + reporterVSID?: string; + /** + * Review under concern + */ + review?: Review; + /** + * The UI source through which the request was made + */ + sourceLink?: string; +} +export declare enum DraftPatchOperation { + Publish = 1, + Cancel = 2 +} +export declare enum DraftStateType { + Unpublished = 1, + Published = 2, + Cancelled = 3, + Error = 4 +} +export interface EventCounts { + /** + * Average rating on the day for extension + */ + averageRating?: number; + /** + * Number of times the extension was bought in hosted scenario (applies only to VSTS extensions) + */ + buyCount?: number; + /** + * Number of times the extension was bought in connected scenario (applies only to VSTS extensions) + */ + connectedBuyCount?: number; + /** + * Number of times the extension was installed in connected scenario (applies only to VSTS extensions) + */ + connectedInstallCount?: number; + /** + * Number of times the extension was installed + */ + installCount?: number; + /** + * Number of times the extension was installed as a trial (applies only to VSTS extensions) + */ + tryCount?: number; + /** + * Number of times the extension was uninstalled (applies only to VSTS extensions) + */ + uninstallCount?: number; + /** + * Number of times the extension was downloaded (applies to VSTS extensions and VSCode marketplace click installs) + */ + webDownloadCount?: number; + /** + * Number of detail page views + */ + webPageViews?: number; +} +/** + * Contract for handling the extension acquisition process + */ +export interface ExtensionAcquisitionRequest { + /** + * How the item is being assigned + */ + assignmentType?: AcquisitionAssignmentType; + /** + * The id of the subscription used for purchase + */ + billingId?: string; + /** + * The marketplace id (publisherName.extensionName) for the item + */ + itemId?: string; + /** + * The type of operation, such as install, request, purchase + */ + operationType?: AcquisitionOperationType; + /** + * Additional properties which can be added to the request. + */ + properties?: any; + /** + * How many licenses should be purchased + */ + quantity?: number; + /** + * A list of target guids where the item should be acquired (installed, requested, etc.), such as account id + */ + targets?: string[]; +} +export interface ExtensionBadge { + description?: string; + imgUri?: string; + link?: string; +} +export interface ExtensionCategory { + /** + * The name of the products with which this category is associated to. + */ + associatedProducts?: string[]; + categoryId?: number; + /** + * This is the internal name for a category + */ + categoryName?: string; + /** + * This parameter is obsolete. Refer to LanguageTitles for language specific titles + */ + language?: string; + /** + * The list of all the titles of this category in various languages + */ + languageTitles?: CategoryLanguageTitle[]; + /** + * This is the internal name of the parent if this is associated with a parent + */ + parentCategoryName?: string; +} +export interface ExtensionDailyStat { + /** + * Stores the event counts + */ + counts?: EventCounts; + /** + * Generic key/value pair to store extended statistics. Used for sending paid extension stats like Upgrade, Downgrade, Cancel trend etc. + */ + extendedStats?: { + [key: string]: any; + }; + /** + * Timestamp of this data point + */ + statisticDate?: Date; + /** + * Version of the extension + */ + version?: string; +} +export interface ExtensionDailyStats { + /** + * List of extension statistics data points + */ + dailyStats?: ExtensionDailyStat[]; + /** + * Id of the extension, this will never be sent back to the client. For internal use only. + */ + extensionId?: string; + /** + * Name of the extension + */ + extensionName?: string; + /** + * Name of the publisher + */ + publisherName?: string; + /** + * Count of stats + */ + statCount?: number; +} +export declare enum ExtensionDeploymentTechnology { + Exe = 1, + Msi = 2, + Vsix = 3, + ReferralLink = 4 +} +export interface ExtensionDraft { + assets?: ExtensionDraftAsset[]; + createdDate?: Date; + draftState?: DraftStateType; + extensionName?: string; + id?: string; + lastUpdated?: Date; + payload?: ExtensionPayload; + product?: string; + publisherName?: string; + validationErrors?: { + key: string; + value: string; + }[]; + validationWarnings?: { + key: string; + value: string; + }[]; +} +export interface ExtensionDraftAsset extends ExtensionFile { +} +export interface ExtensionDraftPatch { + extensionData?: UnpackagedExtensionData; + operation?: DraftPatchOperation; + reCaptchaToken?: string; +} +/** + * Stores details of each event + */ +export interface ExtensionEvent { + /** + * Id which identifies each data point uniquely + */ + id?: number; + properties?: any; + /** + * Timestamp of when the event occurred + */ + statisticDate?: Date; + /** + * Version of the extension + */ + version?: string; +} +/** + * Container object for all extension events. Stores all install and uninstall events related to an extension. The events container is generic so can store data of any type of event. New event types can be added without altering the contract. + */ +export interface ExtensionEvents { + /** + * Generic container for events data. The dictionary key denotes the type of event and the list contains properties related to that event + */ + events?: { + [key: string]: ExtensionEvent[]; + }; + /** + * Id of the extension, this will never be sent back to the client. This field will mainly be used when EMS calls into Gallery REST API to update install/uninstall events for various extensions in one go. + */ + extensionId?: string; + /** + * Name of the extension + */ + extensionName?: string; + /** + * Name of the publisher + */ + publisherName?: string; +} +export interface ExtensionFile { + assetType?: string; + language?: string; + source?: string; +} +/** + * The FilterResult is the set of extensions that matched a particular query filter. + */ +export interface ExtensionFilterResult { + /** + * This is the set of applications that matched the query filter supplied. + */ + extensions?: PublishedExtension[]; + /** + * The PagingToken is returned from a request when more records exist that match the result than were requested or could be returned. A follow-up query with this paging token can be used to retrieve more results. + */ + pagingToken?: string; + /** + * This is the additional optional metadata for the given result. E.g. Total count of results which is useful in case of paged results + */ + resultMetadata?: ExtensionFilterResultMetadata[]; +} +/** + * ExtensionFilterResultMetadata is one set of metadata for the result e.g. Total count. There can be multiple metadata items for one metadata. + */ +export interface ExtensionFilterResultMetadata { + /** + * The metadata items for the category + */ + metadataItems?: MetadataItem[]; + /** + * Defines the category of metadata items + */ + metadataType?: string; +} +/** + * Represents the component pieces of an extensions fully qualified name, along with the fully qualified name. + */ +export interface ExtensionIdentifier { + /** + * The ExtensionName component part of the fully qualified ExtensionIdentifier + */ + extensionName?: string; + /** + * The PublisherName component part of the fully qualified ExtensionIdentifier + */ + publisherName?: string; +} +/** + * Type of event + */ +export declare enum ExtensionLifecycleEventType { + Uninstall = 1, + Install = 2, + Review = 3, + Acquisition = 4, + Sales = 5, + Other = 999 +} +/** + * Package that will be used to create or update a published extension + */ +export interface ExtensionPackage { + /** + * Base 64 encoded extension package + */ + extensionManifest?: string; +} +export interface ExtensionPayload { + description?: string; + displayName?: string; + fileName?: string; + installationTargets?: InstallationTarget[]; + isPreview?: boolean; + isSignedByMicrosoft?: boolean; + isValid?: boolean; + metadata?: { + key: string; + value: string; + }[]; + type?: ExtensionDeploymentTechnology; +} +/** + * Policy with a set of permissions on extension operations + */ +export interface ExtensionPolicy { + /** + * Permissions on 'Install' operation + */ + install?: ExtensionPolicyFlags; + /** + * Permission on 'Request' operation + */ + request?: ExtensionPolicyFlags; +} +/** + * Set of flags that can be associated with a given permission over an extension + */ +export declare enum ExtensionPolicyFlags { + /** + * No permission + */ + None = 0, + /** + * Permission on private extensions + */ + Private = 1, + /** + * Permission on public extensions + */ + Public = 2, + /** + * Permission in extensions that are in preview + */ + Preview = 4, + /** + * Permission in released extensions + */ + Released = 8, + /** + * Permission in 1st party extensions + */ + FirstParty = 16, + /** + * Mask that defines all permissions + */ + All = 31 +} +/** + * An ExtensionQuery is used to search the gallery for a set of extensions that match one of many filter values. + */ +export interface ExtensionQuery { + /** + * When retrieving extensions with a query; frequently the caller only needs a small subset of the assets. The caller may specify a list of asset types that should be returned if the extension contains it. All other assets will not be returned. + */ + assetTypes?: string[]; + /** + * Each filter is a unique query and will have matching set of extensions returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + */ + filters?: QueryFilter[]; + /** + * The Flags are used to determine which set of information the caller would like returned for the matched extensions. + */ + flags?: ExtensionQueryFlags; +} +/** + * Type of extension filters that are supported in the queries. + */ +export declare enum ExtensionQueryFilterType { + /** + * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. + */ + Tag = 1, + /** + * The Values are an ExtensionName or fragment that is used to match other extension names. + */ + DisplayName = 2, + /** + * The Filter is one or more tokens that define what scope to return private extensions for. + */ + Private = 3, + /** + * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. + */ + Id = 4, + /** + * The category is unlike other filters. It is AND'd with the other filters instead of being a separate query. + */ + Category = 5, + /** + * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. + */ + ContributionType = 6, + /** + * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). + */ + Name = 7, + /** + * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode + */ + InstallationTarget = 8, + /** + * Query for featured extensions, no value is allowed when using the query type. + */ + Featured = 9, + /** + * The SearchText provided by the user to search for extensions + */ + SearchText = 10, + /** + * Query for extensions that are featured in their own category, The filterValue for this is name of category of extensions. + */ + FeaturedInCategory = 11, + /** + * When retrieving extensions from a query, exclude the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be excluded. In case of multiple flags to be specified, a logical OR of the interger values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. + */ + ExcludeWithFlags = 12, + /** + * When retrieving extensions from a query, include the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. + */ + IncludeWithFlags = 13, + /** + * Filter the extensions based on the LCID values applicable. Any extensions which are not having any LCID values will also be filtered. This is currently only supported for VS extensions. + */ + Lcid = 14, + /** + * Filter to provide the version of the installation target. This filter will be used along with InstallationTarget filter. The value should be a valid version string. Currently supported only if search text is provided. + */ + InstallationTargetVersion = 15, + /** + * Filter type for specifying a range of installation target version. The filter will be used along with InstallationTarget filter. The value should be a pair of well formed version values separated by hyphen(-). Currently supported only if search text is provided. + */ + InstallationTargetVersionRange = 16, + /** + * Filter type for specifying metadata key and value to be used for filtering. + */ + VsixMetadata = 17, + /** + * Filter to get extensions published by a publisher having supplied internal name + */ + PublisherName = 18, + /** + * Filter to get extensions published by all publishers having supplied display name + */ + PublisherDisplayName = 19, + /** + * When retrieving extensions from a query, include the extensions which have a publisher having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter There should be at most one filter of this type. This only acts as a restrictive filter after. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. + */ + IncludeWithPublisherFlags = 20, + /** + * Filter to get extensions shared with particular organization + */ + OrganizationSharedWith = 21, + /** + * Filter to get VS IDE extensions by Product Architecture + */ + ProductArchitecture = 22, + /** + * Filter to get VS Code extensions by target platform. + */ + TargetPlatform = 23 +} +/** + * Set of flags used to determine which set of information is retrieved when reading published extensions + */ +export declare enum ExtensionQueryFlags { + /** + * None is used to retrieve only the basic extension details. + */ + None = 0, + /** + * IncludeVersions will return version information for extensions returned + */ + IncludeVersions = 1, + /** + * IncludeFiles will return information about which files were found within the extension that were stored independent of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. + */ + IncludeFiles = 2, + /** + * Include the Categories and Tags that were added to the extension definition. + */ + IncludeCategoryAndTags = 4, + /** + * Include the details about which accounts the extension has been shared with if the extension is a private extension. + */ + IncludeSharedAccounts = 8, + /** + * Include properties associated with versions of the extension + */ + IncludeVersionProperties = 16, + /** + * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. + */ + ExcludeNonValidated = 32, + /** + * Include the set of installation targets the extension has requested. + */ + IncludeInstallationTargets = 64, + /** + * Include the base uri for assets of this extension + */ + IncludeAssetUri = 128, + /** + * Include the statistics associated with this extension + */ + IncludeStatistics = 256, + /** + * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. + */ + IncludeLatestVersionOnly = 512, + /** + * This flag switches the asset uri to use GetAssetByName instead of CDN When this is used, values of base asset uri and base asset uri fallback are switched When this is used, source of asset files are pointed to Gallery service always even if CDN is available + */ + UseFallbackAssetUri = 1024, + /** + * This flag is used to get all the metadata values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal. + */ + IncludeMetadata = 2048, + /** + * This flag is used to indicate to return very small data for extension required by VS IDE. This flag is only compatible when querying is done by VS IDE + */ + IncludeMinimalPayloadForVsIde = 4096, + /** + * This flag is used to get Lcid values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal + */ + IncludeLcids = 8192, + /** + * Include the details about which organizations the extension has been shared with if the extension is a private extension. + */ + IncludeSharedOrganizations = 16384, + /** + * Include the details if an extension is in conflict list or not Currently being used for VSCode extensions. + */ + IncludeNameConflictInfo = 32768, + /** + * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. + */ + AllAttributes = 16863 +} +/** + * This is the set of extensions that matched a supplied query through the filters given. + */ +export interface ExtensionQueryResult { + /** + * For each filter supplied in the query, a filter result will be returned in the query result. + */ + results?: ExtensionFilterResult[]; +} +export interface ExtensionShare { + id?: string; + isOrg?: boolean; + name?: string; + type?: string; +} +export interface ExtensionStatistic { + statisticName?: string; + value?: number; +} +export declare enum ExtensionStatisticOperation { + None = 0, + Set = 1, + Increment = 2, + Decrement = 3, + Delete = 4 +} +export interface ExtensionStatisticUpdate { + extensionName?: string; + operation?: ExtensionStatisticOperation; + publisherName?: string; + statistic?: ExtensionStatistic; +} +/** + * Stats aggregation type + */ +export declare enum ExtensionStatsAggregateType { + Daily = 1 +} +export interface ExtensionVersion { + assetUri?: string; + badges?: ExtensionBadge[]; + fallbackAssetUri?: string; + files?: ExtensionFile[]; + flags?: ExtensionVersionFlags; + lastUpdated?: Date; + properties?: { + key: string; + value: string; + }[]; + targetPlatform?: string; + validationResultMessage?: string; + version?: string; + versionDescription?: string; +} +/** + * Set of flags that can be associated with a given extension version. These flags apply to a specific version of the extension. + */ +export declare enum ExtensionVersionFlags { + /** + * No flags exist for this version. + */ + None = 0, + /** + * The Validated flag for a version means the extension version has passed validation and can be used.. + */ + Validated = 1 +} +/** + * One condition in a QueryFilter. + */ +export interface FilterCriteria { + filterType?: number; + /** + * The value used in the match based on the filter type. + */ + value?: string; +} +export interface InstallationTarget { + extensionVersion?: string; + productArchitecture?: string; + target?: string; + targetPlatform?: string; + targetVersion?: string; +} +/** + * MetadataItem is one value of metadata under a given category of metadata + */ +export interface MetadataItem { + /** + * The count of the metadata item + */ + count?: number; + /** + * The name of the metadata item + */ + name?: string; +} +/** + * Information needed for sending mail notification + */ +export interface NotificationsData { + /** + * Notification data needed + */ + data?: { + [key: string]: any; + }; + /** + * List of users who should get the notification + */ + identities?: { + [key: string]: any; + }; + /** + * Type of Mail Notification.Can be Qna , review or CustomerContact + */ + type?: NotificationTemplateType; +} +/** + * Type of event + */ +export declare enum NotificationTemplateType { + /** + * Template type for Review Notification. + */ + ReviewNotification = 1, + /** + * Template type for Qna Notification. + */ + QnaNotification = 2, + /** + * Template type for Customer Contact Notification. + */ + CustomerContactNotification = 3, + /** + * Template type for Publisher Member Notification. + */ + PublisherMemberUpdateNotification = 4 +} +/** + * PagingDirection is used to define which set direction to move the returned result set based on a previous query. + */ +export declare enum PagingDirection { + /** + * Backward will return results from earlier in the resultset. + */ + Backward = 1, + /** + * Forward will return results from later in the resultset. + */ + Forward = 2 +} +/** + * This is the set of categories in response to the get category query + */ +export interface ProductCategoriesResult { + categories?: ProductCategory[]; +} +/** + * This is the interface object to be used by Root Categories and Category Tree APIs for Visual Studio Ide. + */ +export interface ProductCategory { + children?: ProductCategory[]; + /** + * Indicator whether this is a leaf or there are children under this category + */ + hasChildren?: boolean; + /** + * Individual Guid of the Category + */ + id?: string; + /** + * Category Title in the requested language + */ + title?: string; +} +export interface PublishedExtension { + categories?: string[]; + deploymentType?: ExtensionDeploymentTechnology; + displayName?: string; + extensionId?: string; + extensionName?: string; + flags?: PublishedExtensionFlags; + installationTargets?: InstallationTarget[]; + lastUpdated?: Date; + longDescription?: string; + /** + * Check if Extension is in conflict list or not. Taking as String and not as boolean because we don't want end customer to see this flag and by making it Boolean it is coming as false for all the cases. + */ + presentInConflictList?: string; + /** + * Date on which the extension was first uploaded. + */ + publishedDate?: Date; + publisher?: PublisherFacts; + /** + * Date on which the extension first went public. + */ + releaseDate?: Date; + sharedWith?: ExtensionShare[]; + shortDescription?: string; + statistics?: ExtensionStatistic[]; + tags?: string[]; + versions?: ExtensionVersion[]; +} +/** + * Set of flags that can be associated with a given extension. These flags apply to all versions of the extension and not to a specific version. + */ +export declare enum PublishedExtensionFlags { + /** + * No flags exist for this extension. + */ + None = 0, + /** + * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + Disabled = 1, + /** + * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. + */ + BuiltIn = 2, + /** + * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. + */ + Validated = 4, + /** + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. + */ + Trusted = 8, + /** + * The Paid flag indicates that the commerce can be enabled for this extension. Publisher needs to setup Offer/Pricing plan in Azure. If Paid flag is set and a corresponding Offer is not available, the extension will automatically be marked as Preview. If the publisher intends to make the extension Paid in the future, it is mandatory to set the Preview flag. This is currently available only for VSTS extensions only. + */ + Paid = 16, + /** + * This extension registration is public, making its visibility open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. + */ + Public = 256, + /** + * This extension has multiple versions active at one time and version discovery should be done using the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. + */ + MultiVersion = 512, + /** + * The system flag is reserved, and cant be used by publishers. + */ + System = 1024, + /** + * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. + */ + Preview = 2048, + /** + * The Unpublished flag indicates that the extension can't be installed/downloaded. Users who have installed such an extension can continue to use the extension. + */ + Unpublished = 4096, + /** + * The Trial flag indicates that the extension is in Trial version. The flag is right now being used only with respect to Visual Studio extensions. + */ + Trial = 8192, + /** + * The Locked flag indicates that extension has been locked from Marketplace. Further updates/acquisitions are not allowed on the extension until this is present. This should be used along with making the extension private/unpublished. + */ + Locked = 16384, + /** + * This flag is set for extensions we want to hide from Marketplace home and search pages. This will be used to override the exposure of builtIn flags. + */ + Hidden = 32768 +} +export interface Publisher extends PublisherBase { + _links?: any; + domain?: string; + isDnsTokenVerified?: boolean; + isDomainVerified?: boolean; + reCaptchaToken?: string; +} +/** + * Keeping base class separate since publisher DB model class and publisher contract class share these common properties + */ +export interface PublisherBase { + displayName?: string; + emailAddress?: string[]; + extensions?: PublishedExtension[]; + flags?: PublisherFlags; + lastUpdated?: Date; + longDescription?: string; + publisherId?: string; + publisherName?: string; + shortDescription?: string; + state?: PublisherState; +} +/** + * High-level information about the publisher, like id's and names + */ +export interface PublisherFacts { + displayName?: string; + domain?: string; + flags?: PublisherFlags; + isDomainVerified?: boolean; + publisherId?: string; + publisherName?: string; +} +/** + * The FilterResult is the set of publishers that matched a particular query filter. + */ +export interface PublisherFilterResult { + /** + * This is the set of applications that matched the query filter supplied. + */ + publishers?: Publisher[]; +} +export declare enum PublisherFlags { + /** + * This should never be returned, it is used to represent a publisher who's flags haven't changed during update calls. + */ + UnChanged = 1073741824, + /** + * No flags exist for this publisher. + */ + None = 0, + /** + * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + Disabled = 1, + /** + * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). + */ + Verified = 2, + /** + * A Certified publisher is one that is Microsoft verified and in addition meets a set of requirements for its published extensions. The requirements to become a certified publisher are not listed here. They can be found in public documentation (TBD). + */ + Certified = 4, + /** + * This is the set of flags that can't be supplied by the developer and is managed by the service itself. + */ + ServiceFlags = 7 +} +export declare enum PublisherPermissions { + /** + * This gives the bearer the rights to read Publishers and Extensions. + */ + Read = 1, + /** + * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). + */ + UpdateExtension = 2, + /** + * This gives the bearer the rights to create new Publishers at the root of the namespace. + */ + CreatePublisher = 4, + /** + * This gives the bearer the rights to create new Extensions within a publisher. + */ + PublishExtension = 8, + /** + * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. + */ + Admin = 16, + /** + * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. + */ + TrustedPartner = 32, + /** + * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. + */ + PrivateRead = 64, + /** + * This gives the bearer the rights to delete any extension. + */ + DeleteExtension = 128, + /** + * This gives the bearer the rights edit the publisher settings. + */ + EditSettings = 256, + /** + * This gives the bearer the rights to see all permissions on the publisher. + */ + ViewPermissions = 512, + /** + * This gives the bearer the rights to assign permissions on the publisher. + */ + ManagePermissions = 1024, + /** + * This gives the bearer the rights to delete the publisher. + */ + DeletePublisher = 2048 +} +/** + * An PublisherQuery is used to search the gallery for a set of publishers that match one of many filter values. + */ +export interface PublisherQuery { + /** + * Each filter is a unique query and will have matching set of publishers returned from the request. Each result will have the same index in the resulting array that the filter had in the incoming query. + */ + filters?: QueryFilter[]; + /** + * The Flags are used to determine which set of information the caller would like returned for the matched publishers. + */ + flags?: PublisherQueryFlags; +} +/** + * Set of flags used to define the attributes requested when a publisher is returned. Some API's allow the caller to specify the level of detail needed. + */ +export declare enum PublisherQueryFlags { + /** + * None is used to retrieve only the basic publisher details. + */ + None = 0, + /** + * Is used to include a list of basic extension details for all extensions published by the requested publisher. + */ + IncludeExtensions = 1, + /** + * Is used to include email address of all the users who are marked as owners for the publisher + */ + IncludeEmailAddress = 2 +} +/** + * This is the set of publishers that matched a supplied query through the filters given. + */ +export interface PublisherQueryResult { + /** + * For each filter supplied in the query, a filter result will be returned in the query result. + */ + results?: PublisherFilterResult[]; +} +/** + * Access definition for a RoleAssignment. + */ +export declare enum PublisherRoleAccess { + /** + * Access has been explicitly set. + */ + Assigned = 1, + /** + * Access has been inherited from a higher scope. + */ + Inherited = 2 +} +export interface PublisherRoleAssignment { + /** + * Designates the role as explicitly assigned or inherited. + */ + access?: PublisherRoleAccess; + /** + * User friendly description of access assignment. + */ + accessDisplayName?: string; + /** + * The user to whom the role is assigned. + */ + identity?: VSSInterfaces.IdentityRef; + /** + * The role assigned to the user. + */ + role?: PublisherSecurityRole; +} +export interface PublisherSecurityRole { + /** + * Permissions the role is allowed. + */ + allowPermissions?: number; + /** + * Permissions the role is denied. + */ + denyPermissions?: number; + /** + * Description of user access defined by the role + */ + description?: string; + /** + * User friendly name of the role. + */ + displayName?: string; + /** + * Globally unique identifier for the role. + */ + identifier?: string; + /** + * Unique name of the role in the scope. + */ + name?: string; + /** + * Returns the id of the ParentScope. + */ + scope?: string; +} +export declare enum PublisherState { + /** + * No state exists for this publisher. + */ + None = 0, + /** + * This state indicates that publisher has applied for Marketplace verification (via UI) and still not been certified. This state would be reset once the publisher is verified. + */ + VerificationPending = 1, + /** + * This state indicates that publisher has applied for Marketplace certification (via UI) and still not been certified. This state would be reset once the publisher is certified. + */ + CertificationPending = 2, + /** + * This state indicates that publisher had applied for Marketplace certification (via UI) but his/her certification got rejected. This state would be reset if and when the publisher is certified. + */ + CertificationRejected = 4, + /** + * This state indicates that publisher was certified on the Marketplace, but his/her certification got revoked. This state would never be reset, even after publisher gets re-certified. It would indicate that the publisher certification was revoked at least once. + */ + CertificationRevoked = 8 +} +export interface PublisherUserRoleAssignmentRef { + /** + * The name of the role assigned. + */ + roleName?: string; + /** + * Identifier of the user given the role assignment. + */ + uniqueName?: string; + /** + * Unique id of the user given the role assignment. + */ + userId?: string; +} +/** + * The core structure of a QnA item + */ +export interface QnAItem { + /** + * Time when the review was first created + */ + createdDate?: Date; + /** + * Unique identifier of a QnA item + */ + id?: number; + /** + * Get status of item + */ + status?: QnAItemStatus; + /** + * Text description of the QnA item + */ + text?: string; + /** + * Time when the review was edited/updated + */ + updatedDate?: Date; + /** + * User details for the item. + */ + user?: UserIdentityRef; +} +/** + * Denotes the status of the QnA Item + */ +export declare enum QnAItemStatus { + None = 0, + /** + * The UserEditable flag indicates whether the item is editable by the logged in user. + */ + UserEditable = 1, + /** + * The PublisherCreated flag indicates whether the item has been created by extension publisher. + */ + PublisherCreated = 2 +} +/** + * A filter used to define a set of extensions to return during a query. + */ +export interface QueryFilter { + /** + * The filter values define the set of values in this query. They are applied based on the QueryFilterType. + */ + criteria?: FilterCriteria[]; + /** + * The PagingDirection is applied to a paging token if one exists. If not the direction is ignored, and Forward from the start of the resultset is used. Direction should be left out of the request unless a paging token is used to help prevent future issues. + */ + direction?: PagingDirection; + /** + * The page number requested by the user. If not provided 1 is assumed by default. + */ + pageNumber?: number; + /** + * The page size defines the number of results the caller wants for this filter. The count can't exceed the overall query size limits. + */ + pageSize?: number; + /** + * The paging token is a distinct type of filter and the other filter fields are ignored. The paging token represents the continuation of a previously executed query. The information about where in the result and what fields are being filtered are embedded in the token. + */ + pagingToken?: string; + /** + * Defines the type of sorting to be applied on the results. The page slice is cut of the sorted results only. + */ + sortBy?: number; + /** + * Defines the order of sorting, 1 for Ascending, 2 for Descending, else default ordering based on the SortBy value + */ + sortOrder?: number; +} +/** + * The structure of the question / thread + */ +export interface Question extends QnAItem { + reCaptchaToken?: string; + /** + * List of answers in for the question / thread + */ + responses?: Response[]; +} +export interface QuestionsResult { + /** + * Flag indicating if there are more QnA threads to be shown (for paging) + */ + hasMoreQuestions?: boolean; + /** + * List of the QnA threads + */ + questions?: Question[]; +} +export interface RatingCountPerRating { + /** + * Rating value + */ + rating?: number; + /** + * Count of total ratings + */ + ratingCount?: number; +} +/** + * The structure of a response + */ +export interface Response extends QnAItem { + reCaptchaToken?: string; +} +/** + * The status of a REST Api response status. + */ +export declare enum RestApiResponseStatus { + /** + * The operation is completed. + */ + Completed = 0, + /** + * The operation is failed. + */ + Failed = 1, + /** + * The operation is in progress. + */ + Inprogress = 2, + /** + * The operation is in skipped. + */ + Skipped = 3 +} +/** + * REST Api Response + */ +export interface RestApiResponseStatusModel { + /** + * Gets or sets the operation details + */ + operationDetails?: any; + /** + * Gets or sets the operation id + */ + operationId?: string; + /** + * Gets or sets the completed status percentage + */ + percentageCompleted?: number; + /** + * Gets or sets the status + */ + status?: RestApiResponseStatus; + /** + * Gets or sets the status message + */ + statusMessage?: string; +} +export interface Review { + /** + * Admin Reply, if any, for this review + */ + adminReply?: ReviewReply; + /** + * Unique identifier of a review item + */ + id?: number; + /** + * Flag for soft deletion + */ + isDeleted?: boolean; + isIgnored?: boolean; + /** + * Version of the product for which review was submitted + */ + productVersion?: string; + /** + * Rating provided by the user + */ + rating?: number; + reCaptchaToken?: string; + /** + * Reply, if any, for this review + */ + reply?: ReviewReply; + /** + * Text description of the review + */ + text?: string; + /** + * Title of the review + */ + title?: string; + /** + * Time when the review was edited/updated + */ + updatedDate?: Date; + /** + * Name of the user + */ + userDisplayName?: string; + /** + * Id of the user who submitted the review + */ + userId?: string; +} +/** + * Type of operation + */ +export declare enum ReviewEventOperation { + Create = 1, + Update = 2, + Delete = 3 +} +/** + * Properties associated with Review event + */ +export interface ReviewEventProperties { + /** + * Operation performed on Event - Create\Update + */ + eventOperation?: ReviewEventOperation; + /** + * Flag to see if reply is admin reply + */ + isAdminReply?: boolean; + /** + * Flag to record if the review is ignored + */ + isIgnored?: boolean; + /** + * Rating at the time of event + */ + rating?: number; + /** + * Reply update date + */ + replyDate?: Date; + /** + * Publisher reply text or admin reply text + */ + replyText?: string; + /** + * User who responded to the review + */ + replyUserId?: string; + /** + * Review Event Type - Review + */ + resourceType?: ReviewResourceType; + /** + * Review update date + */ + reviewDate?: Date; + /** + * ReviewId of the review on which the operation is performed + */ + reviewId?: number; + /** + * Text in Review Text + */ + reviewText?: string; + /** + * User display name at the time of review + */ + userDisplayName?: string; + /** + * User who gave review + */ + userId?: string; +} +/** + * Options to GetReviews query + */ +export declare enum ReviewFilterOptions { + /** + * No filtering, all reviews are returned (default option) + */ + None = 0, + /** + * Filter out review items with empty review text + */ + FilterEmptyReviews = 1, + /** + * Filter out review items with empty usernames + */ + FilterEmptyUserNames = 2 +} +export interface ReviewPatch { + /** + * Denotes the patch operation type + */ + operation?: ReviewPatchOperation; + /** + * Use when patch operation is FlagReview + */ + reportedConcern?: UserReportedConcern; + /** + * Use when patch operation is EditReview + */ + reviewItem?: Review; +} +/** + * Denotes the patch operation type + */ +export declare enum ReviewPatchOperation { + /** + * Flag a review + */ + FlagReview = 1, + /** + * Update an existing review + */ + UpdateReview = 2, + /** + * Submit a reply for a review + */ + ReplyToReview = 3, + /** + * Submit an admin response + */ + AdminResponseForReview = 4, + /** + * Delete an Admin Reply + */ + DeleteAdminReply = 5, + /** + * Delete Publisher Reply + */ + DeletePublisherReply = 6 +} +export interface ReviewReply { + /** + * Id of the reply + */ + id?: number; + /** + * Flag for soft deletion + */ + isDeleted?: boolean; + /** + * Version of the product when the reply was submitted or updated + */ + productVersion?: string; + /** + * Content of the reply + */ + replyText?: string; + /** + * Id of the review, to which this reply belongs + */ + reviewId?: number; + /** + * Title of the reply + */ + title?: string; + /** + * Date the reply was submitted or updated + */ + updatedDate?: Date; + /** + * Id of the user who left the reply + */ + userId?: string; +} +/** + * Type of event + */ +export declare enum ReviewResourceType { + Review = 1, + PublisherReply = 2, + AdminReply = 3 +} +export interface ReviewsResult { + /** + * Flag indicating if there are more reviews to be shown (for paging) + */ + hasMoreReviews?: boolean; + /** + * List of reviews + */ + reviews?: Review[]; + /** + * Count of total review items + */ + totalReviewCount?: number; +} +export interface ReviewSummary { + /** + * Average Rating + */ + averageRating?: number; + /** + * Count of total ratings + */ + ratingCount?: number; + /** + * Split of count across rating + */ + ratingSplit?: RatingCountPerRating[]; +} +/** + * Defines the sort order that can be defined for Extensions query + */ +export declare enum SortByType { + /** + * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is + */ + Relevance = 0, + /** + * The results will be sorted as per Last Updated date of the extensions with recently updated at the top + */ + LastUpdatedDate = 1, + /** + * Results will be sorted Alphabetically as per the title of the extension + */ + Title = 2, + /** + * Results will be sorted Alphabetically as per Publisher title + */ + Publisher = 3, + /** + * Results will be sorted by Install Count + */ + InstallCount = 4, + /** + * The results will be sorted as per Published date of the extensions + */ + PublishedDate = 5, + /** + * The results will be sorted as per Average ratings of the extensions + */ + AverageRating = 6, + /** + * The results will be sorted as per Trending Daily Score of the extensions + */ + TrendingDaily = 7, + /** + * The results will be sorted as per Trending weekly Score of the extensions + */ + TrendingWeekly = 8, + /** + * The results will be sorted as per Trending monthly Score of the extensions + */ + TrendingMonthly = 9, + /** + * The results will be sorted as per ReleaseDate of the extensions (date on which the extension first went public) + */ + ReleaseDate = 10, + /** + * The results will be sorted as per Author defined in the VSix/Metadata. If not defined, publisher name is used This is specifically needed by VS IDE, other (new and old) clients are not encouraged to use this + */ + Author = 11, + /** + * The results will be sorted as per Weighted Rating of the extension. + */ + WeightedRating = 12 +} +/** + * Defines the sort order that can be defined for Extensions query + */ +export declare enum SortOrderType { + /** + * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descending, for Title default is Ascending etc. + */ + Default = 0, + /** + * The results will be sorted in Ascending order + */ + Ascending = 1, + /** + * The results will be sorted in Descending order + */ + Descending = 2 +} +export interface UnpackagedExtensionData { + categories?: string[]; + description?: string; + displayName?: string; + draftId?: string; + extensionName?: string; + installationTargets?: InstallationTarget[]; + isConvertedToMarkdown?: boolean; + isPreview?: boolean; + pricingCategory?: string; + product?: string; + publisherName?: string; + qnAEnabled?: boolean; + referralUrl?: string; + repositoryUrl?: string; + tags?: string[]; + version?: string; + vsixId?: string; +} +/** + * Represents the extension policy applied to a given user + */ +export interface UserExtensionPolicy { + /** + * User display name that this policy refers to + */ + displayName?: string; + /** + * The extension policy applied to the user + */ + permissions?: ExtensionPolicy; + /** + * User id that this policy refers to + */ + userId?: string; +} +/** + * Identity reference with name and guid + */ +export interface UserIdentityRef { + /** + * User display name + */ + displayName?: string; + /** + * User VSID + */ + id?: string; +} +export interface UserReportedConcern { + /** + * Category of the concern + */ + category?: ConcernCategory; + /** + * User comment associated with the report + */ + concernText?: string; + /** + * Id of the review which was reported + */ + reviewId?: number; + /** + * Date the report was submitted + */ + submittedDate?: Date; + /** + * Id of the user who reported a review + */ + userId?: string; +} +export declare enum VSCodeWebExtensionStatisicsType { + Install = 1, + Update = 2, + Uninstall = 3 +} +export declare var TypeInfo: { + AcquisitionAssignmentType: { + enumValues: { + "none": number; + "me": number; + "all": number; + }; + }; + AcquisitionOperation: any; + AcquisitionOperationState: { + enumValues: { + "disallow": number; + "allow": number; + "completed": number; + }; + }; + AcquisitionOperationType: { + enumValues: { + "get": number; + "install": number; + "buy": number; + "try": number; + "request": number; + "none": number; + "purchaseRequest": number; + }; + }; + AcquisitionOptions: any; + AzureRestApiResponseModel: any; + Concern: any; + ConcernCategory: { + enumValues: { + "general": number; + "abusive": number; + "spam": number; + }; + }; + CustomerLastContact: any; + CustomerSupportRequest: any; + DraftPatchOperation: { + enumValues: { + "publish": number; + "cancel": number; + }; + }; + DraftStateType: { + enumValues: { + "unpublished": number; + "published": number; + "cancelled": number; + "error": number; + }; + }; + ExtensionAcquisitionRequest: any; + ExtensionDailyStat: any; + ExtensionDailyStats: any; + ExtensionDeploymentTechnology: { + enumValues: { + "exe": number; + "msi": number; + "vsix": number; + "referralLink": number; + }; + }; + ExtensionDraft: any; + ExtensionDraftPatch: any; + ExtensionEvent: any; + ExtensionEvents: any; + ExtensionFilterResult: any; + ExtensionLifecycleEventType: { + enumValues: { + "uninstall": number; + "install": number; + "review": number; + "acquisition": number; + "sales": number; + "other": number; + }; + }; + ExtensionPayload: any; + ExtensionPolicy: any; + ExtensionPolicyFlags: { + enumValues: { + "none": number; + "private": number; + "public": number; + "preview": number; + "released": number; + "firstParty": number; + "all": number; + }; + }; + ExtensionQuery: any; + ExtensionQueryFilterType: { + enumValues: { + "tag": number; + "displayName": number; + "private": number; + "id": number; + "category": number; + "contributionType": number; + "name": number; + "installationTarget": number; + "featured": number; + "searchText": number; + "featuredInCategory": number; + "excludeWithFlags": number; + "includeWithFlags": number; + "lcid": number; + "installationTargetVersion": number; + "installationTargetVersionRange": number; + "vsixMetadata": number; + "publisherName": number; + "publisherDisplayName": number; + "includeWithPublisherFlags": number; + "organizationSharedWith": number; + "productArchitecture": number; + "targetPlatform": number; + }; + }; + ExtensionQueryFlags: { + enumValues: { + "none": number; + "includeVersions": number; + "includeFiles": number; + "includeCategoryAndTags": number; + "includeSharedAccounts": number; + "includeVersionProperties": number; + "excludeNonValidated": number; + "includeInstallationTargets": number; + "includeAssetUri": number; + "includeStatistics": number; + "includeLatestVersionOnly": number; + "useFallbackAssetUri": number; + "includeMetadata": number; + "includeMinimalPayloadForVsIde": number; + "includeLcids": number; + "includeSharedOrganizations": number; + "includeNameConflictInfo": number; + "allAttributes": number; + }; + }; + ExtensionQueryResult: any; + ExtensionStatisticOperation: { + enumValues: { + "none": number; + "set": number; + "increment": number; + "decrement": number; + "delete": number; + }; + }; + ExtensionStatisticUpdate: any; + ExtensionStatsAggregateType: { + enumValues: { + "daily": number; + }; + }; + ExtensionVersion: any; + ExtensionVersionFlags: { + enumValues: { + "none": number; + "validated": number; + }; + }; + NotificationsData: any; + NotificationTemplateType: { + enumValues: { + "reviewNotification": number; + "qnaNotification": number; + "customerContactNotification": number; + "publisherMemberUpdateNotification": number; + }; + }; + PagingDirection: { + enumValues: { + "backward": number; + "forward": number; + }; + }; + PublishedExtension: any; + PublishedExtensionFlags: { + enumValues: { + "none": number; + "disabled": number; + "builtIn": number; + "validated": number; + "trusted": number; + "paid": number; + "public": number; + "multiVersion": number; + "system": number; + "preview": number; + "unpublished": number; + "trial": number; + "locked": number; + "hidden": number; + }; + }; + Publisher: any; + PublisherBase: any; + PublisherFacts: any; + PublisherFilterResult: any; + PublisherFlags: { + enumValues: { + "unChanged": number; + "none": number; + "disabled": number; + "verified": number; + "certified": number; + "serviceFlags": number; + }; + }; + PublisherPermissions: { + enumValues: { + "read": number; + "updateExtension": number; + "createPublisher": number; + "publishExtension": number; + "admin": number; + "trustedPartner": number; + "privateRead": number; + "deleteExtension": number; + "editSettings": number; + "viewPermissions": number; + "managePermissions": number; + "deletePublisher": number; + }; + }; + PublisherQuery: any; + PublisherQueryFlags: { + enumValues: { + "none": number; + "includeExtensions": number; + "includeEmailAddress": number; + }; + }; + PublisherQueryResult: any; + PublisherRoleAccess: { + enumValues: { + "assigned": number; + "inherited": number; + }; + }; + PublisherRoleAssignment: any; + PublisherState: { + enumValues: { + "none": number; + "verificationPending": number; + "certificationPending": number; + "certificationRejected": number; + "certificationRevoked": number; + }; + }; + QnAItem: any; + QnAItemStatus: { + enumValues: { + "none": number; + "userEditable": number; + "publisherCreated": number; + }; + }; + QueryFilter: any; + Question: any; + QuestionsResult: any; + Response: any; + RestApiResponseStatus: { + enumValues: { + "completed": number; + "failed": number; + "inprogress": number; + "skipped": number; + }; + }; + RestApiResponseStatusModel: any; + Review: any; + ReviewEventOperation: { + enumValues: { + "create": number; + "update": number; + "delete": number; + }; + }; + ReviewEventProperties: any; + ReviewFilterOptions: { + enumValues: { + "none": number; + "filterEmptyReviews": number; + "filterEmptyUserNames": number; + }; + }; + ReviewPatch: any; + ReviewPatchOperation: { + enumValues: { + "flagReview": number; + "updateReview": number; + "replyToReview": number; + "adminResponseForReview": number; + "deleteAdminReply": number; + "deletePublisherReply": number; + }; + }; + ReviewReply: any; + ReviewResourceType: { + enumValues: { + "review": number; + "publisherReply": number; + "adminReply": number; + }; + }; + ReviewsResult: any; + SortByType: { + enumValues: { + "relevance": number; + "lastUpdatedDate": number; + "title": number; + "publisher": number; + "installCount": number; + "publishedDate": number; + "averageRating": number; + "trendingDaily": number; + "trendingWeekly": number; + "trendingMonthly": number; + "releaseDate": number; + "author": number; + "weightedRating": number; + }; + }; + SortOrderType: { + enumValues: { + "default": number; + "ascending": number; + "descending": number; + }; + }; + UserExtensionPolicy: any; + UserReportedConcern: any; + VSCodeWebExtensionStatisicsType: { + enumValues: { + "install": number; + "update": number; + "uninstall": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.js b/node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.js new file mode 100644 index 0000000..7ff3d27 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/GalleryInterfaces.js @@ -0,0 +1,1460 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * How the acquisition is assigned + */ +var AcquisitionAssignmentType; +(function (AcquisitionAssignmentType) { + AcquisitionAssignmentType[AcquisitionAssignmentType["None"] = 0] = "None"; + /** + * Just assign for me + */ + AcquisitionAssignmentType[AcquisitionAssignmentType["Me"] = 1] = "Me"; + /** + * Assign for all users in the account + */ + AcquisitionAssignmentType[AcquisitionAssignmentType["All"] = 2] = "All"; +})(AcquisitionAssignmentType = exports.AcquisitionAssignmentType || (exports.AcquisitionAssignmentType = {})); +var AcquisitionOperationState; +(function (AcquisitionOperationState) { + /** + * Not allowed to use this AcquisitionOperation + */ + AcquisitionOperationState[AcquisitionOperationState["Disallow"] = 0] = "Disallow"; + /** + * Allowed to use this AcquisitionOperation + */ + AcquisitionOperationState[AcquisitionOperationState["Allow"] = 1] = "Allow"; + /** + * Operation has already been completed and is no longer available + */ + AcquisitionOperationState[AcquisitionOperationState["Completed"] = 3] = "Completed"; +})(AcquisitionOperationState = exports.AcquisitionOperationState || (exports.AcquisitionOperationState = {})); +/** + * Set of different types of operations that can be requested. + */ +var AcquisitionOperationType; +(function (AcquisitionOperationType) { + /** + * Not yet used + */ + AcquisitionOperationType[AcquisitionOperationType["Get"] = 0] = "Get"; + /** + * Install this extension into the host provided + */ + AcquisitionOperationType[AcquisitionOperationType["Install"] = 1] = "Install"; + /** + * Buy licenses for this extension and install into the host provided + */ + AcquisitionOperationType[AcquisitionOperationType["Buy"] = 2] = "Buy"; + /** + * Try this extension + */ + AcquisitionOperationType[AcquisitionOperationType["Try"] = 3] = "Try"; + /** + * Request this extension for installation + */ + AcquisitionOperationType[AcquisitionOperationType["Request"] = 4] = "Request"; + /** + * No action found + */ + AcquisitionOperationType[AcquisitionOperationType["None"] = 5] = "None"; + /** + * Request admins for purchasing extension + */ + AcquisitionOperationType[AcquisitionOperationType["PurchaseRequest"] = 6] = "PurchaseRequest"; +})(AcquisitionOperationType = exports.AcquisitionOperationType || (exports.AcquisitionOperationType = {})); +var ConcernCategory; +(function (ConcernCategory) { + ConcernCategory[ConcernCategory["General"] = 1] = "General"; + ConcernCategory[ConcernCategory["Abusive"] = 2] = "Abusive"; + ConcernCategory[ConcernCategory["Spam"] = 4] = "Spam"; +})(ConcernCategory = exports.ConcernCategory || (exports.ConcernCategory = {})); +var DraftPatchOperation; +(function (DraftPatchOperation) { + DraftPatchOperation[DraftPatchOperation["Publish"] = 1] = "Publish"; + DraftPatchOperation[DraftPatchOperation["Cancel"] = 2] = "Cancel"; +})(DraftPatchOperation = exports.DraftPatchOperation || (exports.DraftPatchOperation = {})); +var DraftStateType; +(function (DraftStateType) { + DraftStateType[DraftStateType["Unpublished"] = 1] = "Unpublished"; + DraftStateType[DraftStateType["Published"] = 2] = "Published"; + DraftStateType[DraftStateType["Cancelled"] = 3] = "Cancelled"; + DraftStateType[DraftStateType["Error"] = 4] = "Error"; +})(DraftStateType = exports.DraftStateType || (exports.DraftStateType = {})); +var ExtensionDeploymentTechnology; +(function (ExtensionDeploymentTechnology) { + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Exe"] = 1] = "Exe"; + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Msi"] = 2] = "Msi"; + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["Vsix"] = 3] = "Vsix"; + ExtensionDeploymentTechnology[ExtensionDeploymentTechnology["ReferralLink"] = 4] = "ReferralLink"; +})(ExtensionDeploymentTechnology = exports.ExtensionDeploymentTechnology || (exports.ExtensionDeploymentTechnology = {})); +/** + * Type of event + */ +var ExtensionLifecycleEventType; +(function (ExtensionLifecycleEventType) { + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Uninstall"] = 1] = "Uninstall"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Install"] = 2] = "Install"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Review"] = 3] = "Review"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Acquisition"] = 4] = "Acquisition"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Sales"] = 5] = "Sales"; + ExtensionLifecycleEventType[ExtensionLifecycleEventType["Other"] = 999] = "Other"; +})(ExtensionLifecycleEventType = exports.ExtensionLifecycleEventType || (exports.ExtensionLifecycleEventType = {})); +/** + * Set of flags that can be associated with a given permission over an extension + */ +var ExtensionPolicyFlags; +(function (ExtensionPolicyFlags) { + /** + * No permission + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["None"] = 0] = "None"; + /** + * Permission on private extensions + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["Private"] = 1] = "Private"; + /** + * Permission on public extensions + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["Public"] = 2] = "Public"; + /** + * Permission in extensions that are in preview + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["Preview"] = 4] = "Preview"; + /** + * Permission in released extensions + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["Released"] = 8] = "Released"; + /** + * Permission in 1st party extensions + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["FirstParty"] = 16] = "FirstParty"; + /** + * Mask that defines all permissions + */ + ExtensionPolicyFlags[ExtensionPolicyFlags["All"] = 31] = "All"; +})(ExtensionPolicyFlags = exports.ExtensionPolicyFlags || (exports.ExtensionPolicyFlags = {})); +/** + * Type of extension filters that are supported in the queries. + */ +var ExtensionQueryFilterType; +(function (ExtensionQueryFilterType) { + /** + * The values are used as tags. All tags are treated as "OR" conditions with each other. There may be some value put on the number of matched tags from the query. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Tag"] = 1] = "Tag"; + /** + * The Values are an ExtensionName or fragment that is used to match other extension names. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["DisplayName"] = 2] = "DisplayName"; + /** + * The Filter is one or more tokens that define what scope to return private extensions for. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Private"] = 3] = "Private"; + /** + * Retrieve a set of extensions based on their id's. The values should be the extension id's encoded as strings. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Id"] = 4] = "Id"; + /** + * The category is unlike other filters. It is AND'd with the other filters instead of being a separate query. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Category"] = 5] = "Category"; + /** + * Certain contribution types may be indexed to allow for query by type. User defined types can't be indexed at the moment. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["ContributionType"] = 6] = "ContributionType"; + /** + * Retrieve an set extension based on the name based identifier. This differs from the internal id (which is being deprecated). + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Name"] = 7] = "Name"; + /** + * The InstallationTarget for an extension defines the target consumer for the extension. This may be something like VS, VSOnline, or VSCode + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTarget"] = 8] = "InstallationTarget"; + /** + * Query for featured extensions, no value is allowed when using the query type. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Featured"] = 9] = "Featured"; + /** + * The SearchText provided by the user to search for extensions + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["SearchText"] = 10] = "SearchText"; + /** + * Query for extensions that are featured in their own category, The filterValue for this is name of category of extensions. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["FeaturedInCategory"] = 11] = "FeaturedInCategory"; + /** + * When retrieving extensions from a query, exclude the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be excluded. In case of multiple flags to be specified, a logical OR of the interger values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["ExcludeWithFlags"] = 12] = "ExcludeWithFlags"; + /** + * When retrieving extensions from a query, include the extensions which are having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter This should be at most one filter of this type. This only acts as a restrictive filter after. In case of having a particular flag in both IncludeWithFlags and ExcludeWithFlags, excludeFlags will remove the included extensions giving empty result for that flag. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["IncludeWithFlags"] = 13] = "IncludeWithFlags"; + /** + * Filter the extensions based on the LCID values applicable. Any extensions which are not having any LCID values will also be filtered. This is currently only supported for VS extensions. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["Lcid"] = 14] = "Lcid"; + /** + * Filter to provide the version of the installation target. This filter will be used along with InstallationTarget filter. The value should be a valid version string. Currently supported only if search text is provided. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTargetVersion"] = 15] = "InstallationTargetVersion"; + /** + * Filter type for specifying a range of installation target version. The filter will be used along with InstallationTarget filter. The value should be a pair of well formed version values separated by hyphen(-). Currently supported only if search text is provided. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["InstallationTargetVersionRange"] = 16] = "InstallationTargetVersionRange"; + /** + * Filter type for specifying metadata key and value to be used for filtering. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["VsixMetadata"] = 17] = "VsixMetadata"; + /** + * Filter to get extensions published by a publisher having supplied internal name + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["PublisherName"] = 18] = "PublisherName"; + /** + * Filter to get extensions published by all publishers having supplied display name + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["PublisherDisplayName"] = 19] = "PublisherDisplayName"; + /** + * When retrieving extensions from a query, include the extensions which have a publisher having the given flags. The value specified for this filter should be a string representing the integer values of the flags to be included. In case of multiple flags to be specified, a logical OR of the integer values should be given as value for this filter There should be at most one filter of this type. This only acts as a restrictive filter after. In case of multiple flags given in IncludeWithFlags in ORed fashion, extensions having any of the given flags will be included. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["IncludeWithPublisherFlags"] = 20] = "IncludeWithPublisherFlags"; + /** + * Filter to get extensions shared with particular organization + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["OrganizationSharedWith"] = 21] = "OrganizationSharedWith"; + /** + * Filter to get VS IDE extensions by Product Architecture + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["ProductArchitecture"] = 22] = "ProductArchitecture"; + /** + * Filter to get VS Code extensions by target platform. + */ + ExtensionQueryFilterType[ExtensionQueryFilterType["TargetPlatform"] = 23] = "TargetPlatform"; +})(ExtensionQueryFilterType = exports.ExtensionQueryFilterType || (exports.ExtensionQueryFilterType = {})); +/** + * Set of flags used to determine which set of information is retrieved when reading published extensions + */ +var ExtensionQueryFlags; +(function (ExtensionQueryFlags) { + /** + * None is used to retrieve only the basic extension details. + */ + ExtensionQueryFlags[ExtensionQueryFlags["None"] = 0] = "None"; + /** + * IncludeVersions will return version information for extensions returned + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeVersions"] = 1] = "IncludeVersions"; + /** + * IncludeFiles will return information about which files were found within the extension that were stored independent of the manifest. When asking for files, versions will be included as well since files are returned as a property of the versions. These files can be retrieved using the path to the file without requiring the entire manifest be downloaded. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeFiles"] = 2] = "IncludeFiles"; + /** + * Include the Categories and Tags that were added to the extension definition. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeCategoryAndTags"] = 4] = "IncludeCategoryAndTags"; + /** + * Include the details about which accounts the extension has been shared with if the extension is a private extension. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeSharedAccounts"] = 8] = "IncludeSharedAccounts"; + /** + * Include properties associated with versions of the extension + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeVersionProperties"] = 16] = "IncludeVersionProperties"; + /** + * Excluding non-validated extensions will remove any extension versions that either are in the process of being validated or have failed validation. + */ + ExtensionQueryFlags[ExtensionQueryFlags["ExcludeNonValidated"] = 32] = "ExcludeNonValidated"; + /** + * Include the set of installation targets the extension has requested. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeInstallationTargets"] = 64] = "IncludeInstallationTargets"; + /** + * Include the base uri for assets of this extension + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeAssetUri"] = 128] = "IncludeAssetUri"; + /** + * Include the statistics associated with this extension + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeStatistics"] = 256] = "IncludeStatistics"; + /** + * When retrieving versions from a query, only include the latest version of the extensions that matched. This is useful when the caller doesn't need all the published versions. It will save a significant size in the returned payload. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeLatestVersionOnly"] = 512] = "IncludeLatestVersionOnly"; + /** + * This flag switches the asset uri to use GetAssetByName instead of CDN When this is used, values of base asset uri and base asset uri fallback are switched When this is used, source of asset files are pointed to Gallery service always even if CDN is available + */ + ExtensionQueryFlags[ExtensionQueryFlags["UseFallbackAssetUri"] = 1024] = "UseFallbackAssetUri"; + /** + * This flag is used to get all the metadata values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeMetadata"] = 2048] = "IncludeMetadata"; + /** + * This flag is used to indicate to return very small data for extension required by VS IDE. This flag is only compatible when querying is done by VS IDE + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeMinimalPayloadForVsIde"] = 4096] = "IncludeMinimalPayloadForVsIde"; + /** + * This flag is used to get Lcid values associated with the extension. This is not applicable to VSTS or VSCode extensions and usage is only internal + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeLcids"] = 8192] = "IncludeLcids"; + /** + * Include the details about which organizations the extension has been shared with if the extension is a private extension. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeSharedOrganizations"] = 16384] = "IncludeSharedOrganizations"; + /** + * Include the details if an extension is in conflict list or not Currently being used for VSCode extensions. + */ + ExtensionQueryFlags[ExtensionQueryFlags["IncludeNameConflictInfo"] = 32768] = "IncludeNameConflictInfo"; + /** + * AllAttributes is designed to be a mask that defines all sub-elements of the extension should be returned. NOTE: This is not actually All flags. This is now locked to the set defined since changing this enum would be a breaking change and would change the behavior of anyone using it. Try not to use this value when making calls to the service, instead be explicit about the options required. + */ + ExtensionQueryFlags[ExtensionQueryFlags["AllAttributes"] = 16863] = "AllAttributes"; +})(ExtensionQueryFlags = exports.ExtensionQueryFlags || (exports.ExtensionQueryFlags = {})); +var ExtensionStatisticOperation; +(function (ExtensionStatisticOperation) { + ExtensionStatisticOperation[ExtensionStatisticOperation["None"] = 0] = "None"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Set"] = 1] = "Set"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Increment"] = 2] = "Increment"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Decrement"] = 3] = "Decrement"; + ExtensionStatisticOperation[ExtensionStatisticOperation["Delete"] = 4] = "Delete"; +})(ExtensionStatisticOperation = exports.ExtensionStatisticOperation || (exports.ExtensionStatisticOperation = {})); +/** + * Stats aggregation type + */ +var ExtensionStatsAggregateType; +(function (ExtensionStatsAggregateType) { + ExtensionStatsAggregateType[ExtensionStatsAggregateType["Daily"] = 1] = "Daily"; +})(ExtensionStatsAggregateType = exports.ExtensionStatsAggregateType || (exports.ExtensionStatsAggregateType = {})); +/** + * Set of flags that can be associated with a given extension version. These flags apply to a specific version of the extension. + */ +var ExtensionVersionFlags; +(function (ExtensionVersionFlags) { + /** + * No flags exist for this version. + */ + ExtensionVersionFlags[ExtensionVersionFlags["None"] = 0] = "None"; + /** + * The Validated flag for a version means the extension version has passed validation and can be used.. + */ + ExtensionVersionFlags[ExtensionVersionFlags["Validated"] = 1] = "Validated"; +})(ExtensionVersionFlags = exports.ExtensionVersionFlags || (exports.ExtensionVersionFlags = {})); +/** + * Type of event + */ +var NotificationTemplateType; +(function (NotificationTemplateType) { + /** + * Template type for Review Notification. + */ + NotificationTemplateType[NotificationTemplateType["ReviewNotification"] = 1] = "ReviewNotification"; + /** + * Template type for Qna Notification. + */ + NotificationTemplateType[NotificationTemplateType["QnaNotification"] = 2] = "QnaNotification"; + /** + * Template type for Customer Contact Notification. + */ + NotificationTemplateType[NotificationTemplateType["CustomerContactNotification"] = 3] = "CustomerContactNotification"; + /** + * Template type for Publisher Member Notification. + */ + NotificationTemplateType[NotificationTemplateType["PublisherMemberUpdateNotification"] = 4] = "PublisherMemberUpdateNotification"; +})(NotificationTemplateType = exports.NotificationTemplateType || (exports.NotificationTemplateType = {})); +/** + * PagingDirection is used to define which set direction to move the returned result set based on a previous query. + */ +var PagingDirection; +(function (PagingDirection) { + /** + * Backward will return results from earlier in the resultset. + */ + PagingDirection[PagingDirection["Backward"] = 1] = "Backward"; + /** + * Forward will return results from later in the resultset. + */ + PagingDirection[PagingDirection["Forward"] = 2] = "Forward"; +})(PagingDirection = exports.PagingDirection || (exports.PagingDirection = {})); +/** + * Set of flags that can be associated with a given extension. These flags apply to all versions of the extension and not to a specific version. + */ +var PublishedExtensionFlags; +(function (PublishedExtensionFlags) { + /** + * No flags exist for this extension. + */ + PublishedExtensionFlags[PublishedExtensionFlags["None"] = 0] = "None"; + /** + * The Disabled flag for an extension means the extension can't be changed and won't be used by consumers. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Disabled"] = 1] = "Disabled"; + /** + * BuiltIn Extension are available to all Tenants. An explicit registration is not required. This attribute is reserved and can't be supplied by Extension Developers. BuiltIn extensions are by definition Public. There is no need to set the public flag for extensions marked BuiltIn. + */ + PublishedExtensionFlags[PublishedExtensionFlags["BuiltIn"] = 2] = "BuiltIn"; + /** + * This extension has been validated by the service. The extension meets the requirements specified. This attribute is reserved and can't be supplied by the Extension Developers. Validation is a process that ensures that all contributions are well formed. They meet the requirements defined by the contribution type they are extending. Note this attribute will be updated asynchronously as the extension is validated by the developer of the contribution type. There will be restricted access to the extension while this process is performed. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Validated"] = 4] = "Validated"; + /** + * Trusted extensions are ones that are given special capabilities. These tend to come from Microsoft and can't be published by the general public. Note: BuiltIn extensions are always trusted. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Trusted"] = 8] = "Trusted"; + /** + * The Paid flag indicates that the commerce can be enabled for this extension. Publisher needs to setup Offer/Pricing plan in Azure. If Paid flag is set and a corresponding Offer is not available, the extension will automatically be marked as Preview. If the publisher intends to make the extension Paid in the future, it is mandatory to set the Preview flag. This is currently available only for VSTS extensions only. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Paid"] = 16] = "Paid"; + /** + * This extension registration is public, making its visibility open to the public. This means all tenants have the ability to install this extension. Without this flag the extension will be private and will need to be shared with the tenants that can install it. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Public"] = 256] = "Public"; + /** + * This extension has multiple versions active at one time and version discovery should be done using the defined "Version Discovery" protocol to determine the version available to a specific user or tenant. @TODO: Link to Version Discovery Protocol. + */ + PublishedExtensionFlags[PublishedExtensionFlags["MultiVersion"] = 512] = "MultiVersion"; + /** + * The system flag is reserved, and cant be used by publishers. + */ + PublishedExtensionFlags[PublishedExtensionFlags["System"] = 1024] = "System"; + /** + * The Preview flag indicates that the extension is still under preview (not yet of "release" quality). These extensions may be decorated differently in the gallery and may have different policies applied to them. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Preview"] = 2048] = "Preview"; + /** + * The Unpublished flag indicates that the extension can't be installed/downloaded. Users who have installed such an extension can continue to use the extension. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Unpublished"] = 4096] = "Unpublished"; + /** + * The Trial flag indicates that the extension is in Trial version. The flag is right now being used only with respect to Visual Studio extensions. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Trial"] = 8192] = "Trial"; + /** + * The Locked flag indicates that extension has been locked from Marketplace. Further updates/acquisitions are not allowed on the extension until this is present. This should be used along with making the extension private/unpublished. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Locked"] = 16384] = "Locked"; + /** + * This flag is set for extensions we want to hide from Marketplace home and search pages. This will be used to override the exposure of builtIn flags. + */ + PublishedExtensionFlags[PublishedExtensionFlags["Hidden"] = 32768] = "Hidden"; +})(PublishedExtensionFlags = exports.PublishedExtensionFlags || (exports.PublishedExtensionFlags = {})); +var PublisherFlags; +(function (PublisherFlags) { + /** + * This should never be returned, it is used to represent a publisher who's flags haven't changed during update calls. + */ + PublisherFlags[PublisherFlags["UnChanged"] = 1073741824] = "UnChanged"; + /** + * No flags exist for this publisher. + */ + PublisherFlags[PublisherFlags["None"] = 0] = "None"; + /** + * The Disabled flag for a publisher means the publisher can't be changed and won't be used by consumers, this extends to extensions owned by the publisher as well. The disabled flag is managed by the service and can't be supplied by the Extension Developers. + */ + PublisherFlags[PublisherFlags["Disabled"] = 1] = "Disabled"; + /** + * A verified publisher is one that Microsoft has done some review of and ensured the publisher meets a set of requirements. The requirements to become a verified publisher are not listed here. They can be found in public documentation (TBD). + */ + PublisherFlags[PublisherFlags["Verified"] = 2] = "Verified"; + /** + * A Certified publisher is one that is Microsoft verified and in addition meets a set of requirements for its published extensions. The requirements to become a certified publisher are not listed here. They can be found in public documentation (TBD). + */ + PublisherFlags[PublisherFlags["Certified"] = 4] = "Certified"; + /** + * This is the set of flags that can't be supplied by the developer and is managed by the service itself. + */ + PublisherFlags[PublisherFlags["ServiceFlags"] = 7] = "ServiceFlags"; +})(PublisherFlags = exports.PublisherFlags || (exports.PublisherFlags = {})); +var PublisherPermissions; +(function (PublisherPermissions) { + /** + * This gives the bearer the rights to read Publishers and Extensions. + */ + PublisherPermissions[PublisherPermissions["Read"] = 1] = "Read"; + /** + * This gives the bearer the rights to update, delete, and share Extensions (but not the ability to create them). + */ + PublisherPermissions[PublisherPermissions["UpdateExtension"] = 2] = "UpdateExtension"; + /** + * This gives the bearer the rights to create new Publishers at the root of the namespace. + */ + PublisherPermissions[PublisherPermissions["CreatePublisher"] = 4] = "CreatePublisher"; + /** + * This gives the bearer the rights to create new Extensions within a publisher. + */ + PublisherPermissions[PublisherPermissions["PublishExtension"] = 8] = "PublishExtension"; + /** + * Admin gives the bearer the rights to manage restricted attributes of Publishers and Extensions. + */ + PublisherPermissions[PublisherPermissions["Admin"] = 16] = "Admin"; + /** + * TrustedPartner gives the bearer the rights to publish a extensions with restricted capabilities. + */ + PublisherPermissions[PublisherPermissions["TrustedPartner"] = 32] = "TrustedPartner"; + /** + * PrivateRead is another form of read designed to allow higher privilege accessors the ability to read private extensions. + */ + PublisherPermissions[PublisherPermissions["PrivateRead"] = 64] = "PrivateRead"; + /** + * This gives the bearer the rights to delete any extension. + */ + PublisherPermissions[PublisherPermissions["DeleteExtension"] = 128] = "DeleteExtension"; + /** + * This gives the bearer the rights edit the publisher settings. + */ + PublisherPermissions[PublisherPermissions["EditSettings"] = 256] = "EditSettings"; + /** + * This gives the bearer the rights to see all permissions on the publisher. + */ + PublisherPermissions[PublisherPermissions["ViewPermissions"] = 512] = "ViewPermissions"; + /** + * This gives the bearer the rights to assign permissions on the publisher. + */ + PublisherPermissions[PublisherPermissions["ManagePermissions"] = 1024] = "ManagePermissions"; + /** + * This gives the bearer the rights to delete the publisher. + */ + PublisherPermissions[PublisherPermissions["DeletePublisher"] = 2048] = "DeletePublisher"; +})(PublisherPermissions = exports.PublisherPermissions || (exports.PublisherPermissions = {})); +/** + * Set of flags used to define the attributes requested when a publisher is returned. Some API's allow the caller to specify the level of detail needed. + */ +var PublisherQueryFlags; +(function (PublisherQueryFlags) { + /** + * None is used to retrieve only the basic publisher details. + */ + PublisherQueryFlags[PublisherQueryFlags["None"] = 0] = "None"; + /** + * Is used to include a list of basic extension details for all extensions published by the requested publisher. + */ + PublisherQueryFlags[PublisherQueryFlags["IncludeExtensions"] = 1] = "IncludeExtensions"; + /** + * Is used to include email address of all the users who are marked as owners for the publisher + */ + PublisherQueryFlags[PublisherQueryFlags["IncludeEmailAddress"] = 2] = "IncludeEmailAddress"; +})(PublisherQueryFlags = exports.PublisherQueryFlags || (exports.PublisherQueryFlags = {})); +/** + * Access definition for a RoleAssignment. + */ +var PublisherRoleAccess; +(function (PublisherRoleAccess) { + /** + * Access has been explicitly set. + */ + PublisherRoleAccess[PublisherRoleAccess["Assigned"] = 1] = "Assigned"; + /** + * Access has been inherited from a higher scope. + */ + PublisherRoleAccess[PublisherRoleAccess["Inherited"] = 2] = "Inherited"; +})(PublisherRoleAccess = exports.PublisherRoleAccess || (exports.PublisherRoleAccess = {})); +var PublisherState; +(function (PublisherState) { + /** + * No state exists for this publisher. + */ + PublisherState[PublisherState["None"] = 0] = "None"; + /** + * This state indicates that publisher has applied for Marketplace verification (via UI) and still not been certified. This state would be reset once the publisher is verified. + */ + PublisherState[PublisherState["VerificationPending"] = 1] = "VerificationPending"; + /** + * This state indicates that publisher has applied for Marketplace certification (via UI) and still not been certified. This state would be reset once the publisher is certified. + */ + PublisherState[PublisherState["CertificationPending"] = 2] = "CertificationPending"; + /** + * This state indicates that publisher had applied for Marketplace certification (via UI) but his/her certification got rejected. This state would be reset if and when the publisher is certified. + */ + PublisherState[PublisherState["CertificationRejected"] = 4] = "CertificationRejected"; + /** + * This state indicates that publisher was certified on the Marketplace, but his/her certification got revoked. This state would never be reset, even after publisher gets re-certified. It would indicate that the publisher certification was revoked at least once. + */ + PublisherState[PublisherState["CertificationRevoked"] = 8] = "CertificationRevoked"; +})(PublisherState = exports.PublisherState || (exports.PublisherState = {})); +/** + * Denotes the status of the QnA Item + */ +var QnAItemStatus; +(function (QnAItemStatus) { + QnAItemStatus[QnAItemStatus["None"] = 0] = "None"; + /** + * The UserEditable flag indicates whether the item is editable by the logged in user. + */ + QnAItemStatus[QnAItemStatus["UserEditable"] = 1] = "UserEditable"; + /** + * The PublisherCreated flag indicates whether the item has been created by extension publisher. + */ + QnAItemStatus[QnAItemStatus["PublisherCreated"] = 2] = "PublisherCreated"; +})(QnAItemStatus = exports.QnAItemStatus || (exports.QnAItemStatus = {})); +/** + * The status of a REST Api response status. + */ +var RestApiResponseStatus; +(function (RestApiResponseStatus) { + /** + * The operation is completed. + */ + RestApiResponseStatus[RestApiResponseStatus["Completed"] = 0] = "Completed"; + /** + * The operation is failed. + */ + RestApiResponseStatus[RestApiResponseStatus["Failed"] = 1] = "Failed"; + /** + * The operation is in progress. + */ + RestApiResponseStatus[RestApiResponseStatus["Inprogress"] = 2] = "Inprogress"; + /** + * The operation is in skipped. + */ + RestApiResponseStatus[RestApiResponseStatus["Skipped"] = 3] = "Skipped"; +})(RestApiResponseStatus = exports.RestApiResponseStatus || (exports.RestApiResponseStatus = {})); +/** + * Type of operation + */ +var ReviewEventOperation; +(function (ReviewEventOperation) { + ReviewEventOperation[ReviewEventOperation["Create"] = 1] = "Create"; + ReviewEventOperation[ReviewEventOperation["Update"] = 2] = "Update"; + ReviewEventOperation[ReviewEventOperation["Delete"] = 3] = "Delete"; +})(ReviewEventOperation = exports.ReviewEventOperation || (exports.ReviewEventOperation = {})); +/** + * Options to GetReviews query + */ +var ReviewFilterOptions; +(function (ReviewFilterOptions) { + /** + * No filtering, all reviews are returned (default option) + */ + ReviewFilterOptions[ReviewFilterOptions["None"] = 0] = "None"; + /** + * Filter out review items with empty review text + */ + ReviewFilterOptions[ReviewFilterOptions["FilterEmptyReviews"] = 1] = "FilterEmptyReviews"; + /** + * Filter out review items with empty usernames + */ + ReviewFilterOptions[ReviewFilterOptions["FilterEmptyUserNames"] = 2] = "FilterEmptyUserNames"; +})(ReviewFilterOptions = exports.ReviewFilterOptions || (exports.ReviewFilterOptions = {})); +/** + * Denotes the patch operation type + */ +var ReviewPatchOperation; +(function (ReviewPatchOperation) { + /** + * Flag a review + */ + ReviewPatchOperation[ReviewPatchOperation["FlagReview"] = 1] = "FlagReview"; + /** + * Update an existing review + */ + ReviewPatchOperation[ReviewPatchOperation["UpdateReview"] = 2] = "UpdateReview"; + /** + * Submit a reply for a review + */ + ReviewPatchOperation[ReviewPatchOperation["ReplyToReview"] = 3] = "ReplyToReview"; + /** + * Submit an admin response + */ + ReviewPatchOperation[ReviewPatchOperation["AdminResponseForReview"] = 4] = "AdminResponseForReview"; + /** + * Delete an Admin Reply + */ + ReviewPatchOperation[ReviewPatchOperation["DeleteAdminReply"] = 5] = "DeleteAdminReply"; + /** + * Delete Publisher Reply + */ + ReviewPatchOperation[ReviewPatchOperation["DeletePublisherReply"] = 6] = "DeletePublisherReply"; +})(ReviewPatchOperation = exports.ReviewPatchOperation || (exports.ReviewPatchOperation = {})); +/** + * Type of event + */ +var ReviewResourceType; +(function (ReviewResourceType) { + ReviewResourceType[ReviewResourceType["Review"] = 1] = "Review"; + ReviewResourceType[ReviewResourceType["PublisherReply"] = 2] = "PublisherReply"; + ReviewResourceType[ReviewResourceType["AdminReply"] = 3] = "AdminReply"; +})(ReviewResourceType = exports.ReviewResourceType || (exports.ReviewResourceType = {})); +/** + * Defines the sort order that can be defined for Extensions query + */ +var SortByType; +(function (SortByType) { + /** + * The results will be sorted by relevance in case search query is given, if no search query resutls will be provided as is + */ + SortByType[SortByType["Relevance"] = 0] = "Relevance"; + /** + * The results will be sorted as per Last Updated date of the extensions with recently updated at the top + */ + SortByType[SortByType["LastUpdatedDate"] = 1] = "LastUpdatedDate"; + /** + * Results will be sorted Alphabetically as per the title of the extension + */ + SortByType[SortByType["Title"] = 2] = "Title"; + /** + * Results will be sorted Alphabetically as per Publisher title + */ + SortByType[SortByType["Publisher"] = 3] = "Publisher"; + /** + * Results will be sorted by Install Count + */ + SortByType[SortByType["InstallCount"] = 4] = "InstallCount"; + /** + * The results will be sorted as per Published date of the extensions + */ + SortByType[SortByType["PublishedDate"] = 5] = "PublishedDate"; + /** + * The results will be sorted as per Average ratings of the extensions + */ + SortByType[SortByType["AverageRating"] = 6] = "AverageRating"; + /** + * The results will be sorted as per Trending Daily Score of the extensions + */ + SortByType[SortByType["TrendingDaily"] = 7] = "TrendingDaily"; + /** + * The results will be sorted as per Trending weekly Score of the extensions + */ + SortByType[SortByType["TrendingWeekly"] = 8] = "TrendingWeekly"; + /** + * The results will be sorted as per Trending monthly Score of the extensions + */ + SortByType[SortByType["TrendingMonthly"] = 9] = "TrendingMonthly"; + /** + * The results will be sorted as per ReleaseDate of the extensions (date on which the extension first went public) + */ + SortByType[SortByType["ReleaseDate"] = 10] = "ReleaseDate"; + /** + * The results will be sorted as per Author defined in the VSix/Metadata. If not defined, publisher name is used This is specifically needed by VS IDE, other (new and old) clients are not encouraged to use this + */ + SortByType[SortByType["Author"] = 11] = "Author"; + /** + * The results will be sorted as per Weighted Rating of the extension. + */ + SortByType[SortByType["WeightedRating"] = 12] = "WeightedRating"; +})(SortByType = exports.SortByType || (exports.SortByType = {})); +/** + * Defines the sort order that can be defined for Extensions query + */ +var SortOrderType; +(function (SortOrderType) { + /** + * Results will be sorted in the default order as per the sorting type defined. The default varies for each type, e.g. for Relevance, default is Descending, for Title default is Ascending etc. + */ + SortOrderType[SortOrderType["Default"] = 0] = "Default"; + /** + * The results will be sorted in Ascending order + */ + SortOrderType[SortOrderType["Ascending"] = 1] = "Ascending"; + /** + * The results will be sorted in Descending order + */ + SortOrderType[SortOrderType["Descending"] = 2] = "Descending"; +})(SortOrderType = exports.SortOrderType || (exports.SortOrderType = {})); +var VSCodeWebExtensionStatisicsType; +(function (VSCodeWebExtensionStatisicsType) { + VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Install"] = 1] = "Install"; + VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Update"] = 2] = "Update"; + VSCodeWebExtensionStatisicsType[VSCodeWebExtensionStatisicsType["Uninstall"] = 3] = "Uninstall"; +})(VSCodeWebExtensionStatisicsType = exports.VSCodeWebExtensionStatisicsType || (exports.VSCodeWebExtensionStatisicsType = {})); +exports.TypeInfo = { + AcquisitionAssignmentType: { + enumValues: { + "none": 0, + "me": 1, + "all": 2 + } + }, + AcquisitionOperation: {}, + AcquisitionOperationState: { + enumValues: { + "disallow": 0, + "allow": 1, + "completed": 3 + } + }, + AcquisitionOperationType: { + enumValues: { + "get": 0, + "install": 1, + "buy": 2, + "try": 3, + "request": 4, + "none": 5, + "purchaseRequest": 6 + } + }, + AcquisitionOptions: {}, + AzureRestApiResponseModel: {}, + Concern: {}, + ConcernCategory: { + enumValues: { + "general": 1, + "abusive": 2, + "spam": 4 + } + }, + CustomerLastContact: {}, + CustomerSupportRequest: {}, + DraftPatchOperation: { + enumValues: { + "publish": 1, + "cancel": 2 + } + }, + DraftStateType: { + enumValues: { + "unpublished": 1, + "published": 2, + "cancelled": 3, + "error": 4 + } + }, + ExtensionAcquisitionRequest: {}, + ExtensionDailyStat: {}, + ExtensionDailyStats: {}, + ExtensionDeploymentTechnology: { + enumValues: { + "exe": 1, + "msi": 2, + "vsix": 3, + "referralLink": 4 + } + }, + ExtensionDraft: {}, + ExtensionDraftPatch: {}, + ExtensionEvent: {}, + ExtensionEvents: {}, + ExtensionFilterResult: {}, + ExtensionLifecycleEventType: { + enumValues: { + "uninstall": 1, + "install": 2, + "review": 3, + "acquisition": 4, + "sales": 5, + "other": 999 + } + }, + ExtensionPayload: {}, + ExtensionPolicy: {}, + ExtensionPolicyFlags: { + enumValues: { + "none": 0, + "private": 1, + "public": 2, + "preview": 4, + "released": 8, + "firstParty": 16, + "all": 31 + } + }, + ExtensionQuery: {}, + ExtensionQueryFilterType: { + enumValues: { + "tag": 1, + "displayName": 2, + "private": 3, + "id": 4, + "category": 5, + "contributionType": 6, + "name": 7, + "installationTarget": 8, + "featured": 9, + "searchText": 10, + "featuredInCategory": 11, + "excludeWithFlags": 12, + "includeWithFlags": 13, + "lcid": 14, + "installationTargetVersion": 15, + "installationTargetVersionRange": 16, + "vsixMetadata": 17, + "publisherName": 18, + "publisherDisplayName": 19, + "includeWithPublisherFlags": 20, + "organizationSharedWith": 21, + "productArchitecture": 22, + "targetPlatform": 23 + } + }, + ExtensionQueryFlags: { + enumValues: { + "none": 0, + "includeVersions": 1, + "includeFiles": 2, + "includeCategoryAndTags": 4, + "includeSharedAccounts": 8, + "includeVersionProperties": 16, + "excludeNonValidated": 32, + "includeInstallationTargets": 64, + "includeAssetUri": 128, + "includeStatistics": 256, + "includeLatestVersionOnly": 512, + "useFallbackAssetUri": 1024, + "includeMetadata": 2048, + "includeMinimalPayloadForVsIde": 4096, + "includeLcids": 8192, + "includeSharedOrganizations": 16384, + "includeNameConflictInfo": 32768, + "allAttributes": 16863 + } + }, + ExtensionQueryResult: {}, + ExtensionStatisticOperation: { + enumValues: { + "none": 0, + "set": 1, + "increment": 2, + "decrement": 3, + "delete": 4 + } + }, + ExtensionStatisticUpdate: {}, + ExtensionStatsAggregateType: { + enumValues: { + "daily": 1 + } + }, + ExtensionVersion: {}, + ExtensionVersionFlags: { + enumValues: { + "none": 0, + "validated": 1 + } + }, + NotificationsData: {}, + NotificationTemplateType: { + enumValues: { + "reviewNotification": 1, + "qnaNotification": 2, + "customerContactNotification": 3, + "publisherMemberUpdateNotification": 4 + } + }, + PagingDirection: { + enumValues: { + "backward": 1, + "forward": 2 + } + }, + PublishedExtension: {}, + PublishedExtensionFlags: { + enumValues: { + "none": 0, + "disabled": 1, + "builtIn": 2, + "validated": 4, + "trusted": 8, + "paid": 16, + "public": 256, + "multiVersion": 512, + "system": 1024, + "preview": 2048, + "unpublished": 4096, + "trial": 8192, + "locked": 16384, + "hidden": 32768 + } + }, + Publisher: {}, + PublisherBase: {}, + PublisherFacts: {}, + PublisherFilterResult: {}, + PublisherFlags: { + enumValues: { + "unChanged": 1073741824, + "none": 0, + "disabled": 1, + "verified": 2, + "certified": 4, + "serviceFlags": 7 + } + }, + PublisherPermissions: { + enumValues: { + "read": 1, + "updateExtension": 2, + "createPublisher": 4, + "publishExtension": 8, + "admin": 16, + "trustedPartner": 32, + "privateRead": 64, + "deleteExtension": 128, + "editSettings": 256, + "viewPermissions": 512, + "managePermissions": 1024, + "deletePublisher": 2048 + } + }, + PublisherQuery: {}, + PublisherQueryFlags: { + enumValues: { + "none": 0, + "includeExtensions": 1, + "includeEmailAddress": 2 + } + }, + PublisherQueryResult: {}, + PublisherRoleAccess: { + enumValues: { + "assigned": 1, + "inherited": 2 + } + }, + PublisherRoleAssignment: {}, + PublisherState: { + enumValues: { + "none": 0, + "verificationPending": 1, + "certificationPending": 2, + "certificationRejected": 4, + "certificationRevoked": 8 + } + }, + QnAItem: {}, + QnAItemStatus: { + enumValues: { + "none": 0, + "userEditable": 1, + "publisherCreated": 2 + } + }, + QueryFilter: {}, + Question: {}, + QuestionsResult: {}, + Response: {}, + RestApiResponseStatus: { + enumValues: { + "completed": 0, + "failed": 1, + "inprogress": 2, + "skipped": 3 + } + }, + RestApiResponseStatusModel: {}, + Review: {}, + ReviewEventOperation: { + enumValues: { + "create": 1, + "update": 2, + "delete": 3 + } + }, + ReviewEventProperties: {}, + ReviewFilterOptions: { + enumValues: { + "none": 0, + "filterEmptyReviews": 1, + "filterEmptyUserNames": 2 + } + }, + ReviewPatch: {}, + ReviewPatchOperation: { + enumValues: { + "flagReview": 1, + "updateReview": 2, + "replyToReview": 3, + "adminResponseForReview": 4, + "deleteAdminReply": 5, + "deletePublisherReply": 6 + } + }, + ReviewReply: {}, + ReviewResourceType: { + enumValues: { + "review": 1, + "publisherReply": 2, + "adminReply": 3 + } + }, + ReviewsResult: {}, + SortByType: { + enumValues: { + "relevance": 0, + "lastUpdatedDate": 1, + "title": 2, + "publisher": 3, + "installCount": 4, + "publishedDate": 5, + "averageRating": 6, + "trendingDaily": 7, + "trendingWeekly": 8, + "trendingMonthly": 9, + "releaseDate": 10, + "author": 11, + "weightedRating": 12 + } + }, + SortOrderType: { + enumValues: { + "default": 0, + "ascending": 1, + "descending": 2 + } + }, + UserExtensionPolicy: {}, + UserReportedConcern: {}, + VSCodeWebExtensionStatisicsType: { + enumValues: { + "install": 1, + "update": 2, + "uninstall": 3 + } + }, +}; +exports.TypeInfo.AcquisitionOperation.fields = { + operationState: { + enumType: exports.TypeInfo.AcquisitionOperationState + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.AcquisitionOptions.fields = { + defaultOperation: { + typeInfo: exports.TypeInfo.AcquisitionOperation + }, + operations: { + isArray: true, + typeInfo: exports.TypeInfo.AcquisitionOperation + } +}; +exports.TypeInfo.AzureRestApiResponseModel.fields = { + operationStatus: { + typeInfo: exports.TypeInfo.RestApiResponseStatusModel + } +}; +exports.TypeInfo.Concern.fields = { + category: { + enumType: exports.TypeInfo.ConcernCategory + }, + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.CustomerLastContact.fields = { + lastContactDate: { + isDate: true, + } +}; +exports.TypeInfo.CustomerSupportRequest.fields = { + review: { + typeInfo: exports.TypeInfo.Review + } +}; +exports.TypeInfo.ExtensionAcquisitionRequest.fields = { + assignmentType: { + enumType: exports.TypeInfo.AcquisitionAssignmentType + }, + operationType: { + enumType: exports.TypeInfo.AcquisitionOperationType + } +}; +exports.TypeInfo.ExtensionDailyStat.fields = { + statisticDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionDailyStats.fields = { + dailyStats: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionDailyStat + } +}; +exports.TypeInfo.ExtensionDraft.fields = { + createdDate: { + isDate: true, + }, + draftState: { + enumType: exports.TypeInfo.DraftStateType + }, + lastUpdated: { + isDate: true, + }, + payload: { + typeInfo: exports.TypeInfo.ExtensionPayload + } +}; +exports.TypeInfo.ExtensionDraftPatch.fields = { + operation: { + enumType: exports.TypeInfo.DraftPatchOperation + } +}; +exports.TypeInfo.ExtensionEvent.fields = { + statisticDate: { + isDate: true, + } +}; +exports.TypeInfo.ExtensionEvents.fields = { + events: { + isDictionary: true, + dictionaryValueFieldInfo: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionEvent + } + } +}; +exports.TypeInfo.ExtensionFilterResult.fields = { + extensions: { + isArray: true, + typeInfo: exports.TypeInfo.PublishedExtension + } +}; +exports.TypeInfo.ExtensionPayload.fields = { + type: { + enumType: exports.TypeInfo.ExtensionDeploymentTechnology + } +}; +exports.TypeInfo.ExtensionPolicy.fields = { + install: { + enumType: exports.TypeInfo.ExtensionPolicyFlags + }, + request: { + enumType: exports.TypeInfo.ExtensionPolicyFlags + } +}; +exports.TypeInfo.ExtensionQuery.fields = { + filters: { + isArray: true, + typeInfo: exports.TypeInfo.QueryFilter + }, + flags: { + enumType: exports.TypeInfo.ExtensionQueryFlags + } +}; +exports.TypeInfo.ExtensionQueryResult.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionFilterResult + } +}; +exports.TypeInfo.ExtensionStatisticUpdate.fields = { + operation: { + enumType: exports.TypeInfo.ExtensionStatisticOperation + } +}; +exports.TypeInfo.ExtensionVersion.fields = { + flags: { + enumType: exports.TypeInfo.ExtensionVersionFlags + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.NotificationsData.fields = { + type: { + enumType: exports.TypeInfo.NotificationTemplateType + } +}; +exports.TypeInfo.PublishedExtension.fields = { + deploymentType: { + enumType: exports.TypeInfo.ExtensionDeploymentTechnology + }, + flags: { + enumType: exports.TypeInfo.PublishedExtensionFlags + }, + lastUpdated: { + isDate: true, + }, + publishedDate: { + isDate: true, + }, + publisher: { + typeInfo: exports.TypeInfo.PublisherFacts + }, + releaseDate: { + isDate: true, + }, + versions: { + isArray: true, + typeInfo: exports.TypeInfo.ExtensionVersion + } +}; +exports.TypeInfo.Publisher.fields = { + extensions: { + isArray: true, + typeInfo: exports.TypeInfo.PublishedExtension + }, + flags: { + enumType: exports.TypeInfo.PublisherFlags + }, + lastUpdated: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.PublisherState + } +}; +exports.TypeInfo.PublisherBase.fields = { + extensions: { + isArray: true, + typeInfo: exports.TypeInfo.PublishedExtension + }, + flags: { + enumType: exports.TypeInfo.PublisherFlags + }, + lastUpdated: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.PublisherState + } +}; +exports.TypeInfo.PublisherFacts.fields = { + flags: { + enumType: exports.TypeInfo.PublisherFlags + } +}; +exports.TypeInfo.PublisherFilterResult.fields = { + publishers: { + isArray: true, + typeInfo: exports.TypeInfo.Publisher + } +}; +exports.TypeInfo.PublisherQuery.fields = { + filters: { + isArray: true, + typeInfo: exports.TypeInfo.QueryFilter + }, + flags: { + enumType: exports.TypeInfo.PublisherQueryFlags + } +}; +exports.TypeInfo.PublisherQueryResult.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.PublisherFilterResult + } +}; +exports.TypeInfo.PublisherRoleAssignment.fields = { + access: { + enumType: exports.TypeInfo.PublisherRoleAccess + } +}; +exports.TypeInfo.QnAItem.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.QueryFilter.fields = { + direction: { + enumType: exports.TypeInfo.PagingDirection + } +}; +exports.TypeInfo.Question.fields = { + createdDate: { + isDate: true, + }, + responses: { + isArray: true, + typeInfo: exports.TypeInfo.Response + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.QuestionsResult.fields = { + questions: { + isArray: true, + typeInfo: exports.TypeInfo.Question + } +}; +exports.TypeInfo.Response.fields = { + createdDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.QnAItemStatus + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.RestApiResponseStatusModel.fields = { + status: { + enumType: exports.TypeInfo.RestApiResponseStatus + } +}; +exports.TypeInfo.Review.fields = { + adminReply: { + typeInfo: exports.TypeInfo.ReviewReply + }, + reply: { + typeInfo: exports.TypeInfo.ReviewReply + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.ReviewEventProperties.fields = { + eventOperation: { + enumType: exports.TypeInfo.ReviewEventOperation + }, + replyDate: { + isDate: true, + }, + resourceType: { + enumType: exports.TypeInfo.ReviewResourceType + }, + reviewDate: { + isDate: true, + } +}; +exports.TypeInfo.ReviewPatch.fields = { + operation: { + enumType: exports.TypeInfo.ReviewPatchOperation + }, + reportedConcern: { + typeInfo: exports.TypeInfo.UserReportedConcern + }, + reviewItem: { + typeInfo: exports.TypeInfo.Review + } +}; +exports.TypeInfo.ReviewReply.fields = { + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.ReviewsResult.fields = { + reviews: { + isArray: true, + typeInfo: exports.TypeInfo.Review + } +}; +exports.TypeInfo.UserExtensionPolicy.fields = { + permissions: { + typeInfo: exports.TypeInfo.ExtensionPolicy + } +}; +exports.TypeInfo.UserReportedConcern.fields = { + category: { + enumType: exports.TypeInfo.ConcernCategory + }, + submittedDate: { + isDate: true, + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts new file mode 100644 index 0000000..fc4d373 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts @@ -0,0 +1,4112 @@ +import PolicyInterfaces = require("../interfaces/PolicyInterfaces"); +import TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface AssociatedWorkItem { + assignedTo?: string; + /** + * Id of associated the work item. + */ + id?: number; + state?: string; + title?: string; + /** + * REST Url of the work item. + */ + url?: string; + webUrl?: string; + workItemType?: string; +} +export interface AsyncGitOperationNotification { + operationId?: number; +} +export interface AsyncRefOperationCommitLevelEventNotification extends AsyncGitOperationNotification { + commitId?: string; +} +export interface AsyncRefOperationCompletedNotification extends AsyncGitOperationNotification { + newRefName?: string; +} +export interface AsyncRefOperationConflictNotification extends AsyncRefOperationCommitLevelEventNotification { +} +export interface AsyncRefOperationGeneralFailureNotification extends AsyncGitOperationNotification { +} +export interface AsyncRefOperationProgressNotification extends AsyncRefOperationCommitLevelEventNotification { + progress?: number; +} +export interface AsyncRefOperationTimeoutNotification extends AsyncGitOperationNotification { +} +/** + * Meta data for a file attached to an artifact. + */ +export interface Attachment { + /** + * Links to other related objects. + */ + _links?: any; + /** + * The person that uploaded this attachment. + */ + author?: VSSInterfaces.IdentityRef; + /** + * Content hash of on-disk representation of file content. Its calculated by the server by using SHA1 hash function. + */ + contentHash?: string; + /** + * The time the attachment was uploaded. + */ + createdDate?: Date; + /** + * The description of the attachment. + */ + description?: string; + /** + * The display name of the attachment. Can't be null or empty. + */ + displayName?: string; + /** + * Id of the attachment. + */ + id?: number; + /** + * Extended properties. + */ + properties?: any; + /** + * The url to download the content of the attachment. + */ + url?: string; +} +/** + * Real time event (SignalR) for an auto-complete update on a pull request + */ +export interface AutoCompleteUpdatedEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for a source/target branch update on a pull request + */ +export interface BranchUpdatedEvent extends RealTimePullRequestEvent { + /** + * If true, the source branch of the pull request was updated + */ + isSourceUpdate?: boolean; +} +export interface Change { + /** + * The type of change that was made to the item. + */ + changeType?: VersionControlChangeType; + /** + * Current version. + */ + item?: T; + /** + * Content of the item after the change. + */ + newContent?: ItemContent; + /** + * Path of the item on the server. + */ + sourceServerItem?: string; + /** + * URL to retrieve the item. + */ + url?: string; +} +export interface ChangeCountDictionary { +} +export interface ChangeList { + allChangesIncluded?: boolean; + changeCounts?: { + [key: number]: number; + }; + changes?: Change[]; + comment?: string; + commentTruncated?: boolean; + creationDate?: Date; + notes?: CheckinNote[]; + owner?: string; + ownerDisplayName?: string; + ownerId?: string; + sortDate?: Date; + version?: string; +} +/** + * Criteria used in a search for change lists + */ +export interface ChangeListSearchCriteria { + /** + * If provided, a version descriptor to compare against base + */ + compareVersion?: string; + /** + * If true, don't include delete history entries + */ + excludeDeletes?: boolean; + /** + * Whether or not to follow renames for the given item being queried + */ + followRenames?: boolean; + /** + * If provided, only include history entries created after this date (string) + */ + fromDate?: string; + /** + * If provided, a version descriptor for the earliest change list to include + */ + fromVersion?: string; + /** + * Path of item to search under. If the itemPaths memebr is used then it will take precedence over this. + */ + itemPath?: string; + /** + * List of item paths to search under. If this member is used then itemPath will be ignored. + */ + itemPaths?: string[]; + /** + * Version of the items to search + */ + itemVersion?: string; + /** + * Number of results to skip (used when clicking more...) + */ + skip?: number; + /** + * If provided, only include history entries created before this date (string) + */ + toDate?: string; + /** + * If provided, the maximum number of history entries to return + */ + top?: number; + /** + * If provided, a version descriptor for the latest change list to include + */ + toVersion?: string; + /** + * Alias or display name of user who made the changes + */ + user?: string; +} +export interface CheckinNote { + name?: string; + value?: string; +} +/** + * Represents a comment which is one of potentially many in a comment thread. + */ +export interface Comment { + /** + * Links to other related objects. + */ + _links?: any; + /** + * The author of the comment. + */ + author?: VSSInterfaces.IdentityRef; + /** + * The comment type at the time of creation. + */ + commentType?: CommentType; + /** + * The comment content. + */ + content?: string; + /** + * The comment ID. IDs start at 1 and are unique to a pull request. + */ + id?: number; + /** + * Whether or not this comment was soft-deleted. + */ + isDeleted?: boolean; + /** + * The date the comment's content was last updated. + */ + lastContentUpdatedDate?: Date; + /** + * The date the comment was last updated. + */ + lastUpdatedDate?: Date; + /** + * The ID of the parent comment. This is used for replies. + */ + parentCommentId?: number; + /** + * The date the comment was first published. + */ + publishedDate?: Date; + /** + * A list of the users who have liked this comment. + */ + usersLiked?: VSSInterfaces.IdentityRef[]; +} +/** + * Comment iteration context is used to identify which diff was being viewed when the thread was created. + */ +export interface CommentIterationContext { + /** + * The iteration of the file on the left side of the diff when the thread was created. If this value is equal to SecondComparingIteration, then this version is the common commit between the source and target branches of the pull request. + */ + firstComparingIteration?: number; + /** + * The iteration of the file on the right side of the diff when the thread was created. + */ + secondComparingIteration?: number; +} +export interface CommentPosition { + /** + * The line number of a thread's position. Starts at 1. + */ + line?: number; + /** + * The character offset of a thread's position inside of a line. Starts at 0. + */ + offset?: number; +} +/** + * Represents a comment thread of a pull request. A thread contains meta data about the file it was left on along with one or more comments (an initial comment and the subsequent replies). + */ +export interface CommentThread { + /** + * Links to other related objects. + */ + _links?: any; + /** + * A list of the comments. + */ + comments?: Comment[]; + /** + * The comment thread id. + */ + id?: number; + /** + * Set of identities related to this thread + */ + identities?: { + [key: string]: VSSInterfaces.IdentityRef; + }; + /** + * Specify if the thread is deleted which happens when all comments are deleted. + */ + isDeleted?: boolean; + /** + * The time this thread was last updated. + */ + lastUpdatedDate?: Date; + /** + * Optional properties associated with the thread as a collection of key-value pairs. + */ + properties?: any; + /** + * The time this thread was published. + */ + publishedDate?: Date; + /** + * The status of the comment thread. + */ + status?: CommentThreadStatus; + /** + * Specify thread context such as position in left/right file. + */ + threadContext?: CommentThreadContext; +} +export interface CommentThreadContext { + /** + * File path relative to the root of the repository. It's up to the client to use any path format. + */ + filePath?: string; + /** + * Position of last character of the thread's span in left file. + */ + leftFileEnd?: CommentPosition; + /** + * Position of first character of the thread's span in left file. + */ + leftFileStart?: CommentPosition; + /** + * Position of last character of the thread's span in right file. + */ + rightFileEnd?: CommentPosition; + /** + * Position of first character of the thread's span in right file. + */ + rightFileStart?: CommentPosition; +} +/** + * The status of a comment thread. + */ +export declare enum CommentThreadStatus { + /** + * The thread status is unknown. + */ + Unknown = 0, + /** + * The thread status is active. + */ + Active = 1, + /** + * The thread status is resolved as fixed. + */ + Fixed = 2, + /** + * The thread status is resolved as won't fix. + */ + WontFix = 3, + /** + * The thread status is closed. + */ + Closed = 4, + /** + * The thread status is resolved as by design. + */ + ByDesign = 5, + /** + * The thread status is pending. + */ + Pending = 6 +} +/** + * Comment tracking criteria is used to identify which iteration context the thread has been tracked to (if any) along with some detail about the original position and filename. + */ +export interface CommentTrackingCriteria { + /** + * The iteration of the file on the left side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0. + */ + firstComparingIteration?: number; + /** + * Original filepath the thread was created on before tracking. This will be different than the current thread filepath if the file in question was renamed in a later iteration. + */ + origFilePath?: string; + /** + * Original position of last character of the thread's span in left file. + */ + origLeftFileEnd?: CommentPosition; + /** + * Original position of first character of the thread's span in left file. + */ + origLeftFileStart?: CommentPosition; + /** + * Original position of last character of the thread's span in right file. + */ + origRightFileEnd?: CommentPosition; + /** + * Original position of first character of the thread's span in right file. + */ + origRightFileStart?: CommentPosition; + /** + * The iteration of the file on the right side of the diff that the thread will be tracked to. Threads were tracked if this is greater than 0. + */ + secondComparingIteration?: number; +} +/** + * The type of a comment. + */ +export declare enum CommentType { + /** + * The comment type is not known. + */ + Unknown = 0, + /** + * This is a regular user comment. + */ + Text = 1, + /** + * The comment comes as a result of a code change. + */ + CodeChange = 2, + /** + * The comment represents a system message. + */ + System = 3 +} +/** + * Real time event (SignalR) for a completion errors on a pull request + */ +export interface CompletionErrorsEvent extends RealTimePullRequestEvent { + /** + * The error message associated with the completion error + */ + errorMessage?: string; +} +/** + * Real time event (SignalR) for a discussions update on a pull request + */ +export interface DiscussionsUpdatedEvent extends RealTimePullRequestEvent { +} +export interface FileContentMetadata { + contentType?: string; + encoding?: number; + extension?: string; + fileName?: string; + isBinary?: boolean; + isImage?: boolean; + vsLink?: string; +} +/** + * Provides properties that describe file differences + */ +export interface FileDiff { + /** + * The collection of line diff blocks + */ + lineDiffBlocks?: LineDiffBlock[]; + /** + * Original path of item if different from current path. + */ + originalPath?: string; + /** + * Current path of item + */ + path?: string; +} +/** + * Provides parameters that describe inputs for the file diff + */ +export interface FileDiffParams { + /** + * Original path of the file + */ + originalPath?: string; + /** + * Current path of the file + */ + path?: string; +} +/** + * Provides properties that describe inputs for the file diffs + */ +export interface FileDiffsCriteria { + /** + * Commit ID of the base version + */ + baseVersionCommit?: string; + /** + * List of parameters for each of the files for which we need to get the file diff + */ + fileDiffParams?: FileDiffParams[]; + /** + * Commit ID of the target version + */ + targetVersionCommit?: string; +} +/** + * A Git annotated tag. + */ +export interface GitAnnotatedTag { + /** + * The tagging Message + */ + message?: string; + /** + * The name of the annotated tag. + */ + name?: string; + /** + * The objectId (Sha1Id) of the tag. + */ + objectId?: string; + /** + * User info and date of tagging. + */ + taggedBy?: GitUserDate; + /** + * Tagged git object. + */ + taggedObject?: GitObject; + url?: string; +} +/** + * Current status of the asynchronous operation. + */ +export declare enum GitAsyncOperationStatus { + /** + * The operation is waiting in a queue and has not yet started. + */ + Queued = 1, + /** + * The operation is currently in progress. + */ + InProgress = 2, + /** + * The operation has completed. + */ + Completed = 3, + /** + * The operation has failed. Check for an error message. + */ + Failed = 4, + /** + * The operation has been abandoned. + */ + Abandoned = 5 +} +export interface GitAsyncRefOperation { + _links?: any; + detailedStatus?: GitAsyncRefOperationDetail; + parameters?: GitAsyncRefOperationParameters; + status?: GitAsyncOperationStatus; + /** + * A URL that can be used to make further requests for status about the operation + */ + url?: string; +} +/** + * Information about the progress of a cherry pick or revert operation. + */ +export interface GitAsyncRefOperationDetail { + /** + * Indicates if there was a conflict generated when trying to cherry pick or revert the changes. + */ + conflict?: boolean; + /** + * The current commit from the list of commits that are being cherry picked or reverted. + */ + currentCommitId?: string; + /** + * Detailed information about why the cherry pick or revert failed to complete. + */ + failureMessage?: string; + /** + * A number between 0 and 1 indicating the percent complete of the operation. + */ + progress?: number; + /** + * Provides a status code that indicates the reason the cherry pick or revert failed. + */ + status?: GitAsyncRefOperationFailureStatus; + /** + * Indicates if the operation went beyond the maximum time allowed for a cherry pick or revert operation. + */ + timedout?: boolean; +} +export declare enum GitAsyncRefOperationFailureStatus { + /** + * No status + */ + None = 0, + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + InvalidRefName = 1, + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + RefNameConflict = 2, + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + CreateBranchPermissionRequired = 3, + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + WritePermissionRequired = 4, + /** + * Target branch was deleted after Git async operation started + */ + TargetBranchDeleted = 5, + /** + * Git object is too large to materialize into memory + */ + GitObjectTooLarge = 6, + /** + * Identity who authorized the operation was not found + */ + OperationIndentityNotFound = 7, + /** + * Async operation was not found + */ + AsyncOperationNotFound = 8, + /** + * Unexpected failure + */ + Other = 9, + /** + * Initiator of async operation has signature with empty name or email + */ + EmptyCommitterSignature = 10 +} +/** + * Parameters that are provided in the request body when requesting to cherry pick or revert. + */ +export interface GitAsyncRefOperationParameters { + /** + * Proposed target branch name for the cherry pick or revert operation. + */ + generatedRefName?: string; + /** + * The target branch for the cherry pick or revert operation. + */ + ontoRefName?: string; + /** + * The git repository for the cherry pick or revert operation. + */ + repository?: GitRepository; + /** + * Details about the source of the cherry pick or revert operation (e.g. A pull request or a specific commit). + */ + source?: GitAsyncRefOperationSource; +} +/** + * GitAsyncRefOperationSource specifies the pull request or list of commits to use when making a cherry pick and revert operation request. Only one should be provided. + */ +export interface GitAsyncRefOperationSource { + /** + * A list of commits to cherry pick or revert + */ + commitList?: GitCommitRef[]; + /** + * Id of the pull request to cherry pick or revert + */ + pullRequestId?: number; +} +export interface GitBaseVersionDescriptor extends GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + baseVersion?: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + baseVersionOptions?: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + baseVersionType?: GitVersionType; +} +export interface GitBlobRef { + _links?: any; + /** + * SHA1 hash of git object + */ + objectId?: string; + /** + * Size of blob content (in bytes) + */ + size?: number; + url?: string; +} +/** + * Ahead and behind counts for a particular ref. + */ +export interface GitBranchStats { + /** + * Number of commits ahead. + */ + aheadCount?: number; + /** + * Number of commits behind. + */ + behindCount?: number; + /** + * Current commit. + */ + commit?: GitCommitRef; + /** + * True if this is the result for the base version. + */ + isBaseVersion?: boolean; + /** + * Name of the ref. + */ + name?: string; +} +export interface GitChange extends Change { + /** + * ID of the change within the group of changes. + */ + changeId?: number; + /** + * New Content template to be used when pushing new changes. + */ + newContentTemplate?: GitTemplate; + /** + * Original path of item if different from current path. + */ + originalPath?: string; +} +/** + * This object is returned from Cherry Pick operations and provides the id and status of the operation + */ +export interface GitCherryPick extends GitAsyncRefOperation { + cherryPickId?: number; +} +export interface GitCommit extends GitCommitRef { + treeId?: string; +} +export interface GitCommitChanges { + changeCounts?: ChangeCountDictionary; + changes?: GitChange[]; +} +export interface GitCommitDiffs { + aheadCount?: number; + allChangesIncluded?: boolean; + baseCommit?: string; + behindCount?: number; + changeCounts?: { + [key: number]: number; + }; + changes?: GitChange[]; + commonCommit?: string; + targetCommit?: string; +} +/** + * Provides properties that describe a Git commit and associated metadata. + */ +export interface GitCommitRef { + /** + * A collection of related REST reference links. + */ + _links?: any; + /** + * Author of the commit. + */ + author?: GitUserDate; + /** + * Counts of the types of changes (edits, deletes, etc.) included with the commit. + */ + changeCounts?: ChangeCountDictionary; + /** + * An enumeration of the changes included with the commit. + */ + changes?: GitChange[]; + /** + * Comment or message of the commit. + */ + comment?: string; + /** + * Indicates if the comment is truncated from the full Git commit comment message. + */ + commentTruncated?: boolean; + /** + * ID (SHA-1) of the commit. + */ + commitId?: string; + /** + * Committer of the commit. + */ + committer?: GitUserDate; + /** + * An enumeration of the parent commit IDs for this commit. + */ + parents?: string[]; + /** + * The push associated with this commit. + */ + push?: GitPushRef; + /** + * Remote URL path to the commit. + */ + remoteUrl?: string; + /** + * A list of status metadata from services and extensions that may associate additional information to the commit. + */ + statuses?: GitStatus[]; + /** + * REST URL for this resource. + */ + url?: string; + /** + * A list of workitems associated with this commit. + */ + workItems?: VSSInterfaces.ResourceRef[]; +} +export interface GitCommitToCreate { + baseRef?: GitRef; + comment?: string; + pathActions?: GitPathAction[]; +} +export interface GitConflict { + _links?: any; + conflictId?: number; + conflictPath?: string; + conflictType?: GitConflictType; + mergeBaseCommit?: GitCommitRef; + mergeOrigin?: GitMergeOriginRef; + mergeSourceCommit?: GitCommitRef; + mergeTargetCommit?: GitCommitRef; + resolutionError?: GitResolutionError; + resolutionStatus?: GitResolutionStatus; + resolvedBy?: VSSInterfaces.IdentityRef; + resolvedDate?: Date; + url?: string; +} +/** + * Data object for AddAdd conflict + */ +export interface GitConflictAddAdd extends GitConflict { + resolution?: GitResolutionMergeContent; + sourceBlob?: GitBlobRef; + targetBlob?: GitBlobRef; +} +/** + * Data object for RenameAdd conflict + */ +export interface GitConflictAddRename extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionPathConflict; + sourceBlob?: GitBlobRef; + targetBlob?: GitBlobRef; + targetOriginalPath?: string; +} +/** + * Data object for EditDelete conflict + */ +export interface GitConflictDeleteEdit extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionPickOneAction; + targetBlob?: GitBlobRef; +} +/** + * Data object for RenameDelete conflict + */ +export interface GitConflictDeleteRename extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionPickOneAction; + targetBlob?: GitBlobRef; + targetNewPath?: string; +} +/** + * Data object for FileDirectory conflict + */ +export interface GitConflictDirectoryFile extends GitConflict { + resolution?: GitResolutionPathConflict; + sourceTree?: GitTreeRef; + targetBlob?: GitBlobRef; +} +/** + * Data object for DeleteEdit conflict + */ +export interface GitConflictEditDelete extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionPickOneAction; + sourceBlob?: GitBlobRef; +} +/** + * Data object for EditEdit conflict + */ +export interface GitConflictEditEdit extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionMergeContent; + sourceBlob?: GitBlobRef; + targetBlob?: GitBlobRef; +} +/** + * Data object for DirectoryFile conflict + */ +export interface GitConflictFileDirectory extends GitConflict { + resolution?: GitResolutionPathConflict; + sourceBlob?: GitBlobRef; + targetTree?: GitTreeRef; +} +/** + * Data object for Rename1to2 conflict + */ +export interface GitConflictRename1to2 extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionRename1to2; + sourceBlob?: GitBlobRef; + sourceNewPath?: string; + targetBlob?: GitBlobRef; + targetNewPath?: string; +} +/** + * Data object for Rename2to1 conflict + */ +export interface GitConflictRename2to1 extends GitConflict { + resolution?: GitResolutionPathConflict; + sourceNewBlob?: GitBlobRef; + sourceOriginalBlob?: GitBlobRef; + sourceOriginalPath?: string; + targetNewBlob?: GitBlobRef; + targetOriginalBlob?: GitBlobRef; + targetOriginalPath?: string; +} +/** + * Data object for AddRename conflict + */ +export interface GitConflictRenameAdd extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionPathConflict; + sourceBlob?: GitBlobRef; + sourceOriginalPath?: string; + targetBlob?: GitBlobRef; +} +/** + * Data object for DeleteRename conflict + */ +export interface GitConflictRenameDelete extends GitConflict { + baseBlob?: GitBlobRef; + resolution?: GitResolutionPickOneAction; + sourceBlob?: GitBlobRef; + sourceNewPath?: string; +} +/** + * Data object for RenameRename conflict + */ +export interface GitConflictRenameRename extends GitConflict { + baseBlob?: GitBlobRef; + originalPath?: string; + resolution?: GitResolutionMergeContent; + sourceBlob?: GitBlobRef; + targetBlob?: GitBlobRef; +} +/** + * The type of a merge conflict. + */ +export declare enum GitConflictType { + /** + * No conflict + */ + None = 0, + /** + * Added on source and target; content differs + */ + AddAdd = 1, + /** + * Added on source and rename destination on target + */ + AddRename = 2, + /** + * Deleted on source and edited on target + */ + DeleteEdit = 3, + /** + * Deleted on source and renamed on target + */ + DeleteRename = 4, + /** + * Path is a directory on source and a file on target + */ + DirectoryFile = 5, + /** + * Children of directory which has DirectoryFile or FileDirectory conflict + */ + DirectoryChild = 6, + /** + * Edited on source and deleted on target + */ + EditDelete = 7, + /** + * Edited on source and target; content differs + */ + EditEdit = 8, + /** + * Path is a file on source and a directory on target + */ + FileDirectory = 9, + /** + * Same file renamed on both source and target; destination paths differ + */ + Rename1to2 = 10, + /** + * Different files renamed to same destination path on both source and target + */ + Rename2to1 = 11, + /** + * Rename destination on source and new file on target + */ + RenameAdd = 12, + /** + * Renamed on source and deleted on target + */ + RenameDelete = 13, + /** + * Rename destination on both source and target; content differs + */ + RenameRename = 14 +} +export interface GitConflictUpdateResult { + /** + * Conflict ID that was provided by input + */ + conflictId?: number; + /** + * Reason for failing + */ + customMessage?: string; + /** + * New state of the conflict after updating + */ + updatedConflict?: GitConflict; + /** + * Status of the update on the server + */ + updateStatus?: GitConflictUpdateStatus; +} +/** + * Represents the possible outcomes from a request to update a pull request conflict + */ +export declare enum GitConflictUpdateStatus { + /** + * Indicates that pull request conflict update request was completed successfully + */ + Succeeded = 0, + /** + * Indicates that the update request did not fit the expected data contract + */ + BadRequest = 1, + /** + * Indicates that the requested resolution was not valid + */ + InvalidResolution = 2, + /** + * Indicates that the conflict in the update request was not a supported conflict type + */ + UnsupportedConflictType = 3, + /** + * Indicates that the conflict could not be found + */ + NotFound = 4 +} +export interface GitDeletedRepository { + createdDate?: Date; + deletedBy?: VSSInterfaces.IdentityRef; + deletedDate?: Date; + id?: string; + name?: string; + project?: TfsCoreInterfaces.TeamProjectReference; +} +export interface GitFilePathsCollection { + commitId?: string; + paths?: string[]; + url?: string; +} +/** + * Status information about a requested fork operation. + */ +export interface GitForkOperationStatusDetail { + /** + * All valid steps for the forking process + */ + allSteps?: string[]; + /** + * Index into AllSteps for the current step + */ + currentStep?: number; + /** + * Error message if the operation failed. + */ + errorMessage?: string; +} +/** + * Information about a fork ref. + */ +export interface GitForkRef extends GitRef { + /** + * The repository ID of the fork. + */ + repository?: GitRepository; +} +/** + * Request to sync data between two forks. + */ +export interface GitForkSyncRequest { + /** + * Collection of related links + */ + _links?: any; + detailedStatus?: GitForkOperationStatusDetail; + /** + * Unique identifier for the operation. + */ + operationId?: number; + /** + * Fully-qualified identifier for the source repository. + */ + source: GlobalGitRepositoryKey; + /** + * If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. + */ + sourceToTargetRefs?: SourceToTargetRef[]; + status?: GitAsyncOperationStatus; +} +/** + * Parameters for creating a fork request + */ +export interface GitForkSyncRequestParameters { + /** + * Fully-qualified identifier for the source repository. + */ + source: GlobalGitRepositoryKey; + /** + * If supplied, the set of ref mappings to use when performing a "sync" or create. If missing, all refs will be synchronized. + */ + sourceToTargetRefs?: SourceToTargetRef[]; +} +export interface GitForkTeamProjectReference extends TfsCoreInterfaces.TeamProjectReference { +} +/** + * Accepted types of version + */ +export declare enum GitHistoryMode { + /** + * The history mode used by `git log`. This is the default. + */ + SimplifiedHistory = 0, + /** + * The history mode used by `git log --first-parent` + */ + FirstParent = 1, + /** + * The history mode used by `git log --full-history` + */ + FullHistory = 2, + /** + * The history mode used by `git log --full-history --simplify-merges` + */ + FullHistorySimplifyMerges = 3 +} +export interface GitImportFailedEvent { + sourceRepositoryName?: string; + targetRepository?: GitRepository; +} +/** + * Parameter for creating a git import request when source is Git version control + */ +export interface GitImportGitSource { + /** + * Tells if this is a sync request or not + */ + overwrite?: boolean; + /** + * Url for the source repo + */ + url?: string; +} +/** + * A request to import data from a remote source control system. + */ +export interface GitImportRequest { + /** + * Links to related resources. + */ + _links?: any; + /** + * Detailed status of the import, including the current step and an error message, if applicable. + */ + detailedStatus?: GitImportStatusDetail; + /** + * The unique identifier for this import request. + */ + importRequestId?: number; + /** + * Parameters for creating the import request. + */ + parameters?: GitImportRequestParameters; + /** + * The target repository for this import. + */ + repository?: GitRepository; + /** + * Current status of the import. + */ + status?: GitAsyncOperationStatus; + /** + * A link back to this import request resource. + */ + url?: string; +} +/** + * Parameters for creating an import request + */ +export interface GitImportRequestParameters { + /** + * Option to delete service endpoint when import is done + */ + deleteServiceEndpointAfterImportIsDone?: boolean; + /** + * Source for importing git repository + */ + gitSource?: GitImportGitSource; + /** + * Service Endpoint for connection to external endpoint + */ + serviceEndpointId?: string; + /** + * Source for importing tfvc repository + */ + tfvcSource?: GitImportTfvcSource; +} +/** + * Additional status information about an import request. + */ +export interface GitImportStatusDetail { + /** + * All valid steps for the import process + */ + allSteps?: string[]; + /** + * Index into AllSteps for the current step + */ + currentStep?: number; + /** + * Error message if the operation failed. + */ + errorMessage?: string; +} +export interface GitImportSucceededEvent { + sourceRepositoryName?: string; + targetRepository?: GitRepository; +} +/** + * Parameter for creating a git import request when source is tfvc version control + */ +export interface GitImportTfvcSource { + /** + * Set true to import History, false otherwise + */ + importHistory?: boolean; + /** + * Get history for last n days (max allowed value is 180 days) + */ + importHistoryDurationInDays?: number; + /** + * Path which we want to import (this can be copied from Path Control in Explorer) + */ + path?: string; +} +export interface GitItem extends ItemModel { + /** + * SHA1 of commit item was fetched at + */ + commitId?: string; + /** + * Type of object (Commit, Tree, Blob, Tag, ...) + */ + gitObjectType?: GitObjectType; + /** + * Shallow ref to commit that last changed this item Only populated if latestProcessedChange is requested May not be accurate if latest change is not yet cached + */ + latestProcessedChange?: GitCommitRef; + /** + * Git object id + */ + objectId?: string; + /** + * Git object id + */ + originalObjectId?: string; +} +export interface GitItemDescriptor { + /** + * Path to item + */ + path?: string; + /** + * Specifies whether to include children (OneLevel), all descendants (Full), or None + */ + recursionLevel?: VersionControlRecursionType; + /** + * Version string (interpretation based on VersionType defined in subclass + */ + version?: string; + /** + * Version modifiers (e.g. previous) + */ + versionOptions?: GitVersionOptions; + /** + * How to interpret version (branch,tag,commit) + */ + versionType?: GitVersionType; +} +export interface GitItemRequestData { + /** + * Whether to include metadata for all items + */ + includeContentMetadata?: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + /** + * Collection of items to fetch, including path, version, and recursion level + */ + itemDescriptors?: GitItemDescriptor[]; + /** + * Whether to include shallow ref to commit that last changed each item + */ + latestProcessedChange?: boolean; +} +export interface GitLastChangeItem { + /** + * Gets or sets the commit Id this item was modified most recently for the provided version. + */ + commitId?: string; + /** + * Gets or sets the path of the item. + */ + path?: string; +} +export interface GitLastChangeTreeItems { + /** + * The list of commits referenced by Items, if they were requested. + */ + commits?: GitCommitRef[]; + /** + * The last change of items. + */ + items?: GitLastChangeItem[]; + /** + * The last explored time, in case the result is not comprehensive. Null otherwise. + */ + lastExploredTime?: Date; +} +export interface GitMerge extends GitMergeParameters { + /** + * Reference links. + */ + _links?: any; + /** + * Detailed status of the merge operation. + */ + detailedStatus?: GitMergeOperationStatusDetail; + /** + * Unique identifier for the merge operation. + */ + mergeOperationId?: number; + /** + * Status of the merge operation. + */ + status?: GitAsyncOperationStatus; +} +/** + * Status information about a requested merge operation. + */ +export interface GitMergeOperationStatusDetail { + /** + * Error message if the operation failed. + */ + failureMessage?: string; + /** + * The commitId of the resultant merge commit. + */ + mergeCommitId?: string; +} +export interface GitMergeOriginRef { + cherryPickId?: number; + pullRequestId?: number; + revertId?: number; +} +/** + * Parameters required for performing git merge. + */ +export interface GitMergeParameters { + /** + * Comment or message of the commit. + */ + comment?: string; + /** + * An enumeration of the parent commit IDs for the merge commit. + */ + parents?: string[]; +} +/** + * Git object identifier and type information. + */ +export interface GitObject { + /** + * Object Id (Sha1Id). + */ + objectId?: string; + /** + * Type of object (Commit, Tree, Blob, Tag) + */ + objectType?: GitObjectType; +} +export declare enum GitObjectType { + Bad = 0, + Commit = 1, + Tree = 2, + Blob = 3, + Tag = 4, + Ext2 = 5, + OfsDelta = 6, + RefDelta = 7 +} +export interface GitPathAction { + action?: GitPathActions; + base64Content?: string; + path?: string; + rawTextContent?: string; + targetPath?: string; +} +export declare enum GitPathActions { + None = 0, + Edit = 1, + Delete = 2, + Add = 3, + Rename = 4 +} +export interface GitPathToItemsCollection { + items?: { + [key: string]: GitItem[]; + }; +} +export interface GitPolicyConfigurationResponse { + /** + * The HTTP client methods find the continuation token header in the response and populate this field. + */ + continuationToken?: string; + policyConfigurations?: PolicyInterfaces.PolicyConfiguration[]; +} +/** + * Represents all the data associated with a pull request. + */ +export interface GitPullRequest { + /** + * Links to other related objects. + */ + _links?: any; + /** + * A string which uniquely identifies this pull request. To generate an artifact ID for a pull request, use this template: ```vstfs:///Git/PullRequestId/{projectId}/{repositoryId}/{pullRequestId}``` + */ + artifactId?: string; + /** + * If set, auto-complete is enabled for this pull request and this is the identity that enabled it. + */ + autoCompleteSetBy?: VSSInterfaces.IdentityRef; + /** + * The user who closed the pull request. + */ + closedBy?: VSSInterfaces.IdentityRef; + /** + * The date when the pull request was closed (completed, abandoned, or merged externally). + */ + closedDate?: Date; + /** + * The code review ID of the pull request. Used internally. + */ + codeReviewId?: number; + /** + * The commits contained in the pull request. + */ + commits?: GitCommitRef[]; + /** + * Options which affect how the pull request will be merged when it is completed. + */ + completionOptions?: GitPullRequestCompletionOptions; + /** + * The most recent date at which the pull request entered the queue to be completed. Used internally. + */ + completionQueueTime?: Date; + /** + * The identity of the user who created the pull request. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The date when the pull request was created. + */ + creationDate?: Date; + /** + * The description of the pull request. + */ + description?: string; + /** + * If this is a PR from a fork this will contain information about its source. + */ + forkSource?: GitForkRef; + /** + * Multiple mergebases warning + */ + hasMultipleMergeBases?: boolean; + /** + * Draft / WIP pull request. + */ + isDraft?: boolean; + /** + * The labels associated with the pull request. + */ + labels?: TfsCoreInterfaces.WebApiTagDefinition[]; + /** + * The commit of the most recent pull request merge. If empty, the most recent merge is in progress or was unsuccessful. + */ + lastMergeCommit?: GitCommitRef; + /** + * The commit at the head of the source branch at the time of the last pull request merge. + */ + lastMergeSourceCommit?: GitCommitRef; + /** + * The commit at the head of the target branch at the time of the last pull request merge. + */ + lastMergeTargetCommit?: GitCommitRef; + /** + * If set, pull request merge failed for this reason. + */ + mergeFailureMessage?: string; + /** + * The type of failure (if any) of the pull request merge. + */ + mergeFailureType?: PullRequestMergeFailureType; + /** + * The ID of the job used to run the pull request merge. Used internally. + */ + mergeId?: string; + /** + * Options used when the pull request merge runs. These are separate from completion options since completion happens only once and a new merge will run every time the source branch of the pull request changes. + */ + mergeOptions?: GitPullRequestMergeOptions; + /** + * The current status of the pull request merge. + */ + mergeStatus?: PullRequestAsyncStatus; + /** + * The ID of the pull request. + */ + pullRequestId?: number; + /** + * Used internally. + */ + remoteUrl?: string; + /** + * The repository containing the target branch of the pull request. + */ + repository?: GitRepository; + /** + * A list of reviewers on the pull request along with the state of their votes. + */ + reviewers?: IdentityRefWithVote[]; + /** + * The name of the source branch of the pull request. + */ + sourceRefName?: string; + /** + * The status of the pull request. + */ + status?: PullRequestStatus; + /** + * If true, this pull request supports multiple iterations. Iteration support means individual pushes to the source branch of the pull request can be reviewed and comments left in one iteration will be tracked across future iterations. + */ + supportsIterations?: boolean; + /** + * The name of the target branch of the pull request. + */ + targetRefName?: string; + /** + * The title of the pull request. + */ + title?: string; + /** + * Used internally. + */ + url?: string; + /** + * Any work item references associated with this pull request. + */ + workItemRefs?: VSSInterfaces.ResourceRef[]; +} +/** + * Change made in a pull request. + */ +export interface GitPullRequestChange extends GitChange { + /** + * ID used to track files through multiple changes. + */ + changeTrackingId?: number; +} +/** + * Represents a comment thread of a pull request. A thread contains meta data about the file it was left on (if any) along with one or more comments (an initial comment and the subsequent replies). + */ +export interface GitPullRequestCommentThread extends CommentThread { + /** + * Extended context information unique to pull requests + */ + pullRequestThreadContext?: GitPullRequestCommentThreadContext; +} +/** + * Comment thread context contains details about what diffs were being viewed at the time of thread creation and whether or not the thread has been tracked from that original diff. + */ +export interface GitPullRequestCommentThreadContext { + /** + * Used to track a comment across iterations. This value can be found by looking at the iteration's changes list. Must be set for pull requests with iteration support. Otherwise, it's not required for 'legacy' pull requests. + */ + changeTrackingId?: number; + /** + * The iteration context being viewed when the thread was created. + */ + iterationContext?: CommentIterationContext; + /** + * The criteria used to track this thread. If this property is filled out when the thread is returned, then the thread has been tracked from its original location using the given criteria. + */ + trackingCriteria?: CommentTrackingCriteria; +} +/** + * Preferences about how the pull request should be completed. + */ +export interface GitPullRequestCompletionOptions { + /** + * List of any policy configuration Id's which auto-complete should not wait for. Only applies to optional policies (isBlocking == false). Auto-complete always waits for required policies (isBlocking == true). + */ + autoCompleteIgnoreConfigIds?: number[]; + /** + * If true, policies will be explicitly bypassed while the pull request is completed. + */ + bypassPolicy?: boolean; + /** + * If policies are bypassed, this reason is stored as to why bypass was used. + */ + bypassReason?: string; + /** + * If true, the source branch of the pull request will be deleted after completion. + */ + deleteSourceBranch?: boolean; + /** + * If set, this will be used as the commit message of the merge commit. + */ + mergeCommitMessage?: string; + /** + * Specify the strategy used to merge the pull request during completion. If MergeStrategy is not set to any value, a no-FF merge will be created if SquashMerge == false. If MergeStrategy is not set to any value, the pull request commits will be squashed if SquashMerge == true. The SquashMerge property is deprecated. It is recommended that you explicitly set MergeStrategy in all cases. If an explicit value is provided for MergeStrategy, the SquashMerge property will be ignored. + */ + mergeStrategy?: GitPullRequestMergeStrategy; + /** + * SquashMerge is deprecated. You should explicitly set the value of MergeStrategy. If MergeStrategy is set to any value, the SquashMerge value will be ignored. If MergeStrategy is not set, the merge strategy will be no-fast-forward if this flag is false, or squash if true. + */ + squashMerge?: boolean; + /** + * If true, we will attempt to transition any work items linked to the pull request into the next logical state (i.e. Active -> Resolved) + */ + transitionWorkItems?: boolean; + /** + * If true, the current completion attempt was triggered via auto-complete. Used internally. + */ + triggeredByAutoComplete?: boolean; +} +/** + * Provides properties that describe a Git pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. + */ +export interface GitPullRequestIteration { + /** + * A collection of related REST reference links. + */ + _links?: any; + /** + * Author of the pull request iteration. + */ + author?: VSSInterfaces.IdentityRef; + /** + * Changes included with the pull request iteration. + */ + changeList?: GitPullRequestChange[]; + /** + * The commits included with the pull request iteration. + */ + commits?: GitCommitRef[]; + /** + * The first common Git commit of the source and target refs. + */ + commonRefCommit?: GitCommitRef; + /** + * The creation date of the pull request iteration. + */ + createdDate?: Date; + /** + * Description of the pull request iteration. + */ + description?: string; + /** + * Indicates if the Commits property contains a truncated list of commits in this pull request iteration. + */ + hasMoreCommits?: boolean; + /** + * ID of the pull request iteration. Iterations are created as a result of creating and pushing updates to a pull request. + */ + id?: number; + /** + * If the iteration reason is Retarget, this is the refName of the new target + */ + newTargetRefName?: string; + /** + * If the iteration reason is Retarget, this is the original target refName + */ + oldTargetRefName?: string; + /** + * The Git push information associated with this pull request iteration. + */ + push?: GitPushRef; + /** + * The reason for which the pull request iteration was created. + */ + reason?: IterationReason; + /** + * The source Git commit of this iteration. + */ + sourceRefCommit?: GitCommitRef; + /** + * The target Git commit of this iteration. + */ + targetRefCommit?: GitCommitRef; + /** + * The updated date of the pull request iteration. + */ + updatedDate?: Date; +} +/** + * Collection of changes made in a pull request. + */ +export interface GitPullRequestIterationChanges { + /** + * Changes made in the iteration. + */ + changeEntries?: GitPullRequestChange[]; + /** + * Value to specify as skip to get the next page of changes. This will be zero if there are no more changes. + */ + nextSkip?: number; + /** + * Value to specify as top to get the next page of changes. This will be zero if there are no more changes. + */ + nextTop?: number; +} +/** + * The options which are used when a pull request merge is created. + */ +export interface GitPullRequestMergeOptions { + /** + * If true, conflict resolutions applied during the merge will be put in separate commits to preserve authorship info for git blame, etc. + */ + conflictAuthorshipCommits?: boolean; + detectRenameFalsePositives?: boolean; + /** + * If true, rename detection will not be performed during the merge. + */ + disableRenames?: boolean; +} +/** + * Enumeration of possible merge strategies which can be used to complete a pull request. + */ +export declare enum GitPullRequestMergeStrategy { + /** + * A two-parent, no-fast-forward merge. The source branch is unchanged. This is the default behavior. + */ + NoFastForward = 1, + /** + * Put all changes from the pull request into a single-parent commit. + */ + Squash = 2, + /** + * Rebase the source branch on top of the target branch HEAD commit, and fast-forward the target branch. The source branch is updated during the rebase operation. + */ + Rebase = 3, + /** + * Rebase the source branch on top of the target branch HEAD commit, and create a two-parent, no-fast-forward merge. The source branch is updated during the rebase operation. + */ + RebaseMerge = 4 +} +/** + * A set of pull request queries and their results. + */ +export interface GitPullRequestQuery { + /** + * The queries to perform. + */ + queries?: GitPullRequestQueryInput[]; + /** + * The results of the queries. This matches the QueryInputs list so Results[n] are the results of QueryInputs[n]. Each entry in the list is a dictionary of commit->pull requests. + */ + results?: { + [key: string]: GitPullRequest[]; + }[]; +} +/** + * Pull request query input parameters. + */ +export interface GitPullRequestQueryInput { + /** + * The list of commit IDs to search for. + */ + items?: string[]; + /** + * The type of query to perform. + */ + type?: GitPullRequestQueryType; +} +/** + * Accepted types of pull request queries. + */ +export declare enum GitPullRequestQueryType { + /** + * No query type set. + */ + NotSet = 0, + /** + * Search for pull requests that created the supplied merge commits. + */ + LastMergeCommit = 1, + /** + * Search for pull requests that merged the supplied commits. + */ + Commit = 2 +} +export interface GitPullRequestReviewFileContentInfo { + _links?: any; + /** + * The file change path. + */ + path?: string; + /** + * Content hash of on-disk representation of file content. Its calculated by the client by using SHA1 hash function. Ensure that uploaded file has same encoding as in source control. + */ + sHA1Hash?: string; +} +export declare enum GitPullRequestReviewFileType { + ChangeEntry = 0, + Attachment = 1 +} +/** + * Pull requests can be searched for matching this criteria. + */ +export interface GitPullRequestSearchCriteria { + /** + * If set, search for pull requests that were created by this identity. + */ + creatorId?: string; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + /** + * If set, search for pull requests whose target branch is in this repository. + */ + repositoryId?: string; + /** + * If set, search for pull requests that have this identity as a reviewer. + */ + reviewerId?: string; + /** + * If set, search for pull requests from this branch. + */ + sourceRefName?: string; + /** + * If set, search for pull requests whose source branch is in this repository. + */ + sourceRepositoryId?: string; + /** + * If set, search for pull requests that are in this state. Defaults to Active if unset. + */ + status?: PullRequestStatus; + /** + * If set, search for pull requests into this branch. + */ + targetRefName?: string; +} +/** + * This class contains the metadata of a service/extension posting pull request status. Status can be associated with a pull request or an iteration. + */ +export interface GitPullRequestStatus extends GitStatus { + /** + * ID of the iteration to associate status with. Minimum value is 1. + */ + iterationId?: number; + /** + * Custom properties of the status. + */ + properties?: any; +} +export interface GitPush extends GitPushRef { + commits?: GitCommitRef[]; + refUpdates?: GitRefUpdate[]; + repository?: GitRepository; +} +export interface GitPushEventData { + afterId?: string; + beforeId?: string; + branch?: string; + commits?: GitCommit[]; + repository?: GitRepository; +} +export interface GitPushRef { + _links?: any; + date?: Date; + pushCorrelationId?: string; + pushedBy?: VSSInterfaces.IdentityRef; + pushId?: number; + url?: string; +} +export interface GitPushSearchCriteria { + fromDate?: Date; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + includeRefUpdates?: boolean; + pusherId?: string; + refName?: string; + toDate?: Date; +} +export interface GitQueryBranchStatsCriteria { + baseCommit?: GitVersionDescriptor; + targetCommits?: GitVersionDescriptor[]; +} +export interface GitQueryCommitsCriteria { + /** + * Number of entries to skip + */ + $skip?: number; + /** + * Maximum number of entries to retrieve + */ + $top?: number; + /** + * Alias or display name of the author + */ + author?: string; + /** + * Only applicable when ItemVersion specified. If provided, start walking history starting at this commit. + */ + compareVersion?: GitVersionDescriptor; + /** + * Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path. + */ + excludeDeletes?: boolean; + /** + * If provided, a lower bound for filtering commits alphabetically + */ + fromCommitId?: string; + /** + * If provided, only include history entries created after this date (string) + */ + fromDate?: string; + /** + * What Git history mode should be used. This only applies to the search criteria when Ids = null and an itemPath is specified. + */ + historyMode?: GitHistoryMode; + /** + * If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters. + */ + ids?: string[]; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + /** + * Whether to include the push information + */ + includePushData?: boolean; + /** + * Whether to include the image Url for committers and authors + */ + includeUserImageUrl?: boolean; + /** + * Whether to include linked work items + */ + includeWorkItems?: boolean; + /** + * Path of item to search under + */ + itemPath?: string; + /** + * If provided, identifies the commit or branch to search + */ + itemVersion?: GitVersionDescriptor; + /** + * If enabled, this option will ignore the itemVersion and compareVersion parameters + */ + showOldestCommitsFirst?: boolean; + /** + * If provided, an upper bound for filtering commits alphabetically + */ + toCommitId?: string; + /** + * If provided, only include history entries created before this date (string) + */ + toDate?: string; + /** + * Alias or display name of the committer + */ + user?: string; +} +export interface GitQueryRefsCriteria { + /** + * List of commit Ids to be searched + */ + commitIds?: string[]; + /** + * List of complete or partial names for refs to be searched + */ + refNames?: string[]; + /** + * Type of search on refNames, if provided + */ + searchType?: GitRefSearchType; +} +export interface GitRecycleBinRepositoryDetails { + /** + * Setting to false will undo earlier deletion and restore the repository. + */ + deleted?: boolean; +} +export interface GitRef { + _links?: any; + creator?: VSSInterfaces.IdentityRef; + isLocked?: boolean; + isLockedBy?: VSSInterfaces.IdentityRef; + name?: string; + objectId?: string; + peeledObjectId?: string; + statuses?: GitStatus[]; + url?: string; +} +export interface GitRefFavorite { + _links?: any; + id?: number; + identityId?: string; + name?: string; + repositoryId?: string; + type?: RefFavoriteType; + url?: string; +} +/** + * Search type on ref name + */ +export declare enum GitRefSearchType { + Exact = 0, + StartsWith = 1, + Contains = 2 +} +export interface GitRefUpdate { + isLocked?: boolean; + name?: string; + newObjectId?: string; + oldObjectId?: string; + repositoryId?: string; +} +/** + * Enumerates the modes under which ref updates can be written to their repositories. + */ +export declare enum GitRefUpdateMode { + /** + * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. + */ + BestEffort = 0, + /** + * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. + */ + AllOrNone = 1 +} +export interface GitRefUpdateResult { + /** + * Custom message for the result object For instance, Reason for failing. + */ + customMessage?: string; + /** + * Whether the ref is locked or not + */ + isLocked?: boolean; + /** + * Ref name + */ + name?: string; + /** + * New object ID + */ + newObjectId?: string; + /** + * Old object ID + */ + oldObjectId?: string; + /** + * Name of the plugin that rejected the updated. + */ + rejectedBy?: string; + /** + * Repository ID + */ + repositoryId?: string; + /** + * True if the ref update succeeded, false otherwise + */ + success?: boolean; + /** + * Status of the update from the TFS server. + */ + updateStatus?: GitRefUpdateStatus; +} +/** + * Represents the possible outcomes from a request to update a ref in a repository. + */ +export declare enum GitRefUpdateStatus { + /** + * Indicates that the ref update request was completed successfully. + */ + Succeeded = 0, + /** + * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. + */ + ForcePushRequired = 1, + /** + * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. + */ + StaleOldObjectId = 2, + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + InvalidRefName = 3, + /** + * The request was not processed + */ + Unprocessed = 4, + /** + * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) + */ + UnresolvableToCommit = 5, + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + WritePermissionRequired = 6, + /** + * The ref update request could not be completed because the user lacks note creation permissions required to write this note + */ + ManageNotePermissionRequired = 7, + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + CreateBranchPermissionRequired = 8, + /** + * The ref update request could not be completed because the user lacks the permission to create a tag + */ + CreateTagPermissionRequired = 9, + /** + * The ref update could not be completed because it was rejected by the plugin. + */ + RejectedByPlugin = 10, + /** + * The ref update could not be completed because the ref is locked by another user. + */ + Locked = 11, + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + RefNameConflict = 12, + /** + * The ref update could not be completed because it was rejected by policy. + */ + RejectedByPolicy = 13, + /** + * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. + */ + SucceededNonExistentRef = 14, + /** + * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. + */ + SucceededCorruptRef = 15 +} +export interface GitRepository { + _links?: any; + defaultBranch?: string; + id?: string; + /** + * True if the repository is disabled. False otherwise. + */ + isDisabled?: boolean; + /** + * True if the repository was created as a fork. + */ + isFork?: boolean; + name?: string; + parentRepository?: GitRepositoryRef; + project?: TfsCoreInterfaces.TeamProjectReference; + remoteUrl?: string; + /** + * Compressed size (bytes) of the repository. + */ + size?: number; + sshUrl?: string; + url?: string; + validRemoteUrls?: string[]; + webUrl?: string; +} +export interface GitRepositoryCreateOptions { + name?: string; + parentRepository?: GitRepositoryRef; + project?: TfsCoreInterfaces.TeamProjectReference; +} +export interface GitRepositoryRef { + /** + * Team Project Collection where this Fork resides + */ + collection?: TfsCoreInterfaces.TeamProjectCollectionReference; + id?: string; + /** + * True if the repository was created as a fork + */ + isFork?: boolean; + name?: string; + project?: TfsCoreInterfaces.TeamProjectReference; + remoteUrl?: string; + sshUrl?: string; + url?: string; +} +export interface GitRepositoryStats { + activePullRequestsCount?: number; + branchesCount?: number; + commitsCount?: number; + repositoryId?: string; +} +export interface GitResolution { + /** + * User who created the resolution. + */ + author?: VSSInterfaces.IdentityRef; +} +/** + * The type of a merge conflict. + */ +export declare enum GitResolutionError { + /** + * No error + */ + None = 0, + /** + * User set a blob id for resolving a content merge, but blob was not found in repo during application + */ + MergeContentNotFound = 1, + /** + * Attempted to resolve a conflict by moving a file to another path, but path was already in use + */ + PathInUse = 2, + /** + * No error + */ + InvalidPath = 3, + /** + * GitResolutionAction was set to an unrecognized value + */ + UnknownAction = 4, + /** + * GitResolutionMergeType was set to an unrecognized value + */ + UnknownMergeType = 5, + /** + * Any error for which a more specific code doesn't apply + */ + OtherError = 255 +} +export interface GitResolutionMergeContent extends GitResolution { + mergeType?: GitResolutionMergeType; + userMergedBlob?: GitBlobRef; + userMergedContent?: number[]; +} +export declare enum GitResolutionMergeType { + Undecided = 0, + TakeSourceContent = 1, + TakeTargetContent = 2, + AutoMerged = 3, + UserMerged = 4 +} +export interface GitResolutionPathConflict extends GitResolution { + action?: GitResolutionPathConflictAction; + renamePath?: string; +} +export declare enum GitResolutionPathConflictAction { + Undecided = 0, + KeepSourceRenameTarget = 1, + KeepSourceDeleteTarget = 2, + KeepTargetRenameSource = 3, + KeepTargetDeleteSource = 4 +} +export interface GitResolutionPickOneAction extends GitResolution { + action?: GitResolutionWhichAction; +} +export interface GitResolutionRename1to2 extends GitResolutionMergeContent { + action?: GitResolutionRename1to2Action; +} +export declare enum GitResolutionRename1to2Action { + Undecided = 0, + KeepSourcePath = 1, + KeepTargetPath = 2, + KeepBothFiles = 3 +} +/** + * Resolution status of a conflict. + */ +export declare enum GitResolutionStatus { + Unresolved = 0, + PartiallyResolved = 1, + Resolved = 2 +} +export declare enum GitResolutionWhichAction { + Undecided = 0, + PickSourceAction = 1, + PickTargetAction = 2 +} +export interface GitRevert extends GitAsyncRefOperation { + revertId?: number; +} +/** + * This class contains the metadata of a service/extension posting a status. + */ +export interface GitStatus { + /** + * Reference links. + */ + _links?: any; + /** + * Context of the status. + */ + context?: GitStatusContext; + /** + * Identity that created the status. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Creation date and time of the status. + */ + creationDate?: Date; + /** + * Status description. Typically describes current state of the status. + */ + description?: string; + /** + * Status identifier. + */ + id?: number; + /** + * State of the status. + */ + state?: GitStatusState; + /** + * URL with status details. + */ + targetUrl?: string; + /** + * Last update date and time of the status. + */ + updatedDate?: Date; +} +/** + * Status context that uniquely identifies the status. + */ +export interface GitStatusContext { + /** + * Genre of the status. Typically name of the service/tool generating the status, can be empty. + */ + genre?: string; + /** + * Name identifier of the status, cannot be null or empty. + */ + name?: string; +} +/** + * State of the status. + */ +export declare enum GitStatusState { + /** + * Status state not set. Default state. + */ + NotSet = 0, + /** + * Status pending. + */ + Pending = 1, + /** + * Status succeeded. + */ + Succeeded = 2, + /** + * Status failed. + */ + Failed = 3, + /** + * Status with an error. + */ + Error = 4, + /** + * Status is not applicable to the target object. + */ + NotApplicable = 5 +} +/** + * An object describing the git suggestion. Git suggestions are currently limited to suggested pull requests. + */ +export interface GitSuggestion { + /** + * Specific properties describing the suggestion. + */ + properties?: { + [key: string]: any; + }; + /** + * The type of suggestion (e.g. pull request). + */ + type?: string; +} +export interface GitTargetVersionDescriptor extends GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + targetVersion?: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + targetVersionOptions?: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + targetVersionType?: GitVersionType; +} +export interface GitTemplate { + /** + * Name of the Template + */ + name?: string; + /** + * Type of the Template + */ + type?: string; +} +export interface GitTreeDiff { + /** + * ObjectId of the base tree of this diff. + */ + baseTreeId?: string; + /** + * List of tree entries that differ between the base and target tree. Renames and object type changes are returned as a delete for the old object and add for the new object. If a continuation token is returned in the response header, some tree entries are yet to be processed and may yield more diff entries. If the continuation token is not returned all the diff entries have been included in this response. + */ + diffEntries?: GitTreeDiffEntry[]; + /** + * ObjectId of the target tree of this diff. + */ + targetTreeId?: string; + /** + * REST Url to this resource. + */ + url?: string; +} +export interface GitTreeDiffEntry { + /** + * SHA1 hash of the object in the base tree, if it exists. Will be null in case of adds. + */ + baseObjectId?: string; + /** + * Type of change that affected this entry. + */ + changeType?: VersionControlChangeType; + /** + * Object type of the tree entry. Blob, Tree or Commit("submodule") + */ + objectType?: GitObjectType; + /** + * Relative path in base and target trees. + */ + path?: string; + /** + * SHA1 hash of the object in the target tree, if it exists. Will be null in case of deletes. + */ + targetObjectId?: string; +} +export interface GitTreeDiffResponse { + /** + * The HTTP client methods find the continuation token header in the response and populate this field. + */ + continuationToken?: string[]; + treeDiff?: GitTreeDiff; +} +export interface GitTreeEntryRef { + /** + * Blob or tree + */ + gitObjectType?: GitObjectType; + /** + * Mode represented as octal string + */ + mode?: string; + /** + * SHA1 hash of git object + */ + objectId?: string; + /** + * Path relative to parent tree object + */ + relativePath?: string; + /** + * Size of content + */ + size?: number; + /** + * url to retrieve tree or blob + */ + url?: string; +} +export interface GitTreeRef { + _links?: any; + /** + * SHA1 hash of git object + */ + objectId?: string; + /** + * Sum of sizes of all children + */ + size?: number; + /** + * Blobs and trees under this tree + */ + treeEntries?: GitTreeEntryRef[]; + /** + * Url to tree + */ + url?: string; +} +/** + * User info and date for Git operations. + */ +export interface GitUserDate { + /** + * Date of the Git operation. + */ + date?: Date; + /** + * Email address of the user performing the Git operation. + */ + email?: string; + /** + * Url for the user's avatar. + */ + imageUrl?: string; + /** + * Name of the user performing the Git operation. + */ + name?: string; +} +export interface GitVersionDescriptor { + /** + * Version string identifier (name of tag/branch, SHA1 of commit) + */ + version?: string; + /** + * Version options - Specify additional modifiers to version (e.g Previous) + */ + versionOptions?: GitVersionOptions; + /** + * Version type (branch, tag, or commit). Determines how Id is interpreted + */ + versionType?: GitVersionType; +} +/** + * Accepted types of version options + */ +export declare enum GitVersionOptions { + /** + * Not specified + */ + None = 0, + /** + * Commit that changed item prior to the current version + */ + PreviousChange = 1, + /** + * First parent of commit (HEAD^) + */ + FirstParent = 2 +} +/** + * Accepted types of version + */ +export declare enum GitVersionType { + /** + * Interpret the version as a branch name + */ + Branch = 0, + /** + * Interpret the version as a tag name + */ + Tag = 1, + /** + * Interpret the version as a commit ID (SHA1) + */ + Commit = 2 +} +/** + * Globally unique key for a repository. + */ +export interface GlobalGitRepositoryKey { + /** + * Team Project Collection ID of the collection for the repository. + */ + collectionId?: string; + /** + * Team Project ID of the project for the repository. + */ + projectId: string; + /** + * ID of the repository. + */ + repositoryId: string; +} +export interface HistoryEntry { + /** + * The Change list (changeset/commit/shelveset) for this point in history + */ + changeList?: ChangeList; + /** + * The change made to the item from this change list (only relevant for File history, not folders) + */ + itemChangeType?: VersionControlChangeType; + /** + * The path of the item at this point in history (only relevant for File history, not folders) + */ + serverItem?: string; +} +/** + * Identity information including a vote on a pull request. + */ +export interface IdentityRefWithVote extends VSSInterfaces.IdentityRef { + /** + * Indicates if this reviewer has declined to review this pull request. + */ + hasDeclined?: boolean; + /** + * Indicates if this reviewer is flagged for attention on this pull request. + */ + isFlagged?: boolean; + /** + * Indicates if this is a required reviewer for this pull request.
Branches can have policies that require particular reviewers are required for pull requests. + */ + isRequired?: boolean; + /** + * URL to retrieve information about this identity + */ + reviewerUrl?: string; + /** + * Vote on a pull request:
10 - approved 5 - approved with suggestions 0 - no vote -5 - waiting for author -10 - rejected + */ + vote?: number; + /** + * Groups or teams that that this reviewer contributed to.
Groups and teams can be reviewers on pull requests but can not vote directly. When a member of the group or team votes, that vote is rolled up into the group or team vote. VotedFor is a list of such votes. + */ + votedFor?: IdentityRefWithVote[]; +} +export interface ImportRepositoryValidation { + gitSource?: GitImportGitSource; + password?: string; + tfvcSource?: GitImportTfvcSource; + username?: string; +} +export interface IncludedGitCommit { + commitId?: string; + commitTime?: Date; + parentCommitIds?: string[]; + repositoryId?: string; +} +/** + * Real time event (SignalR) for IsDraft update on a pull request + */ +export interface IsDraftUpdatedEvent extends RealTimePullRequestEvent { +} +export interface ItemContent { + content?: string; + contentType?: ItemContentType; +} +export declare enum ItemContentType { + RawText = 0, + Base64Encoded = 1 +} +/** + * Optional details to include when returning an item model + */ +export interface ItemDetailsOptions { + /** + * If true, include metadata about the file type + */ + includeContentMetadata?: boolean; + /** + * Specifies whether to include children (OneLevel), all descendants (Full) or None for folder items + */ + recursionLevel?: VersionControlRecursionType; +} +export interface ItemModel { + _links?: any; + content?: string; + contentMetadata?: FileContentMetadata; + isFolder?: boolean; + isSymLink?: boolean; + path?: string; + url?: string; +} +/** + * The reason for which the pull request iteration was created. + */ +export declare enum IterationReason { + Push = 0, + ForcePush = 1, + Create = 2, + Rebase = 4, + Unknown = 8, + Retarget = 16 +} +/** + * Real time event (SignalR) for updated labels on a pull request + */ +export interface LabelsUpdatedEvent extends RealTimePullRequestEvent { +} +/** + * The class to represent the line diff block + */ +export interface LineDiffBlock { + /** + * Type of change that was made to the block. + */ + changeType?: LineDiffBlockChangeType; + /** + * Line number where this block starts in modified file. + */ + modifiedLineNumberStart?: number; + /** + * Count of lines in this block in modified file. + */ + modifiedLinesCount?: number; + /** + * Line number where this block starts in original file. + */ + originalLineNumberStart?: number; + /** + * Count of lines in this block in original file. + */ + originalLinesCount?: number; +} +/** + * Type of change for a line diff block + */ +export declare enum LineDiffBlockChangeType { + /** + * No change - both the blocks are identical + */ + None = 0, + /** + * Lines were added to the block in the modified file + */ + Add = 1, + /** + * Lines were deleted from the block in the original file + */ + Delete = 2, + /** + * Lines were modified + */ + Edit = 3 +} +/** + * Real time event (SignalR) for a merge completed on a pull request + */ +export interface MergeCompletedEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for a policy evaluation update on a pull request + */ +export interface PolicyEvaluationUpdatedEvent extends RealTimePullRequestEvent { +} +/** + * The status of a pull request merge. + */ +export declare enum PullRequestAsyncStatus { + /** + * Status is not set. Default state. + */ + NotSet = 0, + /** + * Pull request merge is queued. + */ + Queued = 1, + /** + * Pull request merge failed due to conflicts. + */ + Conflicts = 2, + /** + * Pull request merge succeeded. + */ + Succeeded = 3, + /** + * Pull request merge rejected by policy. + */ + RejectedByPolicy = 4, + /** + * Pull request merge failed. + */ + Failure = 5 +} +/** + * Real time event (SignalR) for pull request creation + */ +export interface PullRequestCreatedEvent extends RealTimePullRequestEvent { +} +/** + * The specific type of a pull request merge failure. + */ +export declare enum PullRequestMergeFailureType { + /** + * Type is not set. Default type. + */ + None = 0, + /** + * Pull request merge failure type unknown. + */ + Unknown = 1, + /** + * Pull request merge failed due to case mismatch. + */ + CaseSensitive = 2, + /** + * Pull request merge failed due to an object being too large. + */ + ObjectTooLarge = 3 +} +/** + * Status of a pull request. + */ +export declare enum PullRequestStatus { + /** + * Status not set. Default state. + */ + NotSet = 0, + /** + * Pull request is active. + */ + Active = 1, + /** + * Pull request is abandoned. + */ + Abandoned = 2, + /** + * Pull request is completed. + */ + Completed = 3, + /** + * Used in pull request search criteria to include all statuses. + */ + All = 4 +} +/** + * Initial config contract sent to extensions creating tabs on the pull request page + */ +export interface PullRequestTabExtensionConfig { + pullRequestId?: number; + repositoryId?: string; +} +/** + * Base contract for a real time pull request event (SignalR) + */ +export interface RealTimePullRequestEvent { + /** + * The id of this event. Can be used to track send/receive state between client and server. + */ + eventId?: string; + /** + * The id of the pull request this event was generated for. + */ + pullRequestId?: number; +} +export declare enum RefFavoriteType { + Invalid = 0, + Folder = 1, + Ref = 2 +} +/** + * Real time event (SignalR) for when the target branch of a pull request is changed + */ +export interface RetargetEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for an update to reviewers on a pull request + */ +export interface ReviewersUpdatedEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for reviewer votes being reset on a pull request + */ +export interface ReviewersVotesResetEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for a reviewer vote update on a pull request + */ +export interface ReviewerVoteUpdatedEvent extends RealTimePullRequestEvent { +} +/** + * Context used while sharing a pull request. + */ +export interface ShareNotificationContext { + /** + * Optional user note or message. + */ + message?: string; + /** + * Identities of users who will receive a share notification. + */ + receivers?: VSSInterfaces.IdentityRef[]; +} +export interface SourceToTargetRef { + /** + * The source ref to copy. For example, refs/heads/master. + */ + sourceRef?: string; + /** + * The target ref to update. For example, refs/heads/master. + */ + targetRef?: string; +} +/** + * Real time event (SignalR) for an added status on a pull request + */ +export interface StatusAddedEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for deleted statuses on a pull request + */ +export interface StatusesDeletedEvent extends RealTimePullRequestEvent { +} +/** + * Real time event (SignalR) for a status update on a pull request + */ +export interface StatusUpdatedEvent extends RealTimePullRequestEvent { +} +/** + * Represents a Supported IDE entity. + */ +export interface SupportedIde { + /** + * The download URL for the IDE. + */ + downloadUrl?: string; + /** + * The type of the IDE. + */ + ideType?: SupportedIdeType; + /** + * The name of the IDE. + */ + name?: string; + /** + * The URL to open the protocol handler for the IDE. + */ + protocolHandlerUrl?: string; + /** + * A list of SupportedPlatforms. + */ + supportedPlatforms?: string[]; +} +/** + * Enumeration that represents the types of IDEs supported. + */ +export declare enum SupportedIdeType { + Unknown = 0, + AndroidStudio = 1, + AppCode = 2, + CLion = 3, + DataGrip = 4, + Eclipse = 13, + IntelliJ = 5, + MPS = 6, + PhpStorm = 7, + PyCharm = 8, + RubyMine = 9, + Tower = 10, + VisualStudio = 11, + VSCode = 14, + WebStorm = 12 +} +/** + * Class representing a branch object. + */ +export interface TfvcBranch extends TfvcBranchRef { + /** + * List of children for the branch. + */ + children?: TfvcBranch[]; + /** + * List of branch mappings. + */ + mappings?: TfvcBranchMapping[]; + /** + * Path of the branch's parent. + */ + parent?: TfvcShallowBranchRef; + /** + * List of paths of the related branches. + */ + relatedBranches?: TfvcShallowBranchRef[]; +} +/** + * A branch mapping. + */ +export interface TfvcBranchMapping { + /** + * Depth of the branch. + */ + depth?: string; + /** + * Server item for the branch. + */ + serverItem?: string; + /** + * Type of the branch. + */ + type?: string; +} +/** + * Metadata for a branchref. + */ +export interface TfvcBranchRef extends TfvcShallowBranchRef { + /** + * A collection of REST reference links. + */ + _links?: any; + /** + * Creation date of the branch. + */ + createdDate?: Date; + /** + * Branch description. + */ + description?: string; + /** + * Is the branch deleted? + */ + isDeleted?: boolean; + /** + * Alias or display name of user + */ + owner?: VSSInterfaces.IdentityRef; + /** + * URL to retrieve the item. + */ + url?: string; +} +/** + * A change. + */ +export interface TfvcChange extends Change { + /** + * List of merge sources in case of rename or branch creation. + */ + mergeSources?: TfvcMergeSource[]; + /** + * Version at which a (shelved) change was pended against + */ + pendingVersion?: number; +} +/** + * A collection of changes. + */ +export interface TfvcChangeset extends TfvcChangesetRef { + /** + * Changeset Account Id also known as Organization Id. + */ + accountId?: string; + /** + * List of associated changes. + */ + changes?: TfvcChange[]; + /** + * List of Checkin Notes for the changeset. + */ + checkinNotes?: CheckinNote[]; + /** + * Changeset collection Id. + */ + collectionId?: string; + /** + * True if more changes are available. + */ + hasMoreChanges?: boolean; + /** + * Policy Override for the changeset. + */ + policyOverride?: TfvcPolicyOverrideInfo; + /** + * Team Project Ids for the changeset. + */ + teamProjectIds?: string[]; + /** + * List of work items associated with the changeset. + */ + workItems?: AssociatedWorkItem[]; +} +/** + * Metadata for a changeset. + */ +export interface TfvcChangesetRef { + /** + * A collection of REST reference links. + */ + _links?: any; + /** + * Alias or display name of user. + */ + author?: VSSInterfaces.IdentityRef; + /** + * Changeset Id. + */ + changesetId?: number; + /** + * Alias or display name of user. + */ + checkedInBy?: VSSInterfaces.IdentityRef; + /** + * Comment for the changeset. + */ + comment?: string; + /** + * Was the Comment result truncated? + */ + commentTruncated?: boolean; + /** + * Creation date of the changeset. + */ + createdDate?: Date; + /** + * URL to retrieve the item. + */ + url?: string; +} +/** + * Criteria used in a search for change lists. + */ +export interface TfvcChangesetSearchCriteria { + /** + * Alias or display name of user who made the changes. + */ + author?: string; + /** + * Whether or not to follow renames for the given item being queried. + */ + followRenames?: boolean; + /** + * If provided, only include changesets created after this date (string). + */ + fromDate?: string; + /** + * If provided, only include changesets after this changesetID. + */ + fromId?: number; + /** + * Whether to include the _links field on the shallow references. + */ + includeLinks?: boolean; + /** + * Path of item to search under. + */ + itemPath?: string; + mappings?: TfvcMappingFilter[]; + /** + * If provided, only include changesets created before this date (string). + */ + toDate?: string; + /** + * If provided, a version descriptor for the latest change list to include. + */ + toId?: number; +} +/** + * Request body for Get batched changesets. + */ +export interface TfvcChangesetsRequestData { + /** + * List of changeset Ids. + */ + changesetIds?: number[]; + /** + * Max length of the comment. + */ + commentLength?: number; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; +} +export interface TfvcCheckinEventData { + changeset?: TfvcChangeset; + project?: TfsCoreInterfaces.TeamProjectReference; +} +export interface TfvcHistoryEntry extends HistoryEntry { + /** + * The encoding of the item at this point in history (only relevant for File history, not folders) + */ + encoding?: number; + /** + * The file id of the item at this point in history (only relevant for File history, not folders) + */ + fileId?: number; +} +/** + * Metadata for an item. + */ +export interface TfvcItem extends ItemModel { + /** + * Item changed datetime. + */ + changeDate?: Date; + /** + * Greater than 0 if item is deleted. + */ + deletionId?: number; + /** + * File encoding from database, -1 represents binary. + */ + encoding?: number; + /** + * MD5 hash as a base 64 string, applies to files only. + */ + hashValue?: string; + /** + * True if item is a branch. + */ + isBranch?: boolean; + /** + * True if there is a change pending. + */ + isPendingChange?: boolean; + /** + * The size of the file, if applicable. + */ + size?: number; + /** + * Changeset version Id. + */ + version?: number; +} +/** + * Item path and Version descriptor properties + */ +export interface TfvcItemDescriptor { + /** + * Item path. + */ + path?: string; + /** + * Defaults to OneLevel. + */ + recursionLevel?: VersionControlRecursionType; + /** + * Specify the desired version, can be null or empty string only if VersionType is latest or tip. + */ + version?: string; + /** + * Defaults to None. + */ + versionOption?: TfvcVersionOption; + /** + * Defaults to Latest. + */ + versionType?: TfvcVersionType; +} +/** + * Metadata for an item including the previous hash value for files. + */ +export interface TfvcItemPreviousHash extends TfvcItem { + /** + * MD5 hash as a base 64 string, applies to files only. + */ + previousHashValue?: string; +} +/** + * Request body used by Get Items Batch + */ +export interface TfvcItemRequestData { + /** + * If true, include metadata about the file type + */ + includeContentMetadata?: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + itemDescriptors?: TfvcItemDescriptor[]; +} +/** + * Metadata for a label. + */ +export interface TfvcLabel extends TfvcLabelRef { + /** + * List of items. + */ + items?: TfvcItem[]; +} +/** + * Metadata for a Label. + */ +export interface TfvcLabelRef { + /** + * Collection of reference links. + */ + _links?: any; + /** + * Label description. + */ + description?: string; + /** + * Label Id. + */ + id?: number; + /** + * Label scope. + */ + labelScope?: string; + /** + * Last modified datetime for the label. + */ + modifiedDate?: Date; + /** + * Label name. + */ + name?: string; + /** + * Label owner. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Label Url. + */ + url?: string; +} +export interface TfvcLabelRequestData { + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + itemLabelFilter?: string; + labelScope?: string; + maxItemCount?: number; + name?: string; + owner?: string; +} +/** + * MappingFilter can be used to include or exclude specific paths. + */ +export interface TfvcMappingFilter { + /** + * True if ServerPath should be excluded. + */ + exclude?: boolean; + /** + * Path to be included or excluded. + */ + serverPath?: string; +} +export interface TfvcMergeSource { + /** + * Indicates if this a rename source. If false, it is a merge source. + */ + isRename?: boolean; + /** + * The server item of the merge source. + */ + serverItem?: string; + /** + * Start of the version range. + */ + versionFrom?: number; + /** + * End of the version range. + */ + versionTo?: number; +} +/** + * Policy failure information. + */ +export interface TfvcPolicyFailureInfo { + /** + * Policy failure message. + */ + message?: string; + /** + * Name of the policy that failed. + */ + policyName?: string; +} +/** + * Information on the policy override. + */ +export interface TfvcPolicyOverrideInfo { + /** + * Overidden policy comment. + */ + comment?: string; + /** + * Information on the failed policy that was overridden. + */ + policyFailures?: TfvcPolicyFailureInfo[]; +} +/** + * This is the shallow branchref class. + */ +export interface TfvcShallowBranchRef { + /** + * Path for the branch. + */ + path?: string; +} +/** + * Metadata for a shelveset. + */ +export interface TfvcShelveset extends TfvcShelvesetRef { + /** + * List of changes. + */ + changes?: TfvcChange[]; + /** + * List of checkin notes. + */ + notes?: CheckinNote[]; + /** + * Policy override information if applicable. + */ + policyOverride?: TfvcPolicyOverrideInfo; + /** + * List of associated workitems. + */ + workItems?: AssociatedWorkItem[]; +} +/** + * Metadata for a shallow shelveset. + */ +export interface TfvcShelvesetRef { + /** + * List of reference links for the shelveset. + */ + _links?: any; + /** + * Shelveset comment. + */ + comment?: string; + /** + * Shelveset comment truncated as applicable. + */ + commentTruncated?: boolean; + /** + * Shelveset create date. + */ + createdDate?: Date; + /** + * Shelveset Id. + */ + id?: string; + /** + * Shelveset name. + */ + name?: string; + /** + * Shelveset Owner. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Shelveset Url. + */ + url?: string; +} +export interface TfvcShelvesetRequestData { + /** + * Whether to include policyOverride and notes Only applies when requesting a single deep shelveset + */ + includeDetails?: boolean; + /** + * Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset. + */ + includeLinks?: boolean; + /** + * Whether to include workItems + */ + includeWorkItems?: boolean; + /** + * Max number of changes to include + */ + maxChangeCount?: number; + /** + * Max length of comment + */ + maxCommentLength?: number; + /** + * Shelveset name + */ + name?: string; + /** + * Owner's ID. Could be a name or a guid. + */ + owner?: string; +} +export interface TfvcStatistics { + /** + * Id of the last changeset the stats are based on. + */ + changesetId?: number; + /** + * Count of files at the requested scope. + */ + fileCountTotal?: number; +} +/** + * Version descriptor properties. + */ +export interface TfvcVersionDescriptor { + /** + * Version object. + */ + version?: string; + versionOption?: TfvcVersionOption; + versionType?: TfvcVersionType; +} +/** + * Options for Version handling. + */ +export declare enum TfvcVersionOption { + /** + * None. + */ + None = 0, + /** + * Return the previous version. + */ + Previous = 1, + /** + * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. + */ + UseRename = 2 +} +/** + * Type of Version object + */ +export declare enum TfvcVersionType { + /** + * Version is treated as a ChangesetId. + */ + None = 0, + /** + * Version is treated as a ChangesetId. + */ + Changeset = 1, + /** + * Version is treated as a Shelveset name and owner. + */ + Shelveset = 2, + /** + * Version is treated as a Change. + */ + Change = 3, + /** + * Version is treated as a Date. + */ + Date = 4, + /** + * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. + */ + Latest = 5, + /** + * Version will be treated as a Tip, if no version is defined latest will be used. + */ + Tip = 6, + /** + * Version will be treated as a MergeSource. + */ + MergeSource = 7 +} +/** + * Real time event (SignalR) for a title/description update on a pull request + */ +export interface TitleDescriptionUpdatedEvent extends RealTimePullRequestEvent { +} +export interface UpdateRefsRequest { + refUpdateRequests?: GitRefUpdate[]; + updateMode?: GitRefUpdateMode; +} +export declare enum VersionControlChangeType { + None = 0, + Add = 1, + Edit = 2, + Encoding = 4, + Rename = 8, + Delete = 16, + Undelete = 32, + Branch = 64, + Merge = 128, + Lock = 256, + Rollback = 512, + SourceRename = 1024, + TargetRename = 2048, + Property = 4096, + All = 8191 +} +export interface VersionControlProjectInfo { + defaultSourceControlType?: TfsCoreInterfaces.SourceControlTypes; + project?: TfsCoreInterfaces.TeamProjectReference; + supportsGit?: boolean; + supportsTFVC?: boolean; +} +export declare enum VersionControlRecursionType { + /** + * Only return the specified item. + */ + None = 0, + /** + * Return the specified item and its direct children. + */ + OneLevel = 1, + /** + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + */ + OneLevelPlusNestedEmptyFolders = 4, + /** + * Return specified item and all descendants + */ + Full = 120 +} +export declare var TypeInfo: { + Attachment: any; + Change: any; + ChangeList: any; + Comment: any; + CommentThread: any; + CommentThreadStatus: { + enumValues: { + "unknown": number; + "active": number; + "fixed": number; + "wontFix": number; + "closed": number; + "byDesign": number; + "pending": number; + }; + }; + CommentType: { + enumValues: { + "unknown": number; + "text": number; + "codeChange": number; + "system": number; + }; + }; + FileDiff: any; + GitAnnotatedTag: any; + GitAsyncOperationStatus: { + enumValues: { + "queued": number; + "inProgress": number; + "completed": number; + "failed": number; + "abandoned": number; + }; + }; + GitAsyncRefOperation: any; + GitAsyncRefOperationDetail: any; + GitAsyncRefOperationFailureStatus: { + enumValues: { + "none": number; + "invalidRefName": number; + "refNameConflict": number; + "createBranchPermissionRequired": number; + "writePermissionRequired": number; + "targetBranchDeleted": number; + "gitObjectTooLarge": number; + "operationIndentityNotFound": number; + "asyncOperationNotFound": number; + "other": number; + "emptyCommitterSignature": number; + }; + }; + GitAsyncRefOperationParameters: any; + GitAsyncRefOperationSource: any; + GitBaseVersionDescriptor: any; + GitBranchStats: any; + GitChange: any; + GitCherryPick: any; + GitCommit: any; + GitCommitChanges: any; + GitCommitDiffs: any; + GitCommitRef: any; + GitCommitToCreate: any; + GitConflict: any; + GitConflictAddAdd: any; + GitConflictAddRename: any; + GitConflictDeleteEdit: any; + GitConflictDeleteRename: any; + GitConflictDirectoryFile: any; + GitConflictEditDelete: any; + GitConflictEditEdit: any; + GitConflictFileDirectory: any; + GitConflictRename1to2: any; + GitConflictRename2to1: any; + GitConflictRenameAdd: any; + GitConflictRenameDelete: any; + GitConflictRenameRename: any; + GitConflictType: { + enumValues: { + "none": number; + "addAdd": number; + "addRename": number; + "deleteEdit": number; + "deleteRename": number; + "directoryFile": number; + "directoryChild": number; + "editDelete": number; + "editEdit": number; + "fileDirectory": number; + "rename1to2": number; + "rename2to1": number; + "renameAdd": number; + "renameDelete": number; + "renameRename": number; + }; + }; + GitConflictUpdateResult: any; + GitConflictUpdateStatus: { + enumValues: { + "succeeded": number; + "badRequest": number; + "invalidResolution": number; + "unsupportedConflictType": number; + "notFound": number; + }; + }; + GitDeletedRepository: any; + GitForkRef: any; + GitForkSyncRequest: any; + GitForkTeamProjectReference: any; + GitHistoryMode: { + enumValues: { + "simplifiedHistory": number; + "firstParent": number; + "fullHistory": number; + "fullHistorySimplifyMerges": number; + }; + }; + GitImportFailedEvent: any; + GitImportRequest: any; + GitImportSucceededEvent: any; + GitItem: any; + GitItemDescriptor: any; + GitItemRequestData: any; + GitLastChangeTreeItems: any; + GitMerge: any; + GitObject: any; + GitObjectType: { + enumValues: { + "bad": number; + "commit": number; + "tree": number; + "blob": number; + "tag": number; + "ext2": number; + "ofsDelta": number; + "refDelta": number; + }; + }; + GitPathAction: any; + GitPathActions: { + enumValues: { + "none": number; + "edit": number; + "delete": number; + "add": number; + "rename": number; + }; + }; + GitPathToItemsCollection: any; + GitPolicyConfigurationResponse: any; + GitPullRequest: any; + GitPullRequestChange: any; + GitPullRequestCommentThread: any; + GitPullRequestCompletionOptions: any; + GitPullRequestIteration: any; + GitPullRequestIterationChanges: any; + GitPullRequestMergeStrategy: { + enumValues: { + "noFastForward": number; + "squash": number; + "rebase": number; + "rebaseMerge": number; + }; + }; + GitPullRequestQuery: any; + GitPullRequestQueryInput: any; + GitPullRequestQueryType: { + enumValues: { + "notSet": number; + "lastMergeCommit": number; + "commit": number; + }; + }; + GitPullRequestReviewFileType: { + enumValues: { + "changeEntry": number; + "attachment": number; + }; + }; + GitPullRequestSearchCriteria: any; + GitPullRequestStatus: any; + GitPush: any; + GitPushEventData: any; + GitPushRef: any; + GitPushSearchCriteria: any; + GitQueryBranchStatsCriteria: any; + GitQueryCommitsCriteria: any; + GitQueryRefsCriteria: any; + GitRef: any; + GitRefFavorite: any; + GitRefSearchType: { + enumValues: { + "exact": number; + "startsWith": number; + "contains": number; + }; + }; + GitRefUpdateMode: { + enumValues: { + "bestEffort": number; + "allOrNone": number; + }; + }; + GitRefUpdateResult: any; + GitRefUpdateStatus: { + enumValues: { + "succeeded": number; + "forcePushRequired": number; + "staleOldObjectId": number; + "invalidRefName": number; + "unprocessed": number; + "unresolvableToCommit": number; + "writePermissionRequired": number; + "manageNotePermissionRequired": number; + "createBranchPermissionRequired": number; + "createTagPermissionRequired": number; + "rejectedByPlugin": number; + "locked": number; + "refNameConflict": number; + "rejectedByPolicy": number; + "succeededNonExistentRef": number; + "succeededCorruptRef": number; + }; + }; + GitRepository: any; + GitRepositoryCreateOptions: any; + GitRepositoryRef: any; + GitResolutionError: { + enumValues: { + "none": number; + "mergeContentNotFound": number; + "pathInUse": number; + "invalidPath": number; + "unknownAction": number; + "unknownMergeType": number; + "otherError": number; + }; + }; + GitResolutionMergeContent: any; + GitResolutionMergeType: { + enumValues: { + "undecided": number; + "takeSourceContent": number; + "takeTargetContent": number; + "autoMerged": number; + "userMerged": number; + }; + }; + GitResolutionPathConflict: any; + GitResolutionPathConflictAction: { + enumValues: { + "undecided": number; + "keepSourceRenameTarget": number; + "keepSourceDeleteTarget": number; + "keepTargetRenameSource": number; + "keepTargetDeleteSource": number; + }; + }; + GitResolutionPickOneAction: any; + GitResolutionRename1to2: any; + GitResolutionRename1to2Action: { + enumValues: { + "undecided": number; + "keepSourcePath": number; + "keepTargetPath": number; + "keepBothFiles": number; + }; + }; + GitResolutionStatus: { + enumValues: { + "unresolved": number; + "partiallyResolved": number; + "resolved": number; + }; + }; + GitResolutionWhichAction: { + enumValues: { + "undecided": number; + "pickSourceAction": number; + "pickTargetAction": number; + }; + }; + GitRevert: any; + GitStatus: any; + GitStatusState: { + enumValues: { + "notSet": number; + "pending": number; + "succeeded": number; + "failed": number; + "error": number; + "notApplicable": number; + }; + }; + GitTargetVersionDescriptor: any; + GitTreeDiff: any; + GitTreeDiffEntry: any; + GitTreeDiffResponse: any; + GitTreeEntryRef: any; + GitTreeRef: any; + GitUserDate: any; + GitVersionDescriptor: any; + GitVersionOptions: { + enumValues: { + "none": number; + "previousChange": number; + "firstParent": number; + }; + }; + GitVersionType: { + enumValues: { + "branch": number; + "tag": number; + "commit": number; + }; + }; + HistoryEntry: any; + IncludedGitCommit: any; + ItemContent: any; + ItemContentType: { + enumValues: { + "rawText": number; + "base64Encoded": number; + }; + }; + ItemDetailsOptions: any; + IterationReason: { + enumValues: { + "push": number; + "forcePush": number; + "create": number; + "rebase": number; + "unknown": number; + "retarget": number; + }; + }; + LineDiffBlock: any; + LineDiffBlockChangeType: { + enumValues: { + "none": number; + "add": number; + "delete": number; + "edit": number; + }; + }; + PullRequestAsyncStatus: { + enumValues: { + "notSet": number; + "queued": number; + "conflicts": number; + "succeeded": number; + "rejectedByPolicy": number; + "failure": number; + }; + }; + PullRequestMergeFailureType: { + enumValues: { + "none": number; + "unknown": number; + "caseSensitive": number; + "objectTooLarge": number; + }; + }; + PullRequestStatus: { + enumValues: { + "notSet": number; + "active": number; + "abandoned": number; + "completed": number; + "all": number; + }; + }; + RefFavoriteType: { + enumValues: { + "invalid": number; + "folder": number; + "ref": number; + }; + }; + SupportedIde: any; + SupportedIdeType: { + enumValues: { + "unknown": number; + "androidStudio": number; + "appCode": number; + "cLion": number; + "dataGrip": number; + "eclipse": number; + "intelliJ": number; + "mps": number; + "phpStorm": number; + "pyCharm": number; + "rubyMine": number; + "tower": number; + "visualStudio": number; + "vsCode": number; + "webStorm": number; + }; + }; + TfvcBranch: any; + TfvcBranchRef: any; + TfvcChange: any; + TfvcChangeset: any; + TfvcChangesetRef: any; + TfvcCheckinEventData: any; + TfvcHistoryEntry: any; + TfvcItem: any; + TfvcItemDescriptor: any; + TfvcItemPreviousHash: any; + TfvcItemRequestData: any; + TfvcLabel: any; + TfvcLabelRef: any; + TfvcShelveset: any; + TfvcShelvesetRef: any; + TfvcVersionDescriptor: any; + TfvcVersionOption: { + enumValues: { + "none": number; + "previous": number; + "useRename": number; + }; + }; + TfvcVersionType: { + enumValues: { + "none": number; + "changeset": number; + "shelveset": number; + "change": number; + "date": number; + "latest": number; + "tip": number; + "mergeSource": number; + }; + }; + UpdateRefsRequest: any; + VersionControlChangeType: { + enumValues: { + "none": number; + "add": number; + "edit": number; + "encoding": number; + "rename": number; + "delete": number; + "undelete": number; + "branch": number; + "merge": number; + "lock": number; + "rollback": number; + "sourceRename": number; + "targetRename": number; + "property": number; + "all": number; + }; + }; + VersionControlProjectInfo: any; + VersionControlRecursionType: { + enumValues: { + "none": number; + "oneLevel": number; + "oneLevelPlusNestedEmptyFolders": number; + "full": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/GitInterfaces.js b/node_modules/azure-devops-node-api/interfaces/GitInterfaces.js new file mode 100644 index 0000000..aef262c --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/GitInterfaces.js @@ -0,0 +1,2430 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const PolicyInterfaces = require("../interfaces/PolicyInterfaces"); +const TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +/** + * The status of a comment thread. + */ +var CommentThreadStatus; +(function (CommentThreadStatus) { + /** + * The thread status is unknown. + */ + CommentThreadStatus[CommentThreadStatus["Unknown"] = 0] = "Unknown"; + /** + * The thread status is active. + */ + CommentThreadStatus[CommentThreadStatus["Active"] = 1] = "Active"; + /** + * The thread status is resolved as fixed. + */ + CommentThreadStatus[CommentThreadStatus["Fixed"] = 2] = "Fixed"; + /** + * The thread status is resolved as won't fix. + */ + CommentThreadStatus[CommentThreadStatus["WontFix"] = 3] = "WontFix"; + /** + * The thread status is closed. + */ + CommentThreadStatus[CommentThreadStatus["Closed"] = 4] = "Closed"; + /** + * The thread status is resolved as by design. + */ + CommentThreadStatus[CommentThreadStatus["ByDesign"] = 5] = "ByDesign"; + /** + * The thread status is pending. + */ + CommentThreadStatus[CommentThreadStatus["Pending"] = 6] = "Pending"; +})(CommentThreadStatus = exports.CommentThreadStatus || (exports.CommentThreadStatus = {})); +/** + * The type of a comment. + */ +var CommentType; +(function (CommentType) { + /** + * The comment type is not known. + */ + CommentType[CommentType["Unknown"] = 0] = "Unknown"; + /** + * This is a regular user comment. + */ + CommentType[CommentType["Text"] = 1] = "Text"; + /** + * The comment comes as a result of a code change. + */ + CommentType[CommentType["CodeChange"] = 2] = "CodeChange"; + /** + * The comment represents a system message. + */ + CommentType[CommentType["System"] = 3] = "System"; +})(CommentType = exports.CommentType || (exports.CommentType = {})); +/** + * Current status of the asynchronous operation. + */ +var GitAsyncOperationStatus; +(function (GitAsyncOperationStatus) { + /** + * The operation is waiting in a queue and has not yet started. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Queued"] = 1] = "Queued"; + /** + * The operation is currently in progress. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["InProgress"] = 2] = "InProgress"; + /** + * The operation has completed. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Completed"] = 3] = "Completed"; + /** + * The operation has failed. Check for an error message. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Failed"] = 4] = "Failed"; + /** + * The operation has been abandoned. + */ + GitAsyncOperationStatus[GitAsyncOperationStatus["Abandoned"] = 5] = "Abandoned"; +})(GitAsyncOperationStatus = exports.GitAsyncOperationStatus || (exports.GitAsyncOperationStatus = {})); +var GitAsyncRefOperationFailureStatus; +(function (GitAsyncRefOperationFailureStatus) { + /** + * No status + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["None"] = 0] = "None"; + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["InvalidRefName"] = 1] = "InvalidRefName"; + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["RefNameConflict"] = 2] = "RefNameConflict"; + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["CreateBranchPermissionRequired"] = 3] = "CreateBranchPermissionRequired"; + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["WritePermissionRequired"] = 4] = "WritePermissionRequired"; + /** + * Target branch was deleted after Git async operation started + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["TargetBranchDeleted"] = 5] = "TargetBranchDeleted"; + /** + * Git object is too large to materialize into memory + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["GitObjectTooLarge"] = 6] = "GitObjectTooLarge"; + /** + * Identity who authorized the operation was not found + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["OperationIndentityNotFound"] = 7] = "OperationIndentityNotFound"; + /** + * Async operation was not found + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["AsyncOperationNotFound"] = 8] = "AsyncOperationNotFound"; + /** + * Unexpected failure + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["Other"] = 9] = "Other"; + /** + * Initiator of async operation has signature with empty name or email + */ + GitAsyncRefOperationFailureStatus[GitAsyncRefOperationFailureStatus["EmptyCommitterSignature"] = 10] = "EmptyCommitterSignature"; +})(GitAsyncRefOperationFailureStatus = exports.GitAsyncRefOperationFailureStatus || (exports.GitAsyncRefOperationFailureStatus = {})); +/** + * The type of a merge conflict. + */ +var GitConflictType; +(function (GitConflictType) { + /** + * No conflict + */ + GitConflictType[GitConflictType["None"] = 0] = "None"; + /** + * Added on source and target; content differs + */ + GitConflictType[GitConflictType["AddAdd"] = 1] = "AddAdd"; + /** + * Added on source and rename destination on target + */ + GitConflictType[GitConflictType["AddRename"] = 2] = "AddRename"; + /** + * Deleted on source and edited on target + */ + GitConflictType[GitConflictType["DeleteEdit"] = 3] = "DeleteEdit"; + /** + * Deleted on source and renamed on target + */ + GitConflictType[GitConflictType["DeleteRename"] = 4] = "DeleteRename"; + /** + * Path is a directory on source and a file on target + */ + GitConflictType[GitConflictType["DirectoryFile"] = 5] = "DirectoryFile"; + /** + * Children of directory which has DirectoryFile or FileDirectory conflict + */ + GitConflictType[GitConflictType["DirectoryChild"] = 6] = "DirectoryChild"; + /** + * Edited on source and deleted on target + */ + GitConflictType[GitConflictType["EditDelete"] = 7] = "EditDelete"; + /** + * Edited on source and target; content differs + */ + GitConflictType[GitConflictType["EditEdit"] = 8] = "EditEdit"; + /** + * Path is a file on source and a directory on target + */ + GitConflictType[GitConflictType["FileDirectory"] = 9] = "FileDirectory"; + /** + * Same file renamed on both source and target; destination paths differ + */ + GitConflictType[GitConflictType["Rename1to2"] = 10] = "Rename1to2"; + /** + * Different files renamed to same destination path on both source and target + */ + GitConflictType[GitConflictType["Rename2to1"] = 11] = "Rename2to1"; + /** + * Rename destination on source and new file on target + */ + GitConflictType[GitConflictType["RenameAdd"] = 12] = "RenameAdd"; + /** + * Renamed on source and deleted on target + */ + GitConflictType[GitConflictType["RenameDelete"] = 13] = "RenameDelete"; + /** + * Rename destination on both source and target; content differs + */ + GitConflictType[GitConflictType["RenameRename"] = 14] = "RenameRename"; +})(GitConflictType = exports.GitConflictType || (exports.GitConflictType = {})); +/** + * Represents the possible outcomes from a request to update a pull request conflict + */ +var GitConflictUpdateStatus; +(function (GitConflictUpdateStatus) { + /** + * Indicates that pull request conflict update request was completed successfully + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["Succeeded"] = 0] = "Succeeded"; + /** + * Indicates that the update request did not fit the expected data contract + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["BadRequest"] = 1] = "BadRequest"; + /** + * Indicates that the requested resolution was not valid + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["InvalidResolution"] = 2] = "InvalidResolution"; + /** + * Indicates that the conflict in the update request was not a supported conflict type + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["UnsupportedConflictType"] = 3] = "UnsupportedConflictType"; + /** + * Indicates that the conflict could not be found + */ + GitConflictUpdateStatus[GitConflictUpdateStatus["NotFound"] = 4] = "NotFound"; +})(GitConflictUpdateStatus = exports.GitConflictUpdateStatus || (exports.GitConflictUpdateStatus = {})); +/** + * Accepted types of version + */ +var GitHistoryMode; +(function (GitHistoryMode) { + /** + * The history mode used by `git log`. This is the default. + */ + GitHistoryMode[GitHistoryMode["SimplifiedHistory"] = 0] = "SimplifiedHistory"; + /** + * The history mode used by `git log --first-parent` + */ + GitHistoryMode[GitHistoryMode["FirstParent"] = 1] = "FirstParent"; + /** + * The history mode used by `git log --full-history` + */ + GitHistoryMode[GitHistoryMode["FullHistory"] = 2] = "FullHistory"; + /** + * The history mode used by `git log --full-history --simplify-merges` + */ + GitHistoryMode[GitHistoryMode["FullHistorySimplifyMerges"] = 3] = "FullHistorySimplifyMerges"; +})(GitHistoryMode = exports.GitHistoryMode || (exports.GitHistoryMode = {})); +var GitObjectType; +(function (GitObjectType) { + GitObjectType[GitObjectType["Bad"] = 0] = "Bad"; + GitObjectType[GitObjectType["Commit"] = 1] = "Commit"; + GitObjectType[GitObjectType["Tree"] = 2] = "Tree"; + GitObjectType[GitObjectType["Blob"] = 3] = "Blob"; + GitObjectType[GitObjectType["Tag"] = 4] = "Tag"; + GitObjectType[GitObjectType["Ext2"] = 5] = "Ext2"; + GitObjectType[GitObjectType["OfsDelta"] = 6] = "OfsDelta"; + GitObjectType[GitObjectType["RefDelta"] = 7] = "RefDelta"; +})(GitObjectType = exports.GitObjectType || (exports.GitObjectType = {})); +var GitPathActions; +(function (GitPathActions) { + GitPathActions[GitPathActions["None"] = 0] = "None"; + GitPathActions[GitPathActions["Edit"] = 1] = "Edit"; + GitPathActions[GitPathActions["Delete"] = 2] = "Delete"; + GitPathActions[GitPathActions["Add"] = 3] = "Add"; + GitPathActions[GitPathActions["Rename"] = 4] = "Rename"; +})(GitPathActions = exports.GitPathActions || (exports.GitPathActions = {})); +/** + * Enumeration of possible merge strategies which can be used to complete a pull request. + */ +var GitPullRequestMergeStrategy; +(function (GitPullRequestMergeStrategy) { + /** + * A two-parent, no-fast-forward merge. The source branch is unchanged. This is the default behavior. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["NoFastForward"] = 1] = "NoFastForward"; + /** + * Put all changes from the pull request into a single-parent commit. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Squash"] = 2] = "Squash"; + /** + * Rebase the source branch on top of the target branch HEAD commit, and fast-forward the target branch. The source branch is updated during the rebase operation. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["Rebase"] = 3] = "Rebase"; + /** + * Rebase the source branch on top of the target branch HEAD commit, and create a two-parent, no-fast-forward merge. The source branch is updated during the rebase operation. + */ + GitPullRequestMergeStrategy[GitPullRequestMergeStrategy["RebaseMerge"] = 4] = "RebaseMerge"; +})(GitPullRequestMergeStrategy = exports.GitPullRequestMergeStrategy || (exports.GitPullRequestMergeStrategy = {})); +/** + * Accepted types of pull request queries. + */ +var GitPullRequestQueryType; +(function (GitPullRequestQueryType) { + /** + * No query type set. + */ + GitPullRequestQueryType[GitPullRequestQueryType["NotSet"] = 0] = "NotSet"; + /** + * Search for pull requests that created the supplied merge commits. + */ + GitPullRequestQueryType[GitPullRequestQueryType["LastMergeCommit"] = 1] = "LastMergeCommit"; + /** + * Search for pull requests that merged the supplied commits. + */ + GitPullRequestQueryType[GitPullRequestQueryType["Commit"] = 2] = "Commit"; +})(GitPullRequestQueryType = exports.GitPullRequestQueryType || (exports.GitPullRequestQueryType = {})); +var GitPullRequestReviewFileType; +(function (GitPullRequestReviewFileType) { + GitPullRequestReviewFileType[GitPullRequestReviewFileType["ChangeEntry"] = 0] = "ChangeEntry"; + GitPullRequestReviewFileType[GitPullRequestReviewFileType["Attachment"] = 1] = "Attachment"; +})(GitPullRequestReviewFileType = exports.GitPullRequestReviewFileType || (exports.GitPullRequestReviewFileType = {})); +/** + * Search type on ref name + */ +var GitRefSearchType; +(function (GitRefSearchType) { + GitRefSearchType[GitRefSearchType["Exact"] = 0] = "Exact"; + GitRefSearchType[GitRefSearchType["StartsWith"] = 1] = "StartsWith"; + GitRefSearchType[GitRefSearchType["Contains"] = 2] = "Contains"; +})(GitRefSearchType = exports.GitRefSearchType || (exports.GitRefSearchType = {})); +/** + * Enumerates the modes under which ref updates can be written to their repositories. + */ +var GitRefUpdateMode; +(function (GitRefUpdateMode) { + /** + * Indicates the Git protocol model where any refs that can be updated will be updated, but any failures will not prevent other updates from succeeding. + */ + GitRefUpdateMode[GitRefUpdateMode["BestEffort"] = 0] = "BestEffort"; + /** + * Indicates that all ref updates must succeed or none will succeed. All ref updates will be atomically written. If any failure is encountered, previously successful updates will be rolled back and the entire operation will fail. + */ + GitRefUpdateMode[GitRefUpdateMode["AllOrNone"] = 1] = "AllOrNone"; +})(GitRefUpdateMode = exports.GitRefUpdateMode || (exports.GitRefUpdateMode = {})); +/** + * Represents the possible outcomes from a request to update a ref in a repository. + */ +var GitRefUpdateStatus; +(function (GitRefUpdateStatus) { + /** + * Indicates that the ref update request was completed successfully. + */ + GitRefUpdateStatus[GitRefUpdateStatus["Succeeded"] = 0] = "Succeeded"; + /** + * Indicates that the ref update request could not be completed because part of the graph would be disconnected by this change, and the caller does not have ForcePush permission on the repository. + */ + GitRefUpdateStatus[GitRefUpdateStatus["ForcePushRequired"] = 1] = "ForcePushRequired"; + /** + * Indicates that the ref update request could not be completed because the old object ID presented in the request was not the object ID of the ref when the database attempted the update. The most likely scenario is that the caller lost a race to update the ref. + */ + GitRefUpdateStatus[GitRefUpdateStatus["StaleOldObjectId"] = 2] = "StaleOldObjectId"; + /** + * Indicates that the ref update request could not be completed because the ref name presented in the request was not valid. + */ + GitRefUpdateStatus[GitRefUpdateStatus["InvalidRefName"] = 3] = "InvalidRefName"; + /** + * The request was not processed + */ + GitRefUpdateStatus[GitRefUpdateStatus["Unprocessed"] = 4] = "Unprocessed"; + /** + * The ref update request could not be completed because the new object ID for the ref could not be resolved to a commit object (potentially through any number of tags) + */ + GitRefUpdateStatus[GitRefUpdateStatus["UnresolvableToCommit"] = 5] = "UnresolvableToCommit"; + /** + * The ref update request could not be completed because the user lacks write permissions required to write this ref + */ + GitRefUpdateStatus[GitRefUpdateStatus["WritePermissionRequired"] = 6] = "WritePermissionRequired"; + /** + * The ref update request could not be completed because the user lacks note creation permissions required to write this note + */ + GitRefUpdateStatus[GitRefUpdateStatus["ManageNotePermissionRequired"] = 7] = "ManageNotePermissionRequired"; + /** + * The ref update request could not be completed because the user lacks the permission to create a branch + */ + GitRefUpdateStatus[GitRefUpdateStatus["CreateBranchPermissionRequired"] = 8] = "CreateBranchPermissionRequired"; + /** + * The ref update request could not be completed because the user lacks the permission to create a tag + */ + GitRefUpdateStatus[GitRefUpdateStatus["CreateTagPermissionRequired"] = 9] = "CreateTagPermissionRequired"; + /** + * The ref update could not be completed because it was rejected by the plugin. + */ + GitRefUpdateStatus[GitRefUpdateStatus["RejectedByPlugin"] = 10] = "RejectedByPlugin"; + /** + * The ref update could not be completed because the ref is locked by another user. + */ + GitRefUpdateStatus[GitRefUpdateStatus["Locked"] = 11] = "Locked"; + /** + * The ref update could not be completed because, in case-insensitive mode, the ref name conflicts with an existing, differently-cased ref name. + */ + GitRefUpdateStatus[GitRefUpdateStatus["RefNameConflict"] = 12] = "RefNameConflict"; + /** + * The ref update could not be completed because it was rejected by policy. + */ + GitRefUpdateStatus[GitRefUpdateStatus["RejectedByPolicy"] = 13] = "RejectedByPolicy"; + /** + * Indicates that the ref update request was completed successfully, but the ref doesn't actually exist so no changes were made. This should only happen during deletes. + */ + GitRefUpdateStatus[GitRefUpdateStatus["SucceededNonExistentRef"] = 14] = "SucceededNonExistentRef"; + /** + * Indicates that the ref update request was completed successfully, but the passed-in ref was corrupt - as in, the old object ID was bad. This should only happen during deletes. + */ + GitRefUpdateStatus[GitRefUpdateStatus["SucceededCorruptRef"] = 15] = "SucceededCorruptRef"; +})(GitRefUpdateStatus = exports.GitRefUpdateStatus || (exports.GitRefUpdateStatus = {})); +/** + * The type of a merge conflict. + */ +var GitResolutionError; +(function (GitResolutionError) { + /** + * No error + */ + GitResolutionError[GitResolutionError["None"] = 0] = "None"; + /** + * User set a blob id for resolving a content merge, but blob was not found in repo during application + */ + GitResolutionError[GitResolutionError["MergeContentNotFound"] = 1] = "MergeContentNotFound"; + /** + * Attempted to resolve a conflict by moving a file to another path, but path was already in use + */ + GitResolutionError[GitResolutionError["PathInUse"] = 2] = "PathInUse"; + /** + * No error + */ + GitResolutionError[GitResolutionError["InvalidPath"] = 3] = "InvalidPath"; + /** + * GitResolutionAction was set to an unrecognized value + */ + GitResolutionError[GitResolutionError["UnknownAction"] = 4] = "UnknownAction"; + /** + * GitResolutionMergeType was set to an unrecognized value + */ + GitResolutionError[GitResolutionError["UnknownMergeType"] = 5] = "UnknownMergeType"; + /** + * Any error for which a more specific code doesn't apply + */ + GitResolutionError[GitResolutionError["OtherError"] = 255] = "OtherError"; +})(GitResolutionError = exports.GitResolutionError || (exports.GitResolutionError = {})); +var GitResolutionMergeType; +(function (GitResolutionMergeType) { + GitResolutionMergeType[GitResolutionMergeType["Undecided"] = 0] = "Undecided"; + GitResolutionMergeType[GitResolutionMergeType["TakeSourceContent"] = 1] = "TakeSourceContent"; + GitResolutionMergeType[GitResolutionMergeType["TakeTargetContent"] = 2] = "TakeTargetContent"; + GitResolutionMergeType[GitResolutionMergeType["AutoMerged"] = 3] = "AutoMerged"; + GitResolutionMergeType[GitResolutionMergeType["UserMerged"] = 4] = "UserMerged"; +})(GitResolutionMergeType = exports.GitResolutionMergeType || (exports.GitResolutionMergeType = {})); +var GitResolutionPathConflictAction; +(function (GitResolutionPathConflictAction) { + GitResolutionPathConflictAction[GitResolutionPathConflictAction["Undecided"] = 0] = "Undecided"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepSourceRenameTarget"] = 1] = "KeepSourceRenameTarget"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepSourceDeleteTarget"] = 2] = "KeepSourceDeleteTarget"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepTargetRenameSource"] = 3] = "KeepTargetRenameSource"; + GitResolutionPathConflictAction[GitResolutionPathConflictAction["KeepTargetDeleteSource"] = 4] = "KeepTargetDeleteSource"; +})(GitResolutionPathConflictAction = exports.GitResolutionPathConflictAction || (exports.GitResolutionPathConflictAction = {})); +var GitResolutionRename1to2Action; +(function (GitResolutionRename1to2Action) { + GitResolutionRename1to2Action[GitResolutionRename1to2Action["Undecided"] = 0] = "Undecided"; + GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepSourcePath"] = 1] = "KeepSourcePath"; + GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepTargetPath"] = 2] = "KeepTargetPath"; + GitResolutionRename1to2Action[GitResolutionRename1to2Action["KeepBothFiles"] = 3] = "KeepBothFiles"; +})(GitResolutionRename1to2Action = exports.GitResolutionRename1to2Action || (exports.GitResolutionRename1to2Action = {})); +/** + * Resolution status of a conflict. + */ +var GitResolutionStatus; +(function (GitResolutionStatus) { + GitResolutionStatus[GitResolutionStatus["Unresolved"] = 0] = "Unresolved"; + GitResolutionStatus[GitResolutionStatus["PartiallyResolved"] = 1] = "PartiallyResolved"; + GitResolutionStatus[GitResolutionStatus["Resolved"] = 2] = "Resolved"; +})(GitResolutionStatus = exports.GitResolutionStatus || (exports.GitResolutionStatus = {})); +var GitResolutionWhichAction; +(function (GitResolutionWhichAction) { + GitResolutionWhichAction[GitResolutionWhichAction["Undecided"] = 0] = "Undecided"; + GitResolutionWhichAction[GitResolutionWhichAction["PickSourceAction"] = 1] = "PickSourceAction"; + GitResolutionWhichAction[GitResolutionWhichAction["PickTargetAction"] = 2] = "PickTargetAction"; +})(GitResolutionWhichAction = exports.GitResolutionWhichAction || (exports.GitResolutionWhichAction = {})); +/** + * State of the status. + */ +var GitStatusState; +(function (GitStatusState) { + /** + * Status state not set. Default state. + */ + GitStatusState[GitStatusState["NotSet"] = 0] = "NotSet"; + /** + * Status pending. + */ + GitStatusState[GitStatusState["Pending"] = 1] = "Pending"; + /** + * Status succeeded. + */ + GitStatusState[GitStatusState["Succeeded"] = 2] = "Succeeded"; + /** + * Status failed. + */ + GitStatusState[GitStatusState["Failed"] = 3] = "Failed"; + /** + * Status with an error. + */ + GitStatusState[GitStatusState["Error"] = 4] = "Error"; + /** + * Status is not applicable to the target object. + */ + GitStatusState[GitStatusState["NotApplicable"] = 5] = "NotApplicable"; +})(GitStatusState = exports.GitStatusState || (exports.GitStatusState = {})); +/** + * Accepted types of version options + */ +var GitVersionOptions; +(function (GitVersionOptions) { + /** + * Not specified + */ + GitVersionOptions[GitVersionOptions["None"] = 0] = "None"; + /** + * Commit that changed item prior to the current version + */ + GitVersionOptions[GitVersionOptions["PreviousChange"] = 1] = "PreviousChange"; + /** + * First parent of commit (HEAD^) + */ + GitVersionOptions[GitVersionOptions["FirstParent"] = 2] = "FirstParent"; +})(GitVersionOptions = exports.GitVersionOptions || (exports.GitVersionOptions = {})); +/** + * Accepted types of version + */ +var GitVersionType; +(function (GitVersionType) { + /** + * Interpret the version as a branch name + */ + GitVersionType[GitVersionType["Branch"] = 0] = "Branch"; + /** + * Interpret the version as a tag name + */ + GitVersionType[GitVersionType["Tag"] = 1] = "Tag"; + /** + * Interpret the version as a commit ID (SHA1) + */ + GitVersionType[GitVersionType["Commit"] = 2] = "Commit"; +})(GitVersionType = exports.GitVersionType || (exports.GitVersionType = {})); +var ItemContentType; +(function (ItemContentType) { + ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; + ItemContentType[ItemContentType["Base64Encoded"] = 1] = "Base64Encoded"; +})(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {})); +/** + * The reason for which the pull request iteration was created. + */ +var IterationReason; +(function (IterationReason) { + IterationReason[IterationReason["Push"] = 0] = "Push"; + IterationReason[IterationReason["ForcePush"] = 1] = "ForcePush"; + IterationReason[IterationReason["Create"] = 2] = "Create"; + IterationReason[IterationReason["Rebase"] = 4] = "Rebase"; + IterationReason[IterationReason["Unknown"] = 8] = "Unknown"; + IterationReason[IterationReason["Retarget"] = 16] = "Retarget"; +})(IterationReason = exports.IterationReason || (exports.IterationReason = {})); +/** + * Type of change for a line diff block + */ +var LineDiffBlockChangeType; +(function (LineDiffBlockChangeType) { + /** + * No change - both the blocks are identical + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["None"] = 0] = "None"; + /** + * Lines were added to the block in the modified file + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["Add"] = 1] = "Add"; + /** + * Lines were deleted from the block in the original file + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["Delete"] = 2] = "Delete"; + /** + * Lines were modified + */ + LineDiffBlockChangeType[LineDiffBlockChangeType["Edit"] = 3] = "Edit"; +})(LineDiffBlockChangeType = exports.LineDiffBlockChangeType || (exports.LineDiffBlockChangeType = {})); +/** + * The status of a pull request merge. + */ +var PullRequestAsyncStatus; +(function (PullRequestAsyncStatus) { + /** + * Status is not set. Default state. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["NotSet"] = 0] = "NotSet"; + /** + * Pull request merge is queued. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Queued"] = 1] = "Queued"; + /** + * Pull request merge failed due to conflicts. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Conflicts"] = 2] = "Conflicts"; + /** + * Pull request merge succeeded. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Succeeded"] = 3] = "Succeeded"; + /** + * Pull request merge rejected by policy. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["RejectedByPolicy"] = 4] = "RejectedByPolicy"; + /** + * Pull request merge failed. + */ + PullRequestAsyncStatus[PullRequestAsyncStatus["Failure"] = 5] = "Failure"; +})(PullRequestAsyncStatus = exports.PullRequestAsyncStatus || (exports.PullRequestAsyncStatus = {})); +/** + * The specific type of a pull request merge failure. + */ +var PullRequestMergeFailureType; +(function (PullRequestMergeFailureType) { + /** + * Type is not set. Default type. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["None"] = 0] = "None"; + /** + * Pull request merge failure type unknown. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["Unknown"] = 1] = "Unknown"; + /** + * Pull request merge failed due to case mismatch. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["CaseSensitive"] = 2] = "CaseSensitive"; + /** + * Pull request merge failed due to an object being too large. + */ + PullRequestMergeFailureType[PullRequestMergeFailureType["ObjectTooLarge"] = 3] = "ObjectTooLarge"; +})(PullRequestMergeFailureType = exports.PullRequestMergeFailureType || (exports.PullRequestMergeFailureType = {})); +/** + * Status of a pull request. + */ +var PullRequestStatus; +(function (PullRequestStatus) { + /** + * Status not set. Default state. + */ + PullRequestStatus[PullRequestStatus["NotSet"] = 0] = "NotSet"; + /** + * Pull request is active. + */ + PullRequestStatus[PullRequestStatus["Active"] = 1] = "Active"; + /** + * Pull request is abandoned. + */ + PullRequestStatus[PullRequestStatus["Abandoned"] = 2] = "Abandoned"; + /** + * Pull request is completed. + */ + PullRequestStatus[PullRequestStatus["Completed"] = 3] = "Completed"; + /** + * Used in pull request search criteria to include all statuses. + */ + PullRequestStatus[PullRequestStatus["All"] = 4] = "All"; +})(PullRequestStatus = exports.PullRequestStatus || (exports.PullRequestStatus = {})); +var RefFavoriteType; +(function (RefFavoriteType) { + RefFavoriteType[RefFavoriteType["Invalid"] = 0] = "Invalid"; + RefFavoriteType[RefFavoriteType["Folder"] = 1] = "Folder"; + RefFavoriteType[RefFavoriteType["Ref"] = 2] = "Ref"; +})(RefFavoriteType = exports.RefFavoriteType || (exports.RefFavoriteType = {})); +/** + * Enumeration that represents the types of IDEs supported. + */ +var SupportedIdeType; +(function (SupportedIdeType) { + SupportedIdeType[SupportedIdeType["Unknown"] = 0] = "Unknown"; + SupportedIdeType[SupportedIdeType["AndroidStudio"] = 1] = "AndroidStudio"; + SupportedIdeType[SupportedIdeType["AppCode"] = 2] = "AppCode"; + SupportedIdeType[SupportedIdeType["CLion"] = 3] = "CLion"; + SupportedIdeType[SupportedIdeType["DataGrip"] = 4] = "DataGrip"; + SupportedIdeType[SupportedIdeType["Eclipse"] = 13] = "Eclipse"; + SupportedIdeType[SupportedIdeType["IntelliJ"] = 5] = "IntelliJ"; + SupportedIdeType[SupportedIdeType["MPS"] = 6] = "MPS"; + SupportedIdeType[SupportedIdeType["PhpStorm"] = 7] = "PhpStorm"; + SupportedIdeType[SupportedIdeType["PyCharm"] = 8] = "PyCharm"; + SupportedIdeType[SupportedIdeType["RubyMine"] = 9] = "RubyMine"; + SupportedIdeType[SupportedIdeType["Tower"] = 10] = "Tower"; + SupportedIdeType[SupportedIdeType["VisualStudio"] = 11] = "VisualStudio"; + SupportedIdeType[SupportedIdeType["VSCode"] = 14] = "VSCode"; + SupportedIdeType[SupportedIdeType["WebStorm"] = 12] = "WebStorm"; +})(SupportedIdeType = exports.SupportedIdeType || (exports.SupportedIdeType = {})); +/** + * Options for Version handling. + */ +var TfvcVersionOption; +(function (TfvcVersionOption) { + /** + * None. + */ + TfvcVersionOption[TfvcVersionOption["None"] = 0] = "None"; + /** + * Return the previous version. + */ + TfvcVersionOption[TfvcVersionOption["Previous"] = 1] = "Previous"; + /** + * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. + */ + TfvcVersionOption[TfvcVersionOption["UseRename"] = 2] = "UseRename"; +})(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {})); +/** + * Type of Version object + */ +var TfvcVersionType; +(function (TfvcVersionType) { + /** + * Version is treated as a ChangesetId. + */ + TfvcVersionType[TfvcVersionType["None"] = 0] = "None"; + /** + * Version is treated as a ChangesetId. + */ + TfvcVersionType[TfvcVersionType["Changeset"] = 1] = "Changeset"; + /** + * Version is treated as a Shelveset name and owner. + */ + TfvcVersionType[TfvcVersionType["Shelveset"] = 2] = "Shelveset"; + /** + * Version is treated as a Change. + */ + TfvcVersionType[TfvcVersionType["Change"] = 3] = "Change"; + /** + * Version is treated as a Date. + */ + TfvcVersionType[TfvcVersionType["Date"] = 4] = "Date"; + /** + * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. + */ + TfvcVersionType[TfvcVersionType["Latest"] = 5] = "Latest"; + /** + * Version will be treated as a Tip, if no version is defined latest will be used. + */ + TfvcVersionType[TfvcVersionType["Tip"] = 6] = "Tip"; + /** + * Version will be treated as a MergeSource. + */ + TfvcVersionType[TfvcVersionType["MergeSource"] = 7] = "MergeSource"; +})(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {})); +var VersionControlChangeType; +(function (VersionControlChangeType) { + VersionControlChangeType[VersionControlChangeType["None"] = 0] = "None"; + VersionControlChangeType[VersionControlChangeType["Add"] = 1] = "Add"; + VersionControlChangeType[VersionControlChangeType["Edit"] = 2] = "Edit"; + VersionControlChangeType[VersionControlChangeType["Encoding"] = 4] = "Encoding"; + VersionControlChangeType[VersionControlChangeType["Rename"] = 8] = "Rename"; + VersionControlChangeType[VersionControlChangeType["Delete"] = 16] = "Delete"; + VersionControlChangeType[VersionControlChangeType["Undelete"] = 32] = "Undelete"; + VersionControlChangeType[VersionControlChangeType["Branch"] = 64] = "Branch"; + VersionControlChangeType[VersionControlChangeType["Merge"] = 128] = "Merge"; + VersionControlChangeType[VersionControlChangeType["Lock"] = 256] = "Lock"; + VersionControlChangeType[VersionControlChangeType["Rollback"] = 512] = "Rollback"; + VersionControlChangeType[VersionControlChangeType["SourceRename"] = 1024] = "SourceRename"; + VersionControlChangeType[VersionControlChangeType["TargetRename"] = 2048] = "TargetRename"; + VersionControlChangeType[VersionControlChangeType["Property"] = 4096] = "Property"; + VersionControlChangeType[VersionControlChangeType["All"] = 8191] = "All"; +})(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {})); +var VersionControlRecursionType; +(function (VersionControlRecursionType) { + /** + * Only return the specified item. + */ + VersionControlRecursionType[VersionControlRecursionType["None"] = 0] = "None"; + /** + * Return the specified item and its direct children. + */ + VersionControlRecursionType[VersionControlRecursionType["OneLevel"] = 1] = "OneLevel"; + /** + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + */ + VersionControlRecursionType[VersionControlRecursionType["OneLevelPlusNestedEmptyFolders"] = 4] = "OneLevelPlusNestedEmptyFolders"; + /** + * Return specified item and all descendants + */ + VersionControlRecursionType[VersionControlRecursionType["Full"] = 120] = "Full"; +})(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {})); +exports.TypeInfo = { + Attachment: {}, + Change: {}, + ChangeList: {}, + Comment: {}, + CommentThread: {}, + CommentThreadStatus: { + enumValues: { + "unknown": 0, + "active": 1, + "fixed": 2, + "wontFix": 3, + "closed": 4, + "byDesign": 5, + "pending": 6 + } + }, + CommentType: { + enumValues: { + "unknown": 0, + "text": 1, + "codeChange": 2, + "system": 3 + } + }, + FileDiff: {}, + GitAnnotatedTag: {}, + GitAsyncOperationStatus: { + enumValues: { + "queued": 1, + "inProgress": 2, + "completed": 3, + "failed": 4, + "abandoned": 5 + } + }, + GitAsyncRefOperation: {}, + GitAsyncRefOperationDetail: {}, + GitAsyncRefOperationFailureStatus: { + enumValues: { + "none": 0, + "invalidRefName": 1, + "refNameConflict": 2, + "createBranchPermissionRequired": 3, + "writePermissionRequired": 4, + "targetBranchDeleted": 5, + "gitObjectTooLarge": 6, + "operationIndentityNotFound": 7, + "asyncOperationNotFound": 8, + "other": 9, + "emptyCommitterSignature": 10 + } + }, + GitAsyncRefOperationParameters: {}, + GitAsyncRefOperationSource: {}, + GitBaseVersionDescriptor: {}, + GitBranchStats: {}, + GitChange: {}, + GitCherryPick: {}, + GitCommit: {}, + GitCommitChanges: {}, + GitCommitDiffs: {}, + GitCommitRef: {}, + GitCommitToCreate: {}, + GitConflict: {}, + GitConflictAddAdd: {}, + GitConflictAddRename: {}, + GitConflictDeleteEdit: {}, + GitConflictDeleteRename: {}, + GitConflictDirectoryFile: {}, + GitConflictEditDelete: {}, + GitConflictEditEdit: {}, + GitConflictFileDirectory: {}, + GitConflictRename1to2: {}, + GitConflictRename2to1: {}, + GitConflictRenameAdd: {}, + GitConflictRenameDelete: {}, + GitConflictRenameRename: {}, + GitConflictType: { + enumValues: { + "none": 0, + "addAdd": 1, + "addRename": 2, + "deleteEdit": 3, + "deleteRename": 4, + "directoryFile": 5, + "directoryChild": 6, + "editDelete": 7, + "editEdit": 8, + "fileDirectory": 9, + "rename1to2": 10, + "rename2to1": 11, + "renameAdd": 12, + "renameDelete": 13, + "renameRename": 14 + } + }, + GitConflictUpdateResult: {}, + GitConflictUpdateStatus: { + enumValues: { + "succeeded": 0, + "badRequest": 1, + "invalidResolution": 2, + "unsupportedConflictType": 3, + "notFound": 4 + } + }, + GitDeletedRepository: {}, + GitForkRef: {}, + GitForkSyncRequest: {}, + GitForkTeamProjectReference: {}, + GitHistoryMode: { + enumValues: { + "simplifiedHistory": 0, + "firstParent": 1, + "fullHistory": 2, + "fullHistorySimplifyMerges": 3 + } + }, + GitImportFailedEvent: {}, + GitImportRequest: {}, + GitImportSucceededEvent: {}, + GitItem: {}, + GitItemDescriptor: {}, + GitItemRequestData: {}, + GitLastChangeTreeItems: {}, + GitMerge: {}, + GitObject: {}, + GitObjectType: { + enumValues: { + "bad": 0, + "commit": 1, + "tree": 2, + "blob": 3, + "tag": 4, + "ext2": 5, + "ofsDelta": 6, + "refDelta": 7 + } + }, + GitPathAction: {}, + GitPathActions: { + enumValues: { + "none": 0, + "edit": 1, + "delete": 2, + "add": 3, + "rename": 4 + } + }, + GitPathToItemsCollection: {}, + GitPolicyConfigurationResponse: {}, + GitPullRequest: {}, + GitPullRequestChange: {}, + GitPullRequestCommentThread: {}, + GitPullRequestCompletionOptions: {}, + GitPullRequestIteration: {}, + GitPullRequestIterationChanges: {}, + GitPullRequestMergeStrategy: { + enumValues: { + "noFastForward": 1, + "squash": 2, + "rebase": 3, + "rebaseMerge": 4 + } + }, + GitPullRequestQuery: {}, + GitPullRequestQueryInput: {}, + GitPullRequestQueryType: { + enumValues: { + "notSet": 0, + "lastMergeCommit": 1, + "commit": 2 + } + }, + GitPullRequestReviewFileType: { + enumValues: { + "changeEntry": 0, + "attachment": 1 + } + }, + GitPullRequestSearchCriteria: {}, + GitPullRequestStatus: {}, + GitPush: {}, + GitPushEventData: {}, + GitPushRef: {}, + GitPushSearchCriteria: {}, + GitQueryBranchStatsCriteria: {}, + GitQueryCommitsCriteria: {}, + GitQueryRefsCriteria: {}, + GitRef: {}, + GitRefFavorite: {}, + GitRefSearchType: { + enumValues: { + "exact": 0, + "startsWith": 1, + "contains": 2 + } + }, + GitRefUpdateMode: { + enumValues: { + "bestEffort": 0, + "allOrNone": 1 + } + }, + GitRefUpdateResult: {}, + GitRefUpdateStatus: { + enumValues: { + "succeeded": 0, + "forcePushRequired": 1, + "staleOldObjectId": 2, + "invalidRefName": 3, + "unprocessed": 4, + "unresolvableToCommit": 5, + "writePermissionRequired": 6, + "manageNotePermissionRequired": 7, + "createBranchPermissionRequired": 8, + "createTagPermissionRequired": 9, + "rejectedByPlugin": 10, + "locked": 11, + "refNameConflict": 12, + "rejectedByPolicy": 13, + "succeededNonExistentRef": 14, + "succeededCorruptRef": 15 + } + }, + GitRepository: {}, + GitRepositoryCreateOptions: {}, + GitRepositoryRef: {}, + GitResolutionError: { + enumValues: { + "none": 0, + "mergeContentNotFound": 1, + "pathInUse": 2, + "invalidPath": 3, + "unknownAction": 4, + "unknownMergeType": 5, + "otherError": 255 + } + }, + GitResolutionMergeContent: {}, + GitResolutionMergeType: { + enumValues: { + "undecided": 0, + "takeSourceContent": 1, + "takeTargetContent": 2, + "autoMerged": 3, + "userMerged": 4 + } + }, + GitResolutionPathConflict: {}, + GitResolutionPathConflictAction: { + enumValues: { + "undecided": 0, + "keepSourceRenameTarget": 1, + "keepSourceDeleteTarget": 2, + "keepTargetRenameSource": 3, + "keepTargetDeleteSource": 4 + } + }, + GitResolutionPickOneAction: {}, + GitResolutionRename1to2: {}, + GitResolutionRename1to2Action: { + enumValues: { + "undecided": 0, + "keepSourcePath": 1, + "keepTargetPath": 2, + "keepBothFiles": 3 + } + }, + GitResolutionStatus: { + enumValues: { + "unresolved": 0, + "partiallyResolved": 1, + "resolved": 2 + } + }, + GitResolutionWhichAction: { + enumValues: { + "undecided": 0, + "pickSourceAction": 1, + "pickTargetAction": 2 + } + }, + GitRevert: {}, + GitStatus: {}, + GitStatusState: { + enumValues: { + "notSet": 0, + "pending": 1, + "succeeded": 2, + "failed": 3, + "error": 4, + "notApplicable": 5 + } + }, + GitTargetVersionDescriptor: {}, + GitTreeDiff: {}, + GitTreeDiffEntry: {}, + GitTreeDiffResponse: {}, + GitTreeEntryRef: {}, + GitTreeRef: {}, + GitUserDate: {}, + GitVersionDescriptor: {}, + GitVersionOptions: { + enumValues: { + "none": 0, + "previousChange": 1, + "firstParent": 2 + } + }, + GitVersionType: { + enumValues: { + "branch": 0, + "tag": 1, + "commit": 2 + } + }, + HistoryEntry: {}, + IncludedGitCommit: {}, + ItemContent: {}, + ItemContentType: { + enumValues: { + "rawText": 0, + "base64Encoded": 1 + } + }, + ItemDetailsOptions: {}, + IterationReason: { + enumValues: { + "push": 0, + "forcePush": 1, + "create": 2, + "rebase": 4, + "unknown": 8, + "retarget": 16 + } + }, + LineDiffBlock: {}, + LineDiffBlockChangeType: { + enumValues: { + "none": 0, + "add": 1, + "delete": 2, + "edit": 3 + } + }, + PullRequestAsyncStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "conflicts": 2, + "succeeded": 3, + "rejectedByPolicy": 4, + "failure": 5 + } + }, + PullRequestMergeFailureType: { + enumValues: { + "none": 0, + "unknown": 1, + "caseSensitive": 2, + "objectTooLarge": 3 + } + }, + PullRequestStatus: { + enumValues: { + "notSet": 0, + "active": 1, + "abandoned": 2, + "completed": 3, + "all": 4 + } + }, + RefFavoriteType: { + enumValues: { + "invalid": 0, + "folder": 1, + "ref": 2 + } + }, + SupportedIde: {}, + SupportedIdeType: { + enumValues: { + "unknown": 0, + "androidStudio": 1, + "appCode": 2, + "cLion": 3, + "dataGrip": 4, + "eclipse": 13, + "intelliJ": 5, + "mps": 6, + "phpStorm": 7, + "pyCharm": 8, + "rubyMine": 9, + "tower": 10, + "visualStudio": 11, + "vsCode": 14, + "webStorm": 12 + } + }, + TfvcBranch: {}, + TfvcBranchRef: {}, + TfvcChange: {}, + TfvcChangeset: {}, + TfvcChangesetRef: {}, + TfvcCheckinEventData: {}, + TfvcHistoryEntry: {}, + TfvcItem: {}, + TfvcItemDescriptor: {}, + TfvcItemPreviousHash: {}, + TfvcItemRequestData: {}, + TfvcLabel: {}, + TfvcLabelRef: {}, + TfvcShelveset: {}, + TfvcShelvesetRef: {}, + TfvcVersionDescriptor: {}, + TfvcVersionOption: { + enumValues: { + "none": 0, + "previous": 1, + "useRename": 2 + } + }, + TfvcVersionType: { + enumValues: { + "none": 0, + "changeset": 1, + "shelveset": 2, + "change": 3, + "date": 4, + "latest": 5, + "tip": 6, + "mergeSource": 7 + } + }, + UpdateRefsRequest: {}, + VersionControlChangeType: { + enumValues: { + "none": 0, + "add": 1, + "edit": 2, + "encoding": 4, + "rename": 8, + "delete": 16, + "undelete": 32, + "branch": 64, + "merge": 128, + "lock": 256, + "rollback": 512, + "sourceRename": 1024, + "targetRename": 2048, + "property": 4096, + "all": 8191 + } + }, + VersionControlProjectInfo: {}, + VersionControlRecursionType: { + enumValues: { + "none": 0, + "oneLevel": 1, + "oneLevelPlusNestedEmptyFolders": 4, + "full": 120 + } + }, +}; +exports.TypeInfo.Attachment.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.Change.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.ChangeList.fields = { + changeCounts: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, + }, + creationDate: { + isDate: true, + }, + sortDate: { + isDate: true, + } +}; +exports.TypeInfo.Comment.fields = { + commentType: { + enumType: exports.TypeInfo.CommentType + }, + lastContentUpdatedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + publishedDate: { + isDate: true, + } +}; +exports.TypeInfo.CommentThread.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + }, + lastUpdatedDate: { + isDate: true, + }, + publishedDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.CommentThreadStatus + } +}; +exports.TypeInfo.FileDiff.fields = { + lineDiffBlocks: { + isArray: true, + typeInfo: exports.TypeInfo.LineDiffBlock + } +}; +exports.TypeInfo.GitAnnotatedTag.fields = { + taggedBy: { + typeInfo: exports.TypeInfo.GitUserDate + }, + taggedObject: { + typeInfo: exports.TypeInfo.GitObject + } +}; +exports.TypeInfo.GitAsyncRefOperation.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail + }, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitAsyncRefOperationDetail.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncRefOperationFailureStatus + } +}; +exports.TypeInfo.GitAsyncRefOperationParameters.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + source: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationSource + } +}; +exports.TypeInfo.GitAsyncRefOperationSource.fields = { + commitList: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitBaseVersionDescriptor.fields = { + baseVersionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + baseVersionType: { + enumType: exports.TypeInfo.GitVersionType + }, + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.GitBranchStats.fields = { + commit: { + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.GitCherryPick.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail + }, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitCommit.fields = { + author: { + typeInfo: exports.TypeInfo.GitUserDate + }, + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + }, + committer: { + typeInfo: exports.TypeInfo.GitUserDate + }, + push: { + typeInfo: exports.TypeInfo.GitPushRef + }, + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitCommitChanges.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + } +}; +exports.TypeInfo.GitCommitDiffs.fields = { + changeCounts: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.VersionControlChangeType, + }, + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + } +}; +exports.TypeInfo.GitCommitRef.fields = { + author: { + typeInfo: exports.TypeInfo.GitUserDate + }, + changes: { + isArray: true, + typeInfo: exports.TypeInfo.GitChange + }, + committer: { + typeInfo: exports.TypeInfo.GitUserDate + }, + push: { + typeInfo: exports.TypeInfo.GitPushRef + }, + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitCommitToCreate.fields = { + baseRef: { + typeInfo: exports.TypeInfo.GitRef + }, + pathActions: { + isArray: true, + typeInfo: exports.TypeInfo.GitPathAction + } +}; +exports.TypeInfo.GitConflict.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictAddAdd.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionMergeContent + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictAddRename.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictDeleteEdit.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictDeleteRename.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictDirectoryFile.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + }, + sourceTree: { + typeInfo: exports.TypeInfo.GitTreeRef + } +}; +exports.TypeInfo.GitConflictEditDelete.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictEditEdit.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionMergeContent + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictFileDirectory.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + }, + targetTree: { + typeInfo: exports.TypeInfo.GitTreeRef + } +}; +exports.TypeInfo.GitConflictRename1to2.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionRename1to2 + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictRename2to1.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictRenameAdd.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPathConflict + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictRenameDelete.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionPickOneAction + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictRenameRename.fields = { + conflictType: { + enumType: exports.TypeInfo.GitConflictType + }, + mergeBaseCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + resolution: { + typeInfo: exports.TypeInfo.GitResolutionMergeContent + }, + resolutionError: { + enumType: exports.TypeInfo.GitResolutionError + }, + resolutionStatus: { + enumType: exports.TypeInfo.GitResolutionStatus + }, + resolvedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitConflictUpdateResult.fields = { + updatedConflict: { + typeInfo: exports.TypeInfo.GitConflict + }, + updateStatus: { + enumType: exports.TypeInfo.GitConflictUpdateStatus + } +}; +exports.TypeInfo.GitDeletedRepository.fields = { + createdDate: { + isDate: true, + }, + deletedDate: { + isDate: true, + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitForkRef.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitForkSyncRequest.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitForkTeamProjectReference.fields = { + lastUpdateTime: { + isDate: true, + }, + visibility: { + enumType: TfsCoreInterfaces.TypeInfo.ProjectVisibility + } +}; +exports.TypeInfo.GitImportFailedEvent.fields = { + targetRepository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitImportRequest.fields = { + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitImportSucceededEvent.fields = { + targetRepository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitItem.fields = { + gitObjectType: { + enumType: exports.TypeInfo.GitObjectType + }, + latestProcessedChange: { + typeInfo: exports.TypeInfo.GitCommitRef + } +}; +exports.TypeInfo.GitItemDescriptor.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType + }, + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.GitItemRequestData.fields = { + itemDescriptors: { + isArray: true, + typeInfo: exports.TypeInfo.GitItemDescriptor + } +}; +exports.TypeInfo.GitLastChangeTreeItems.fields = { + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + lastExploredTime: { + isDate: true, + } +}; +exports.TypeInfo.GitMerge.fields = { + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitObject.fields = { + objectType: { + enumType: exports.TypeInfo.GitObjectType + } +}; +exports.TypeInfo.GitPathAction.fields = { + action: { + enumType: exports.TypeInfo.GitPathActions + } +}; +exports.TypeInfo.GitPathToItemsCollection.fields = { + items: { + isDictionary: true, + dictionaryValueFieldInfo: { + isArray: true, + typeInfo: exports.TypeInfo.GitItem + } + } +}; +exports.TypeInfo.GitPolicyConfigurationResponse.fields = { + policyConfigurations: { + isArray: true, + typeInfo: PolicyInterfaces.TypeInfo.PolicyConfiguration + } +}; +exports.TypeInfo.GitPullRequest.fields = { + closedDate: { + isDate: true, + }, + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + completionOptions: { + typeInfo: exports.TypeInfo.GitPullRequestCompletionOptions + }, + completionQueueTime: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + forkSource: { + typeInfo: exports.TypeInfo.GitForkRef + }, + lastMergeCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + lastMergeSourceCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + lastMergeTargetCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + mergeFailureType: { + enumType: exports.TypeInfo.PullRequestMergeFailureType + }, + mergeStatus: { + enumType: exports.TypeInfo.PullRequestAsyncStatus + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository + }, + status: { + enumType: exports.TypeInfo.PullRequestStatus + } +}; +exports.TypeInfo.GitPullRequestChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.GitPullRequestCommentThread.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + }, + lastUpdatedDate: { + isDate: true, + }, + publishedDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.CommentThreadStatus + } +}; +exports.TypeInfo.GitPullRequestCompletionOptions.fields = { + mergeStrategy: { + enumType: exports.TypeInfo.GitPullRequestMergeStrategy + } +}; +exports.TypeInfo.GitPullRequestIteration.fields = { + changeList: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestChange + }, + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + commonRefCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + createdDate: { + isDate: true, + }, + push: { + typeInfo: exports.TypeInfo.GitPushRef + }, + reason: { + enumType: exports.TypeInfo.IterationReason + }, + sourceRefCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + targetRefCommit: { + typeInfo: exports.TypeInfo.GitCommitRef + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitPullRequestIterationChanges.fields = { + changeEntries: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestChange + } +}; +exports.TypeInfo.GitPullRequestQuery.fields = { + queries: { + isArray: true, + typeInfo: exports.TypeInfo.GitPullRequestQueryInput + }, +}; +exports.TypeInfo.GitPullRequestQueryInput.fields = { + type: { + enumType: exports.TypeInfo.GitPullRequestQueryType + } +}; +exports.TypeInfo.GitPullRequestSearchCriteria.fields = { + status: { + enumType: exports.TypeInfo.PullRequestStatus + } +}; +exports.TypeInfo.GitPullRequestStatus.fields = { + creationDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.GitStatusState + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitPush.fields = { + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommitRef + }, + date: { + isDate: true, + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitPushEventData.fields = { + commits: { + isArray: true, + typeInfo: exports.TypeInfo.GitCommit + }, + repository: { + typeInfo: exports.TypeInfo.GitRepository + } +}; +exports.TypeInfo.GitPushRef.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.GitPushSearchCriteria.fields = { + fromDate: { + isDate: true, + }, + toDate: { + isDate: true, + } +}; +exports.TypeInfo.GitQueryBranchStatsCriteria.fields = { + baseCommit: { + typeInfo: exports.TypeInfo.GitVersionDescriptor + }, + targetCommits: { + isArray: true, + typeInfo: exports.TypeInfo.GitVersionDescriptor + } +}; +exports.TypeInfo.GitQueryCommitsCriteria.fields = { + compareVersion: { + typeInfo: exports.TypeInfo.GitVersionDescriptor + }, + historyMode: { + enumType: exports.TypeInfo.GitHistoryMode + }, + itemVersion: { + typeInfo: exports.TypeInfo.GitVersionDescriptor + } +}; +exports.TypeInfo.GitQueryRefsCriteria.fields = { + searchType: { + enumType: exports.TypeInfo.GitRefSearchType + } +}; +exports.TypeInfo.GitRef.fields = { + statuses: { + isArray: true, + typeInfo: exports.TypeInfo.GitStatus + } +}; +exports.TypeInfo.GitRefFavorite.fields = { + type: { + enumType: exports.TypeInfo.RefFavoriteType + } +}; +exports.TypeInfo.GitRefUpdateResult.fields = { + updateStatus: { + enumType: exports.TypeInfo.GitRefUpdateStatus + } +}; +exports.TypeInfo.GitRepository.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitRepositoryCreateOptions.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitRepositoryRef.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitResolutionMergeContent.fields = { + mergeType: { + enumType: exports.TypeInfo.GitResolutionMergeType + } +}; +exports.TypeInfo.GitResolutionPathConflict.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionPathConflictAction + } +}; +exports.TypeInfo.GitResolutionPickOneAction.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionWhichAction + } +}; +exports.TypeInfo.GitResolutionRename1to2.fields = { + action: { + enumType: exports.TypeInfo.GitResolutionRename1to2Action + }, + mergeType: { + enumType: exports.TypeInfo.GitResolutionMergeType + } +}; +exports.TypeInfo.GitRevert.fields = { + detailedStatus: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationDetail + }, + parameters: { + typeInfo: exports.TypeInfo.GitAsyncRefOperationParameters + }, + status: { + enumType: exports.TypeInfo.GitAsyncOperationStatus + } +}; +exports.TypeInfo.GitStatus.fields = { + creationDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.GitStatusState + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.GitTargetVersionDescriptor.fields = { + targetVersionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + targetVersionType: { + enumType: exports.TypeInfo.GitVersionType + }, + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.GitTreeDiff.fields = { + diffEntries: { + isArray: true, + typeInfo: exports.TypeInfo.GitTreeDiffEntry + } +}; +exports.TypeInfo.GitTreeDiffEntry.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + objectType: { + enumType: exports.TypeInfo.GitObjectType + } +}; +exports.TypeInfo.GitTreeDiffResponse.fields = { + treeDiff: { + typeInfo: exports.TypeInfo.GitTreeDiff + } +}; +exports.TypeInfo.GitTreeEntryRef.fields = { + gitObjectType: { + enumType: exports.TypeInfo.GitObjectType + } +}; +exports.TypeInfo.GitTreeRef.fields = { + treeEntries: { + isArray: true, + typeInfo: exports.TypeInfo.GitTreeEntryRef + } +}; +exports.TypeInfo.GitUserDate.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.GitVersionDescriptor.fields = { + versionOptions: { + enumType: exports.TypeInfo.GitVersionOptions + }, + versionType: { + enumType: exports.TypeInfo.GitVersionType + } +}; +exports.TypeInfo.HistoryEntry.fields = { + itemChangeType: { + enumType: exports.TypeInfo.VersionControlChangeType + } +}; +exports.TypeInfo.IncludedGitCommit.fields = { + commitTime: { + isDate: true, + } +}; +exports.TypeInfo.ItemContent.fields = { + contentType: { + enumType: exports.TypeInfo.ItemContentType + } +}; +exports.TypeInfo.ItemDetailsOptions.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType + } +}; +exports.TypeInfo.LineDiffBlock.fields = { + changeType: { + enumType: exports.TypeInfo.LineDiffBlockChangeType + } +}; +exports.TypeInfo.SupportedIde.fields = { + ideType: { + enumType: exports.TypeInfo.SupportedIdeType + } +}; +exports.TypeInfo.TfvcBranch.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcBranch + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcBranchRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.TfvcChangeset.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcChange + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcChangesetRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcCheckinEventData.fields = { + changeset: { + typeInfo: exports.TypeInfo.TfvcChangeset + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.TfvcHistoryEntry.fields = { + itemChangeType: { + enumType: exports.TypeInfo.VersionControlChangeType + } +}; +exports.TypeInfo.TfvcItem.fields = { + changeDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcItemDescriptor.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType + }, + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption + }, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } +}; +exports.TypeInfo.TfvcItemPreviousHash.fields = { + changeDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcItemRequestData.fields = { + itemDescriptors: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItemDescriptor + } +}; +exports.TypeInfo.TfvcLabel.fields = { + items: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItem + }, + modifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcLabelRef.fields = { + modifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcShelveset.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcChange + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcShelvesetRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcVersionDescriptor.fields = { + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption + }, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } +}; +exports.TypeInfo.UpdateRefsRequest.fields = { + updateMode: { + enumType: exports.TypeInfo.GitRefUpdateMode + } +}; +exports.TypeInfo.VersionControlProjectInfo.fields = { + defaultSourceControlType: { + enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/GraphInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/GraphInterfaces.d.ts new file mode 100644 index 0000000..4c2b108 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/GraphInterfaces.d.ts @@ -0,0 +1,442 @@ +import IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces"); +export interface GraphCachePolicies { + /** + * Size of the cache + */ + cacheSize?: number; +} +/** + * Subject descriptor of a Graph entity + */ +export interface GraphDescriptorResult { + /** + * This field contains zero or more interesting links about the graph descriptor. These links may be invoked to obtain additional relationships or more detailed information about this graph descriptor. + */ + _links?: any; + value?: string; +} +/** + * Represents a set of data used to communicate with a federated provider on behalf of a particular user. + */ +export interface GraphFederatedProviderData { + /** + * The access token that can be used to communicated with the federated provider on behalf on the target identity, if we were able to successfully acquire one, otherwise null, if we were not. + */ + accessToken?: string; + /** + * The name of the federated provider, e.g. "github.com". + */ + providerName?: string; + /** + * The descriptor of the graph subject to which this federated provider data corresponds. + */ + subjectDescriptor?: string; + /** + * The version number of this federated provider data, which corresponds to when it was last updated. Can be used to prevent returning stale provider data from the cache when the caller is aware of a newer version, such as to prevent local cache poisoning from a remote cache or store. This is the app layer equivalent of the data layer sequence ID. + */ + version?: number; +} +export interface GraphGlobalExtendedPropertyBatch { + propertyNameFilters?: string[]; + subjectDescriptors?: string[]; +} +/** + * Graph group entity + */ +export interface GraphGroup extends GraphMember { + /** + * A short phrase to help human readers disambiguate groups with similar names + */ + description?: string; + isCrossProject?: boolean; + isDeleted?: boolean; + isGlobalScope?: boolean; + isRestrictedVisible?: boolean; + localScopeId?: string; + scopeId?: string; + scopeName?: string; + scopeType?: string; + securingHostId?: string; + specialType?: string; +} +/** + * Do not attempt to use this type to create a new group. This type does not contain sufficient fields to create a new group. + */ +export interface GraphGroupCreationContext { + /** + * Optional: If provided, we will use this identifier for the storage key of the created group + */ + storageKey?: string; +} +/** + * Use this type to create a new group using the mail address as a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AAD and AD use case. + */ +export interface GraphGroupMailAddressCreationContext extends GraphGroupCreationContext { + /** + * This should be the mail address or the group in the source AD or AAD provider. Example: jamal@contoso.com Team Services will communicate with the source provider to fill all other fields on creation. + */ + mailAddress: string; +} +/** + * Use this type to create a new group using the OriginID as a reference to an existing group from an external AD or AAD backed provider. This is the subset of GraphGroup fields required for creation of a group for the AD and AAD use case. + */ +export interface GraphGroupOriginIdCreationContext extends GraphGroupCreationContext { + /** + * This should be the object id or sid of the group from the source AD or AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Team Services will communicate with the source provider to fill all other fields on creation. + */ + originId: string; +} +/** + * Use this type to create a new Vsts group that is not backed by an external provider. + */ +export interface GraphGroupVstsCreationContext extends GraphGroupCreationContext { + /** + * For internal use only in back compat scenarios. + */ + crossProject?: boolean; + /** + * Used by VSTS groups; if set this will be the group description, otherwise ignored + */ + description?: string; + descriptor?: string; + /** + * Used by VSTS groups; if set this will be the group DisplayName, otherwise ignored + */ + displayName: string; + /** + * For internal use only in back compat scenarios. + */ + restrictedVisibility?: boolean; + /** + * For internal use only in back compat scenarios. + */ + specialGroupType?: string; +} +export interface GraphMember extends GraphSubject { + /** + * This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc) + */ + domain?: string; + /** + * The email address of record for a given graph member. This may be different than the principal name. + */ + mailAddress?: string; + /** + * This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS. + */ + principalName?: string; +} +/** + * Relationship between a container and a member + */ +export interface GraphMembership { + /** + * This field contains zero or more interesting links about the graph membership. These links may be invoked to obtain additional relationships or more detailed information about this graph membership. + */ + _links?: any; + containerDescriptor?: string; + memberDescriptor?: string; +} +/** + * Status of a Graph membership (active/inactive) + */ +export interface GraphMembershipState { + /** + * This field contains zero or more interesting links about the graph membership state. These links may be invoked to obtain additional relationships or more detailed information about this graph membership state. + */ + _links?: any; + /** + * When true, the membership is active + */ + active?: boolean; +} +export interface GraphMembershipTraversal { + /** + * Reason why the subject could not be traversed completely + */ + incompletenessReason?: string; + /** + * When true, the subject is traversed completely + */ + isComplete?: boolean; + /** + * The traversed subject descriptor + */ + subjectDescriptor?: string; + /** + * Subject descriptor ids of the traversed members + */ + traversedSubjectIds?: string[]; + /** + * Subject descriptors of the traversed members + */ + traversedSubjects?: string[]; +} +/** + * Who is the provider for this user and what is the identifier and domain that is used to uniquely identify the user. + */ +export interface GraphProviderInfo { + /** + * The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + */ + descriptor?: string; + /** + * This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AAD the tenantID of the directory.) + */ + domain?: string; + /** + * The type of source provider for the origin identifier (ex: "aad", "msa") + */ + origin?: string; + /** + * The unique identifier from the system of origin. (For MSA this is the PUID in hex notation, for AAD this is the object id.) + */ + originId?: string; +} +/** + * Container where a graph entity is defined (organization, project, team) + */ +export interface GraphScope extends GraphSubject { + /** + * The subject descriptor that references the administrators group for this scope. Only members of this group can change the contents of this scope or assign other users permissions to access this scope. + */ + administratorDescriptor?: string; + /** + * When true, this scope is also a securing host for one or more scopes. + */ + isGlobal?: boolean; + /** + * The subject descriptor for the closest account or organization in the ancestor tree of this scope. + */ + parentDescriptor?: string; + /** + * The type of this scope. Typically ServiceHost or TeamProject. + */ + scopeType?: IdentitiesInterfaces.GroupScopeType; + /** + * The subject descriptor for the containing organization in the ancestor tree of this scope. + */ + securingHostDescriptor?: string; +} +/** + * This type is the subset of fields that can be provided by the user to create a Vsts scope. Scope creation is currently limited to internal back-compat scenarios. End users that attempt to create a scope with this API will fail. + */ +export interface GraphScopeCreationContext { + /** + * Set this field to override the default description of this scope's admin group. + */ + adminGroupDescription?: string; + /** + * All scopes have an Administrator Group that controls access to the contents of the scope. Set this field to use a non-default group name for that administrators group. + */ + adminGroupName?: string; + /** + * Set this optional field if this scope is created on behalf of a user other than the user making the request. This should be the Id of the user that is not the requester. + */ + creatorId?: string; + /** + * The scope must be provided with a unique name within the parent scope. This means the created scope can have a parent or child with the same name, but no siblings with the same name. + */ + name?: string; + /** + * The type of scope being created. + */ + scopeType?: IdentitiesInterfaces.GroupScopeType; + /** + * An optional ID that uniquely represents the scope within it's parent scope. If this parameter is not provided, Vsts will generate on automatically. + */ + storageKey?: string; +} +/** + * Storage key of a Graph entity + */ +export interface GraphStorageKeyResult { + /** + * This field contains zero or more interesting links about the graph storage key. These links may be invoked to obtain additional relationships or more detailed information about this graph storage key. + */ + _links?: any; + value?: string; +} +/** + * Top-level graph entity + */ +export interface GraphSubject extends GraphSubjectBase { + /** + * [Internal Use Only] The legacy descriptor is here in case you need to access old version IMS using identity descriptor. + */ + legacyDescriptor?: string; + /** + * The type of source provider for the origin identifier (ex:AD, AAD, MSA) + */ + origin?: string; + /** + * The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider. + */ + originId?: string; + /** + * This field identifies the type of the graph subject (ex: Group, Scope, User). + */ + subjectKind?: string; +} +export interface GraphSubjectBase { + /** + * This field contains zero or more interesting links about the graph subject. These links may be invoked to obtain additional relationships or more detailed information about this graph subject. + */ + _links?: any; + /** + * The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations. + */ + descriptor?: string; + /** + * This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider. + */ + displayName?: string; + /** + * This url is the full route to the source resource of this graph subject. + */ + url?: string; +} +/** + * Batching of subjects to lookup using the Graph API + */ +export interface GraphSubjectLookup { + lookupKeys?: GraphSubjectLookupKey[]; +} +export interface GraphSubjectLookupKey { + descriptor?: string; +} +/** + * Subject to search using the Graph API + */ +export interface GraphSubjectQuery { + /** + * Search term to search for Azure Devops users or/and groups + */ + query?: string; + /** + * Optional parameter. Specify a non-default scope (collection, project) to search for users or groups within the scope. + */ + scopeDescriptor?: string; + /** + * "User" or "Group" can be specified, both or either + */ + subjectKind?: string[]; +} +export interface GraphSystemSubject extends GraphSubject { +} +export declare enum GraphTraversalDirection { + Unknown = 0, + Down = 1, + Up = 2 +} +/** + * Graph user entity + */ +export interface GraphUser extends GraphMember { + /** + * The short, generally unique name for the user in the backing directory. For AAD users, this corresponds to the mail nickname, which is often but not necessarily similar to the part of the user's mail address before the @ sign. For GitHub users, this corresponds to the GitHub user handle. + */ + directoryAlias?: string; + /** + * When true, the group has been deleted in the identity provider + */ + isDeletedInOrigin?: boolean; + metadataUpdateDate?: Date; + /** + * The meta type of the user in the origin, such as "member", "guest", etc. See UserMetaType for the set of possible values. + */ + metaType?: string; +} +/** + * Do not attempt to use this type to create a new user. Use one of the subclasses instead. This type does not contain sufficient fields to create a new user. + */ +export interface GraphUserCreationContext { + /** + * Optional: If provided, we will use this identifier for the storage key of the created user + */ + storageKey?: string; +} +/** + * Use this type to create a new user using the mail address as a reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its mail address in the backing provider. + */ +export interface GraphUserMailAddressCreationContext extends GraphUserCreationContext { + mailAddress: string; +} +/** + * Use this type to create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its unique ID in the backing provider. + */ +export interface GraphUserOriginIdCreationContext extends GraphUserCreationContext { + /** + * This should be the name of the origin provider. Example: github.com + */ + origin?: string; + /** + * This should be the object id or sid of the user from the source AD or AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Team Services will communicate with the source provider to fill all other fields on creation. + */ + originId: string; +} +/** + * Use this type to update an existing user using the OriginID as a reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its unique ID in the backing provider. + */ +export interface GraphUserOriginIdUpdateContext extends GraphUserUpdateContext { + /** + * This should be the object id or sid of the user from the source AD or AAD provider. Example: d47d025a-ce2f-4a79-8618-e8862ade30dd Azure Devops will communicate with the source provider to fill all other fields on creation. + */ + originId: string; +} +/** + * Use this type to create a new user using the principal name as a reference to an existing user from an external AD or AAD backed provider. This is the subset of GraphUser fields required for creation of a GraphUser for the AD and AAD use case when looking up the user by its principal name in the backing provider. + */ +export interface GraphUserPrincipalNameCreationContext extends GraphUserCreationContext { + /** + * This should be the principal name or upn of the user in the source AD or AAD provider. Example: jamal@contoso.com Team Services will communicate with the source provider to fill all other fields on creation. + */ + principalName: string; +} +/** + * Do not attempt to use this type to update user. Use one of the subclasses instead. This type does not contain sufficient fields to create a new user. + */ +export interface GraphUserUpdateContext { + /** + * Storage key should not be specified in case of updating user + */ + storageKey?: string; +} +export interface PagedGraphGroups { + /** + * This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. + */ + continuationToken?: string[]; + /** + * The enumerable list of groups found within a page. + */ + graphGroups?: GraphGroup[]; +} +export interface PagedGraphUsers { + /** + * This will be non-null if there is another page of data. There will never be more than one continuation token returned by a request. + */ + continuationToken?: string[]; + /** + * The enumerable set of users found within a page. + */ + graphUsers?: GraphUser[]; +} +export interface RequestAccessPayLoad { + message?: string; + projectUri?: string; + urlRequested?: string; +} +export declare var TypeInfo: { + GraphScope: any; + GraphScopeCreationContext: any; + GraphTraversalDirection: { + enumValues: { + "unknown": number; + "down": number; + "up": number; + }; + }; + GraphUser: any; + PagedGraphUsers: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/GraphInterfaces.js b/node_modules/azure-devops-node-api/interfaces/GraphInterfaces.js new file mode 100644 index 0000000..7ba3b12 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/GraphInterfaces.js @@ -0,0 +1,52 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces"); +var GraphTraversalDirection; +(function (GraphTraversalDirection) { + GraphTraversalDirection[GraphTraversalDirection["Unknown"] = 0] = "Unknown"; + GraphTraversalDirection[GraphTraversalDirection["Down"] = 1] = "Down"; + GraphTraversalDirection[GraphTraversalDirection["Up"] = 2] = "Up"; +})(GraphTraversalDirection = exports.GraphTraversalDirection || (exports.GraphTraversalDirection = {})); +exports.TypeInfo = { + GraphScope: {}, + GraphScopeCreationContext: {}, + GraphTraversalDirection: { + enumValues: { + "unknown": 0, + "down": 1, + "up": 2 + } + }, + GraphUser: {}, + PagedGraphUsers: {}, +}; +exports.TypeInfo.GraphScope.fields = { + scopeType: { + enumType: IdentitiesInterfaces.TypeInfo.GroupScopeType + } +}; +exports.TypeInfo.GraphScopeCreationContext.fields = { + scopeType: { + enumType: IdentitiesInterfaces.TypeInfo.GroupScopeType + } +}; +exports.TypeInfo.GraphUser.fields = { + metadataUpdateDate: { + isDate: true, + } +}; +exports.TypeInfo.PagedGraphUsers.fields = { + graphUsers: { + isArray: true, + typeInfo: exports.TypeInfo.GraphUser + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.d.ts new file mode 100644 index 0000000..8292a89 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.d.ts @@ -0,0 +1,274 @@ +/** + * Container class for changed identities + */ +export interface ChangedIdentities { + /** + * Changed Identities + */ + identities?: Identity[]; + /** + * More data available, set to true if pagesize is specified. + */ + moreData?: boolean; + /** + * Last Identity SequenceId + */ + sequenceContext?: ChangedIdentitiesContext; +} +/** + * Context class for changed identities + */ +export interface ChangedIdentitiesContext { + /** + * Last Group SequenceId + */ + groupSequenceId?: number; + /** + * Last Identity SequenceId + */ + identitySequenceId?: number; + /** + * Last Group OrganizationIdentitySequenceId + */ + organizationIdentitySequenceId?: number; + /** + * Page size + */ + pageSize?: number; +} +export interface CreateScopeInfo { + adminGroupDescription?: string; + adminGroupName?: string; + creatorId?: string; + parentScopeId?: string; + scopeName?: string; + scopeType?: GroupScopeType; +} +export interface FrameworkIdentityInfo { + displayName?: string; + identifier?: string; + identityType?: FrameworkIdentityType; + role?: string; +} +export declare enum FrameworkIdentityType { + None = 0, + ServiceIdentity = 1, + AggregateIdentity = 2, + ImportedIdentity = 3 +} +export interface GroupMembership { + active?: boolean; + descriptor?: IdentityDescriptor; + id?: string; + queriedId?: string; +} +export declare enum GroupScopeType { + Generic = 0, + ServiceHost = 1, + TeamProject = 2 +} +export interface Identity extends IdentityBase { +} +/** + * Base Identity class to allow "trimmed" identity class in the GetConnectionData API Makes sure that on-the-wire representations of the derived classes are compatible with each other (e.g. Server responds with PublicIdentity object while client deserializes it as Identity object) Derived classes should not have additional [DataMember] properties + */ +export interface IdentityBase { + /** + * The custom display name for the identity (if any). Setting this property to an empty string will clear the existing custom display name. Setting this property to null will not affect the existing persisted value (since null values do not get sent over the wire or to the database) + */ + customDisplayName?: string; + descriptor?: IdentityDescriptor; + /** + * Identity Identifier. Also called Storage Key, or VSID + */ + id?: string; + /** + * True if the identity has a membership in any Azure Devops group in the organization. + */ + isActive?: boolean; + /** + * True if the identity is a group. + */ + isContainer?: boolean; + masterId?: string; + /** + * Id of the members of the identity (groups only). + */ + memberIds?: string[]; + memberOf?: IdentityDescriptor[]; + members?: IdentityDescriptor[]; + metaTypeId?: number; + properties?: any; + /** + * The display name for the identity as specified by the source identity provider. + */ + providerDisplayName?: string; + resourceVersion?: number; + socialDescriptor?: string; + /** + * Subject descriptor of a Graph entity. + */ + subjectDescriptor?: string; + uniqueUserId?: number; +} +export interface IdentityBatchInfo { + descriptors?: IdentityDescriptor[]; + identityIds?: string[]; + includeRestrictedVisibility?: boolean; + propertyNames?: string[]; + queryMembership?: QueryMembership; + socialDescriptors?: string[]; + subjectDescriptors?: string[]; +} +/** + * An Identity descriptor is a wrapper for the identity type (Windows SID, Passport) along with a unique identifier such as the SID or PUID. + */ +export interface IdentityDescriptor { + /** + * The unique identifier for this identity, not exceeding 256 chars, which will be persisted. + */ + identifier?: string; + /** + * Type of descriptor (for example, Windows, Passport, etc.). + */ + identityType?: string; +} +export interface IdentityRightsTransferData { + userPrincipalNameMappings?: { + [key: string]: string; + }; +} +export interface IdentityScope { + administrators?: IdentityDescriptor; + id: string; + isActive?: boolean; + isGlobal?: boolean; + localScopeId?: string; + name?: string; + parentId?: string; + scopeType?: GroupScopeType; + securingHostId?: string; + subjectDescriptor?: string; +} +/** + * Identity information. + */ +export interface IdentitySelf { + /** + * The UserPrincipalName (UPN) of the account. This value comes from the source provider. + */ + accountName?: string; + /** + * The display name. For AAD accounts with multiple tenants this is the display name of the profile in the home tenant. + */ + displayName?: string; + /** + * This represents the name of the container of origin. For AAD accounts this is the tenantID of the home tenant. For MSA accounts this is the string "Windows Live ID". + */ + domain?: string; + /** + * This is the VSID of the home tenant profile. If the profile is signed into the home tenant or if the profile has no tenants then this Id is the same as the Id returned by the profile/profiles/me endpoint. Going forward it is recommended that you use the combined values of Origin, OriginId and Domain to uniquely identify a user rather than this Id. + */ + id?: string; + /** + * The type of source provider for the origin identifier. For MSA accounts this is "msa". For AAD accounts this is "aad". + */ + origin?: string; + /** + * The unique identifier from the system of origin. If there are multiple tenants this is the unique identifier of the account in the home tenant. (For MSA this is the PUID in hex notation, for AAD this is the object id.) + */ + originId?: string; + /** + * For AAD accounts this is all of the tenants that this account is a member of. + */ + tenants?: TenantInfo[]; +} +export interface IdentitySnapshot { + groups?: Identity[]; + identityIds?: string[]; + memberships?: GroupMembership[]; + scopeId?: string; + scopes?: IdentityScope[]; +} +export interface IdentityUpdateData { + id?: string; + index?: number; + updated?: boolean; +} +export interface PagedIdentities { + continuationToken?: string[]; + identities?: Identity[]; +} +export declare enum QueryMembership { + /** + * Query will not return any membership data + */ + None = 0, + /** + * Query will return only direct membership data + */ + Direct = 1, + /** + * Query will return expanded membership data + */ + Expanded = 2, + /** + * Query will return expanded up membership data (parents only) + */ + ExpandedUp = 3, + /** + * Query will return expanded down membership data (children only) + */ + ExpandedDown = 4 +} +export declare enum ReadIdentitiesOptions { + None = 0, + FilterIllegalMemberships = 1 +} +export interface SwapIdentityInfo { + id1?: string; + id2?: string; +} +export interface TenantInfo { + homeTenant?: boolean; + tenantId?: string; + tenantName?: string; + verifiedDomains?: string[]; +} +export declare var TypeInfo: { + CreateScopeInfo: any; + FrameworkIdentityInfo: any; + FrameworkIdentityType: { + enumValues: { + "none": number; + "serviceIdentity": number; + "aggregateIdentity": number; + "importedIdentity": number; + }; + }; + GroupScopeType: { + enumValues: { + "generic": number; + "serviceHost": number; + "teamProject": number; + }; + }; + IdentityBatchInfo: any; + IdentityScope: any; + IdentitySnapshot: any; + QueryMembership: { + enumValues: { + "none": number; + "direct": number; + "expanded": number; + "expandedUp": number; + "expandedDown": number; + }; + }; + ReadIdentitiesOptions: { + enumValues: { + "none": number; + "filterIllegalMemberships": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.js b/node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.js new file mode 100644 index 0000000..24df9eb --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/IdentitiesInterfaces.js @@ -0,0 +1,115 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var FrameworkIdentityType; +(function (FrameworkIdentityType) { + FrameworkIdentityType[FrameworkIdentityType["None"] = 0] = "None"; + FrameworkIdentityType[FrameworkIdentityType["ServiceIdentity"] = 1] = "ServiceIdentity"; + FrameworkIdentityType[FrameworkIdentityType["AggregateIdentity"] = 2] = "AggregateIdentity"; + FrameworkIdentityType[FrameworkIdentityType["ImportedIdentity"] = 3] = "ImportedIdentity"; +})(FrameworkIdentityType = exports.FrameworkIdentityType || (exports.FrameworkIdentityType = {})); +var GroupScopeType; +(function (GroupScopeType) { + GroupScopeType[GroupScopeType["Generic"] = 0] = "Generic"; + GroupScopeType[GroupScopeType["ServiceHost"] = 1] = "ServiceHost"; + GroupScopeType[GroupScopeType["TeamProject"] = 2] = "TeamProject"; +})(GroupScopeType = exports.GroupScopeType || (exports.GroupScopeType = {})); +var QueryMembership; +(function (QueryMembership) { + /** + * Query will not return any membership data + */ + QueryMembership[QueryMembership["None"] = 0] = "None"; + /** + * Query will return only direct membership data + */ + QueryMembership[QueryMembership["Direct"] = 1] = "Direct"; + /** + * Query will return expanded membership data + */ + QueryMembership[QueryMembership["Expanded"] = 2] = "Expanded"; + /** + * Query will return expanded up membership data (parents only) + */ + QueryMembership[QueryMembership["ExpandedUp"] = 3] = "ExpandedUp"; + /** + * Query will return expanded down membership data (children only) + */ + QueryMembership[QueryMembership["ExpandedDown"] = 4] = "ExpandedDown"; +})(QueryMembership = exports.QueryMembership || (exports.QueryMembership = {})); +var ReadIdentitiesOptions; +(function (ReadIdentitiesOptions) { + ReadIdentitiesOptions[ReadIdentitiesOptions["None"] = 0] = "None"; + ReadIdentitiesOptions[ReadIdentitiesOptions["FilterIllegalMemberships"] = 1] = "FilterIllegalMemberships"; +})(ReadIdentitiesOptions = exports.ReadIdentitiesOptions || (exports.ReadIdentitiesOptions = {})); +exports.TypeInfo = { + CreateScopeInfo: {}, + FrameworkIdentityInfo: {}, + FrameworkIdentityType: { + enumValues: { + "none": 0, + "serviceIdentity": 1, + "aggregateIdentity": 2, + "importedIdentity": 3 + } + }, + GroupScopeType: { + enumValues: { + "generic": 0, + "serviceHost": 1, + "teamProject": 2 + } + }, + IdentityBatchInfo: {}, + IdentityScope: {}, + IdentitySnapshot: {}, + QueryMembership: { + enumValues: { + "none": 0, + "direct": 1, + "expanded": 2, + "expandedUp": 3, + "expandedDown": 4 + } + }, + ReadIdentitiesOptions: { + enumValues: { + "none": 0, + "filterIllegalMemberships": 1 + } + }, +}; +exports.TypeInfo.CreateScopeInfo.fields = { + scopeType: { + enumType: exports.TypeInfo.GroupScopeType + } +}; +exports.TypeInfo.FrameworkIdentityInfo.fields = { + identityType: { + enumType: exports.TypeInfo.FrameworkIdentityType + } +}; +exports.TypeInfo.IdentityBatchInfo.fields = { + queryMembership: { + enumType: exports.TypeInfo.QueryMembership + } +}; +exports.TypeInfo.IdentityScope.fields = { + scopeType: { + enumType: exports.TypeInfo.GroupScopeType + } +}; +exports.TypeInfo.IdentitySnapshot.fields = { + scopes: { + isArray: true, + typeInfo: exports.TypeInfo.IdentityScope + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.d.ts new file mode 100644 index 0000000..8bc339d --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.d.ts @@ -0,0 +1,178 @@ +import IdentitiesInterfaces = require("../interfaces/IdentitiesInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface AccessMapping { + accessPoint?: string; + displayName?: string; + moniker?: string; + /** + * The service which owns this access mapping e.g. TFS, ELS, etc. + */ + serviceOwner?: string; + /** + * Part of the access mapping which applies context after the access point of the server. + */ + virtualDirectory?: string; +} +/** + * Data transfer class that holds information needed to set up a connection with a VSS server. + */ +export interface ConnectionData { + /** + * The Id of the authenticated user who made this request. More information about the user can be obtained by passing this Id to the Identity service + */ + authenticatedUser?: IdentitiesInterfaces.Identity; + /** + * The Id of the authorized user who made this request. More information about the user can be obtained by passing this Id to the Identity service + */ + authorizedUser?: IdentitiesInterfaces.Identity; + /** + * The id for the server. + */ + deploymentId?: string; + /** + * The type for the server Hosted/OnPremises. + */ + deploymentType?: VSSInterfaces.DeploymentFlags; + /** + * The instance id for this host. + */ + instanceId?: string; + /** + * The last user access for this instance. Null if not requested specifically. + */ + lastUserAccess?: Date; + /** + * Data that the location service holds. + */ + locationServiceData?: LocationServiceData; + /** + * The virtual directory of the host we are talking to. + */ + webApplicationRelativeDirectory?: string; +} +export declare enum InheritLevel { + None = 0, + Deployment = 1, + Account = 2, + Collection = 4, + All = 7 +} +export interface LocationMapping { + accessMappingMoniker?: string; + location?: string; +} +/** + * Data transfer class used to transfer data about the location service data over the web service. + */ +export interface LocationServiceData { + /** + * Data about the access mappings contained by this location service. + */ + accessMappings?: AccessMapping[]; + /** + * Data that the location service holds. + */ + clientCacheFresh?: boolean; + /** + * The time to live on the location service cache. + */ + clientCacheTimeToLive?: number; + /** + * The default access mapping moniker for the server. + */ + defaultAccessMappingMoniker?: string; + /** + * The obsolete id for the last change that took place on the server (use LastChangeId64). + */ + lastChangeId?: number; + /** + * The non-truncated 64-bit id for the last change that took place on the server. + */ + lastChangeId64?: number; + /** + * Data about the service definitions contained by this location service. + */ + serviceDefinitions?: ServiceDefinition[]; + /** + * The identifier of the deployment which is hosting this location data (e.g. SPS, TFS, ELS, Napa, etc.) + */ + serviceOwner?: string; +} +export declare enum RelativeToSetting { + Context = 0, + WebApplication = 2, + FullyQualified = 3 +} +export interface ResourceAreaInfo { + id?: string; + locationUrl?: string; + name?: string; +} +export interface ServiceDefinition { + description?: string; + displayName?: string; + identifier?: string; + inheritLevel?: InheritLevel; + locationMappings?: LocationMapping[]; + /** + * Maximum api version that this resource supports (current server version for this resource). Copied from ApiResourceLocation. + */ + maxVersion?: string; + /** + * Minimum api version that this resource supports. Copied from ApiResourceLocation. + */ + minVersion?: string; + parentIdentifier?: string; + parentServiceType?: string; + properties?: any; + relativePath?: string; + relativeToSetting?: RelativeToSetting; + /** + * The latest version of this resource location that is in "Release" (non-preview) mode. Copied from ApiResourceLocation. + */ + releasedVersion?: string; + /** + * The current resource version supported by this resource location. Copied from ApiResourceLocation. + */ + resourceVersion?: number; + /** + * The service which owns this definition e.g. TFS, ELS, etc. + */ + serviceOwner?: string; + serviceType?: string; + status?: ServiceStatus; + toolId?: string; +} +export declare enum ServiceStatus { + Assigned = 0, + Active = 1, + Moving = 2 +} +export declare var TypeInfo: { + ConnectionData: any; + InheritLevel: { + enumValues: { + "none": number; + "deployment": number; + "account": number; + "collection": number; + "all": number; + }; + }; + LocationServiceData: any; + RelativeToSetting: { + enumValues: { + "context": number; + "webApplication": number; + "fullyQualified": number; + }; + }; + ServiceDefinition: any; + ServiceStatus: { + enumValues: { + "assigned": number; + "active": number; + "moving": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.js b/node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.js new file mode 100644 index 0000000..8a10491 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/LocationsInterfaces.js @@ -0,0 +1,88 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +var InheritLevel; +(function (InheritLevel) { + InheritLevel[InheritLevel["None"] = 0] = "None"; + InheritLevel[InheritLevel["Deployment"] = 1] = "Deployment"; + InheritLevel[InheritLevel["Account"] = 2] = "Account"; + InheritLevel[InheritLevel["Collection"] = 4] = "Collection"; + InheritLevel[InheritLevel["All"] = 7] = "All"; +})(InheritLevel = exports.InheritLevel || (exports.InheritLevel = {})); +var RelativeToSetting; +(function (RelativeToSetting) { + RelativeToSetting[RelativeToSetting["Context"] = 0] = "Context"; + RelativeToSetting[RelativeToSetting["WebApplication"] = 2] = "WebApplication"; + RelativeToSetting[RelativeToSetting["FullyQualified"] = 3] = "FullyQualified"; +})(RelativeToSetting = exports.RelativeToSetting || (exports.RelativeToSetting = {})); +var ServiceStatus; +(function (ServiceStatus) { + ServiceStatus[ServiceStatus["Assigned"] = 0] = "Assigned"; + ServiceStatus[ServiceStatus["Active"] = 1] = "Active"; + ServiceStatus[ServiceStatus["Moving"] = 2] = "Moving"; +})(ServiceStatus = exports.ServiceStatus || (exports.ServiceStatus = {})); +exports.TypeInfo = { + ConnectionData: {}, + InheritLevel: { + enumValues: { + "none": 0, + "deployment": 1, + "account": 2, + "collection": 4, + "all": 7 + } + }, + LocationServiceData: {}, + RelativeToSetting: { + enumValues: { + "context": 0, + "webApplication": 2, + "fullyQualified": 3 + } + }, + ServiceDefinition: {}, + ServiceStatus: { + enumValues: { + "assigned": 0, + "active": 1, + "moving": 2 + } + }, +}; +exports.TypeInfo.ConnectionData.fields = { + deploymentType: { + enumType: VSSInterfaces.TypeInfo.DeploymentFlags + }, + lastUserAccess: { + isDate: true, + }, + locationServiceData: { + typeInfo: exports.TypeInfo.LocationServiceData + } +}; +exports.TypeInfo.LocationServiceData.fields = { + serviceDefinitions: { + isArray: true, + typeInfo: exports.TypeInfo.ServiceDefinition + } +}; +exports.TypeInfo.ServiceDefinition.fields = { + inheritLevel: { + enumType: exports.TypeInfo.InheritLevel + }, + relativeToSetting: { + enumType: exports.TypeInfo.RelativeToSetting + }, + status: { + enumType: exports.TypeInfo.ServiceStatus + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.d.ts new file mode 100644 index 0000000..198d38d --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.d.ts @@ -0,0 +1,1602 @@ +import FormInputInterfaces = require("../interfaces/common/FormInputInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface ActorFilter extends RoleBasedFilter { +} +export interface ActorNotificationReason extends NotificationReason { + matchedRoles?: string[]; +} +/** + * Artifact filter options. Used in "follow" subscriptions. + */ +export interface ArtifactFilter extends BaseSubscriptionFilter { + artifactId?: string; + artifactType?: string; + artifactUri?: string; + type?: string; +} +export interface BaseSubscriptionFilter { + eventType?: string; + type?: string; +} +export interface BatchNotificationOperation { + notificationOperation?: NotificationOperation; + notificationQueryConditions?: NotificationQueryCondition[]; +} +export interface BlockFilter extends RoleBasedFilter { +} +export interface BlockSubscriptionChannel { + type?: string; +} +/** + * Default delivery preference for group subscribers. Indicates how the subscriber should be notified. + */ +export declare enum DefaultGroupDeliveryPreference { + NoDelivery = -1, + EachMember = 2 +} +export interface DiagnosticIdentity { + displayName?: string; + emailAddress?: string; + id?: string; +} +export interface DiagnosticNotification { + eventId?: number; + eventType?: string; + id?: number; + messages?: NotificationDiagnosticLogMessage[]; + recipients?: { + [key: string]: DiagnosticRecipient; + }; + result?: string; + stats?: { + [key: string]: number; + }; + subscriptionId?: string; +} +export interface DiagnosticRecipient { + recipient?: DiagnosticIdentity; + status?: string; +} +export interface EmailHtmlSubscriptionChannel extends SubscriptionChannelWithAddress { + type?: string; +} +export interface EmailPlaintextSubscriptionChannel extends SubscriptionChannelWithAddress { + type?: string; +} +/** + * Describes the subscription evaluation operation status. + */ +export declare enum EvaluationOperationStatus { + /** + * The operation object does not have the status set. + */ + NotSet = 0, + /** + * The operation has been queued. + */ + Queued = 1, + /** + * The operation is in progress. + */ + InProgress = 2, + /** + * The operation was cancelled by the user. + */ + Cancelled = 3, + /** + * The operation completed successfully. + */ + Succeeded = 4, + /** + * The operation completed with a failure. + */ + Failed = 5, + /** + * The operation timed out. + */ + TimedOut = 6, + /** + * The operation could not be found. + */ + NotFound = 7 +} +export interface EventBacklogStatus { + captureTime?: Date; + jobId?: string; + lastEventBatchStartTime?: Date; + lastEventProcessedTime?: Date; + lastJobBatchStartTime?: Date; + lastJobProcessedTime?: Date; + oldestPendingEventTime?: Date; + publisher?: string; + unprocessedEvents?: number; +} +export interface EventBatch { + endTime?: any; + eventCounts?: { + [key: string]: number; + }; + eventIds?: string; + notificationCounts?: { + [key: string]: number; + }; + preProcessEndTime?: any; + preProcessStartTime?: any; + processEndTime?: any; + processStartTime?: any; + startTime?: any; + subscriptionCounts?: { + [key: string]: number; + }; +} +export interface EventProcessingLog extends NotificationJobDiagnosticLog { + batches?: EventBatch[]; + matcherResults?: MatcherResult[]; +} +/** + * Set of flags used to determine which set of information is retrieved when querying for event publishers + */ +export declare enum EventPublisherQueryFlags { + None = 0, + /** + * Include event types from the remote services too + */ + IncludeRemoteServices = 2 +} +/** + * Encapsulates events result properties. It defines the total number of events used and the number of matched events. + */ +export interface EventsEvaluationResult { + /** + * Count of events evaluated. + */ + count?: number; + /** + * Count of matched events. + */ + matchedCount?: number; +} +/** + * A transform request specify the properties of a notification event to be transformed. + */ +export interface EventTransformRequest { + /** + * Event payload. + */ + eventPayload: string; + /** + * Event type. + */ + eventType: string; + /** + * System inputs. + */ + systemInputs: { + [key: string]: string; + }; +} +/** + * Result of transforming a notification event. + */ +export interface EventTransformResult { + /** + * Transformed html content. + */ + content: string; + /** + * Calculated data. + */ + data?: any; + /** + * Calculated system inputs. + */ + systemInputs?: { + [key: string]: string; + }; +} +/** + * Set of flags used to determine which set of information is retrieved when querying for eventtypes + */ +export declare enum EventTypeQueryFlags { + None = 0, + /** + * IncludeFields will include all fields and their types + */ + IncludeFields = 1 +} +export interface ExpressionFilter extends BaseSubscriptionFilter { + criteria?: ExpressionFilterModel; + type?: string; +} +/** + * Subscription Filter Clause represents a single clause in a subscription filter e.g. If the subscription has the following criteria "Project Name = [Current Project] AND Assigned To = [Me] it will be represented as two Filter Clauses Clause 1: Index = 1, Logical Operator: NULL , FieldName = 'Project Name', Operator = '=', Value = '[Current Project]' Clause 2: Index = 2, Logical Operator: 'AND' , FieldName = 'Assigned To' , Operator = '=', Value = '[Me]' + */ +export interface ExpressionFilterClause { + fieldName?: string; + /** + * The order in which this clause appeared in the filter query + */ + index?: number; + /** + * Logical Operator 'AND', 'OR' or NULL (only for the first clause in the filter) + */ + logicalOperator?: string; + operator?: string; + value?: string; +} +/** + * Represents a hierarchy of SubscritionFilterClauses that have been grouped together through either adding a group in the WebUI or using parethesis in the Subscription condition string + */ +export interface ExpressionFilterGroup { + /** + * The index of the last FilterClause in this group + */ + end?: number; + /** + * Level of the group, since groups can be nested for each nested group the level will increase by 1 + */ + level?: number; + /** + * The index of the first FilterClause in this group + */ + start?: number; +} +export interface ExpressionFilterModel { + /** + * Flat list of clauses in this subscription + */ + clauses?: ExpressionFilterClause[]; + /** + * Grouping of clauses in the subscription + */ + groups?: ExpressionFilterGroup[]; + /** + * Max depth of the Subscription tree + */ + maxGroupLevel?: number; +} +export interface FieldInputValues extends FormInputInterfaces.InputValues { + operators?: number[]; +} +export interface FieldValuesQuery extends FormInputInterfaces.InputValuesQuery { + inputValues?: FieldInputValues[]; + scope?: string; +} +export interface GeneratedNotification { + recipients?: DiagnosticIdentity[]; +} +export interface GroupSubscriptionChannel extends SubscriptionChannelWithAddress { + type?: string; +} +/** + * Abstraction interface for the diagnostic log. Primarily for deserialization. + */ +export interface INotificationDiagnosticLog { + /** + * Identifier used for correlating to other diagnostics that may have been recorded elsewhere. + */ + activityId?: string; + /** + * Description of what subscription or notification job is being logged. + */ + description?: string; + /** + * Time the log ended. + */ + endTime?: Date; + /** + * Unique instance identifier. + */ + id?: string; + /** + * Type of information being logged. + */ + logType?: string; + /** + * List of log messages. + */ + messages?: NotificationDiagnosticLogMessage[]; + /** + * Dictionary of log properties and settings for the job. + */ + properties?: { + [key: string]: string; + }; + /** + * This identifier depends on the logType. For notification jobs, this will be the job Id. For subscription tracing, this will be a special root Guid with the subscription Id encoded. + */ + source?: string; + /** + * Time the log started. + */ + startTime?: Date; +} +export interface ISubscriptionChannel { + type?: string; +} +export interface ISubscriptionFilter { + eventType?: string; + type?: string; +} +export interface MatcherResult { + matcher?: string; + stats?: { + [key: string]: { + [key: string]: number; + }; + }; +} +export interface MessageQueueSubscriptionChannel { + type?: string; +} +export interface NotificationAdminSettings { + /** + * The default group delivery preference for groups in this collection + */ + defaultGroupDeliveryPreference?: DefaultGroupDeliveryPreference; +} +export interface NotificationAdminSettingsUpdateParameters { + defaultGroupDeliveryPreference?: DefaultGroupDeliveryPreference; +} +export interface NotificationBacklogStatus { + captureTime?: Date; + channel?: string; + jobId?: string; + lastJobBatchStartTime?: Date; + lastJobProcessedTime?: Date; + lastNotificationBatchStartTime?: Date; + lastNotificationProcessedTime?: Date; + oldestPendingNotificationTime?: Date; + publisher?: string; + /** + * Null status is unprocessed + */ + status?: string; + unprocessedNotifications?: number; +} +export interface NotificationBatch { + endTime?: any; + notificationCount?: number; + notificationIds?: string; + problematicNotifications?: DiagnosticNotification[]; + startTime?: any; +} +export interface NotificationDeliveryLog extends NotificationJobDiagnosticLog { + batches?: NotificationBatch[]; +} +/** + * Abstract base class for all of the diagnostic logs. + */ +export interface NotificationDiagnosticLog { + /** + * Identifier used for correlating to other diagnostics that may have been recorded elsewhere. + */ + activityId?: string; + description?: string; + endTime?: Date; + errors?: number; + /** + * Unique instance identifier. + */ + id?: string; + logType?: string; + messages?: NotificationDiagnosticLogMessage[]; + properties?: { + [key: string]: string; + }; + /** + * This identifier depends on the logType. For notification jobs, this will be the job Id. For subscription tracing, this will be a special root Guid with the subscription Id encoded. + */ + source?: string; + startTime?: Date; + warnings?: number; +} +export interface NotificationDiagnosticLogMessage { + /** + * Corresponds to .Net TraceLevel enumeration + */ + level?: number; + message?: string; + time?: any; +} +export interface NotificationEventBacklogStatus { + eventBacklogStatus?: EventBacklogStatus[]; + notificationBacklogStatus?: NotificationBacklogStatus[]; +} +/** + * Encapsulates the properties of a filterable field. A filterable field is a field in an event that can used to filter notifications for a certain event type. + */ +export interface NotificationEventField { + /** + * Gets or sets the type of this field. + */ + fieldType?: NotificationEventFieldType; + /** + * Gets or sets the unique identifier of this field. + */ + id?: string; + /** + * Gets or sets the name of this field. + */ + name?: string; + /** + * Gets or sets the path to the field in the event object. This path can be either Json Path or XPath, depending on if the event will be serialized into Json or XML + */ + path?: string; + /** + * Gets or sets the scopes that this field supports. If not specified then the event type scopes apply. + */ + supportedScopes?: string[]; +} +/** + * Encapsulates the properties of a field type. It includes a unique id for the operator and a localized string for display name + */ +export interface NotificationEventFieldOperator { + /** + * Gets or sets the display name of an operator + */ + displayName?: string; + /** + * Gets or sets the id of an operator + */ + id?: string; +} +/** + * Encapsulates the properties of a field type. It describes the data type of a field, the operators it support and how to populate it in the UI + */ +export interface NotificationEventFieldType { + /** + * Gets or sets the unique identifier of this field type. + */ + id?: string; + operatorConstraints?: OperatorConstraint[]; + /** + * Gets or sets the list of operators that this type supports. + */ + operators?: NotificationEventFieldOperator[]; + subscriptionFieldType?: SubscriptionFieldType; + /** + * Gets or sets the value definition of this field like the getValuesMethod and template to display in the UI + */ + value?: ValueDefinition; +} +/** + * Encapsulates the properties of a notification event publisher. + */ +export interface NotificationEventPublisher { + id?: string; + subscriptionManagementInfo?: SubscriptionManagement; + url?: string; +} +/** + * Encapsulates the properties of an event role. An event Role is used for role based subscription for example for a buildCompletedEvent, one role is request by field + */ +export interface NotificationEventRole { + /** + * Gets or sets an Id for that role, this id is used by the event. + */ + id?: string; + /** + * Gets or sets the Name for that role, this name is used for UI display. + */ + name?: string; + /** + * Gets or sets whether this role can be a group or just an individual user + */ + supportsGroups?: boolean; +} +/** + * Encapsulates the properties of an event type. It defines the fields, that can be used for filtering, for that event type. + */ +export interface NotificationEventType { + category?: NotificationEventTypeCategory; + /** + * Gets or sets the color representing this event type. Example: rgb(128,245,211) or #fafafa + */ + color?: string; + customSubscriptionsAllowed?: boolean; + eventPublisher?: NotificationEventPublisher; + fields?: { + [key: string]: NotificationEventField; + }; + hasInitiator?: boolean; + /** + * Gets or sets the icon representing this event type. Can be a URL or a CSS class. Example: css://some-css-class + */ + icon?: string; + /** + * Gets or sets the unique identifier of this event definition. + */ + id?: string; + /** + * Gets or sets the name of this event definition. + */ + name?: string; + roles?: NotificationEventRole[]; + /** + * Gets or sets the scopes that this event type supports + */ + supportedScopes?: string[]; + /** + * Gets or sets the rest end point to get this event type details (fields, fields types) + */ + url?: string; +} +/** + * Encapsulates the properties of a category. A category will be used by the UI to group event types + */ +export interface NotificationEventTypeCategory { + /** + * Gets or sets the unique identifier of this category. + */ + id?: string; + /** + * Gets or sets the friendly name of this category. + */ + name?: string; +} +export interface NotificationJobDiagnosticLog extends NotificationDiagnosticLog { + result?: string; + stats?: { + [key: string]: { + [key: string]: number; + }; + }; +} +export declare enum NotificationOperation { + None = 0, + SuspendUnprocessed = 1 +} +export interface NotificationQueryCondition { + eventInitiator?: string; + eventType?: string; + subscriber?: string; + subscriptionId?: string; +} +export interface NotificationReason { + notificationReasonType?: NotificationReasonType; + targetIdentities?: VSSInterfaces.IdentityRef[]; +} +export declare enum NotificationReasonType { + Unknown = 0, + Follows = 1, + Personal = 2, + PersonalAlias = 3, + DirectMember = 4, + IndirectMember = 5, + GroupAlias = 6, + SubscriptionAlias = 7, + SingleRole = 8, + DirectMemberGroupRole = 9, + InDirectMemberGroupRole = 10, + AliasMemberGroupRole = 11 +} +/** + * Encapsulates notifications result properties. It defines the number of notifications and the recipients of notifications. + */ +export interface NotificationsEvaluationResult { + /** + * Count of generated notifications + */ + count?: number; +} +export interface NotificationStatistic { + date?: Date; + hitCount?: number; + path?: string; + type?: NotificationStatisticType; + user?: VSSInterfaces.IdentityRef; +} +export interface NotificationStatisticsQuery { + conditions?: NotificationStatisticsQueryConditions[]; +} +export interface NotificationStatisticsQueryConditions { + endDate?: Date; + hitCountMinimum?: number; + path?: string; + startDate?: Date; + type?: NotificationStatisticType; + user?: VSSInterfaces.IdentityRef; +} +export declare enum NotificationStatisticType { + NotificationBySubscription = 0, + EventsByEventType = 1, + NotificationByEventType = 2, + EventsByEventTypePerUser = 3, + NotificationByEventTypePerUser = 4, + Events = 5, + Notifications = 6, + NotificationFailureBySubscription = 7, + UnprocessedRangeStart = 100, + UnprocessedEventsByPublisher = 101, + UnprocessedEventDelayByPublisher = 102, + UnprocessedNotificationsByChannelByPublisher = 103, + UnprocessedNotificationDelayByChannelByPublisher = 104, + DelayRangeStart = 200, + TotalPipelineTime = 201, + NotificationPipelineTime = 202, + EventPipelineTime = 203, + HourlyRangeStart = 1000, + HourlyNotificationBySubscription = 1001, + HourlyEventsByEventTypePerUser = 1002, + HourlyEvents = 1003, + HourlyNotifications = 1004, + HourlyUnprocessedEventsByPublisher = 1101, + HourlyUnprocessedEventDelayByPublisher = 1102, + HourlyUnprocessedNotificationsByChannelByPublisher = 1103, + HourlyUnprocessedNotificationDelayByChannelByPublisher = 1104, + HourlyTotalPipelineTime = 1201, + HourlyNotificationPipelineTime = 1202, + HourlyEventPipelineTime = 1203 +} +/** + * A subscriber is a user or group that has the potential to receive notifications. + */ +export interface NotificationSubscriber { + /** + * Indicates how the subscriber should be notified by default. + */ + deliveryPreference?: NotificationSubscriberDeliveryPreference; + flags?: SubscriberFlags; + /** + * Identifier of the subscriber. + */ + id?: string; + /** + * Preferred email address of the subscriber. A null or empty value indicates no preferred email address has been set. + */ + preferredEmailAddress?: string; +} +/** + * Delivery preference for a subscriber. Indicates how the subscriber should be notified. + */ +export declare enum NotificationSubscriberDeliveryPreference { + /** + * Do not send notifications by default. Note: notifications can still be delivered to this subscriber, for example via a custom subscription. + */ + NoDelivery = -1, + /** + * Deliver notifications to the subscriber's preferred email address. + */ + PreferredEmailAddress = 1, + /** + * Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. + */ + EachMember = 2, + /** + * Use default + */ + UseDefault = 3 +} +/** + * Updates to a subscriber. Typically used to change (or set) a preferred email address or default delivery preference. + */ +export interface NotificationSubscriberUpdateParameters { + /** + * New delivery preference for the subscriber (indicates how the subscriber should be notified). + */ + deliveryPreference?: NotificationSubscriberDeliveryPreference; + /** + * New preferred email address for the subscriber. Specify an empty string to clear the current address. + */ + preferredEmailAddress?: string; +} +/** + * A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events. + */ +export interface NotificationSubscription { + /** + * Links to related resources, APIs, and views for the subscription. + */ + _links?: any; + /** + * Admin-managed settings for the subscription. Only applies when the subscriber is a group. + */ + adminSettings?: SubscriptionAdminSettings; + /** + * Channel for delivering notifications triggered by the subscription. + */ + channel?: ISubscriptionChannel; + /** + * Description of the subscription. Typically describes filter criteria which helps identity the subscription. + */ + description?: string; + /** + * Diagnostics for this subscription. + */ + diagnostics?: SubscriptionDiagnostics; + /** + * Any extra properties like detailed description for different contexts, user/group contexts + */ + extendedProperties?: { + [key: string]: string; + }; + /** + * Matching criteria for the subscription. ExpressionFilter + */ + filter: ISubscriptionFilter; + /** + * Read-only indicators that further describe the subscription. + */ + flags?: SubscriptionFlags; + /** + * Subscription identifier. + */ + id?: string; + /** + * User that last modified (or created) the subscription. + */ + lastModifiedBy?: VSSInterfaces.IdentityRef; + /** + * Date when the subscription was last modified. If the subscription has not been updated since it was created, this value will indicate when the subscription was created. + */ + modifiedDate?: Date; + /** + * The permissions the user have for this subscriptions. + */ + permissions?: SubscriptionPermissions; + /** + * The container in which events must be published from in order to be matched by the subscription. If empty, the scope is the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + */ + scope?: SubscriptionScope; + /** + * Status of the subscription. Typically indicates whether the subscription is enabled or not. + */ + status?: SubscriptionStatus; + /** + * Message that provides more details about the status of the subscription. + */ + statusMessage?: string; + /** + * User or group that will receive notifications for events matching the subscription's filter criteria. + */ + subscriber?: VSSInterfaces.IdentityRef; + /** + * REST API URL of the subscriotion. + */ + url?: string; + /** + * User-managed settings for the subscription. Only applies when the subscriber is a group. Typically used to indicate whether the calling user is opted in or out of a group subscription. + */ + userSettings?: SubscriptionUserSettings; +} +/** + * Parameters for creating a new subscription. A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events. + */ +export interface NotificationSubscriptionCreateParameters { + /** + * Channel for delivering notifications triggered by the new subscription. + */ + channel?: ISubscriptionChannel; + /** + * Brief description for the new subscription. Typically describes filter criteria which helps identity the subscription. + */ + description?: string; + /** + * Matching criteria for the new subscription. ExpressionFilter + */ + filter: ISubscriptionFilter; + /** + * The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically an account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + */ + scope?: SubscriptionScope; + /** + * User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. + */ + subscriber?: VSSInterfaces.IdentityRef; +} +export interface NotificationSubscriptionTemplate { + description?: string; + filter: ISubscriptionFilter; + id?: string; + notificationEventInformation?: NotificationEventType; + type?: SubscriptionTemplateType; +} +/** + * Parameters for updating an existing subscription. A subscription defines criteria for matching events and how the subscription's subscriber should be notified about those events. Note: only the fields to be updated should be set. + */ +export interface NotificationSubscriptionUpdateParameters { + /** + * Admin-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. + */ + adminSettings?: SubscriptionAdminSettings; + /** + * Channel for delivering notifications triggered by the subscription. + */ + channel?: ISubscriptionChannel; + /** + * Updated description for the subscription. Typically describes filter criteria which helps identity the subscription. + */ + description?: string; + /** + * Matching criteria for the subscription. ExpressionFilter + */ + filter?: ISubscriptionFilter; + /** + * The container in which events must be published from in order to be matched by the new subscription. If not specified, defaults to the current host (typically the current account or project collection). For example, a subscription scoped to project A will not produce notifications for events published from project B. + */ + scope?: SubscriptionScope; + /** + * Updated status for the subscription. Typically used to enable or disable a subscription. + */ + status?: SubscriptionStatus; + /** + * Optional message that provides more details about the updated status. + */ + statusMessage?: string; + /** + * User-managed settings for the subscription. Only applies to subscriptions where the subscriber is a group. Typically used to opt-in or opt-out a user from a group subscription. + */ + userSettings?: SubscriptionUserSettings; +} +/** + * Encapsulates the properties of an operator constraint. An operator constraint defines if some operator is available only for specific scope like a project scope. + */ +export interface OperatorConstraint { + operator?: string; + /** + * Gets or sets the list of scopes that this type supports. + */ + supportedScopes?: string[]; +} +export interface ProcessedEvent { + /** + * All of the users that were associated with this event and their role. + */ + actors?: VSSInterfaces.EventActor[]; + allowedChannels?: string; + artifactUri?: string; + deliveryIdentities?: ProcessingIdentities; + /** + * Evaluations for each user + */ + evaluations?: { + [key: string]: SubscriptionEvaluation; + }; + eventId?: number; + /** + * Which members were excluded from evaluation (only applies to ActorMatcher subscriptions) + */ + exclusions?: VSSInterfaces.EventActor[]; + /** + * Which members were included for evaluation (only applies to ActorMatcher subscriptions) + */ + inclusions?: VSSInterfaces.EventActor[]; + notifications?: GeneratedNotification[]; +} +export interface ProcessingDiagnosticIdentity extends DiagnosticIdentity { + deliveryPreference?: string; + isActive?: boolean; + isGroup?: boolean; + message?: string; +} +export interface ProcessingIdentities { + excludedIdentities?: { + [key: string]: ProcessingDiagnosticIdentity; + }; + includedIdentities?: { + [key: string]: ProcessingDiagnosticIdentity; + }; + messages?: NotificationDiagnosticLogMessage[]; + missingIdentities?: string[]; + properties?: { + [key: string]: string; + }; +} +export interface RoleBasedFilter extends ExpressionFilter { + exclusions?: string[]; + inclusions?: string[]; +} +export interface ServiceBusSubscriptionChannel { + type?: string; +} +export interface ServiceHooksSubscriptionChannel { + type?: string; +} +export interface SoapSubscriptionChannel extends SubscriptionChannelWithAddress { + type?: string; +} +export declare enum SubscriberFlags { + None = 0, + /** + * Subscriber's delivery preferences could be updated + */ + DeliveryPreferencesEditable = 2, + /** + * Subscriber's delivery preferences supports email delivery + */ + SupportsPreferredEmailAddressDelivery = 4, + /** + * Subscriber's delivery preferences supports individual members delivery(group expansion) + */ + SupportsEachMemberDelivery = 8, + /** + * Subscriber's delivery preferences supports no delivery + */ + SupportsNoDelivery = 16, + /** + * Subscriber is a user + */ + IsUser = 32, + /** + * Subscriber is a group + */ + IsGroup = 64, + /** + * Subscriber is a team + */ + IsTeam = 128 +} +/** + * Admin-managed settings for a group subscription. + */ +export interface SubscriptionAdminSettings { + /** + * If true, members of the group subscribed to the associated subscription cannot opt (choose not to get notified) + */ + blockUserOptOut: boolean; +} +export interface SubscriptionChannelWithAddress { + address?: string; + type?: string; + useCustomAddress?: boolean; +} +/** + * Contains all the diagnostics settings for a subscription. + */ +export interface SubscriptionDiagnostics { + /** + * Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. + */ + deliveryResults?: SubscriptionTracing; + /** + * Diagnostics settings for troubleshooting notification delivery. + */ + deliveryTracing?: SubscriptionTracing; + /** + * Diagnostics settings for troubleshooting event matching. + */ + evaluationTracing?: SubscriptionTracing; +} +export interface SubscriptionEvaluation { + clauses?: SubscriptionEvaluationClause[]; + user?: DiagnosticIdentity; +} +export interface SubscriptionEvaluationClause { + clause?: string; + order?: number; + result?: boolean; +} +/** + * Encapsulates the properties of a SubscriptionEvaluationRequest. It defines the subscription to be evaluated and time interval for events used in evaluation. + */ +export interface SubscriptionEvaluationRequest { + /** + * The min created date for the events used for matching in UTC. Use all events created since this date + */ + minEventsCreatedDate: Date; + /** + * User or group that will receive notifications for events matching the subscription's filter criteria. If not specified, defaults to the calling user. + */ + subscriptionCreateParameters?: NotificationSubscriptionCreateParameters; +} +/** + * Encapsulates the subscription evaluation results. It defines the Date Interval that was used, number of events evaluated and events and notifications results + */ +export interface SubscriptionEvaluationResult { + /** + * Subscription evaluation job status + */ + evaluationJobStatus?: EvaluationOperationStatus; + /** + * Subscription evaluation events results. + */ + events?: EventsEvaluationResult; + /** + * The requestId which is the subscription evaluation jobId + */ + id?: string; + /** + * Subscription evaluation notification results. + */ + notifications?: NotificationsEvaluationResult; +} +/** + * Encapsulates the subscription evaluation settings needed for the UI + */ +export interface SubscriptionEvaluationSettings { + /** + * Indicates whether subscription evaluation before saving is enabled or not + */ + enabled?: boolean; + /** + * Time interval to check on subscription evaluation job in seconds + */ + interval?: number; + /** + * Threshold on the number of notifications for considering a subscription too noisy + */ + threshold?: number; + /** + * Time out for the subscription evaluation check in seconds + */ + timeOut?: number; +} +export declare enum SubscriptionFieldType { + String = 1, + Integer = 2, + DateTime = 3, + PlainText = 5, + Html = 7, + TreePath = 8, + History = 9, + Double = 10, + Guid = 11, + Boolean = 12, + Identity = 13, + PicklistInteger = 14, + PicklistString = 15, + PicklistDouble = 16, + TeamProject = 17 +} +/** + * Read-only indicators that further describe the subscription. + */ +export declare enum SubscriptionFlags { + /** + * None + */ + None = 0, + /** + * Subscription's subscriber is a group, not a user + */ + GroupSubscription = 1, + /** + * Subscription is contributed and not persisted. This means certain fields of the subscription, like Filter, are read-only. + */ + ContributedSubscription = 2, + /** + * A user that is member of the subscription's subscriber group can opt in/out of the subscription. + */ + CanOptOut = 4, + /** + * If the subscriber is a group, is it a team. + */ + TeamSubscription = 8, + /** + * For role based subscriptions, there is an expectation that there will always be at least one actor that matches + */ + OneActorMatches = 16 +} +/** + * Encapsulates the properties needed to manage subscriptions, opt in and out of subscriptions. + */ +export interface SubscriptionManagement { + serviceInstanceType?: string; + url?: string; +} +/** + * The permissions that a user has to a certain subscription + */ +export declare enum SubscriptionPermissions { + /** + * None + */ + None = 0, + /** + * full view of description, filters, etc. Not limited. + */ + View = 1, + /** + * update subscription + */ + Edit = 2, + /** + * delete subscription + */ + Delete = 4 +} +/** + * Notification subscriptions query input. + */ +export interface SubscriptionQuery { + /** + * One or more conditions to query on. If more than 2 conditions are specified, the combined results of each condition is returned (i.e. conditions are logically OR'ed). + */ + conditions: SubscriptionQueryCondition[]; + /** + * Flags the refine the types of subscriptions that will be returned from the query. + */ + queryFlags?: SubscriptionQueryFlags; +} +/** + * Conditions a subscription must match to qualify for the query result set. Not all fields are required. A subscription must match all conditions specified in order to qualify for the result set. + */ +export interface SubscriptionQueryCondition { + /** + * Filter conditions that matching subscriptions must have. Typically only the filter's type and event type are used for matching. + */ + filter?: ISubscriptionFilter; + /** + * Flags to specify the the type subscriptions to query for. + */ + flags?: SubscriptionFlags; + /** + * Scope that matching subscriptions must have. + */ + scope?: string; + /** + * ID of the subscriber (user or group) that matching subscriptions must be subscribed to. + */ + subscriberId?: string; + /** + * ID of the subscription to query for. + */ + subscriptionId?: string; +} +/** + * Flags that influence the result set of a subscription query. + */ +export declare enum SubscriptionQueryFlags { + None = 0, + /** + * Include subscriptions with invalid subscribers. + */ + IncludeInvalidSubscriptions = 2, + /** + * Include subscriptions marked for deletion. + */ + IncludeDeletedSubscriptions = 4, + /** + * Include the full filter details with each subscription. + */ + IncludeFilterDetails = 8, + /** + * For a subscription the caller does not have permission to view, return basic (non-confidential) information. + */ + AlwaysReturnBasicInformation = 16, + /** + * Include system subscriptions. + */ + IncludeSystemSubscriptions = 32 +} +/** + * A resource, typically an account or project, in which events are published from. + */ +export interface SubscriptionScope extends VSSInterfaces.EventScope { +} +/** + * Subscription status values. A value greater than or equal to zero indicates the subscription is enabled. A negative value indicates the subscription is disabled. + */ +export declare enum SubscriptionStatus { + /** + * Subscription is disabled because it generated a high volume of notifications. + */ + JailedByNotificationsVolume = -200, + /** + * Subscription is disabled and will be deleted. + */ + PendingDeletion = -100, + /** + * Subscription is disabled because of an Argument Exception while processing the subscription + */ + DisabledArgumentException = -12, + /** + * Subscription is disabled because the project is invalid + */ + DisabledProjectInvalid = -11, + /** + * Subscription is disabled because the identity does not have the appropriate permissions + */ + DisabledMissingPermissions = -10, + /** + * Subscription is disabled service due to failures. + */ + DisabledFromProbation = -9, + /** + * Subscription is disabled because the identity is no longer active + */ + DisabledInactiveIdentity = -8, + /** + * Subscription is disabled because message queue is not supported. + */ + DisabledMessageQueueNotSupported = -7, + /** + * Subscription is disabled because its subscriber is unknown. + */ + DisabledMissingIdentity = -6, + /** + * Subscription is disabled because it has an invalid role expression. + */ + DisabledInvalidRoleExpression = -5, + /** + * Subscription is disabled because it has an invalid filter expression. + */ + DisabledInvalidPathClause = -4, + /** + * Subscription is disabled because it is a duplicate of a default subscription. + */ + DisabledAsDuplicateOfDefault = -3, + /** + * Subscription is disabled by an administrator, not the subscription's subscriber. + */ + DisabledByAdmin = -2, + /** + * Subscription is disabled, typically by the owner of the subscription, and will not produce any notifications. + */ + Disabled = -1, + /** + * Subscription is active. + */ + Enabled = 0, + /** + * Subscription is active, but is on probation due to failed deliveries or other issues with the subscription. + */ + EnabledOnProbation = 1 +} +/** + * Set of flags used to determine which set of templates is retrieved when querying for subscription templates + */ +export declare enum SubscriptionTemplateQueryFlags { + None = 0, + /** + * Include user templates + */ + IncludeUser = 1, + /** + * Include group templates + */ + IncludeGroup = 2, + /** + * Include user and group templates + */ + IncludeUserAndGroup = 4, + /** + * Include the event type details like the fields and operators + */ + IncludeEventTypeInformation = 22 +} +export declare enum SubscriptionTemplateType { + User = 0, + Team = 1, + Both = 2, + None = 3 +} +export interface SubscriptionTraceDiagnosticLog extends NotificationDiagnosticLog { + /** + * Indicates the job Id that processed or delivered this subscription + */ + jobId?: string; + /** + * Indicates unique instance identifier for the job that processed or delivered this subscription + */ + jobInstanceId?: string; + subscriptionId?: string; +} +export interface SubscriptionTraceEventProcessingLog extends SubscriptionTraceDiagnosticLog { + channel?: string; + evaluationIdentities?: ProcessingIdentities; + /** + * Which members opted out from receiving notifications from this subscription + */ + optedOut?: DiagnosticIdentity[]; + processedEvents?: { + [key: number]: ProcessedEvent; + }; +} +export interface SubscriptionTraceNotificationDeliveryLog extends SubscriptionTraceDiagnosticLog { + notifications?: DiagnosticNotification[]; +} +/** + * Data controlling a single diagnostic setting for a subscription. + */ +export interface SubscriptionTracing { + /** + * Indicates whether the diagnostic tracing is enabled or not. + */ + enabled: boolean; + /** + * Trace until the specified end date. + */ + endDate?: Date; + /** + * The maximum number of result details to trace. + */ + maxTracedEntries?: number; + /** + * The date and time tracing started. + */ + startDate?: Date; + /** + * Trace until remaining count reaches 0. + */ + tracedEntries?: number; +} +/** + * User-managed settings for a group subscription. + */ +export interface SubscriptionUserSettings { + /** + * Indicates whether the user will receive notifications for the associated group subscription. + */ + optedOut: boolean; +} +export interface UnsupportedFilter extends BaseSubscriptionFilter { + type?: string; +} +export interface UnsupportedSubscriptionChannel { + type?: string; +} +/** + * Parameters to update diagnostics settings for a subscription. + */ +export interface UpdateSubscripitonDiagnosticsParameters { + /** + * Diagnostics settings for retaining delivery results. Used for Service Hooks subscriptions. + */ + deliveryResults?: UpdateSubscripitonTracingParameters; + /** + * Diagnostics settings for troubleshooting notification delivery. + */ + deliveryTracing?: UpdateSubscripitonTracingParameters; + /** + * Diagnostics settings for troubleshooting event matching. + */ + evaluationTracing?: UpdateSubscripitonTracingParameters; +} +/** + * Parameters to update a specific diagnostic setting. + */ +export interface UpdateSubscripitonTracingParameters { + /** + * Indicates whether to enable to disable the diagnostic tracing. + */ + enabled: boolean; +} +export interface UserSubscriptionChannel extends SubscriptionChannelWithAddress { + type?: string; +} +export interface UserSystemSubscriptionChannel extends SubscriptionChannelWithAddress { + type?: string; +} +/** + * Encapsulates the properties of a field value definition. It has the information needed to retrieve the list of possible values for a certain field and how to handle that field values in the UI. This information includes what type of object this value represents, which property to use for UI display and which property to use for saving the subscription + */ +export interface ValueDefinition { + /** + * Gets or sets the data source. + */ + dataSource?: FormInputInterfaces.InputValue[]; + /** + * Gets or sets the rest end point. + */ + endPoint?: string; + /** + * Gets or sets the result template. + */ + resultTemplate?: string; +} +export declare var TypeInfo: { + ActorNotificationReason: any; + BatchNotificationOperation: any; + DefaultGroupDeliveryPreference: { + enumValues: { + "noDelivery": number; + "eachMember": number; + }; + }; + EvaluationOperationStatus: { + enumValues: { + "notSet": number; + "queued": number; + "inProgress": number; + "cancelled": number; + "succeeded": number; + "failed": number; + "timedOut": number; + "notFound": number; + }; + }; + EventBacklogStatus: any; + EventProcessingLog: any; + EventPublisherQueryFlags: { + enumValues: { + "none": number; + "includeRemoteServices": number; + }; + }; + EventTypeQueryFlags: { + enumValues: { + "none": number; + "includeFields": number; + }; + }; + INotificationDiagnosticLog: any; + NotificationAdminSettings: any; + NotificationAdminSettingsUpdateParameters: any; + NotificationBacklogStatus: any; + NotificationDeliveryLog: any; + NotificationDiagnosticLog: any; + NotificationEventBacklogStatus: any; + NotificationEventField: any; + NotificationEventFieldType: any; + NotificationEventType: any; + NotificationJobDiagnosticLog: any; + NotificationOperation: { + enumValues: { + "none": number; + "suspendUnprocessed": number; + }; + }; + NotificationReason: any; + NotificationReasonType: { + enumValues: { + "unknown": number; + "follows": number; + "personal": number; + "personalAlias": number; + "directMember": number; + "indirectMember": number; + "groupAlias": number; + "subscriptionAlias": number; + "singleRole": number; + "directMemberGroupRole": number; + "inDirectMemberGroupRole": number; + "aliasMemberGroupRole": number; + }; + }; + NotificationStatistic: any; + NotificationStatisticsQuery: any; + NotificationStatisticsQueryConditions: any; + NotificationStatisticType: { + enumValues: { + "notificationBySubscription": number; + "eventsByEventType": number; + "notificationByEventType": number; + "eventsByEventTypePerUser": number; + "notificationByEventTypePerUser": number; + "events": number; + "notifications": number; + "notificationFailureBySubscription": number; + "unprocessedRangeStart": number; + "unprocessedEventsByPublisher": number; + "unprocessedEventDelayByPublisher": number; + "unprocessedNotificationsByChannelByPublisher": number; + "unprocessedNotificationDelayByChannelByPublisher": number; + "delayRangeStart": number; + "totalPipelineTime": number; + "notificationPipelineTime": number; + "eventPipelineTime": number; + "hourlyRangeStart": number; + "hourlyNotificationBySubscription": number; + "hourlyEventsByEventTypePerUser": number; + "hourlyEvents": number; + "hourlyNotifications": number; + "hourlyUnprocessedEventsByPublisher": number; + "hourlyUnprocessedEventDelayByPublisher": number; + "hourlyUnprocessedNotificationsByChannelByPublisher": number; + "hourlyUnprocessedNotificationDelayByChannelByPublisher": number; + "hourlyTotalPipelineTime": number; + "hourlyNotificationPipelineTime": number; + "hourlyEventPipelineTime": number; + }; + }; + NotificationSubscriber: any; + NotificationSubscriberDeliveryPreference: { + enumValues: { + "noDelivery": number; + "preferredEmailAddress": number; + "eachMember": number; + "useDefault": number; + }; + }; + NotificationSubscriberUpdateParameters: any; + NotificationSubscription: any; + NotificationSubscriptionTemplate: any; + NotificationSubscriptionUpdateParameters: any; + SubscriberFlags: { + enumValues: { + "none": number; + "deliveryPreferencesEditable": number; + "supportsPreferredEmailAddressDelivery": number; + "supportsEachMemberDelivery": number; + "supportsNoDelivery": number; + "isUser": number; + "isGroup": number; + "isTeam": number; + }; + }; + SubscriptionDiagnostics: any; + SubscriptionEvaluationRequest: any; + SubscriptionEvaluationResult: any; + SubscriptionFieldType: { + enumValues: { + "string": number; + "integer": number; + "dateTime": number; + "plainText": number; + "html": number; + "treePath": number; + "history": number; + "double": number; + "guid": number; + "boolean": number; + "identity": number; + "picklistInteger": number; + "picklistString": number; + "picklistDouble": number; + "teamProject": number; + }; + }; + SubscriptionFlags: { + enumValues: { + "none": number; + "groupSubscription": number; + "contributedSubscription": number; + "canOptOut": number; + "teamSubscription": number; + "oneActorMatches": number; + }; + }; + SubscriptionPermissions: { + enumValues: { + "none": number; + "view": number; + "edit": number; + "delete": number; + }; + }; + SubscriptionQuery: any; + SubscriptionQueryCondition: any; + SubscriptionQueryFlags: { + enumValues: { + "none": number; + "includeInvalidSubscriptions": number; + "includeDeletedSubscriptions": number; + "includeFilterDetails": number; + "alwaysReturnBasicInformation": number; + "includeSystemSubscriptions": number; + }; + }; + SubscriptionStatus: { + enumValues: { + "jailedByNotificationsVolume": number; + "pendingDeletion": number; + "disabledArgumentException": number; + "disabledProjectInvalid": number; + "disabledMissingPermissions": number; + "disabledFromProbation": number; + "disabledInactiveIdentity": number; + "disabledMessageQueueNotSupported": number; + "disabledMissingIdentity": number; + "disabledInvalidRoleExpression": number; + "disabledInvalidPathClause": number; + "disabledAsDuplicateOfDefault": number; + "disabledByAdmin": number; + "disabled": number; + "enabled": number; + "enabledOnProbation": number; + }; + }; + SubscriptionTemplateQueryFlags: { + enumValues: { + "none": number; + "includeUser": number; + "includeGroup": number; + "includeUserAndGroup": number; + "includeEventTypeInformation": number; + }; + }; + SubscriptionTemplateType: { + enumValues: { + "user": number; + "team": number; + "both": number; + "none": number; + }; + }; + SubscriptionTraceDiagnosticLog: any; + SubscriptionTraceEventProcessingLog: any; + SubscriptionTraceNotificationDeliveryLog: any; + SubscriptionTracing: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.js b/node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.js new file mode 100644 index 0000000..bbf7ce6 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/NotificationInterfaces.js @@ -0,0 +1,872 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Default delivery preference for group subscribers. Indicates how the subscriber should be notified. + */ +var DefaultGroupDeliveryPreference; +(function (DefaultGroupDeliveryPreference) { + DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; + DefaultGroupDeliveryPreference[DefaultGroupDeliveryPreference["EachMember"] = 2] = "EachMember"; +})(DefaultGroupDeliveryPreference = exports.DefaultGroupDeliveryPreference || (exports.DefaultGroupDeliveryPreference = {})); +/** + * Describes the subscription evaluation operation status. + */ +var EvaluationOperationStatus; +(function (EvaluationOperationStatus) { + /** + * The operation object does not have the status set. + */ + EvaluationOperationStatus[EvaluationOperationStatus["NotSet"] = 0] = "NotSet"; + /** + * The operation has been queued. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Queued"] = 1] = "Queued"; + /** + * The operation is in progress. + */ + EvaluationOperationStatus[EvaluationOperationStatus["InProgress"] = 2] = "InProgress"; + /** + * The operation was cancelled by the user. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Cancelled"] = 3] = "Cancelled"; + /** + * The operation completed successfully. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The operation completed with a failure. + */ + EvaluationOperationStatus[EvaluationOperationStatus["Failed"] = 5] = "Failed"; + /** + * The operation timed out. + */ + EvaluationOperationStatus[EvaluationOperationStatus["TimedOut"] = 6] = "TimedOut"; + /** + * The operation could not be found. + */ + EvaluationOperationStatus[EvaluationOperationStatus["NotFound"] = 7] = "NotFound"; +})(EvaluationOperationStatus = exports.EvaluationOperationStatus || (exports.EvaluationOperationStatus = {})); +/** + * Set of flags used to determine which set of information is retrieved when querying for event publishers + */ +var EventPublisherQueryFlags; +(function (EventPublisherQueryFlags) { + EventPublisherQueryFlags[EventPublisherQueryFlags["None"] = 0] = "None"; + /** + * Include event types from the remote services too + */ + EventPublisherQueryFlags[EventPublisherQueryFlags["IncludeRemoteServices"] = 2] = "IncludeRemoteServices"; +})(EventPublisherQueryFlags = exports.EventPublisherQueryFlags || (exports.EventPublisherQueryFlags = {})); +/** + * Set of flags used to determine which set of information is retrieved when querying for eventtypes + */ +var EventTypeQueryFlags; +(function (EventTypeQueryFlags) { + EventTypeQueryFlags[EventTypeQueryFlags["None"] = 0] = "None"; + /** + * IncludeFields will include all fields and their types + */ + EventTypeQueryFlags[EventTypeQueryFlags["IncludeFields"] = 1] = "IncludeFields"; +})(EventTypeQueryFlags = exports.EventTypeQueryFlags || (exports.EventTypeQueryFlags = {})); +var NotificationOperation; +(function (NotificationOperation) { + NotificationOperation[NotificationOperation["None"] = 0] = "None"; + NotificationOperation[NotificationOperation["SuspendUnprocessed"] = 1] = "SuspendUnprocessed"; +})(NotificationOperation = exports.NotificationOperation || (exports.NotificationOperation = {})); +var NotificationReasonType; +(function (NotificationReasonType) { + NotificationReasonType[NotificationReasonType["Unknown"] = 0] = "Unknown"; + NotificationReasonType[NotificationReasonType["Follows"] = 1] = "Follows"; + NotificationReasonType[NotificationReasonType["Personal"] = 2] = "Personal"; + NotificationReasonType[NotificationReasonType["PersonalAlias"] = 3] = "PersonalAlias"; + NotificationReasonType[NotificationReasonType["DirectMember"] = 4] = "DirectMember"; + NotificationReasonType[NotificationReasonType["IndirectMember"] = 5] = "IndirectMember"; + NotificationReasonType[NotificationReasonType["GroupAlias"] = 6] = "GroupAlias"; + NotificationReasonType[NotificationReasonType["SubscriptionAlias"] = 7] = "SubscriptionAlias"; + NotificationReasonType[NotificationReasonType["SingleRole"] = 8] = "SingleRole"; + NotificationReasonType[NotificationReasonType["DirectMemberGroupRole"] = 9] = "DirectMemberGroupRole"; + NotificationReasonType[NotificationReasonType["InDirectMemberGroupRole"] = 10] = "InDirectMemberGroupRole"; + NotificationReasonType[NotificationReasonType["AliasMemberGroupRole"] = 11] = "AliasMemberGroupRole"; +})(NotificationReasonType = exports.NotificationReasonType || (exports.NotificationReasonType = {})); +var NotificationStatisticType; +(function (NotificationStatisticType) { + NotificationStatisticType[NotificationStatisticType["NotificationBySubscription"] = 0] = "NotificationBySubscription"; + NotificationStatisticType[NotificationStatisticType["EventsByEventType"] = 1] = "EventsByEventType"; + NotificationStatisticType[NotificationStatisticType["NotificationByEventType"] = 2] = "NotificationByEventType"; + NotificationStatisticType[NotificationStatisticType["EventsByEventTypePerUser"] = 3] = "EventsByEventTypePerUser"; + NotificationStatisticType[NotificationStatisticType["NotificationByEventTypePerUser"] = 4] = "NotificationByEventTypePerUser"; + NotificationStatisticType[NotificationStatisticType["Events"] = 5] = "Events"; + NotificationStatisticType[NotificationStatisticType["Notifications"] = 6] = "Notifications"; + NotificationStatisticType[NotificationStatisticType["NotificationFailureBySubscription"] = 7] = "NotificationFailureBySubscription"; + NotificationStatisticType[NotificationStatisticType["UnprocessedRangeStart"] = 100] = "UnprocessedRangeStart"; + NotificationStatisticType[NotificationStatisticType["UnprocessedEventsByPublisher"] = 101] = "UnprocessedEventsByPublisher"; + NotificationStatisticType[NotificationStatisticType["UnprocessedEventDelayByPublisher"] = 102] = "UnprocessedEventDelayByPublisher"; + NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationsByChannelByPublisher"] = 103] = "UnprocessedNotificationsByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["UnprocessedNotificationDelayByChannelByPublisher"] = 104] = "UnprocessedNotificationDelayByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["DelayRangeStart"] = 200] = "DelayRangeStart"; + NotificationStatisticType[NotificationStatisticType["TotalPipelineTime"] = 201] = "TotalPipelineTime"; + NotificationStatisticType[NotificationStatisticType["NotificationPipelineTime"] = 202] = "NotificationPipelineTime"; + NotificationStatisticType[NotificationStatisticType["EventPipelineTime"] = 203] = "EventPipelineTime"; + NotificationStatisticType[NotificationStatisticType["HourlyRangeStart"] = 1000] = "HourlyRangeStart"; + NotificationStatisticType[NotificationStatisticType["HourlyNotificationBySubscription"] = 1001] = "HourlyNotificationBySubscription"; + NotificationStatisticType[NotificationStatisticType["HourlyEventsByEventTypePerUser"] = 1002] = "HourlyEventsByEventTypePerUser"; + NotificationStatisticType[NotificationStatisticType["HourlyEvents"] = 1003] = "HourlyEvents"; + NotificationStatisticType[NotificationStatisticType["HourlyNotifications"] = 1004] = "HourlyNotifications"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventsByPublisher"] = 1101] = "HourlyUnprocessedEventsByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedEventDelayByPublisher"] = 1102] = "HourlyUnprocessedEventDelayByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationsByChannelByPublisher"] = 1103] = "HourlyUnprocessedNotificationsByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyUnprocessedNotificationDelayByChannelByPublisher"] = 1104] = "HourlyUnprocessedNotificationDelayByChannelByPublisher"; + NotificationStatisticType[NotificationStatisticType["HourlyTotalPipelineTime"] = 1201] = "HourlyTotalPipelineTime"; + NotificationStatisticType[NotificationStatisticType["HourlyNotificationPipelineTime"] = 1202] = "HourlyNotificationPipelineTime"; + NotificationStatisticType[NotificationStatisticType["HourlyEventPipelineTime"] = 1203] = "HourlyEventPipelineTime"; +})(NotificationStatisticType = exports.NotificationStatisticType || (exports.NotificationStatisticType = {})); +/** + * Delivery preference for a subscriber. Indicates how the subscriber should be notified. + */ +var NotificationSubscriberDeliveryPreference; +(function (NotificationSubscriberDeliveryPreference) { + /** + * Do not send notifications by default. Note: notifications can still be delivered to this subscriber, for example via a custom subscription. + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["NoDelivery"] = -1] = "NoDelivery"; + /** + * Deliver notifications to the subscriber's preferred email address. + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["PreferredEmailAddress"] = 1] = "PreferredEmailAddress"; + /** + * Deliver notifications to each member of the group representing the subscriber. Only applicable when the subscriber is a group. + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["EachMember"] = 2] = "EachMember"; + /** + * Use default + */ + NotificationSubscriberDeliveryPreference[NotificationSubscriberDeliveryPreference["UseDefault"] = 3] = "UseDefault"; +})(NotificationSubscriberDeliveryPreference = exports.NotificationSubscriberDeliveryPreference || (exports.NotificationSubscriberDeliveryPreference = {})); +var SubscriberFlags; +(function (SubscriberFlags) { + SubscriberFlags[SubscriberFlags["None"] = 0] = "None"; + /** + * Subscriber's delivery preferences could be updated + */ + SubscriberFlags[SubscriberFlags["DeliveryPreferencesEditable"] = 2] = "DeliveryPreferencesEditable"; + /** + * Subscriber's delivery preferences supports email delivery + */ + SubscriberFlags[SubscriberFlags["SupportsPreferredEmailAddressDelivery"] = 4] = "SupportsPreferredEmailAddressDelivery"; + /** + * Subscriber's delivery preferences supports individual members delivery(group expansion) + */ + SubscriberFlags[SubscriberFlags["SupportsEachMemberDelivery"] = 8] = "SupportsEachMemberDelivery"; + /** + * Subscriber's delivery preferences supports no delivery + */ + SubscriberFlags[SubscriberFlags["SupportsNoDelivery"] = 16] = "SupportsNoDelivery"; + /** + * Subscriber is a user + */ + SubscriberFlags[SubscriberFlags["IsUser"] = 32] = "IsUser"; + /** + * Subscriber is a group + */ + SubscriberFlags[SubscriberFlags["IsGroup"] = 64] = "IsGroup"; + /** + * Subscriber is a team + */ + SubscriberFlags[SubscriberFlags["IsTeam"] = 128] = "IsTeam"; +})(SubscriberFlags = exports.SubscriberFlags || (exports.SubscriberFlags = {})); +var SubscriptionFieldType; +(function (SubscriptionFieldType) { + SubscriptionFieldType[SubscriptionFieldType["String"] = 1] = "String"; + SubscriptionFieldType[SubscriptionFieldType["Integer"] = 2] = "Integer"; + SubscriptionFieldType[SubscriptionFieldType["DateTime"] = 3] = "DateTime"; + SubscriptionFieldType[SubscriptionFieldType["PlainText"] = 5] = "PlainText"; + SubscriptionFieldType[SubscriptionFieldType["Html"] = 7] = "Html"; + SubscriptionFieldType[SubscriptionFieldType["TreePath"] = 8] = "TreePath"; + SubscriptionFieldType[SubscriptionFieldType["History"] = 9] = "History"; + SubscriptionFieldType[SubscriptionFieldType["Double"] = 10] = "Double"; + SubscriptionFieldType[SubscriptionFieldType["Guid"] = 11] = "Guid"; + SubscriptionFieldType[SubscriptionFieldType["Boolean"] = 12] = "Boolean"; + SubscriptionFieldType[SubscriptionFieldType["Identity"] = 13] = "Identity"; + SubscriptionFieldType[SubscriptionFieldType["PicklistInteger"] = 14] = "PicklistInteger"; + SubscriptionFieldType[SubscriptionFieldType["PicklistString"] = 15] = "PicklistString"; + SubscriptionFieldType[SubscriptionFieldType["PicklistDouble"] = 16] = "PicklistDouble"; + SubscriptionFieldType[SubscriptionFieldType["TeamProject"] = 17] = "TeamProject"; +})(SubscriptionFieldType = exports.SubscriptionFieldType || (exports.SubscriptionFieldType = {})); +/** + * Read-only indicators that further describe the subscription. + */ +var SubscriptionFlags; +(function (SubscriptionFlags) { + /** + * None + */ + SubscriptionFlags[SubscriptionFlags["None"] = 0] = "None"; + /** + * Subscription's subscriber is a group, not a user + */ + SubscriptionFlags[SubscriptionFlags["GroupSubscription"] = 1] = "GroupSubscription"; + /** + * Subscription is contributed and not persisted. This means certain fields of the subscription, like Filter, are read-only. + */ + SubscriptionFlags[SubscriptionFlags["ContributedSubscription"] = 2] = "ContributedSubscription"; + /** + * A user that is member of the subscription's subscriber group can opt in/out of the subscription. + */ + SubscriptionFlags[SubscriptionFlags["CanOptOut"] = 4] = "CanOptOut"; + /** + * If the subscriber is a group, is it a team. + */ + SubscriptionFlags[SubscriptionFlags["TeamSubscription"] = 8] = "TeamSubscription"; + /** + * For role based subscriptions, there is an expectation that there will always be at least one actor that matches + */ + SubscriptionFlags[SubscriptionFlags["OneActorMatches"] = 16] = "OneActorMatches"; +})(SubscriptionFlags = exports.SubscriptionFlags || (exports.SubscriptionFlags = {})); +/** + * The permissions that a user has to a certain subscription + */ +var SubscriptionPermissions; +(function (SubscriptionPermissions) { + /** + * None + */ + SubscriptionPermissions[SubscriptionPermissions["None"] = 0] = "None"; + /** + * full view of description, filters, etc. Not limited. + */ + SubscriptionPermissions[SubscriptionPermissions["View"] = 1] = "View"; + /** + * update subscription + */ + SubscriptionPermissions[SubscriptionPermissions["Edit"] = 2] = "Edit"; + /** + * delete subscription + */ + SubscriptionPermissions[SubscriptionPermissions["Delete"] = 4] = "Delete"; +})(SubscriptionPermissions = exports.SubscriptionPermissions || (exports.SubscriptionPermissions = {})); +/** + * Flags that influence the result set of a subscription query. + */ +var SubscriptionQueryFlags; +(function (SubscriptionQueryFlags) { + SubscriptionQueryFlags[SubscriptionQueryFlags["None"] = 0] = "None"; + /** + * Include subscriptions with invalid subscribers. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeInvalidSubscriptions"] = 2] = "IncludeInvalidSubscriptions"; + /** + * Include subscriptions marked for deletion. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeDeletedSubscriptions"] = 4] = "IncludeDeletedSubscriptions"; + /** + * Include the full filter details with each subscription. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeFilterDetails"] = 8] = "IncludeFilterDetails"; + /** + * For a subscription the caller does not have permission to view, return basic (non-confidential) information. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["AlwaysReturnBasicInformation"] = 16] = "AlwaysReturnBasicInformation"; + /** + * Include system subscriptions. + */ + SubscriptionQueryFlags[SubscriptionQueryFlags["IncludeSystemSubscriptions"] = 32] = "IncludeSystemSubscriptions"; +})(SubscriptionQueryFlags = exports.SubscriptionQueryFlags || (exports.SubscriptionQueryFlags = {})); +/** + * Subscription status values. A value greater than or equal to zero indicates the subscription is enabled. A negative value indicates the subscription is disabled. + */ +var SubscriptionStatus; +(function (SubscriptionStatus) { + /** + * Subscription is disabled because it generated a high volume of notifications. + */ + SubscriptionStatus[SubscriptionStatus["JailedByNotificationsVolume"] = -200] = "JailedByNotificationsVolume"; + /** + * Subscription is disabled and will be deleted. + */ + SubscriptionStatus[SubscriptionStatus["PendingDeletion"] = -100] = "PendingDeletion"; + /** + * Subscription is disabled because of an Argument Exception while processing the subscription + */ + SubscriptionStatus[SubscriptionStatus["DisabledArgumentException"] = -12] = "DisabledArgumentException"; + /** + * Subscription is disabled because the project is invalid + */ + SubscriptionStatus[SubscriptionStatus["DisabledProjectInvalid"] = -11] = "DisabledProjectInvalid"; + /** + * Subscription is disabled because the identity does not have the appropriate permissions + */ + SubscriptionStatus[SubscriptionStatus["DisabledMissingPermissions"] = -10] = "DisabledMissingPermissions"; + /** + * Subscription is disabled service due to failures. + */ + SubscriptionStatus[SubscriptionStatus["DisabledFromProbation"] = -9] = "DisabledFromProbation"; + /** + * Subscription is disabled because the identity is no longer active + */ + SubscriptionStatus[SubscriptionStatus["DisabledInactiveIdentity"] = -8] = "DisabledInactiveIdentity"; + /** + * Subscription is disabled because message queue is not supported. + */ + SubscriptionStatus[SubscriptionStatus["DisabledMessageQueueNotSupported"] = -7] = "DisabledMessageQueueNotSupported"; + /** + * Subscription is disabled because its subscriber is unknown. + */ + SubscriptionStatus[SubscriptionStatus["DisabledMissingIdentity"] = -6] = "DisabledMissingIdentity"; + /** + * Subscription is disabled because it has an invalid role expression. + */ + SubscriptionStatus[SubscriptionStatus["DisabledInvalidRoleExpression"] = -5] = "DisabledInvalidRoleExpression"; + /** + * Subscription is disabled because it has an invalid filter expression. + */ + SubscriptionStatus[SubscriptionStatus["DisabledInvalidPathClause"] = -4] = "DisabledInvalidPathClause"; + /** + * Subscription is disabled because it is a duplicate of a default subscription. + */ + SubscriptionStatus[SubscriptionStatus["DisabledAsDuplicateOfDefault"] = -3] = "DisabledAsDuplicateOfDefault"; + /** + * Subscription is disabled by an administrator, not the subscription's subscriber. + */ + SubscriptionStatus[SubscriptionStatus["DisabledByAdmin"] = -2] = "DisabledByAdmin"; + /** + * Subscription is disabled, typically by the owner of the subscription, and will not produce any notifications. + */ + SubscriptionStatus[SubscriptionStatus["Disabled"] = -1] = "Disabled"; + /** + * Subscription is active. + */ + SubscriptionStatus[SubscriptionStatus["Enabled"] = 0] = "Enabled"; + /** + * Subscription is active, but is on probation due to failed deliveries or other issues with the subscription. + */ + SubscriptionStatus[SubscriptionStatus["EnabledOnProbation"] = 1] = "EnabledOnProbation"; +})(SubscriptionStatus = exports.SubscriptionStatus || (exports.SubscriptionStatus = {})); +/** + * Set of flags used to determine which set of templates is retrieved when querying for subscription templates + */ +var SubscriptionTemplateQueryFlags; +(function (SubscriptionTemplateQueryFlags) { + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["None"] = 0] = "None"; + /** + * Include user templates + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUser"] = 1] = "IncludeUser"; + /** + * Include group templates + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeGroup"] = 2] = "IncludeGroup"; + /** + * Include user and group templates + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeUserAndGroup"] = 4] = "IncludeUserAndGroup"; + /** + * Include the event type details like the fields and operators + */ + SubscriptionTemplateQueryFlags[SubscriptionTemplateQueryFlags["IncludeEventTypeInformation"] = 22] = "IncludeEventTypeInformation"; +})(SubscriptionTemplateQueryFlags = exports.SubscriptionTemplateQueryFlags || (exports.SubscriptionTemplateQueryFlags = {})); +var SubscriptionTemplateType; +(function (SubscriptionTemplateType) { + SubscriptionTemplateType[SubscriptionTemplateType["User"] = 0] = "User"; + SubscriptionTemplateType[SubscriptionTemplateType["Team"] = 1] = "Team"; + SubscriptionTemplateType[SubscriptionTemplateType["Both"] = 2] = "Both"; + SubscriptionTemplateType[SubscriptionTemplateType["None"] = 3] = "None"; +})(SubscriptionTemplateType = exports.SubscriptionTemplateType || (exports.SubscriptionTemplateType = {})); +exports.TypeInfo = { + ActorNotificationReason: {}, + BatchNotificationOperation: {}, + DefaultGroupDeliveryPreference: { + enumValues: { + "noDelivery": -1, + "eachMember": 2 + } + }, + EvaluationOperationStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "inProgress": 2, + "cancelled": 3, + "succeeded": 4, + "failed": 5, + "timedOut": 6, + "notFound": 7 + } + }, + EventBacklogStatus: {}, + EventProcessingLog: {}, + EventPublisherQueryFlags: { + enumValues: { + "none": 0, + "includeRemoteServices": 2 + } + }, + EventTypeQueryFlags: { + enumValues: { + "none": 0, + "includeFields": 1 + } + }, + INotificationDiagnosticLog: {}, + NotificationAdminSettings: {}, + NotificationAdminSettingsUpdateParameters: {}, + NotificationBacklogStatus: {}, + NotificationDeliveryLog: {}, + NotificationDiagnosticLog: {}, + NotificationEventBacklogStatus: {}, + NotificationEventField: {}, + NotificationEventFieldType: {}, + NotificationEventType: {}, + NotificationJobDiagnosticLog: {}, + NotificationOperation: { + enumValues: { + "none": 0, + "suspendUnprocessed": 1 + } + }, + NotificationReason: {}, + NotificationReasonType: { + enumValues: { + "unknown": 0, + "follows": 1, + "personal": 2, + "personalAlias": 3, + "directMember": 4, + "indirectMember": 5, + "groupAlias": 6, + "subscriptionAlias": 7, + "singleRole": 8, + "directMemberGroupRole": 9, + "inDirectMemberGroupRole": 10, + "aliasMemberGroupRole": 11 + } + }, + NotificationStatistic: {}, + NotificationStatisticsQuery: {}, + NotificationStatisticsQueryConditions: {}, + NotificationStatisticType: { + enumValues: { + "notificationBySubscription": 0, + "eventsByEventType": 1, + "notificationByEventType": 2, + "eventsByEventTypePerUser": 3, + "notificationByEventTypePerUser": 4, + "events": 5, + "notifications": 6, + "notificationFailureBySubscription": 7, + "unprocessedRangeStart": 100, + "unprocessedEventsByPublisher": 101, + "unprocessedEventDelayByPublisher": 102, + "unprocessedNotificationsByChannelByPublisher": 103, + "unprocessedNotificationDelayByChannelByPublisher": 104, + "delayRangeStart": 200, + "totalPipelineTime": 201, + "notificationPipelineTime": 202, + "eventPipelineTime": 203, + "hourlyRangeStart": 1000, + "hourlyNotificationBySubscription": 1001, + "hourlyEventsByEventTypePerUser": 1002, + "hourlyEvents": 1003, + "hourlyNotifications": 1004, + "hourlyUnprocessedEventsByPublisher": 1101, + "hourlyUnprocessedEventDelayByPublisher": 1102, + "hourlyUnprocessedNotificationsByChannelByPublisher": 1103, + "hourlyUnprocessedNotificationDelayByChannelByPublisher": 1104, + "hourlyTotalPipelineTime": 1201, + "hourlyNotificationPipelineTime": 1202, + "hourlyEventPipelineTime": 1203 + } + }, + NotificationSubscriber: {}, + NotificationSubscriberDeliveryPreference: { + enumValues: { + "noDelivery": -1, + "preferredEmailAddress": 1, + "eachMember": 2, + "useDefault": 3 + } + }, + NotificationSubscriberUpdateParameters: {}, + NotificationSubscription: {}, + NotificationSubscriptionTemplate: {}, + NotificationSubscriptionUpdateParameters: {}, + SubscriberFlags: { + enumValues: { + "none": 0, + "deliveryPreferencesEditable": 2, + "supportsPreferredEmailAddressDelivery": 4, + "supportsEachMemberDelivery": 8, + "supportsNoDelivery": 16, + "isUser": 32, + "isGroup": 64, + "isTeam": 128 + } + }, + SubscriptionDiagnostics: {}, + SubscriptionEvaluationRequest: {}, + SubscriptionEvaluationResult: {}, + SubscriptionFieldType: { + enumValues: { + "string": 1, + "integer": 2, + "dateTime": 3, + "plainText": 5, + "html": 7, + "treePath": 8, + "history": 9, + "double": 10, + "guid": 11, + "boolean": 12, + "identity": 13, + "picklistInteger": 14, + "picklistString": 15, + "picklistDouble": 16, + "teamProject": 17 + } + }, + SubscriptionFlags: { + enumValues: { + "none": 0, + "groupSubscription": 1, + "contributedSubscription": 2, + "canOptOut": 4, + "teamSubscription": 8, + "oneActorMatches": 16 + } + }, + SubscriptionPermissions: { + enumValues: { + "none": 0, + "view": 1, + "edit": 2, + "delete": 4 + } + }, + SubscriptionQuery: {}, + SubscriptionQueryCondition: {}, + SubscriptionQueryFlags: { + enumValues: { + "none": 0, + "includeInvalidSubscriptions": 2, + "includeDeletedSubscriptions": 4, + "includeFilterDetails": 8, + "alwaysReturnBasicInformation": 16, + "includeSystemSubscriptions": 32 + } + }, + SubscriptionStatus: { + enumValues: { + "jailedByNotificationsVolume": -200, + "pendingDeletion": -100, + "disabledArgumentException": -12, + "disabledProjectInvalid": -11, + "disabledMissingPermissions": -10, + "disabledFromProbation": -9, + "disabledInactiveIdentity": -8, + "disabledMessageQueueNotSupported": -7, + "disabledMissingIdentity": -6, + "disabledInvalidRoleExpression": -5, + "disabledInvalidPathClause": -4, + "disabledAsDuplicateOfDefault": -3, + "disabledByAdmin": -2, + "disabled": -1, + "enabled": 0, + "enabledOnProbation": 1 + } + }, + SubscriptionTemplateQueryFlags: { + enumValues: { + "none": 0, + "includeUser": 1, + "includeGroup": 2, + "includeUserAndGroup": 4, + "includeEventTypeInformation": 22 + } + }, + SubscriptionTemplateType: { + enumValues: { + "user": 0, + "team": 1, + "both": 2, + "none": 3 + } + }, + SubscriptionTraceDiagnosticLog: {}, + SubscriptionTraceEventProcessingLog: {}, + SubscriptionTraceNotificationDeliveryLog: {}, + SubscriptionTracing: {}, +}; +exports.TypeInfo.ActorNotificationReason.fields = { + notificationReasonType: { + enumType: exports.TypeInfo.NotificationReasonType + } +}; +exports.TypeInfo.BatchNotificationOperation.fields = { + notificationOperation: { + enumType: exports.TypeInfo.NotificationOperation + } +}; +exports.TypeInfo.EventBacklogStatus.fields = { + captureTime: { + isDate: true, + }, + lastEventBatchStartTime: { + isDate: true, + }, + lastEventProcessedTime: { + isDate: true, + }, + lastJobBatchStartTime: { + isDate: true, + }, + lastJobProcessedTime: { + isDate: true, + }, + oldestPendingEventTime: { + isDate: true, + } +}; +exports.TypeInfo.EventProcessingLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.INotificationDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationAdminSettings.fields = { + defaultGroupDeliveryPreference: { + enumType: exports.TypeInfo.DefaultGroupDeliveryPreference + } +}; +exports.TypeInfo.NotificationAdminSettingsUpdateParameters.fields = { + defaultGroupDeliveryPreference: { + enumType: exports.TypeInfo.DefaultGroupDeliveryPreference + } +}; +exports.TypeInfo.NotificationBacklogStatus.fields = { + captureTime: { + isDate: true, + }, + lastJobBatchStartTime: { + isDate: true, + }, + lastJobProcessedTime: { + isDate: true, + }, + lastNotificationBatchStartTime: { + isDate: true, + }, + lastNotificationProcessedTime: { + isDate: true, + }, + oldestPendingNotificationTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationDeliveryLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationEventBacklogStatus.fields = { + eventBacklogStatus: { + isArray: true, + typeInfo: exports.TypeInfo.EventBacklogStatus + }, + notificationBacklogStatus: { + isArray: true, + typeInfo: exports.TypeInfo.NotificationBacklogStatus + } +}; +exports.TypeInfo.NotificationEventField.fields = { + fieldType: { + typeInfo: exports.TypeInfo.NotificationEventFieldType + } +}; +exports.TypeInfo.NotificationEventFieldType.fields = { + subscriptionFieldType: { + enumType: exports.TypeInfo.SubscriptionFieldType + } +}; +exports.TypeInfo.NotificationEventType.fields = { + fields: { + isDictionary: true, + dictionaryValueTypeInfo: exports.TypeInfo.NotificationEventField + } +}; +exports.TypeInfo.NotificationJobDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.NotificationReason.fields = { + notificationReasonType: { + enumType: exports.TypeInfo.NotificationReasonType + } +}; +exports.TypeInfo.NotificationStatistic.fields = { + date: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.NotificationStatisticType + } +}; +exports.TypeInfo.NotificationStatisticsQuery.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.NotificationStatisticsQueryConditions + } +}; +exports.TypeInfo.NotificationStatisticsQueryConditions.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.NotificationStatisticType + } +}; +exports.TypeInfo.NotificationSubscriber.fields = { + deliveryPreference: { + enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference + }, + flags: { + enumType: exports.TypeInfo.SubscriberFlags + } +}; +exports.TypeInfo.NotificationSubscriberUpdateParameters.fields = { + deliveryPreference: { + enumType: exports.TypeInfo.NotificationSubscriberDeliveryPreference + } +}; +exports.TypeInfo.NotificationSubscription.fields = { + diagnostics: { + typeInfo: exports.TypeInfo.SubscriptionDiagnostics + }, + flags: { + enumType: exports.TypeInfo.SubscriptionFlags + }, + modifiedDate: { + isDate: true, + }, + permissions: { + enumType: exports.TypeInfo.SubscriptionPermissions + }, + status: { + enumType: exports.TypeInfo.SubscriptionStatus + } +}; +exports.TypeInfo.NotificationSubscriptionTemplate.fields = { + notificationEventInformation: { + typeInfo: exports.TypeInfo.NotificationEventType + }, + type: { + enumType: exports.TypeInfo.SubscriptionTemplateType + } +}; +exports.TypeInfo.NotificationSubscriptionUpdateParameters.fields = { + status: { + enumType: exports.TypeInfo.SubscriptionStatus + } +}; +exports.TypeInfo.SubscriptionDiagnostics.fields = { + deliveryResults: { + typeInfo: exports.TypeInfo.SubscriptionTracing + }, + deliveryTracing: { + typeInfo: exports.TypeInfo.SubscriptionTracing + }, + evaluationTracing: { + typeInfo: exports.TypeInfo.SubscriptionTracing + } +}; +exports.TypeInfo.SubscriptionEvaluationRequest.fields = { + minEventsCreatedDate: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionEvaluationResult.fields = { + evaluationJobStatus: { + enumType: exports.TypeInfo.EvaluationOperationStatus + } +}; +exports.TypeInfo.SubscriptionQuery.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.SubscriptionQueryCondition + }, + queryFlags: { + enumType: exports.TypeInfo.SubscriptionQueryFlags + } +}; +exports.TypeInfo.SubscriptionQueryCondition.fields = { + flags: { + enumType: exports.TypeInfo.SubscriptionFlags + } +}; +exports.TypeInfo.SubscriptionTraceDiagnosticLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionTraceEventProcessingLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionTraceNotificationDeliveryLog.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.SubscriptionTracing.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.d.ts new file mode 100644 index 0000000..662e20c --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.d.ts @@ -0,0 +1,174 @@ +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +/** + * The full policy configuration with settings. + */ +export interface PolicyConfiguration extends VersionedPolicyConfigurationRef { + /** + * The links to other objects related to this object. + */ + _links?: any; + /** + * A reference to the identity that created the policy. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The date and time when the policy was created. + */ + createdDate?: Date; + /** + * Indicates whether the policy is blocking. + */ + isBlocking: boolean; + /** + * Indicates whether the policy has been (soft) deleted. + */ + isDeleted?: boolean; + /** + * Indicates whether the policy is enabled. + */ + isEnabled: boolean; + /** + * If set, this policy requires "Manage Enterprise Policies" permission to create, edit, or delete. + */ + isEnterpriseManaged?: boolean; + /** + * The policy configuration settings. + */ + settings: any; +} +/** + * Policy configuration reference. + */ +export interface PolicyConfigurationRef { + /** + * The policy configuration ID. + */ + id?: number; + /** + * The policy configuration type. + */ + type?: PolicyTypeRef; + /** + * The URL where the policy configuration can be retrieved. + */ + url?: string; +} +/** + * This record encapsulates the current state of a policy as it applies to one specific pull request. Each pull request has a unique PolicyEvaluationRecord for each pull request which the policy applies to. + */ +export interface PolicyEvaluationRecord { + /** + * Links to other related objects + */ + _links?: any; + /** + * A string which uniquely identifies the target of a policy evaluation. + */ + artifactId?: string; + /** + * Time when this policy finished evaluating on this pull request. + */ + completedDate?: Date; + /** + * Contains all configuration data for the policy which is being evaluated. + */ + configuration?: PolicyConfiguration; + /** + * Internal context data of this policy evaluation. + */ + context?: any; + /** + * Guid which uniquely identifies this evaluation record (one policy running on one pull request). + */ + evaluationId?: string; + /** + * Time when this policy was first evaluated on this pull request. + */ + startedDate?: Date; + /** + * Status of the policy (Running, Approved, Failed, etc.) + */ + status?: PolicyEvaluationStatus; +} +/** + * Status of a policy which is running against a specific pull request. + */ +export declare enum PolicyEvaluationStatus { + /** + * The policy is either queued to run, or is waiting for some event before progressing. + */ + Queued = 0, + /** + * The policy is currently running. + */ + Running = 1, + /** + * The policy has been fulfilled for this pull request. + */ + Approved = 2, + /** + * The policy has rejected this pull request. + */ + Rejected = 3, + /** + * The policy does not apply to this pull request. + */ + NotApplicable = 4, + /** + * The policy has encountered an unexpected error. + */ + Broken = 5 +} +/** + * User-friendly policy type with description (used for querying policy types). + */ +export interface PolicyType extends PolicyTypeRef { + /** + * The links to other objects related to this object. + */ + _links?: any; + /** + * Detailed description of the policy type. + */ + description?: string; +} +/** + * Policy type reference. + */ +export interface PolicyTypeRef { + /** + * Display name of the policy type. + */ + displayName?: string; + /** + * The policy type ID. + */ + id: string; + /** + * The URL where the policy type can be retrieved. + */ + url?: string; +} +/** + * A particular revision for a policy configuration. + */ +export interface VersionedPolicyConfigurationRef extends PolicyConfigurationRef { + /** + * The policy configuration revision ID. + */ + revision?: number; +} +export declare var TypeInfo: { + PolicyConfiguration: any; + PolicyEvaluationRecord: any; + PolicyEvaluationStatus: { + enumValues: { + "queued": number; + "running": number; + "approved": number; + "rejected": number; + "notApplicable": number; + "broken": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.js b/node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.js new file mode 100644 index 0000000..d62b539 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/PolicyInterfaces.js @@ -0,0 +1,74 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Status of a policy which is running against a specific pull request. + */ +var PolicyEvaluationStatus; +(function (PolicyEvaluationStatus) { + /** + * The policy is either queued to run, or is waiting for some event before progressing. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Queued"] = 0] = "Queued"; + /** + * The policy is currently running. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Running"] = 1] = "Running"; + /** + * The policy has been fulfilled for this pull request. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Approved"] = 2] = "Approved"; + /** + * The policy has rejected this pull request. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Rejected"] = 3] = "Rejected"; + /** + * The policy does not apply to this pull request. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["NotApplicable"] = 4] = "NotApplicable"; + /** + * The policy has encountered an unexpected error. + */ + PolicyEvaluationStatus[PolicyEvaluationStatus["Broken"] = 5] = "Broken"; +})(PolicyEvaluationStatus = exports.PolicyEvaluationStatus || (exports.PolicyEvaluationStatus = {})); +exports.TypeInfo = { + PolicyConfiguration: {}, + PolicyEvaluationRecord: {}, + PolicyEvaluationStatus: { + enumValues: { + "queued": 0, + "running": 1, + "approved": 2, + "rejected": 3, + "notApplicable": 4, + "broken": 5 + } + }, +}; +exports.TypeInfo.PolicyConfiguration.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.PolicyEvaluationRecord.fields = { + completedDate: { + isDate: true, + }, + configuration: { + typeInfo: exports.TypeInfo.PolicyConfiguration + }, + startedDate: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.PolicyEvaluationStatus + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.d.ts new file mode 100644 index 0000000..eccceac --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.d.ts @@ -0,0 +1,136 @@ +export interface AttributeDescriptor { + attributeName: string; + containerName: string; +} +export interface AttributesContainer { + attributes: { + [key: string]: ProfileAttribute; + }; + containerName: string; + revision: number; +} +export interface Avatar { + isAutoGenerated: boolean; + size: AvatarSize; + timeStamp: Date; + value: number[]; +} +export declare enum AvatarSize { + Small = 0, + Medium = 1, + Large = 2 +} +export interface CoreProfileAttribute extends ProfileAttributeBase { +} +export interface Country { + code: string; + englishName: string; +} +export interface CreateProfileContext { + cIData: { + [key: string]: any; + }; + contactWithOffers: boolean; + countryName: string; + displayName: string; + emailAddress: string; + hasAccount: boolean; + language: string; + phoneNumber: string; +} +export interface GeoRegion { + regionCode: string; +} +export interface Profile { + applicationContainer: AttributesContainer; + coreAttributes: { + [key: string]: CoreProfileAttribute; + }; + coreRevision: number; + id: string; + revision: number; + timeStamp: Date; +} +export interface ProfileAttribute extends ProfileAttributeBase { +} +export interface ProfileAttributeBase { + descriptor: AttributeDescriptor; + revision: number; + timeStamp: Date; + value: T; +} +/** + * Country/region information + */ +export interface ProfileRegion { + /** + * The two-letter code defined in ISO 3166 for the country/region. + */ + code: string; + /** + * Localized country/region name + */ + name: string; +} +/** + * Container of country/region information + */ +export interface ProfileRegions { + /** + * List of country/region code with contact consent requirement type of notice + */ + noticeContactConsentRequirementRegions: string[]; + /** + * List of country/region code with contact consent requirement type of opt-out + */ + optOutContactConsentRequirementRegions: string[]; + /** + * List of country/regions + */ + regions: ProfileRegion[]; +} +export declare var TypeInfo: { + AttributeDescriptor: { + fields: any; + }; + AttributesContainer: { + fields: any; + }; + Avatar: { + fields: any; + }; + AvatarSize: { + enumValues: { + "small": number; + "medium": number; + "large": number; + }; + }; + CoreProfileAttribute: { + fields: any; + }; + Country: { + fields: any; + }; + CreateProfileContext: { + fields: any; + }; + GeoRegion: { + fields: any; + }; + Profile: { + fields: any; + }; + ProfileAttribute: { + fields: any; + }; + ProfileAttributeBase: { + fields: any; + }; + ProfileRegion: { + fields: any; + }; + ProfileRegions: { + fields: any; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.js b/node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.js new file mode 100644 index 0000000..5649d85 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ProfileInterfaces.js @@ -0,0 +1,117 @@ +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AvatarSize; +(function (AvatarSize) { + AvatarSize[AvatarSize["Small"] = 0] = "Small"; + AvatarSize[AvatarSize["Medium"] = 1] = "Medium"; + AvatarSize[AvatarSize["Large"] = 2] = "Large"; +})(AvatarSize = exports.AvatarSize || (exports.AvatarSize = {})); +exports.TypeInfo = { + AttributeDescriptor: { + fields: null + }, + AttributesContainer: { + fields: null + }, + Avatar: { + fields: null + }, + AvatarSize: { + enumValues: { + "small": 0, + "medium": 1, + "large": 2, + } + }, + CoreProfileAttribute: { + fields: null + }, + Country: { + fields: null + }, + CreateProfileContext: { + fields: null + }, + GeoRegion: { + fields: null + }, + Profile: { + fields: null + }, + ProfileAttribute: { + fields: null + }, + ProfileAttributeBase: { + fields: null + }, + ProfileRegion: { + fields: null + }, + ProfileRegions: { + fields: null + }, +}; +exports.TypeInfo.AttributeDescriptor.fields = {}; +exports.TypeInfo.AttributesContainer.fields = { + attributes: {}, +}; +exports.TypeInfo.Avatar.fields = { + size: { + enumType: exports.TypeInfo.AvatarSize + }, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.CoreProfileAttribute.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor + }, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.Country.fields = {}; +exports.TypeInfo.CreateProfileContext.fields = {}; +exports.TypeInfo.GeoRegion.fields = {}; +exports.TypeInfo.Profile.fields = { + applicationContainer: { + typeInfo: exports.TypeInfo.AttributesContainer + }, + coreAttributes: {}, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.ProfileAttribute.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor + }, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.ProfileAttributeBase.fields = { + descriptor: { + typeInfo: exports.TypeInfo.AttributeDescriptor + }, + timeStamp: { + isDate: true, + }, +}; +exports.TypeInfo.ProfileRegion.fields = {}; +exports.TypeInfo.ProfileRegions.fields = { + regions: { + isArray: true, + typeInfo: exports.TypeInfo.ProfileRegion + }, +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.d.ts new file mode 100644 index 0000000..d970f17 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.d.ts @@ -0,0 +1,78 @@ +export declare enum AggregationType { + Hourly = 0, + Daily = 1 +} +export interface AnalyzerDescriptor { + description?: string; + id: string; + majorVersion?: number; + minorVersion?: number; + name: string; + patchVersion?: number; +} +export interface CodeChangeTrendItem { + time?: Date; + value?: number; +} +export interface LanguageMetricsSecuredObject { + namespaceId?: string; + projectId?: string; + requiredPermissions?: number; +} +export interface LanguageStatistics extends LanguageMetricsSecuredObject { + bytes?: number; + files?: number; + filesPercentage?: number; + languagePercentage?: number; + name?: string; +} +export interface ProjectActivityMetrics { + authorsCount?: number; + codeChangesCount?: number; + codeChangesTrend?: CodeChangeTrendItem[]; + projectId?: string; + pullRequestsCompletedCount?: number; + pullRequestsCreatedCount?: number; +} +export interface ProjectLanguageAnalytics extends LanguageMetricsSecuredObject { + id?: string; + languageBreakdown?: LanguageStatistics[]; + repositoryLanguageAnalytics?: RepositoryLanguageAnalytics[]; + resultPhase?: ResultPhase; + url?: string; +} +export interface RepositoryActivityMetrics { + codeChangesCount?: number; + codeChangesTrend?: CodeChangeTrendItem[]; + repositoryId?: string; +} +export interface RepositoryLanguageAnalytics extends LanguageMetricsSecuredObject { + id?: string; + languageBreakdown?: LanguageStatistics[]; + name?: string; + resultPhase?: ResultPhase; + updatedTime?: Date; +} +export declare enum ResultPhase { + Preliminary = 0, + Full = 1 +} +export declare var TypeInfo: { + AggregationType: { + enumValues: { + "hourly": number; + "daily": number; + }; + }; + CodeChangeTrendItem: any; + ProjectActivityMetrics: any; + ProjectLanguageAnalytics: any; + RepositoryActivityMetrics: any; + RepositoryLanguageAnalytics: any; + ResultPhase: { + enumValues: { + "preliminary": number; + "full": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.js b/node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.js new file mode 100644 index 0000000..4e09634 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ProjectAnalysisInterfaces.js @@ -0,0 +1,74 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var AggregationType; +(function (AggregationType) { + AggregationType[AggregationType["Hourly"] = 0] = "Hourly"; + AggregationType[AggregationType["Daily"] = 1] = "Daily"; +})(AggregationType = exports.AggregationType || (exports.AggregationType = {})); +var ResultPhase; +(function (ResultPhase) { + ResultPhase[ResultPhase["Preliminary"] = 0] = "Preliminary"; + ResultPhase[ResultPhase["Full"] = 1] = "Full"; +})(ResultPhase = exports.ResultPhase || (exports.ResultPhase = {})); +exports.TypeInfo = { + AggregationType: { + enumValues: { + "hourly": 0, + "daily": 1 + } + }, + CodeChangeTrendItem: {}, + ProjectActivityMetrics: {}, + ProjectLanguageAnalytics: {}, + RepositoryActivityMetrics: {}, + RepositoryLanguageAnalytics: {}, + ResultPhase: { + enumValues: { + "preliminary": 0, + "full": 1 + } + }, +}; +exports.TypeInfo.CodeChangeTrendItem.fields = { + time: { + isDate: true, + } +}; +exports.TypeInfo.ProjectActivityMetrics.fields = { + codeChangesTrend: { + isArray: true, + typeInfo: exports.TypeInfo.CodeChangeTrendItem + } +}; +exports.TypeInfo.ProjectLanguageAnalytics.fields = { + repositoryLanguageAnalytics: { + isArray: true, + typeInfo: exports.TypeInfo.RepositoryLanguageAnalytics + }, + resultPhase: { + enumType: exports.TypeInfo.ResultPhase + } +}; +exports.TypeInfo.RepositoryActivityMetrics.fields = { + codeChangesTrend: { + isArray: true, + typeInfo: exports.TypeInfo.CodeChangeTrendItem + } +}; +exports.TypeInfo.RepositoryLanguageAnalytics.fields = { + resultPhase: { + enumType: exports.TypeInfo.ResultPhase + }, + updatedTime: { + isDate: true, + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.d.ts new file mode 100644 index 0000000..fba9714 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.d.ts @@ -0,0 +1,4431 @@ +import DistributedTaskCommonInterfaces = require("../interfaces/DistributedTaskCommonInterfaces"); +import FormInputInterfaces = require("../interfaces/common/FormInputInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface AgentArtifactDefinition { + /** + * Gets or sets the artifact definition alias. + */ + alias?: string; + /** + * Gets or sets the artifact type. + */ + artifactType?: AgentArtifactType; + /** + * Gets or sets the artifact definition details. + */ + details?: string; + /** + * Gets or sets the name of artifact definition. + */ + name?: string; + /** + * Gets or sets the version of artifact definition. + */ + version?: string; +} +export declare enum AgentArtifactType { + /** + * Indicates XamlBuild artifact + */ + XamlBuild = 0, + /** + * Indicates Build artifact + */ + Build = 1, + /** + * Indicates Jenkins artifact + */ + Jenkins = 2, + /** + * Indicates FileShare artifact + */ + FileShare = 3, + /** + * Indicates Nuget artifact + */ + Nuget = 4, + /** + * Indicates TfsOnPrem artifact + */ + TfsOnPrem = 5, + /** + * Indicates GitHub artifact + */ + GitHub = 6, + /** + * Indicates TFGit artifact + */ + TFGit = 7, + /** + * Indicates ExternalTfsBuild artifact + */ + ExternalTfsBuild = 8, + /** + * Indicates Custom artifact + */ + Custom = 9, + /** + * Indicates Tfvc artifact + */ + Tfvc = 10 +} +export interface AgentBasedDeployPhase extends DeployPhase { + /** + * Gets and sets the agent job deployment input + */ + deploymentInput?: AgentDeploymentInput; +} +export interface AgentDeploymentInput extends DeploymentInput { + /** + * Specification for an agent on which a job gets executed. + */ + agentSpecification?: AgentSpecification; + /** + * Gets or sets the image ID. + */ + imageId?: number; + /** + * Gets or sets the parallel execution input. + */ + parallelExecution?: ExecutionInput; +} +/** + * Represents a reference to an agent queue. + */ +export interface AgentPoolQueueReference extends ResourceReference { + /** + * The ID of the queue. + */ + id?: number; +} +/** + * Specification of the agent defined by the pool provider. + */ +export interface AgentSpecification { + /** + * Agent specification unique identifier. + */ + identifier?: string; +} +export declare enum ApprovalExecutionOrder { + /** + * Approvals shown before gates. + */ + BeforeGates = 1, + /** + * Approvals shown after successful execution of gates. + */ + AfterSuccessfulGates = 2, + /** + * Approvals shown always after execution of gates. + */ + AfterGatesAlways = 4 +} +export declare enum ApprovalFilters { + /** + * No approvals or approval snapshots. + */ + None = 0, + /** + * Manual approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). + */ + ManualApprovals = 1, + /** + * Automated approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). + */ + AutomatedApprovals = 2, + /** + * No approval steps, but approval snapshots (Use with either ManualApprovals or AutomatedApprovals for approval steps). + */ + ApprovalSnapshots = 4, + /** + * All approval steps and approval snapshots. + */ + All = 7 +} +export interface ApprovalOptions { + /** + * Specify whether the approval can be skipped if the same approver approved the previous stage. + */ + autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped?: boolean; + /** + * Specify whether revalidate identity of approver before completing the approval. + */ + enforceIdentityRevalidation?: boolean; + /** + * Approvals execution order. + */ + executionOrder?: ApprovalExecutionOrder; + /** + * Specify whether the user requesting a release or deployment should allow to approver. + */ + releaseCreatorCanBeApprover?: boolean; + /** + * The number of approvals required to move release forward. '0' means all approvals required. + */ + requiredApproverCount?: number; + /** + * Approval timeout. Approval default timeout is 30 days. Maximum allowed timeout is 365 days. '0' means default timeout i.e 30 days. + */ + timeoutInMinutes?: number; +} +export declare enum ApprovalStatus { + /** + * Indicates the approval does not have the status set. + */ + Undefined = 0, + /** + * Indicates the approval is pending. + */ + Pending = 1, + /** + * Indicates the approval is approved. + */ + Approved = 2, + /** + * Indicates the approval is rejected. + */ + Rejected = 4, + /** + * Indicates the approval is reassigned. + */ + Reassigned = 6, + /** + * Indicates the approval is canceled. + */ + Canceled = 7, + /** + * Indicates the approval is skipped. + */ + Skipped = 8 +} +export declare enum ApprovalType { + /** + * Indicates the approval type does not set. + */ + Undefined = 0, + /** + * Indicates the approvals which executed before deployment. + */ + PreDeploy = 1, + /** + * Indicates the approvals which executed after deployment. + */ + PostDeploy = 2, + /** + * Indicates all approvals. + */ + All = 3 +} +export interface Artifact { + /** + * Gets or sets alias. + */ + alias?: string; + /** + * Gets or sets definition reference. e.g. {"project":{"id":"fed755ea-49c5-4399-acea-fd5b5aa90a6c","name":"myProject"},"definition":{"id":"1","name":"mybuildDefinition"},"connection":{"id":"1","name":"myConnection"}}. + */ + definitionReference?: { + [key: string]: ArtifactSourceReference; + }; + /** + * Indicates whether artifact is primary or not. + */ + isPrimary?: boolean; + /** + * Indicates whether artifact is retained by release or not. + */ + isRetained?: boolean; + sourceId?: string; + /** + * Gets or sets type. It can have value as 'Build', 'Jenkins', 'GitHub', 'Nuget', 'Team Build (external)', 'ExternalTFSBuild', 'Git', 'TFVC', 'ExternalTfsXamlBuild'. + */ + type?: string; +} +export interface ArtifactContributionDefinition { + artifactTriggerConfiguration?: ArtifactTriggerConfiguration; + artifactType?: string; + artifactTypeStreamMapping?: { + [key: string]: string; + }; + browsableArtifactTypeMapping?: { + [key: string]: string; + }; + dataSourceBindings?: DataSourceBinding[]; + displayName?: string; + downloadTaskId?: string; + endpointTypeId?: string; + inputDescriptors?: FormInputInterfaces.InputDescriptor[]; + isCommitsTraceabilitySupported?: boolean; + isWorkitemsTraceabilitySupported?: boolean; + name?: string; + taskInputMapping?: { + [key: string]: string; + }; + uniqueSourceIdentifier?: string; +} +export interface ArtifactDownloadInputBase { + /** + * Gets or sets the alias of artifact. + */ + alias?: string; + /** + * Gets or sets the name of artifact definition. Valid values are 'Skip', 'Selective', 'All'. + */ + artifactDownloadMode?: string; + /** + * Gets or sets the artifact items of the input. + */ + artifactItems?: string[]; + /** + * Gets or sets the type of artifact. + */ + artifactType?: string; +} +export interface ArtifactFilter { + /** + * Gets or sets whether a release should be created on build tagging. + */ + createReleaseOnBuildTagging?: boolean; + /** + * Gets or sets the branch for the filter. + */ + sourceBranch?: string; + /** + * Gets or sets the regex based tag filter. + */ + tagFilter?: TagFilter; + /** + * Gets or sets the list of tags for the filter. + */ + tags?: string[]; + /** + * Gets or sets whether filter should default to build definition branch. + */ + useBuildDefinitionBranch?: boolean; +} +export interface ArtifactInstanceData { + accountName?: string; + authenticationToken?: string; + tfsUrl?: string; + version?: string; +} +export interface ArtifactMetadata { + /** + * Sets alias of artifact. + */ + alias?: string; + /** + * Sets instance reference of artifact. e.g. for build artifact it is build number. + */ + instanceReference?: BuildVersion; +} +export interface ArtifactProvider { + /** + * Gets or sets the id of artifact provider. + */ + id?: number; + /** + * Gets or sets the name of artifact provider. + */ + name?: string; + /** + * Gets or sets the link of artifact provider. + */ + sourceUri?: string; + /** + * Gets or sets the version of artifact provider. + */ + version?: string; +} +export interface ArtifactsDownloadInput { + downloadInputs?: ArtifactDownloadInputBase[]; +} +export interface ArtifactSourceId { + /** + * Gets or sets the artifact type of artifact source. + */ + artifactTypeId?: string; + /** + * Gets or sets the list of sourceIdInput of artifact source. + */ + sourceIdInputs?: SourceIdInput[]; +} +export interface ArtifactSourceIdsQueryResult { + /** + * Gets or sets the list of artifactsourceIds. + */ + artifactSourceIds?: ArtifactSourceId[]; +} +export interface ArtifactSourceReference { + /** + * ID of the artifact source. + */ + id?: string; + /** + * Name of the artifact source. + */ + name?: string; +} +export interface ArtifactSourceTrigger extends ReleaseTriggerBase { + /** + * Artifact source alias for Artifact Source trigger type + */ + artifactAlias?: string; + triggerConditions?: ArtifactFilter[]; +} +export interface ArtifactTriggerConfiguration { + /** + * Gets or sets the whether trigger is supported or not. + */ + isTriggerSupported?: boolean; + /** + * Gets or sets the whether trigger is supported only on hosted environment. + */ + isTriggerSupportedOnlyInHosted?: boolean; + /** + * Gets or sets the whether webhook is supported at server level. + */ + isWebhookSupportedAtServerLevel?: boolean; + /** + * Gets or sets the payload hash header name for the artifact trigger configuration. + */ + payloadHashHeaderName?: string; + /** + * Gets or sets the resources for artifact trigger configuration. + */ + resources?: { + [key: string]: string; + }; + /** + * Gets or sets the webhook payload mapping for artifact trigger configuration. + */ + webhookPayloadMapping?: { + [key: string]: string; + }; +} +export interface ArtifactTypeDefinition { + /** + * Gets or sets the artifact trigger configuration of artifact type definition. + */ + artifactTriggerConfiguration?: ArtifactTriggerConfiguration; + /** + * Gets or sets the artifact type of artifact type definition. Valid values are 'Build', 'Package', 'Source' or 'ContainerImage'. + */ + artifactType?: string; + /** + * Gets or sets the display name of artifact type definition. + */ + displayName?: string; + /** + * Gets or sets the endpoint type id of artifact type definition. + */ + endpointTypeId?: string; + /** + * Gets or sets the input descriptors of artifact type definition. + */ + inputDescriptors?: FormInputInterfaces.InputDescriptor[]; + /** + * Gets or sets the is commits tracebility supported value of artifact type defintion. + */ + isCommitsTraceabilitySupported?: boolean; + /** + * Gets or sets the is workitems tracebility supported value of artifact type defintion. + */ + isWorkitemsTraceabilitySupported?: boolean; + /** + * Gets or sets the name of artifact type definition. + */ + name?: string; + /** + * Gets or sets the unique source identifier of artifact type definition. + */ + uniqueSourceIdentifier?: string; +} +export interface ArtifactVersion { + /** + * Gets or sets the alias of artifact. + */ + alias?: string; + /** + * Gets or sets the default version of artifact. + */ + defaultVersion?: BuildVersion; + /** + * Gets or sets the error message encountered during querying of versions for artifact. + */ + errorMessage?: string; + sourceId?: string; + /** + * Gets or sets the list of build versions of artifact. + */ + versions?: BuildVersion[]; +} +export interface ArtifactVersionQueryResult { + /** + * Gets or sets the list for artifact versions of artifact version query result. + */ + artifactVersions?: ArtifactVersion[]; +} +export declare enum AuditAction { + /** + * Indicates the audit add. + */ + Add = 1, + /** + * Indicates the audit update. + */ + Update = 2, + /** + * Indicates the audit delete. + */ + Delete = 3, + /** + * Indicates the audit undelete. + */ + Undelete = 4 +} +export declare enum AuthorizationHeaderFor { + RevalidateApproverIdentity = 0, + OnBehalfOf = 1 +} +export interface AutoTriggerIssue { + issue?: Issue; + issueSource?: IssueSource; + project?: ProjectReference; + releaseDefinitionReference?: ReleaseDefinitionShallowReference; + releaseTriggerType?: ReleaseTriggerType; +} +export interface AzureKeyVaultVariableGroupProviderData extends VariableGroupProviderData { + /** + * Gets or sets last refreshed time. + */ + lastRefreshedOn?: Date; + /** + * Gets or sets the service endpoint ID. + */ + serviceEndpointId?: string; + /** + * Gets or sets the vault name. + */ + vault?: string; +} +export interface AzureKeyVaultVariableValue extends VariableValue { + /** + * Gets or sets the content type of key vault variable value. + */ + contentType?: string; + /** + * Indicates the vault variable value enabled or not. + */ + enabled?: boolean; + /** + * Gets or sets the expire time of key vault variable value. + */ + expires?: Date; +} +export interface BaseDeploymentInput { + /** + * Gets or sets the job condition. + */ + condition?: string; + /** + * Gets or sets the job cancel timeout in minutes for deployment which are cancelled by user for this release environment. + */ + jobCancelTimeoutInMinutes?: number; + /** + * Gets or sets the override inputs. + */ + overrideInputs?: { + [key: string]: string; + }; + /** + * Gets or sets the job execution timeout in minutes for deployment which are queued against this release environment. + */ + timeoutInMinutes?: number; +} +export interface BuildArtifactDownloadInput extends ArtifactDownloadInputBase { +} +export interface BuildVersion { + /** + * Gets or sets the commit message for the artifact. + */ + commitMessage?: string; + /** + * Gets or sets the definition id. + */ + definitionId?: string; + /** + * Gets or sets the definition name. + */ + definitionName?: string; + /** + * Gets or sets the build id. + */ + id?: string; + /** + * Gets or sets if the artifact supports multiple definitions. + */ + isMultiDefinitionType?: boolean; + /** + * Gets or sets the build number. + */ + name?: string; + /** + * Gets or sets the source branch for the artifact. + */ + sourceBranch?: string; + /** + * Gets or sets the source pull request version for the artifact. + */ + sourcePullRequestVersion?: SourcePullRequestVersion; + /** + * Gets or sets the repository id for the artifact. + */ + sourceRepositoryId?: string; + /** + * Gets or sets the repository type for the artifact. + */ + sourceRepositoryType?: string; + /** + * Gets or sets the source version for the artifact. + */ + sourceVersion?: string; +} +/** + * Represents a change associated with a build. + */ +export interface Change { + /** + * The author of the change. + */ + author?: VSSInterfaces.IdentityRef; + /** + * The type of source. "TfsVersionControl", "TfsGit", etc. + */ + changeType?: string; + /** + * The location of a user-friendly representation of the resource. + */ + displayUri?: string; + /** + * Something that identifies the change. For a commit, this would be the SHA1. For a TFVC changeset, this would be the changeset id. + */ + id?: string; + /** + * The location of the full representation of the resource. + */ + location?: string; + /** + * A description of the change. This might be a commit message or changeset description. + */ + message?: string; + /** + * The person or process that pushed the change. + */ + pushedBy?: VSSInterfaces.IdentityRef; + /** + * The person or process that pushed the change. + */ + pusher?: string; + /** + * A timestamp for the change. + */ + timestamp?: Date; +} +export interface CodeRepositoryReference { + /** + * Gets and sets the repository references. + */ + repositoryReference?: { + [key: string]: ReleaseManagementInputValue; + }; + /** + * It can have value as ‘GitHub’, ‘Vsts’. + */ + systemType?: PullRequestSystemType; +} +export interface ComplianceSettings { + /** + * Scan the release definition for secrets + */ + checkForCredentialsAndOtherSecrets?: boolean; +} +export interface Condition { + /** + * Gets or sets the condition type. + */ + conditionType?: ConditionType; + /** + * Gets or sets the name of the condition. e.g. 'ReleaseStarted'. + */ + name?: string; + /** + * Gets or set value of the condition. + */ + value?: string; +} +export declare enum ConditionType { + /** + * The condition type is undefined. + */ + Undefined = 0, + /** + * The condition type is event. + */ + Event = 1, + /** + * The condition type is environment state. + */ + EnvironmentState = 2, + /** + * The condition type is artifact. + */ + Artifact = 4 +} +export interface ConfigurationVariableValue { + /** + * Gets and sets if a variable can be overridden at deployment time or not. + */ + allowOverride?: boolean; + /** + * Gets or sets as variable is secret or not. + */ + isSecret?: boolean; + /** + * Gets and sets value of the configuration variable. + */ + value?: string; +} +export interface Consumer { + /** + * ID of the consumer. + */ + consumerId?: number; + /** + * Name of the consumer. + */ + consumerName?: string; +} +export interface ContainerImageTrigger extends ReleaseTriggerBase { + /** + * Alias of the trigger. + */ + alias?: string; + /** + * List tag filters applied while trigger. + */ + tagFilters?: TagFilter[]; +} +export interface ContinuousDeploymentTriggerIssue extends AutoTriggerIssue { + /** + * Artifact type. + */ + artifactType?: string; + /** + * ArtifactVersion ID. + */ + artifactVersionId?: string; + /** + * Artifact source ID. + */ + sourceId?: string; +} +export interface ControlOptions { + /** + * Always run the job. + */ + alwaysRun?: boolean; + /** + * Indicates whether to continue job on error or not. + */ + continueOnError?: boolean; + /** + * Indicates the job enabled or not. + */ + enabled?: boolean; +} +export interface CustomArtifactDownloadInput extends ArtifactDownloadInputBase { +} +export interface DataSourceBinding { + /** + * Pagination format supported by this data source(ContinuationToken/SkipTop). + */ + callbackContextTemplate?: string; + /** + * Subsequent calls needed? + */ + callBackRequiredTemplate?: string; + /** + * Name of the datasource. + */ + dataSourceName?: string; + /** + * Endpoint ID of the datasource. + */ + endpointId?: string; + /** + * Endpoint URL of the datasource. + */ + endpointUrl?: string; + /** + * Defines the initial value of the query params + */ + initialContextTemplate?: string; + /** + * Parameters of the datasource. + */ + parameters?: { + [key: string]: string; + }; + /** + * Gets or sets http request body + */ + requestContent?: string; + /** + * Gets or sets http request verb + */ + requestVerb?: string; + /** + * Result selector applied on output of datasource result, for example jsonpath:$.value[?(@.properties.isEnabled == true)]. + */ + resultSelector?: string; + /** + * Format of the return results, for example. { "Value" : "{{{id}}}", "DisplayValue" : "{{{name}}}" }. + */ + resultTemplate?: string; + /** + * Target of the datasource. + */ + target?: string; +} +export interface DefinitionEnvironmentReference { + /** + * Definition environment ID. + */ + definitionEnvironmentId?: number; + /** + * Definition environment name. + */ + definitionEnvironmentName?: string; + /** + * ReleaseDefinition ID. + */ + releaseDefinitionId?: number; + /** + * ReleaseDefinition name. + */ + releaseDefinitionName?: string; +} +export interface Demand { + /** + * Gets and sets the name of demand. + */ + name?: string; + /** + * Gets and sets the value of demand. + */ + value?: string; +} +export interface Deployment { + /** + * Gets links to access the deployment. + */ + _links?: any; + /** + * Gets attempt number. + */ + attempt?: number; + /** + * Gets the date on which deployment is complete. + */ + completedOn?: Date; + /** + * Gets the list of condition associated with deployment. + */ + conditions?: Condition[]; + /** + * Gets release definition environment id. + */ + definitionEnvironmentId?: number; + /** + * Gets status of the deployment. + */ + deploymentStatus?: DeploymentStatus; + /** + * Gets the unique identifier for deployment. + */ + id?: number; + /** + * Gets the identity who last modified the deployment. + */ + lastModifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets the date on which deployment is last modified. + */ + lastModifiedOn?: Date; + /** + * Gets operation status of deployment. + */ + operationStatus?: DeploymentOperationStatus; + /** + * Gets list of PostDeployApprovals. + */ + postDeployApprovals?: ReleaseApproval[]; + /** + * Gets list of PreDeployApprovals. + */ + preDeployApprovals?: ReleaseApproval[]; + /** + * Gets or sets project reference. + */ + projectReference?: ProjectReference; + /** + * Gets the date on which deployment is queued. + */ + queuedOn?: Date; + /** + * Gets reason of deployment. + */ + reason?: DeploymentReason; + /** + * Gets the reference of release. + */ + release?: ReleaseReference; + /** + * Gets releaseDefinitionReference which specifies the reference of the release definition to which the deployment is associated. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + /** + * Gets releaseEnvironmentReference which specifies the reference of the release environment to which the deployment is associated. + */ + releaseEnvironment?: ReleaseEnvironmentShallowReference; + /** + * Gets the identity who requested. + */ + requestedBy?: VSSInterfaces.IdentityRef; + /** + * Gets the identity for whom deployment is requested. + */ + requestedFor?: VSSInterfaces.IdentityRef; + /** + * Gets the date on which deployment is scheduled. + */ + scheduledDeploymentTime?: Date; + /** + * Gets the date on which deployment is started. + */ + startedOn?: Date; +} +export interface DeploymentApprovalCompletedEvent extends DeploymentEvent { + approval?: ReleaseApproval; + project?: ProjectReference; + release?: Release; +} +export interface DeploymentApprovalPendingEvent extends DeploymentEvent { + approval?: ReleaseApproval; + approvalOptions?: ApprovalOptions; + completedApprovals?: ReleaseApproval[]; + data?: { + [key: string]: any; + }; + deployment?: Deployment; + isMultipleRankApproval?: boolean; + pendingApprovals?: ReleaseApproval[]; + project?: ProjectReference; + release?: Release; +} +export interface DeploymentAttempt { + /** + * Deployment attempt. + */ + attempt?: number; + /** + * ID of the deployment. + */ + deploymentId?: number; + /** + * Error log to show any unexpected error that occurred during executing deploy step + */ + errorLog?: string; + /** + * Specifies whether deployment has started or not. + */ + hasStarted?: boolean; + /** + * ID of deployment. + */ + id?: number; + /** + * All the issues related to the deployment. + */ + issues?: Issue[]; + job?: ReleaseTask; + /** + * Identity who last modified this deployment. + */ + lastModifiedBy?: VSSInterfaces.IdentityRef; + /** + * Time when this deployment last modified. + */ + lastModifiedOn?: Date; + /** + * Deployment operation status. + */ + operationStatus?: DeploymentOperationStatus; + /** + * Post deployment gates that executed in this deployment. + */ + postDeploymentGates?: ReleaseGates; + /** + * Pre deployment gates that executed in this deployment. + */ + preDeploymentGates?: ReleaseGates; + /** + * When this deployment queued on. + */ + queuedOn?: Date; + /** + * Reason for the deployment. + */ + reason?: DeploymentReason; + /** + * List of release deployphases executed in this deployment. + */ + releaseDeployPhases?: ReleaseDeployPhase[]; + /** + * Identity who requested this deployment. + */ + requestedBy?: VSSInterfaces.IdentityRef; + /** + * Identity for this deployment requested. + */ + requestedFor?: VSSInterfaces.IdentityRef; + runPlanId?: string; + /** + * status of the deployment. + */ + status?: DeploymentStatus; + tasks?: ReleaseTask[]; +} +export interface DeploymentAuthorizationInfo { + /** + * Authorization header type, typically either RevalidateApproverIdentity or OnBehalfOf. + */ + authorizationHeaderFor?: AuthorizationHeaderFor; + /** + * List of resources. + */ + resources?: string[]; + /** + * ID of the tenant. + */ + tenantId?: string; + /** + * Access token key. + */ + vstsAccessTokenKey?: string; +} +export declare enum DeploymentAuthorizationOwner { + Automatic = 0, + DeploymentSubmitter = 1, + FirstPreDeploymentApprover = 2 +} +export interface DeploymentCompletedEvent extends DeploymentEvent { + comment?: string; + data?: { + [key: string]: any; + }; + deployment?: Deployment; + environment?: ReleaseEnvironment; + project?: ProjectReference; +} +export interface DeploymentEvent extends ReleaseEvent { + attemptId?: number; + stageName?: string; +} +export declare enum DeploymentExpands { + All = 0, + DeploymentOnly = 1, + Approvals = 2, + Artifacts = 4 +} +export interface DeploymentInput extends BaseDeploymentInput { + /** + * Artifacts that downloaded during job execution. + */ + artifactsDownloadInput?: ArtifactsDownloadInput; + /** + * List demands that needs to meet to execute the job. + */ + demands?: Demand[]; + /** + * Indicates whether to include access token in deployment job or not. + */ + enableAccessToken?: boolean; + /** + * Id of the pool on which job get executed. + */ + queueId?: number; + /** + * Indicates whether artifacts downloaded while job execution or not. + */ + skipArtifactsDownload?: boolean; +} +export interface DeploymentJob { + /** + * Parent task of all executed tasks. + */ + job?: ReleaseTask; + /** + * List of executed tasks with in job. + */ + tasks?: ReleaseTask[]; +} +export interface DeploymentManualInterventionPendingEvent { + deployment?: Deployment; + emailRecipients?: string[]; + environmentOwner?: VSSInterfaces.IdentityRef; + manualIntervention?: ManualIntervention; + project?: ProjectReference; + release?: Release; +} +export declare enum DeploymentOperationStatus { + /** + * The deployment operation status is undefined. + */ + Undefined = 0, + /** + * The deployment operation status is queued. + */ + Queued = 1, + /** + * The deployment operation status is scheduled. + */ + Scheduled = 2, + /** + * The deployment operation status is pending. + */ + Pending = 4, + /** + * The deployment operation status is approved. + */ + Approved = 8, + /** + * The deployment operation status is rejected. + */ + Rejected = 16, + /** + * The deployment operation status is deferred. + */ + Deferred = 32, + /** + * The deployment operation status is queued for agent. + */ + QueuedForAgent = 64, + /** + * The deployment operation status is phase in progress. + */ + PhaseInProgress = 128, + /** + * The deployment operation status is phase succeeded. + */ + PhaseSucceeded = 256, + /** + * The deployment operation status is phase partially succeeded. + */ + PhasePartiallySucceeded = 512, + /** + * The deployment operation status is phase failed. + */ + PhaseFailed = 1024, + /** + * The deployment operation status is canceled. + */ + Canceled = 2048, + /** + * The deployment operation status is phase canceled. + */ + PhaseCanceled = 4096, + /** + * The deployment operation status is manualintervention pending. + */ + ManualInterventionPending = 8192, + /** + * The deployment operation status is queued for pipeline. + */ + QueuedForPipeline = 16384, + /** + * The deployment operation status is cancelling. + */ + Cancelling = 32768, + /** + * The deployment operation status is EvaluatingGates. + */ + EvaluatingGates = 65536, + /** + * The deployment operation status is GateFailed. + */ + GateFailed = 131072, + /** + * The deployment operation status is all. + */ + All = 258047 +} +export interface DeploymentQueryParameters { + /** + * Query deployments based specified artifact source id. + */ + artifactSourceId?: string; + /** + * Query deployments based specified artifact type id. + */ + artifactTypeId?: string; + /** + * Query deployments based specified artifact versions. + */ + artifactVersions?: string[]; + /** + * Query deployments number of deployments per environment. + */ + deploymentsPerEnvironment?: number; + /** + * Query deployment based on deployment status. + */ + deploymentStatus?: DeploymentStatus; + /** + * Query deployments of specified environments. + */ + environments?: DefinitionEnvironmentReference[]; + /** + * Query deployments based specified expands. + */ + expands?: DeploymentExpands; + /** + * Specify deleted deployments should return or not. + */ + isDeleted?: boolean; + latestDeploymentsOnly?: boolean; + maxDeploymentsPerEnvironment?: number; + maxModifiedTime?: Date; + minModifiedTime?: Date; + /** + * Query deployment based on deployment operation status. + */ + operationStatus?: DeploymentOperationStatus; + queryOrder?: ReleaseQueryOrder; + /** + * Query deployments based query type. + */ + queryType?: DeploymentsQueryType; + /** + * Query deployments based specified source branch. + */ + sourceBranch?: string; +} +export declare enum DeploymentReason { + /** + * The deployment reason is none. + */ + None = 0, + /** + * The deployment reason is manual. + */ + Manual = 1, + /** + * The deployment reason is automated. + */ + Automated = 2, + /** + * The deployment reason is scheduled. + */ + Scheduled = 4, + /** + * The deployment reason is RedeployTrigger. + */ + RedeployTrigger = 8 +} +export declare enum DeploymentsQueryType { + Regular = 1, + FailingSince = 2 +} +export interface DeploymentStartedEvent extends DeploymentEvent { + environment?: ReleaseEnvironment; + project?: ProjectReference; + release?: Release; +} +export declare enum DeploymentStatus { + /** + * The deployment status is undefined. + */ + Undefined = 0, + /** + * The deployment status is not deployed. + */ + NotDeployed = 1, + /** + * The deployment status is in progress. + */ + InProgress = 2, + /** + * The deployment status is succeeded. + */ + Succeeded = 4, + /** + * The deployment status is partiallysucceeded. + */ + PartiallySucceeded = 8, + /** + * The deployment status is failed. + */ + Failed = 16, + /** + * The deployment status is all. + */ + All = 31 +} +export interface DeployPhase { + /** + * Gets and sets the name of deploy phase. + */ + name?: string; + /** + * Indicates the deploy phase type. + */ + phaseType?: DeployPhaseTypes; + /** + * Gets and sets the rank of deploy phase. + */ + rank?: number; + /** + * Gets and sets the reference name of deploy phase. + */ + refName?: string; + /** + * Gets and sets the workflow tasks for the deploy phase. + */ + workflowTasks?: WorkflowTask[]; +} +export declare enum DeployPhaseStatus { + /** + * Phase status not set. + */ + Undefined = 0, + /** + * Phase execution not started. + */ + NotStarted = 1, + /** + * Phase execution in progress. + */ + InProgress = 2, + /** + * Phase execution partially succeeded. + */ + PartiallySucceeded = 4, + /** + * Phase execution succeeded. + */ + Succeeded = 8, + /** + * Phase execution failed. + */ + Failed = 16, + /** + * Phase execution canceled. + */ + Canceled = 32, + /** + * Phase execution skipped. + */ + Skipped = 64, + /** + * Phase is in cancelling state. + */ + Cancelling = 128 +} +export declare enum DeployPhaseTypes { + /** + * Phase type not defined. Don't use this. + */ + Undefined = 0, + /** + * Phase type which contains tasks executed on agent. + */ + AgentBasedDeployment = 1, + /** + * Phase type which contains tasks executed by server. + */ + RunOnServer = 2, + /** + * Phase type which contains tasks executed on deployment group machines. + */ + MachineGroupBasedDeployment = 4, + /** + * Phase type which contains tasks which acts as Gates for the deployment to go forward. + */ + DeploymentGates = 8 +} +export interface EmailRecipients { + /** + * List of email addresses. + */ + emailAddresses?: string[]; + /** + * List of TFS IDs guids. + */ + tfsIds?: string[]; +} +/** + * Defines policy on environment queuing at Release Management side queue. We will send to Environment Runner [creating pre-deploy and other steps] only when the policies mentioned are satisfied. + */ +export interface EnvironmentExecutionPolicy { + /** + * This policy decides, how many environments would be with Environment Runner. + */ + concurrencyCount?: number; + /** + * Queue depth in the EnvironmentQueue table, this table keeps the environment entries till Environment Runner is free [as per it's policy] to take another environment for running. + */ + queueDepthCount?: number; +} +export interface EnvironmentOptions { + /** + * Gets and sets as the auto link workitems or not. + */ + autoLinkWorkItems?: boolean; + /** + * Gets and sets as the badge enabled or not. + */ + badgeEnabled?: boolean; + emailNotificationType?: string; + emailRecipients?: string; + enableAccessToken?: boolean; + /** + * Gets and sets as the publish deployment status or not. + */ + publishDeploymentStatus?: boolean; + /** + * Gets and sets as the.pull request deployment enabled or not. + */ + pullRequestDeploymentEnabled?: boolean; + skipArtifactsDownload?: boolean; + timeoutInMinutes?: number; +} +export interface EnvironmentRetentionPolicy { + /** + * Gets and sets the number of days to keep environment. + */ + daysToKeep?: number; + /** + * Gets and sets the number of releases to keep. + */ + releasesToKeep?: number; + /** + * Gets and sets as the build to be retained or not. + */ + retainBuild?: boolean; +} +export declare enum EnvironmentStatus { + /** + * Environment status not set. + */ + Undefined = 0, + /** + * Environment is in not started state. + */ + NotStarted = 1, + /** + * Environment is in progress state. + */ + InProgress = 2, + /** + * Environment is in succeeded state. + */ + Succeeded = 4, + /** + * Environment is in canceled state. + */ + Canceled = 8, + /** + * Environment is in rejected state. + */ + Rejected = 16, + /** + * Environment is in queued state. + */ + Queued = 32, + /** + * Environment is in scheduled state. + */ + Scheduled = 64, + /** + * Environment is in partially succeeded state. + */ + PartiallySucceeded = 128 +} +export interface EnvironmentTrigger { + /** + * Definition environment ID on which this trigger applicable. + */ + definitionEnvironmentId?: number; + /** + * ReleaseDefinition ID on which this trigger applicable. + */ + releaseDefinitionId?: number; + /** + * Gets or sets the trigger content. + */ + triggerContent?: string; + /** + * Gets or sets the trigger type. + */ + triggerType?: EnvironmentTriggerType; +} +export interface EnvironmentTriggerContent { + /** + * Gets or sets action. + */ + action?: string; + /** + * Gets or sets list of event types. + */ + eventTypes?: string[]; +} +export declare enum EnvironmentTriggerType { + /** + * Environment trigger type undefined. + */ + Undefined = 0, + /** + * Environment trigger type is deployment group redeploy. + */ + DeploymentGroupRedeploy = 1, + /** + * Environment trigger type is Rollback. + */ + RollbackRedeploy = 2 +} +export interface ExecutionInput { + /** + * Parallel execution type, for example MultiConfiguration or MultiMachine. + */ + parallelExecutionType?: ParallelExecutionTypes; +} +/** + * Class to represent favorite entry. + */ +export interface FavoriteItem { + /** + * Application specific data for the entry. + */ + data?: string; + /** + * Unique Id of the the entry. + */ + id?: string; + /** + * Display text for favorite entry. + */ + name?: string; + /** + * Application specific favorite entry type. Empty or Null represents that Favorite item is a Folder. + */ + type?: string; +} +export interface Folder { + /** + * Identity who created this folder. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Time when this folder created. + */ + createdOn?: Date; + /** + * Description of the folder. + */ + description?: string; + /** + * Identity who last changed this folder. + */ + lastChangedBy?: VSSInterfaces.IdentityRef; + /** + * Time when this folder last changed. + */ + lastChangedDate?: Date; + /** + * path of the folder. + */ + path?: string; +} +export declare enum FolderPathQueryOrder { + /** + * No order. + */ + None = 0, + /** + * Order by folder name and path ascending. + */ + Ascending = 1, + /** + * Order by folder name and path descending. + */ + Descending = 2 +} +export interface GatesDeploymentInput extends BaseDeploymentInput { + /** + * Gates minimum success duration. + */ + minimumSuccessDuration?: number; + /** + * Gates sampling interval. + */ + samplingInterval?: number; + /** + * Gates stabilization time. + */ + stabilizationTime?: number; +} +export interface GatesDeployPhase extends DeployPhase { + /** + * Gets and sets the gate job input. + */ + deploymentInput?: GatesDeploymentInput; +} +export declare enum GateStatus { + /** + * The gate does not have the status set. + */ + None = 0, + /** + * The gate is in pending state. + */ + Pending = 1, + /** + * The gate is currently in progress. + */ + InProgress = 2, + /** + * The gate completed successfully. + */ + Succeeded = 4, + /** + * The gate execution failed. + */ + Failed = 8, + /** + * The gate execution cancelled. + */ + Canceled = 16 +} +export interface GateUpdateMetadata { + /** + * Comment. + */ + comment?: string; + /** + * Name of gate to be ignored. + */ + gatesToIgnore?: string[]; +} +export interface GitArtifactDownloadInput extends ArtifactDownloadInputBase { +} +export interface GitHubArtifactDownloadInput extends ArtifactDownloadInputBase { +} +export interface IgnoredGate { + /** + * Gets the date on which gate is last ignored. + */ + lastModifiedOn?: Date; + /** + * Name of gate ignored. + */ + name?: string; +} +export interface Issue { + /** + * Issue data. + */ + data?: { + [key: string]: string; + }; + /** + * Issue type, for example error, warning or info. + */ + issueType?: string; + /** + * Issue message. + */ + message?: string; +} +export declare enum IssueSource { + None = 0, + User = 1, + System = 2 +} +export interface JenkinsArtifactDownloadInput extends ArtifactDownloadInputBase { +} +export interface MachineGroupBasedDeployPhase extends DeployPhase { + /** + * Gets and sets the deployment group job input + */ + deploymentInput?: MachineGroupDeploymentInput; +} +export interface MachineGroupDeploymentInput extends DeploymentInput { + /** + * Deployment group health option. + */ + deploymentHealthOption?: string; + /** + * Minimum percentage of the targets guaranteed to be healthy. + */ + healthPercent?: number; + /** + * Deployment target tag filter. + */ + tags?: string[]; +} +export interface MailMessage { + /** + * Body of mail. + */ + body?: string; + /** + * Mail CC recipients. + */ + cC?: EmailRecipients; + /** + * Reply to. + */ + inReplyTo?: string; + /** + * Message ID of the mail. + */ + messageId?: string; + /** + * Data when should be replied to mail. + */ + replyBy?: Date; + /** + * Reply to Email recipients. + */ + replyTo?: EmailRecipients; + /** + * List of mail section types. + */ + sections?: MailSectionType[]; + /** + * Mail sender type. + */ + senderType?: SenderType; + /** + * Subject of the mail. + */ + subject?: string; + /** + * Mail To recipients. + */ + to?: EmailRecipients; +} +export declare enum MailSectionType { + Details = 0, + Environments = 1, + Issues = 2, + TestResults = 3, + WorkItems = 4, + ReleaseInfo = 5 +} +export interface ManualIntervention { + /** + * Gets or sets the identity who should approve. + */ + approver?: VSSInterfaces.IdentityRef; + /** + * Gets or sets comments for approval. + */ + comments?: string; + /** + * Gets date on which it got created. + */ + createdOn?: Date; + /** + * Gets the unique identifier for manual intervention. + */ + id?: number; + /** + * Gets or sets instructions for approval. + */ + instructions?: string; + /** + * Gets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets or sets the name. + */ + name?: string; + /** + * Gets releaseReference for manual intervention. + */ + release?: ReleaseShallowReference; + /** + * Gets releaseDefinitionReference for manual intervention. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + /** + * Gets releaseEnvironmentReference for manual intervention. + */ + releaseEnvironment?: ReleaseEnvironmentShallowReference; + /** + * Gets or sets the status of the manual intervention. + */ + status?: ManualInterventionStatus; + /** + * Get task instance identifier. + */ + taskInstanceId?: string; + /** + * Gets url to access the manual intervention. + */ + url?: string; +} +/** + * Describes manual intervention status + */ +export declare enum ManualInterventionStatus { + /** + * The manual intervention does not have the status set. + */ + Unknown = 0, + /** + * The manual intervention is pending. + */ + Pending = 1, + /** + * The manual intervention is rejected. + */ + Rejected = 2, + /** + * The manual intervention is approved. + */ + Approved = 4, + /** + * The manual intervention is canceled. + */ + Canceled = 8 +} +export interface ManualInterventionUpdateMetadata { + /** + * Sets the comment for manual intervention update. + */ + comment?: string; + /** + * Sets the status of the manual intervention. + */ + status?: ManualInterventionStatus; +} +export interface MappingDetails { + mappings?: { + [key: string]: FormInputInterfaces.InputValue; + }; +} +export interface Metric { + /** + * Name of the Metric. + */ + name?: string; + /** + * Value of the Metric. + */ + value?: number; +} +export interface MultiConfigInput extends ParallelExecutionInputBase { + /** + * Multipliers for parallel execution of deployment, for example x86,x64. + */ + multipliers?: string; +} +export interface MultiMachineInput extends ParallelExecutionInputBase { +} +export interface OrgPipelineReleaseSettings { + /** + * Defines whether user can manage pipeline settings. + */ + hasManagePipelinePoliciesPermission?: boolean; + /** + * EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project. + */ + orgEnforceJobAuthScope?: boolean; +} +export interface OrgPipelineReleaseSettingsUpdateParameters { + /** + * EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project. + */ + orgEnforceJobAuthScope?: boolean; +} +export interface PackageTrigger extends ReleaseTriggerBase { + /** + * Package trigger alias. + */ + alias?: string; +} +export interface ParallelExecutionInputBase extends ExecutionInput { + /** + * Indicate whether continue execution of deployment on error or not. + */ + continueOnError?: boolean; + /** + * Maximum number of agents used while parallel execution. + */ + maxNumberOfAgents?: number; +} +export declare enum ParallelExecutionTypes { + None = 0, + MultiConfiguration = 1, + MultiMachine = 2 +} +export interface PipelineProcess { + /** + * Pipeline process type. + */ + type?: PipelineProcessTypes; +} +export declare enum PipelineProcessTypes { + Designer = 1, + Yaml = 2 +} +export interface ProjectPipelineReleaseSettings { + /** + * EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project. + */ + enforceJobAuthScope?: boolean; + /** + * Defines whether user can manage pipeline settings. + */ + hasManageSettingsPermission?: boolean; + /** + * EnforceJobAuthScope setting at organisaion level. If enabled, scope of access for all release pipelines in the organisation reduces to the current project. + */ + orgEnforceJobAuthScope?: boolean; + /** + * Defines whether project is public. + */ + publicProject?: boolean; +} +export interface ProjectPipelineReleaseSettingsUpdateParameters { + /** + * EnforceJobAuthScope setting at project level. If enabled, scope of access for all release pipelines reduces to the current project. + */ + enforceJobAuthScope?: boolean; +} +export interface ProjectReference { + /** + * Gets the unique identifier of this field. + */ + id?: string; + /** + * Gets name of project. + */ + name?: string; +} +export interface PropertySelector { + /** + * List of properties. + */ + properties?: string[]; + /** + * Property selector type. + */ + selectorType?: PropertySelectorType; +} +export declare enum PropertySelectorType { + /** + * Include in property selector. + */ + Inclusion = 0, + /** + * Exclude in property selector. + */ + Exclusion = 1 +} +export interface PullRequestConfiguration { + /** + * Code repository reference. + */ + codeRepositoryReference?: CodeRepositoryReference; + /** + * In case of Source based artifacts, Code reference will be present in Artifact details. + */ + useArtifactReference?: boolean; +} +export interface PullRequestFilter { + /** + * List of tags. + */ + tags?: string[]; + /** + * Target branch of pull request. + */ + targetBranch?: string; +} +export declare enum PullRequestSystemType { + None = 0, + TfsGit = 1, + GitHub = 2 +} +export interface PullRequestTrigger extends ReleaseTriggerBase { + /** + * Artifact alias trigger is linked to. + */ + artifactAlias?: string; + /** + * Code reference details of pull request. + */ + pullRequestConfiguration?: PullRequestConfiguration; + /** + * Policy name using which status will be published to pull request. + */ + statusPolicyName?: string; + /** + * List of filters applied while trigger. + */ + triggerConditions?: PullRequestFilter[]; +} +export interface QueuedReleaseData { + /** + * Project ID of the release. + */ + projectId?: string; + /** + * Release queue position. + */ + queuePosition?: number; + /** + * Queued release ID. + */ + releaseId?: number; +} +export interface RealtimeReleaseDefinitionEvent { + definitionId?: number; + projectId?: string; +} +export interface RealtimeReleaseEvent { + environmentId?: number; + projectId?: string; + releaseId?: number; +} +export interface Release { + /** + * Gets links to access the release. + */ + _links?: any; + /** + * Gets or sets the list of artifacts. + */ + artifacts?: Artifact[]; + /** + * Gets or sets comment. + */ + comment?: string; + /** + * Gets or sets the identity who created. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the identity for whom release was created. + */ + createdFor?: VSSInterfaces.IdentityRef; + /** + * Gets date on which it got created. + */ + createdOn?: Date; + /** + * Gets revision number of definition snapshot. + */ + definitionSnapshotRevision?: number; + /** + * Gets or sets description of release. + */ + description?: string; + /** + * Gets list of environments. + */ + environments?: ReleaseEnvironment[]; + /** + * Gets the unique identifier of this field. + */ + id?: number; + /** + * Whether to exclude the release from retention policies. + */ + keepForever?: boolean; + /** + * Gets logs container url. + */ + logsContainerUrl?: string; + /** + * Gets or sets the identity who modified. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets name. + */ + name?: string; + /** + * Gets pool name. + */ + poolName?: string; + /** + * Gets or sets project reference. + */ + projectReference?: ProjectReference; + properties?: any; + /** + * Gets reason of release. + */ + reason?: ReleaseReason; + /** + * Gets releaseDefinitionReference which specifies the reference of the release definition to which this release is associated. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + /** + * Gets or sets the release definition revision. + */ + releaseDefinitionRevision?: number; + /** + * Gets release name format. + */ + releaseNameFormat?: string; + /** + * Gets status. + */ + status?: ReleaseStatus; + /** + * Gets or sets list of tags. + */ + tags?: string[]; + triggeringArtifactAlias?: string; + url?: string; + /** + * Gets the list of variable groups. + */ + variableGroups?: VariableGroup[]; + /** + * Gets or sets the dictionary of variables. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; +} +export interface ReleaseAbandonedEvent extends ReleaseEvent { + project?: ProjectReference; + release?: Release; +} +export interface ReleaseApproval { + /** + * Gets or sets the type of approval. + */ + approvalType?: ApprovalType; + /** + * Gets the identity who approved. + */ + approvedBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the identity who should approve. + */ + approver?: VSSInterfaces.IdentityRef; + /** + * Gets or sets attempt which specifies as which deployment attempt it belongs. + */ + attempt?: number; + /** + * Gets or sets comments for approval. + */ + comments?: string; + /** + * Gets date on which it got created. + */ + createdOn?: Date; + /** + * Gets history which specifies all approvals associated with this approval. + */ + history?: ReleaseApprovalHistory[]; + /** + * Gets the unique identifier of this field. + */ + id?: number; + /** + * Gets or sets as approval is automated or not. + */ + isAutomated?: boolean; + isNotificationOn?: boolean; + /** + * Gets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets or sets rank which specifies the order of the approval. e.g. Same rank denotes parallel approval. + */ + rank?: number; + /** + * Gets releaseReference which specifies the reference of the release to which this approval is associated. + */ + release?: ReleaseShallowReference; + /** + * Gets releaseDefinitionReference which specifies the reference of the release definition to which this approval is associated. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + /** + * Gets releaseEnvironmentReference which specifies the reference of the release environment to which this approval is associated. + */ + releaseEnvironment?: ReleaseEnvironmentShallowReference; + /** + * Gets the revision number. + */ + revision?: number; + /** + * Gets or sets the status of the approval. + */ + status?: ApprovalStatus; + trialNumber?: number; + /** + * Gets url to access the approval. + */ + url?: string; +} +export interface ReleaseApprovalHistory { + /** + * Identity of the approver. + */ + approver?: VSSInterfaces.IdentityRef; + /** + * Identity of the object who changed approval. + */ + changedBy?: VSSInterfaces.IdentityRef; + /** + * Approval history comments. + */ + comments?: string; + /** + * Time when this approval created. + */ + createdOn?: Date; + /** + * Time when this approval modified. + */ + modifiedOn?: Date; + /** + * Approval history revision. + */ + revision?: number; +} +export interface ReleaseApprovalPendingEvent { + approval?: ReleaseApproval; + approvalOptions?: ApprovalOptions; + completedApprovals?: ReleaseApproval[]; + definitionName?: string; + deployment?: Deployment; + environmentId?: number; + environmentName?: string; + environments?: ReleaseEnvironment[]; + isMultipleRankApproval?: boolean; + pendingApprovals?: ReleaseApproval[]; + releaseCreator?: string; + releaseName?: string; + title?: string; + webAccessUri?: string; +} +export interface ReleaseArtifact { + /** + * Gets or sets the artifact provider of ReleaseArtifact. + */ + artifactProvider?: ArtifactProvider; + /** + * Gets or sets the artifact type of ReleaseArtifact. + */ + artifactType?: string; + /** + * Gets or sets the definition json of ReleaseArtifact. + */ + definitionData?: string; + /** + * Gets or sets the definition id of ReleaseArtifact. + */ + definitionId?: number; + /** + * Gets or sets the description of ReleaseArtifact. + */ + description?: string; + /** + * Gets or sets the id of ReleaseArtifact. + */ + id?: number; + /** + * Gets or sets the name of ReleaseArtifact. + */ + name?: string; + /** + * Gets or sets the release id. + */ + releaseId?: number; +} +export interface ReleaseCondition extends Condition { + /** + * The release condition result. + */ + result?: boolean; +} +export interface ReleaseCreatedEvent extends ReleaseEvent { + project?: ProjectReference; + release?: Release; +} +export interface ReleaseDefinition extends ReleaseDefinitionShallowReference { + /** + * Gets or sets the list of artifacts. + */ + artifacts?: Artifact[]; + /** + * Gets or sets comment. + */ + comment?: string; + /** + * Gets or sets the identity who created. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on which it got created. + */ + createdOn?: Date; + /** + * Gets or sets the description. + */ + description?: string; + /** + * Gets or sets the list of environments. + */ + environments?: ReleaseDefinitionEnvironment[]; + /** + * Whether release definition is deleted. + */ + isDeleted?: boolean; + /** + * Gets the reference of last release. + */ + lastRelease?: ReleaseReference; + /** + * Gets or sets the identity who modified. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets or sets pipeline process. + */ + pipelineProcess?: PipelineProcess; + /** + * Gets or sets properties. + */ + properties?: any; + /** + * Gets or sets the release name format. + */ + releaseNameFormat?: string; + retentionPolicy?: RetentionPolicy; + /** + * Gets the revision number. + */ + revision?: number; + /** + * Gets or sets source of release definition. + */ + source?: ReleaseDefinitionSource; + /** + * Gets or sets list of tags. + */ + tags?: string[]; + /** + * Gets or sets the list of triggers. + */ + triggers?: ReleaseTriggerBase[]; + /** + * Gets or sets the list of variable groups. + */ + variableGroups?: number[]; + /** + * Gets or sets the dictionary of variables. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; +} +export interface ReleaseDefinitionApprovals { + /** + * Gets or sets the approval options. + */ + approvalOptions?: ApprovalOptions; + /** + * Gets or sets the approvals. + */ + approvals?: ReleaseDefinitionApprovalStep[]; +} +export interface ReleaseDefinitionApprovalStep extends ReleaseDefinitionEnvironmentStep { + /** + * Gets and sets the approver. + */ + approver?: VSSInterfaces.IdentityRef; + /** + * Indicates whether the approval automated. + */ + isAutomated?: boolean; + /** + * Indicates whether the approval notification set. + */ + isNotificationOn?: boolean; + /** + * Gets or sets the rank of approval step. + */ + rank?: number; +} +export interface ReleaseDefinitionDeployStep extends ReleaseDefinitionEnvironmentStep { + /** + * The list of steps for this definition. + */ + tasks?: WorkflowTask[]; +} +export interface ReleaseDefinitionEnvironment { + /** + * Gets or sets the BadgeUrl. BadgeUrl will be used when Badge will be enabled in Release Definition Environment. + */ + badgeUrl?: string; + /** + * Gets or sets the environment conditions. + */ + conditions?: Condition[]; + /** + * Gets or sets the current release reference. + */ + currentRelease?: ReleaseShallowReference; + /** + * Gets or sets the demands. + */ + demands?: Demand[]; + /** + * Gets or sets the deploy phases of environment. + */ + deployPhases?: DeployPhase[]; + /** + * Gets or sets the deploystep. + */ + deployStep?: ReleaseDefinitionDeployStep; + /** + * Gets or sets the environment options. + */ + environmentOptions?: EnvironmentOptions; + /** + * Gets or sets the triggers on environment. + */ + environmentTriggers?: EnvironmentTrigger[]; + /** + * Gets or sets the environment execution policy. + */ + executionPolicy?: EnvironmentExecutionPolicy; + /** + * Gets and sets the ID of the ReleaseDefinitionEnvironment. + */ + id?: number; + /** + * Gets and sets the name of the ReleaseDefinitionEnvironment. + */ + name?: string; + /** + * Gets and sets the Owner of the ReleaseDefinitionEnvironment. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the post deployment approvals. + */ + postDeployApprovals?: ReleaseDefinitionApprovals; + /** + * Gets or sets the post deployment gates. + */ + postDeploymentGates?: ReleaseDefinitionGatesStep; + /** + * Gets or sets the pre deployment approvals. + */ + preDeployApprovals?: ReleaseDefinitionApprovals; + /** + * Gets or sets the pre deployment gates. + */ + preDeploymentGates?: ReleaseDefinitionGatesStep; + /** + * Gets or sets the environment process parameters. + */ + processParameters?: DistributedTaskCommonInterfaces.ProcessParameters; + /** + * Gets or sets the properties on environment. + */ + properties?: any; + /** + * Gets or sets the queue ID. + */ + queueId?: number; + /** + * Gets and sets the rank of the ReleaseDefinitionEnvironment. + */ + rank?: number; + /** + * Gets or sets the environment retention policy. + */ + retentionPolicy?: EnvironmentRetentionPolicy; + runOptions?: { + [key: string]: string; + }; + /** + * Gets or sets the schedules + */ + schedules?: ReleaseSchedule[]; + /** + * Gets or sets the variable groups. + */ + variableGroups?: number[]; + /** + * Gets and sets the variables. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; +} +export interface ReleaseDefinitionEnvironmentStep { + /** + * ID of the approval or deploy step. + */ + id?: number; +} +export interface ReleaseDefinitionEnvironmentSummary { + /** + * ID of ReleaseDefinition environment summary. + */ + id?: number; + /** + * List of release shallow reference deployed using this ReleaseDefinition. + */ + lastReleases?: ReleaseShallowReference[]; + /** + * Name of ReleaseDefinition environment summary. + */ + name?: string; +} +export interface ReleaseDefinitionEnvironmentTemplate { + /** + * Indicates whether template can be deleted or not. + */ + canDelete?: boolean; + /** + * Category of the ReleaseDefinition environment template. + */ + category?: string; + /** + * Description of the ReleaseDefinition environment template. + */ + description?: string; + /** + * ReleaseDefinition environment data which used to create this template. + */ + environment?: ReleaseDefinitionEnvironment; + /** + * ID of the task which used to display icon used for this template. + */ + iconTaskId?: string; + /** + * Icon uri of the template. + */ + iconUri?: string; + /** + * ID of the ReleaseDefinition environment template. + */ + id?: string; + /** + * Indicates whether template deleted or not. + */ + isDeleted?: boolean; + /** + * Name of the ReleaseDefinition environment template. + */ + name?: string; +} +export declare enum ReleaseDefinitionExpands { + /** + * Returns top level properties of object. + */ + None = 0, + /** + * Include environments in return object. + */ + Environments = 2, + /** + * Include artifacts in return object. + */ + Artifacts = 4, + /** + * Include triggers in return object. + */ + Triggers = 8, + /** + * Include variables in return object. + */ + Variables = 16, + /** + * Include tags in return object. + */ + Tags = 32, + /** + * Include last release in return object. + */ + LastRelease = 64 +} +export interface ReleaseDefinitionGate { + /** + * Gets or sets the gates workflow. + */ + tasks?: WorkflowTask[]; +} +export interface ReleaseDefinitionGatesOptions { + /** + * Gets or sets as the gates enabled or not. + */ + isEnabled?: boolean; + /** + * Gets or sets the minimum duration for steady results after a successful gates evaluation. + */ + minimumSuccessDuration?: number; + /** + * Gets or sets the time between re-evaluation of gates. + */ + samplingInterval?: number; + /** + * Gets or sets the delay before evaluation. + */ + stabilizationTime?: number; + /** + * Gets or sets the timeout after which gates fail. + */ + timeout?: number; +} +export interface ReleaseDefinitionGatesStep { + /** + * Gets or sets the gates. + */ + gates?: ReleaseDefinitionGate[]; + /** + * Gets or sets the gate options. + */ + gatesOptions?: ReleaseDefinitionGatesOptions; + /** + * ID of the ReleaseDefinitionGateStep. + */ + id?: number; +} +export declare enum ReleaseDefinitionQueryOrder { + /** + * Return results based on release definition Id ascending order. + */ + IdAscending = 0, + /** + * Return results based on release definition Id descending order. + */ + IdDescending = 1, + /** + * Return results based on release definition name ascending order. + */ + NameAscending = 2, + /** + * Return results based on release definition name descending order. + */ + NameDescending = 3 +} +export interface ReleaseDefinitionRevision { + /** + * Gets api-version for revision object. + */ + apiVersion?: string; + /** + * Gets the identity who did change. + */ + changedBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on which ReleaseDefinition changed. + */ + changedDate?: Date; + /** + * Gets type of change. + */ + changeType?: AuditAction; + /** + * Gets comments for revision. + */ + comment?: string; + /** + * Get id of the definition. + */ + definitionId?: number; + /** + * Gets definition URL. + */ + definitionUrl?: string; + /** + * Get revision number of the definition. + */ + revision?: number; +} +export interface ReleaseDefinitionShallowReference { + /** + * Gets the links to related resources, APIs, and views for the release definition. + */ + _links?: any; + /** + * Gets the unique identifier of release definition. + */ + id?: number; + /** + * Gets or sets the name of the release definition. + */ + name?: string; + /** + * Gets or sets the path of the release definition. + */ + path?: string; + /** + * Gets or sets project reference. + */ + projectReference?: ProjectReference; + /** + * Gets the REST API url to access the release definition. + */ + url?: string; +} +export declare enum ReleaseDefinitionSource { + /** + * Indicates ReleaseDefinition source not defined. + */ + Undefined = 0, + /** + * Indicates ReleaseDefinition created using REST API. + */ + RestApi = 1, + /** + * Indicates ReleaseDefinition created using UI. + */ + UserInterface = 2, + /** + * Indicates ReleaseDefinition created from Ibiza. + */ + Ibiza = 4, + /** + * Indicates ReleaseDefinition created from PortalExtension API. + */ + PortalExtensionApi = 8 +} +export interface ReleaseDefinitionSummary { + /** + * List of Release Definition environment summary. + */ + environments?: ReleaseDefinitionEnvironmentSummary[]; + /** + * Release Definition reference. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + /** + * List of releases deployed using this Release Definition. + */ + releases?: Release[]; +} +export interface ReleaseDefinitionUndeleteParameter { + /** + * Gets or sets comment. + */ + comment?: string; +} +export interface ReleaseDeployPhase { + /** + * Deployment jobs of the phase. + */ + deploymentJobs?: DeploymentJob[]; + /** + * Phase execution error logs. + */ + errorLog?: string; + /** + * ID of the phase. + */ + id?: number; + /** + * List of manual intervention tasks execution information in phase. + */ + manualInterventions?: ManualIntervention[]; + /** + * Name of the phase. + */ + name?: string; + /** + * ID of the phase. + */ + phaseId?: string; + /** + * Type of the phase. + */ + phaseType?: DeployPhaseTypes; + /** + * Rank of the phase. + */ + rank?: number; + /** + * Run Plan ID of the phase. + */ + runPlanId?: string; + /** + * Phase start time. + */ + startedOn?: Date; + /** + * Status of the phase. + */ + status?: DeployPhaseStatus; +} +export interface ReleaseEnvironment { + /** + * Gets list of conditions. + */ + conditions?: ReleaseCondition[]; + /** + * Gets date on which it got created. + */ + createdOn?: Date; + /** + * Gets definition environment id. + */ + definitionEnvironmentId?: number; + /** + * Gets demands. + */ + demands?: Demand[]; + /** + * Gets list of deploy phases snapshot. + */ + deployPhasesSnapshot?: DeployPhase[]; + /** + * Gets deploy steps. + */ + deploySteps?: DeploymentAttempt[]; + /** + * Gets environment options. + */ + environmentOptions?: EnvironmentOptions; + /** + * Gets the unique identifier of this field. + */ + id?: number; + /** + * Gets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets name. + */ + name?: string; + /** + * Gets next scheduled UTC time. + */ + nextScheduledUtcTime?: Date; + /** + * Gets the identity who is owner for release environment. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Gets list of post deploy approvals snapshot. + */ + postApprovalsSnapshot?: ReleaseDefinitionApprovals; + /** + * Gets list of post deploy approvals. + */ + postDeployApprovals?: ReleaseApproval[]; + /** + * Post deployment gates snapshot data. + */ + postDeploymentGatesSnapshot?: ReleaseDefinitionGatesStep; + /** + * Gets list of pre deploy approvals snapshot. + */ + preApprovalsSnapshot?: ReleaseDefinitionApprovals; + /** + * Gets list of pre deploy approvals. + */ + preDeployApprovals?: ReleaseApproval[]; + /** + * Pre deployment gates snapshot data. + */ + preDeploymentGatesSnapshot?: ReleaseDefinitionGatesStep; + /** + * Gets process parameters. + */ + processParameters?: DistributedTaskCommonInterfaces.ProcessParameters; + /** + * Gets queue id. + */ + queueId?: number; + /** + * Gets rank. + */ + rank?: number; + /** + * Gets release reference which specifies the reference of the release to which this release environment is associated. + */ + release?: ReleaseShallowReference; + /** + * Gets the identity who created release. + */ + releaseCreatedBy?: VSSInterfaces.IdentityRef; + /** + * Gets releaseDefinitionReference which specifies the reference of the release definition to which this release environment is associated. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + /** + * Gets release description. + */ + releaseDescription?: string; + /** + * Gets release id. + */ + releaseId?: number; + /** + * Gets schedule deployment time of release environment. + */ + scheduledDeploymentTime?: Date; + /** + * Gets list of schedules. + */ + schedules?: ReleaseSchedule[]; + /** + * Gets environment status. + */ + status?: EnvironmentStatus; + /** + * Gets time to deploy. + */ + timeToDeploy?: number; + /** + * Gets trigger reason. + */ + triggerReason?: string; + /** + * Gets the list of variable groups. + */ + variableGroups?: VariableGroup[]; + /** + * Gets the dictionary of variables. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; + /** + * Gets list of workflow tasks. + */ + workflowTasks?: WorkflowTask[]; +} +export interface ReleaseEnvironmentCompletedEvent { + createdByName?: string; + definitionId?: number; + definitionName?: string; + environment?: ReleaseEnvironment; + environmentId?: number; + projectName?: string; + reason?: DeploymentReason; + releaseCreatedBy?: VSSInterfaces.IdentityRef; + releaseLogsUri?: string; + releaseName?: string; + status?: string; + title?: string; + webAccessUri?: string; +} +export declare enum ReleaseEnvironmentExpands { + /** + * Return top level properties of object. + */ + None = 0, + /** + * Expand environment with tasks. + */ + Tasks = 1 +} +export interface ReleaseEnvironmentShallowReference { + /** + * Gets the links to related resources, APIs, and views for the release environment. + */ + _links?: any; + /** + * Gets the unique identifier of release environment. + */ + id?: number; + /** + * Gets or sets the name of the release environment. + */ + name?: string; + /** + * Gets the REST API url to access the release environment. + */ + url?: string; +} +export interface ReleaseEnvironmentStatusUpdatedEvent extends RealtimeReleaseDefinitionEvent { + environmentId?: number; + environmentStatus?: EnvironmentStatus; + latestDeploymentOperationStatus?: DeploymentOperationStatus; + latestDeploymentStatus?: DeploymentStatus; + releaseId?: number; +} +export interface ReleaseEnvironmentUpdateMetadata { + /** + * Gets or sets comment. + */ + comment?: string; + /** + * Gets or sets scheduled deployment time. + */ + scheduledDeploymentTime?: Date; + /** + * Gets or sets status of environment. + */ + status?: EnvironmentStatus; + /** + * Sets list of environment variables to be overridden at deployment time. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; +} +export interface ReleaseEvent { + id?: number; + url?: string; +} +export declare enum ReleaseExpands { + None = 0, + Environments = 2, + Artifacts = 4, + Approvals = 8, + ManualInterventions = 16, + Variables = 32, + Tags = 64 +} +export interface ReleaseGates { + /** + * Contains the gates job details of each evaluation. + */ + deploymentJobs?: DeploymentJob[]; + /** + * ID of release gates. + */ + id?: number; + /** + * List of ignored gates. + */ + ignoredGates?: IgnoredGate[]; + /** + * Gates last modified time. + */ + lastModifiedOn?: Date; + /** + * Run plan ID of the gates. + */ + runPlanId?: string; + /** + * Gates stabilization completed date and time. + */ + stabilizationCompletedOn?: Date; + /** + * Gates evaluation started time. + */ + startedOn?: Date; + /** + * Status of release gates. + */ + status?: GateStatus; + /** + * Date and time at which all gates executed successfully. + */ + succeedingSince?: Date; +} +export interface ReleaseGatesPhase extends ReleaseDeployPhase { + /** + * List of ignored gates. + */ + ignoredGates?: IgnoredGate[]; + /** + * Date and time at which stabilization of gates completed. + */ + stabilizationCompletedOn?: Date; + /** + * Date and time at which all gates executed successfully. + */ + succeedingSince?: Date; +} +export interface ReleaseManagementInputValue { + /** + * The text to show for the display of this value. + */ + displayValue?: string; + /** + * The value to store for this input. + */ + value?: string; +} +export interface ReleaseNotCreatedEvent { + definitionReference?: ReleaseDefinitionShallowReference; + message?: string; + releaseReason?: ReleaseReason; + requestedBy?: VSSInterfaces.IdentityRef; +} +export declare enum ReleaseQueryOrder { + /** + * Return results in descending order. + */ + Descending = 0, + /** + * Return results in ascending order. + */ + Ascending = 1 +} +export declare enum ReleaseReason { + /** + * Indicates the release triggered reason not set. + */ + None = 0, + /** + * Indicates the release triggered manually. + */ + Manual = 1, + /** + * Indicates the release triggered by continuous integration. + */ + ContinuousIntegration = 2, + /** + * Indicates the release triggered by schedule. + */ + Schedule = 3, + /** + * Indicates the release triggered by PullRequest. + */ + PullRequest = 4 +} +export interface ReleaseReference { + /** + * Gets links to access the release. + */ + _links?: any; + /** + * Gets list of artifacts. + */ + artifacts?: Artifact[]; + /** + * Gets the identity who created release. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on when this release created. + */ + createdOn?: Date; + /** + * Gets description. + */ + description?: string; + /** + * ID of the Release. + */ + id?: number; + /** + * Gets the identity who modified release. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets name of release. + */ + name?: string; + /** + * Gets reason for release. + */ + reason?: ReleaseReason; + /** + * Gets release definition shallow reference. + */ + releaseDefinition?: ReleaseDefinitionShallowReference; + url?: string; + webAccessUri?: string; +} +export interface ReleaseRevision { + /** + * Gets or sets the identity who changed. + */ + changedBy?: VSSInterfaces.IdentityRef; + /** + * Change date of the revision. + */ + changedDate?: Date; + /** + * Change details of the revision. + */ + changeDetails?: string; + /** + * Change details of the revision. Typically ChangeDetails values are Add and Update. + */ + changeType?: string; + /** + * Comment of the revision. + */ + comment?: string; + /** + * Release ID of which this revision belongs. + */ + definitionSnapshotRevision?: number; + /** + * Gets or sets the release ID of which this revision belongs. + */ + releaseId?: number; +} +export interface ReleaseSchedule { + /** + * Days of the week to release. + */ + daysToRelease?: ScheduleDays; + /** + * Team Foundation Job Definition Job Id. + */ + jobId?: string; + /** + * Flag to determine if this schedule should only release if the associated artifact has been changed or release definition changed. + */ + scheduleOnlyWithChanges?: boolean; + /** + * Local time zone hour to start. + */ + startHours?: number; + /** + * Local time zone minute to start. + */ + startMinutes?: number; + /** + * Time zone Id of release schedule, such as 'UTC'. + */ + timeZoneId?: string; +} +export interface ReleaseSettings { + /** + * Release Compliance settings. + */ + complianceSettings?: ComplianceSettings; + /** + * Release retention settings. + */ + retentionSettings?: RetentionSettings; +} +export interface ReleaseShallowReference { + /** + * Gets the links to related resources, APIs, and views for the release. + */ + _links?: any; + /** + * Gets the unique identifier of release. + */ + id?: number; + /** + * Gets or sets the name of the release. + */ + name?: string; + /** + * Gets the REST API url to access the release. + */ + url?: string; +} +export interface ReleaseStartEnvironmentMetadata { + /** + * Sets release definition environment id. + */ + definitionEnvironmentId?: number; + /** + * Sets list of environments variables to be overridden at deployment time. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; +} +export interface ReleaseStartMetadata { + /** + * Sets list of artifact to create a release. + */ + artifacts?: ArtifactMetadata[]; + /** + * Optionally provide a requestor identity + */ + createdFor?: string; + /** + * Sets definition Id to create a release. + */ + definitionId?: number; + /** + * Sets description to create a release. + */ + description?: string; + /** + * Sets list of environments meta data. + */ + environmentsMetadata?: ReleaseStartEnvironmentMetadata[]; + /** + * Sets 'true' to create release in draft mode, 'false' otherwise. + */ + isDraft?: boolean; + /** + * Sets list of environments to manual as condition. + */ + manualEnvironments?: string[]; + properties?: any; + /** + * Sets reason to create a release. + */ + reason?: ReleaseReason; + /** + * Sets list of release variables to be overridden at deployment time. + */ + variables?: { + [key: string]: ConfigurationVariableValue; + }; +} +export declare enum ReleaseStatus { + /** + * Release status not set. + */ + Undefined = 0, + /** + * Release is in draft state. + */ + Draft = 1, + /** + * Release status is in active. + */ + Active = 2, + /** + * Release status is in abandoned. + */ + Abandoned = 4 +} +export interface ReleaseTask { + /** + * Agent name on which task executed. + */ + agentName?: string; + dateEnded?: Date; + dateStarted?: Date; + /** + * Finish time of the release task. + */ + finishTime?: Date; + /** + * ID of the release task. + */ + id?: number; + /** + * List of issues occurred while execution of task. + */ + issues?: Issue[]; + /** + * Number of lines log release task has. + */ + lineCount?: number; + /** + * Log URL of the task. + */ + logUrl?: string; + /** + * Name of the task. + */ + name?: string; + /** + * Task execution complete precent. + */ + percentComplete?: number; + /** + * Rank of the release task. + */ + rank?: number; + /** + * Result code of the task. + */ + resultCode?: string; + /** + * ID of the release task. + */ + startTime?: Date; + /** + * Status of release task. + */ + status?: TaskStatus; + /** + * Workflow task reference. + */ + task?: WorkflowTaskReference; + /** + * Timeline record ID of the release task. + */ + timelineRecordId?: string; +} +export interface ReleaseTaskAttachment { + /** + * Reference links of task. + */ + _links?: any; + /** + * Data and time when it created. + */ + createdOn?: Date; + /** + * Identity who modified. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Data and time when modified. + */ + modifiedOn?: Date; + /** + * Name of the task attachment. + */ + name?: string; + /** + * Record ID of the task. + */ + recordId?: string; + /** + * Timeline ID of the task. + */ + timelineId?: string; + /** + * Type of task attachment. + */ + type?: string; +} +export interface ReleaseTaskLogUpdatedEvent extends RealtimeReleaseEvent { + lines?: string[]; + stepRecordId?: string; + timelineRecordId?: string; +} +export interface ReleaseTasksUpdatedEvent extends RealtimeReleaseEvent { + job?: ReleaseTask; + planId?: string; + releaseDeployPhaseId?: number; + releaseStepId?: number; + tasks?: ReleaseTask[]; +} +export interface ReleaseTriggerBase { + /** + * Type of release trigger. + */ + triggerType?: ReleaseTriggerType; +} +export declare enum ReleaseTriggerType { + /** + * Release trigger type not set. + */ + Undefined = 0, + /** + * Artifact based release trigger. + */ + ArtifactSource = 1, + /** + * Schedule based release trigger. + */ + Schedule = 2, + /** + * Source repository based release trigger. + */ + SourceRepo = 3, + /** + * Container image based release trigger. + */ + ContainerImage = 4, + /** + * Package based release trigger. + */ + Package = 5, + /** + * Pull request based release trigger. + */ + PullRequest = 6 +} +export interface ReleaseUpdatedEvent extends RealtimeReleaseEvent { + release?: Release; +} +export interface ReleaseUpdateMetadata { + /** + * Sets comment for release. + */ + comment?: string; + /** + * Set 'true' to exclude the release from retention policies. + */ + keepForever?: boolean; + /** + * Sets list of manual environments. + */ + manualEnvironments?: string[]; + /** + * Sets name of the release. + */ + name?: string; + /** + * Sets status of the release. + */ + status?: ReleaseStatus; +} +export interface ReleaseWorkItemRef { + assignee?: string; + /** + * Gets or sets the ID. + */ + id?: string; + /** + * Gets or sets the provider. + */ + provider?: string; + /** + * Gets or sets the state. + */ + state?: string; + /** + * Gets or sets the title. + */ + title?: string; + /** + * Gets or sets the type. + */ + type?: string; + /** + * Gets or sets the workitem url. + */ + url?: string; +} +/** + * Represents a reference to a resource. + */ +export interface ResourceReference { + /** + * An alias to be used when referencing the resource. + */ + alias?: string; +} +export interface RetentionPolicy { + /** + * Indicates the number of days to keep deployment. + */ + daysToKeep?: number; +} +export interface RetentionSettings { + /** + * Number of days to keep deleted releases. + */ + daysToKeepDeletedReleases?: number; + /** + * Specifies the default environment retention policy. + */ + defaultEnvironmentRetentionPolicy?: EnvironmentRetentionPolicy; + /** + * Specifies the maximum environment retention policy. + */ + maximumEnvironmentRetentionPolicy?: EnvironmentRetentionPolicy; +} +export interface RunOnServerDeployPhase extends DeployPhase { + /** + * Gets and sets the agentless job input. + */ + deploymentInput?: ServerDeploymentInput; +} +export declare enum ScheduleDays { + /** + * Scheduled day not set. + */ + None = 0, + /** + * Scheduled on Monday. + */ + Monday = 1, + /** + * Scheduled on Tuesday. + */ + Tuesday = 2, + /** + * Scheduled on Wednesday. + */ + Wednesday = 4, + /** + * Scheduled on Thursday. + */ + Thursday = 8, + /** + * Scheduled on Friday. + */ + Friday = 16, + /** + * Scheduled on Saturday. + */ + Saturday = 32, + /** + * Scheduled on Sunday. + */ + Sunday = 64, + /** + * Scheduled on all the days in week. + */ + All = 127 +} +export interface ScheduledReleaseTrigger extends ReleaseTriggerBase { + /** + * Release schedule for Scheduled Release trigger type. + */ + schedule?: ReleaseSchedule; +} +export declare enum SenderType { + ServiceAccount = 1, + RequestingUser = 2 +} +export interface ServerDeploymentInput extends BaseDeploymentInput { + /** + * Gets or sets the parallel execution input. + */ + parallelExecution?: ExecutionInput; +} +/** + * Represents a reference to a service endpoint. + */ +export interface ServiceEndpointReference extends ResourceReference { + /** + * The ID of the service endpoint. + */ + id?: string; +} +export declare enum SingleReleaseExpands { + /** + * Return top level properties of object. + */ + None = 0, + /** + * Expand release with tasks. + */ + Tasks = 1 +} +export interface SourceIdInput { + /** + * ID of source. + */ + id?: string; + /** + * Name of the source. + */ + name?: string; +} +export interface SourcePullRequestVersion { + /** + * Pull Request Iteration Id for which the release will publish status. + */ + iterationId?: string; + /** + * Pull Request Id for which the release will publish status. + */ + pullRequestId?: string; + /** + * Date and time of the pull request merge creation. It is required to keep timeline record of Releases created by pull request. + */ + pullRequestMergedAt?: Date; + /** + * Source branch of the Pull Request. + */ + sourceBranch?: string; + /** + * Source branch commit Id of the Pull Request for which the release will publish status. + */ + sourceBranchCommitId?: string; + /** + * Target branch of the Pull Request. + */ + targetBranch?: string; +} +export interface SourceRepoTrigger extends ReleaseTriggerBase { + /** + * Alias of the source repo trigger. + */ + alias?: string; + branchFilters?: string[]; +} +export interface SummaryMailSection { + /** + * Html content of summary mail. + */ + htmlContent?: string; + /** + * Rank of the summary mail. + */ + rank?: number; + /** + * Summary mail section type. MailSectionType has section types. + */ + sectionType?: MailSectionType; + /** + * Title of the summary mail. + */ + title?: string; +} +export interface TagFilter { + /** + * Gets or sets the tag filter pattern. + */ + pattern?: string; +} +export interface TaskOrchestrationPlanGroupReference { + /** + * Gets or sets the plan group. + */ + planGroup?: string; + /** + * ID of the Project. + */ + projectId?: string; +} +export interface TaskOrchestrationPlanGroupsStartedEvent { + planGroups?: TaskOrchestrationPlanGroupReference[]; +} +export declare enum TaskStatus { + /** + * The task does not have the status set. + */ + Unknown = 0, + /** + * The task is in pending status. + */ + Pending = 1, + /** + * The task is currently in progress. + */ + InProgress = 2, + /** + * The task completed successfully. + */ + Success = 3, + /** + * The task execution failed. + */ + Failure = 4, + /** + * The task execution canceled. + */ + Canceled = 5, + /** + * The task execution skipped. + */ + Skipped = 6, + /** + * The task completed successfully. + */ + Succeeded = 7, + /** + * The task execution failed. + */ + Failed = 8, + /** + * The task execution partially succeeded. + */ + PartiallySucceeded = 9 +} +export interface TfvcArtifactDownloadInput extends ArtifactDownloadInputBase { +} +export interface TimeZone { + /** + * Display name of the time zone. + */ + displayName?: string; + /** + * Id of the time zone. + */ + id?: string; +} +export interface TimeZoneList { + /** + * UTC timezone. + */ + utcTimeZone?: TimeZone; + /** + * List of valid timezones. + */ + validTimeZones?: TimeZone[]; +} +export interface VariableGroup { + /** + * Gets or sets the identity who created. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on which it got created. + */ + createdOn?: Date; + /** + * Gets or sets description. + */ + description?: string; + /** + * Gets the unique identifier of this field. + */ + id?: number; + /** + * Denotes if a variable group is shared with other project or not. + */ + isShared?: boolean; + /** + * Gets or sets the identity who modified. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets or sets name. + */ + name?: string; + /** + * Gets or sets provider data. + */ + providerData?: VariableGroupProviderData; + /** + * Gets or sets type. + */ + type?: string; + /** + * all project references where the variable group is shared with other projects. + */ + variableGroupProjectReferences?: VariableGroupProjectReference[]; + /** + * Gets and sets the dictionary of variables. + */ + variables?: { + [key: string]: VariableValue; + }; +} +export declare enum VariableGroupActionFilter { + None = 0, + Manage = 2, + Use = 16 +} +/** + * A variable group reference is a shallow reference to variable group. + */ +export interface VariableGroupProjectReference { + /** + * Gets or sets description of the variable group. + */ + description?: string; + /** + * Gets or sets name of the variable group. + */ + name?: string; + /** + * Gets or sets project reference of the variable group. + */ + projectReference?: ProjectReference; +} +export interface VariableGroupProviderData { +} +export interface VariableValue { + /** + * Gets or sets if the variable is read only or not. + */ + isReadOnly?: boolean; + /** + * Gets or sets as the variable is secret or not. + */ + isSecret?: boolean; + /** + * Gets or sets the value. + */ + value?: string; +} +export interface WorkflowTask { + /** + * Gets or sets as the task always run or not. + */ + alwaysRun?: boolean; + /** + * Gets or sets the task condition. + */ + condition?: string; + /** + * Gets or sets as the task continue run on error or not. + */ + continueOnError?: boolean; + /** + * Gets or sets the task definition type. Example:- 'Agent', DeploymentGroup', 'Server' or 'ServerGate'. + */ + definitionType?: string; + /** + * Gets or sets as the task enabled or not. + */ + enabled?: boolean; + /** + * Gets or sets the task environment variables. + */ + environment?: { + [key: string]: string; + }; + /** + * Gets or sets the task inputs. + */ + inputs?: { + [key: string]: string; + }; + /** + * Gets or sets the name of the task. + */ + name?: string; + /** + * Gets or sets the task override inputs. + */ + overrideInputs?: { + [key: string]: string; + }; + /** + * Gets or sets the reference name of the task. + */ + refName?: string; + /** + * Gets or sets the task retryCount. + */ + retryCountOnTaskFailure?: number; + /** + * Gets or sets the ID of the task. + */ + taskId: string; + /** + * Gets or sets the task timeout. + */ + timeoutInMinutes?: number; + /** + * Gets or sets the version of the task. + */ + version: string; +} +export interface WorkflowTaskReference { + /** + * Task identifier. + */ + id?: string; + /** + * Name of the task. + */ + name?: string; + /** + * Version of the task. + */ + version?: string; +} +export interface YamlFileSource { + /** + * Gets or sets definition reference. e.g. {"project":{"id":"fed755ea-49c5-4399-acea-fd5b5aa90a6c","name":"myProject"},"definition":{"id":"1","name":"mybuildDefinition"},"connection":{"id":"1","name":"myConnection"}} + */ + sourceReference?: { + [key: string]: YamlSourceReference; + }; + type?: YamlFileSourceTypes; +} +export declare enum YamlFileSourceTypes { + None = 0, + TFSGit = 1 +} +export interface YamlPipelineProcess extends PipelineProcess { + errors?: string[]; + filename?: string; + fileSource?: YamlFileSource; + resources?: YamlPipelineProcessResources; +} +export interface YamlPipelineProcessResources { + endpoints?: ServiceEndpointReference[]; + queues?: AgentPoolQueueReference[]; +} +export interface YamlSourceReference { + id?: string; + name?: string; +} +export declare var TypeInfo: { + AgentArtifactDefinition: any; + AgentArtifactType: { + enumValues: { + "xamlBuild": number; + "build": number; + "jenkins": number; + "fileShare": number; + "nuget": number; + "tfsOnPrem": number; + "gitHub": number; + "tfGit": number; + "externalTfsBuild": number; + "custom": number; + "tfvc": number; + }; + }; + AgentBasedDeployPhase: any; + AgentDeploymentInput: any; + ApprovalExecutionOrder: { + enumValues: { + "beforeGates": number; + "afterSuccessfulGates": number; + "afterGatesAlways": number; + }; + }; + ApprovalFilters: { + enumValues: { + "none": number; + "manualApprovals": number; + "automatedApprovals": number; + "approvalSnapshots": number; + "all": number; + }; + }; + ApprovalOptions: any; + ApprovalStatus: { + enumValues: { + "undefined": number; + "pending": number; + "approved": number; + "rejected": number; + "reassigned": number; + "canceled": number; + "skipped": number; + }; + }; + ApprovalType: { + enumValues: { + "undefined": number; + "preDeploy": number; + "postDeploy": number; + "all": number; + }; + }; + ArtifactContributionDefinition: any; + ArtifactMetadata: any; + ArtifactSourceTrigger: any; + ArtifactTypeDefinition: any; + ArtifactVersion: any; + ArtifactVersionQueryResult: any; + AuditAction: { + enumValues: { + "add": number; + "update": number; + "delete": number; + "undelete": number; + }; + }; + AuthorizationHeaderFor: { + enumValues: { + "revalidateApproverIdentity": number; + "onBehalfOf": number; + }; + }; + AutoTriggerIssue: any; + AzureKeyVaultVariableGroupProviderData: any; + AzureKeyVaultVariableValue: any; + BuildVersion: any; + Change: any; + CodeRepositoryReference: any; + Condition: any; + ConditionType: { + enumValues: { + "undefined": number; + "event": number; + "environmentState": number; + "artifact": number; + }; + }; + ContainerImageTrigger: any; + ContinuousDeploymentTriggerIssue: any; + Deployment: any; + DeploymentApprovalCompletedEvent: any; + DeploymentApprovalPendingEvent: any; + DeploymentAttempt: any; + DeploymentAuthorizationInfo: any; + DeploymentAuthorizationOwner: { + enumValues: { + "automatic": number; + "deploymentSubmitter": number; + "firstPreDeploymentApprover": number; + }; + }; + DeploymentCompletedEvent: any; + DeploymentExpands: { + enumValues: { + "all": number; + "deploymentOnly": number; + "approvals": number; + "artifacts": number; + }; + }; + DeploymentJob: any; + DeploymentManualInterventionPendingEvent: any; + DeploymentOperationStatus: { + enumValues: { + "undefined": number; + "queued": number; + "scheduled": number; + "pending": number; + "approved": number; + "rejected": number; + "deferred": number; + "queuedForAgent": number; + "phaseInProgress": number; + "phaseSucceeded": number; + "phasePartiallySucceeded": number; + "phaseFailed": number; + "canceled": number; + "phaseCanceled": number; + "manualInterventionPending": number; + "queuedForPipeline": number; + "cancelling": number; + "evaluatingGates": number; + "gateFailed": number; + "all": number; + }; + }; + DeploymentQueryParameters: any; + DeploymentReason: { + enumValues: { + "none": number; + "manual": number; + "automated": number; + "scheduled": number; + "redeployTrigger": number; + }; + }; + DeploymentsQueryType: { + enumValues: { + "regular": number; + "failingSince": number; + }; + }; + DeploymentStartedEvent: any; + DeploymentStatus: { + enumValues: { + "undefined": number; + "notDeployed": number; + "inProgress": number; + "succeeded": number; + "partiallySucceeded": number; + "failed": number; + "all": number; + }; + }; + DeployPhase: any; + DeployPhaseStatus: { + enumValues: { + "undefined": number; + "notStarted": number; + "inProgress": number; + "partiallySucceeded": number; + "succeeded": number; + "failed": number; + "canceled": number; + "skipped": number; + "cancelling": number; + }; + }; + DeployPhaseTypes: { + enumValues: { + "undefined": number; + "agentBasedDeployment": number; + "runOnServer": number; + "machineGroupBasedDeployment": number; + "deploymentGates": number; + }; + }; + EnvironmentStatus: { + enumValues: { + "undefined": number; + "notStarted": number; + "inProgress": number; + "succeeded": number; + "canceled": number; + "rejected": number; + "queued": number; + "scheduled": number; + "partiallySucceeded": number; + }; + }; + EnvironmentTrigger: any; + EnvironmentTriggerType: { + enumValues: { + "undefined": number; + "deploymentGroupRedeploy": number; + "rollbackRedeploy": number; + }; + }; + ExecutionInput: any; + Folder: any; + FolderPathQueryOrder: { + enumValues: { + "none": number; + "ascending": number; + "descending": number; + }; + }; + GatesDeployPhase: any; + GateStatus: { + enumValues: { + "none": number; + "pending": number; + "inProgress": number; + "succeeded": number; + "failed": number; + "canceled": number; + }; + }; + IgnoredGate: any; + IssueSource: { + enumValues: { + "none": number; + "user": number; + "system": number; + }; + }; + MachineGroupBasedDeployPhase: any; + MailMessage: any; + MailSectionType: { + enumValues: { + "details": number; + "environments": number; + "issues": number; + "testResults": number; + "workItems": number; + "releaseInfo": number; + }; + }; + ManualIntervention: any; + ManualInterventionStatus: { + enumValues: { + "unknown": number; + "pending": number; + "rejected": number; + "approved": number; + "canceled": number; + }; + }; + ManualInterventionUpdateMetadata: any; + MultiConfigInput: any; + MultiMachineInput: any; + PackageTrigger: any; + ParallelExecutionInputBase: any; + ParallelExecutionTypes: { + enumValues: { + "none": number; + "multiConfiguration": number; + "multiMachine": number; + }; + }; + PipelineProcess: any; + PipelineProcessTypes: { + enumValues: { + "designer": number; + "yaml": number; + }; + }; + PropertySelector: any; + PropertySelectorType: { + enumValues: { + "inclusion": number; + "exclusion": number; + }; + }; + PullRequestConfiguration: any; + PullRequestSystemType: { + enumValues: { + "none": number; + "tfsGit": number; + "gitHub": number; + }; + }; + PullRequestTrigger: any; + Release: any; + ReleaseAbandonedEvent: any; + ReleaseApproval: any; + ReleaseApprovalHistory: any; + ReleaseApprovalPendingEvent: any; + ReleaseCondition: any; + ReleaseCreatedEvent: any; + ReleaseDefinition: any; + ReleaseDefinitionApprovals: any; + ReleaseDefinitionEnvironment: any; + ReleaseDefinitionEnvironmentTemplate: any; + ReleaseDefinitionExpands: { + enumValues: { + "none": number; + "environments": number; + "artifacts": number; + "triggers": number; + "variables": number; + "tags": number; + "lastRelease": number; + }; + }; + ReleaseDefinitionQueryOrder: { + enumValues: { + "idAscending": number; + "idDescending": number; + "nameAscending": number; + "nameDescending": number; + }; + }; + ReleaseDefinitionRevision: any; + ReleaseDefinitionSource: { + enumValues: { + "undefined": number; + "restApi": number; + "userInterface": number; + "ibiza": number; + "portalExtensionApi": number; + }; + }; + ReleaseDefinitionSummary: any; + ReleaseDeployPhase: any; + ReleaseEnvironment: any; + ReleaseEnvironmentCompletedEvent: any; + ReleaseEnvironmentExpands: { + enumValues: { + "none": number; + "tasks": number; + }; + }; + ReleaseEnvironmentStatusUpdatedEvent: any; + ReleaseEnvironmentUpdateMetadata: any; + ReleaseExpands: { + enumValues: { + "none": number; + "environments": number; + "artifacts": number; + "approvals": number; + "manualInterventions": number; + "variables": number; + "tags": number; + }; + }; + ReleaseGates: any; + ReleaseGatesPhase: any; + ReleaseNotCreatedEvent: any; + ReleaseQueryOrder: { + enumValues: { + "descending": number; + "ascending": number; + }; + }; + ReleaseReason: { + enumValues: { + "none": number; + "manual": number; + "continuousIntegration": number; + "schedule": number; + "pullRequest": number; + }; + }; + ReleaseReference: any; + ReleaseRevision: any; + ReleaseSchedule: any; + ReleaseStartMetadata: any; + ReleaseStatus: { + enumValues: { + "undefined": number; + "draft": number; + "active": number; + "abandoned": number; + }; + }; + ReleaseTask: any; + ReleaseTaskAttachment: any; + ReleaseTasksUpdatedEvent: any; + ReleaseTriggerBase: any; + ReleaseTriggerType: { + enumValues: { + "undefined": number; + "artifactSource": number; + "schedule": number; + "sourceRepo": number; + "containerImage": number; + "package": number; + "pullRequest": number; + }; + }; + ReleaseUpdatedEvent: any; + ReleaseUpdateMetadata: any; + RunOnServerDeployPhase: any; + ScheduleDays: { + enumValues: { + "none": number; + "monday": number; + "tuesday": number; + "wednesday": number; + "thursday": number; + "friday": number; + "saturday": number; + "sunday": number; + "all": number; + }; + }; + ScheduledReleaseTrigger: any; + SenderType: { + enumValues: { + "serviceAccount": number; + "requestingUser": number; + }; + }; + ServerDeploymentInput: any; + SingleReleaseExpands: { + enumValues: { + "none": number; + "tasks": number; + }; + }; + SourcePullRequestVersion: any; + SourceRepoTrigger: any; + SummaryMailSection: any; + TaskStatus: { + enumValues: { + "unknown": number; + "pending": number; + "inProgress": number; + "success": number; + "failure": number; + "canceled": number; + "skipped": number; + "succeeded": number; + "failed": number; + "partiallySucceeded": number; + }; + }; + VariableGroup: any; + VariableGroupActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + YamlFileSource: any; + YamlFileSourceTypes: { + enumValues: { + "none": number; + "tfsGit": number; + }; + }; + YamlPipelineProcess: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.js b/node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.js new file mode 100644 index 0000000..c75e319 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/ReleaseInterfaces.js @@ -0,0 +1,2164 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const FormInputInterfaces = require("../interfaces/common/FormInputInterfaces"); +var AgentArtifactType; +(function (AgentArtifactType) { + /** + * Indicates XamlBuild artifact + */ + AgentArtifactType[AgentArtifactType["XamlBuild"] = 0] = "XamlBuild"; + /** + * Indicates Build artifact + */ + AgentArtifactType[AgentArtifactType["Build"] = 1] = "Build"; + /** + * Indicates Jenkins artifact + */ + AgentArtifactType[AgentArtifactType["Jenkins"] = 2] = "Jenkins"; + /** + * Indicates FileShare artifact + */ + AgentArtifactType[AgentArtifactType["FileShare"] = 3] = "FileShare"; + /** + * Indicates Nuget artifact + */ + AgentArtifactType[AgentArtifactType["Nuget"] = 4] = "Nuget"; + /** + * Indicates TfsOnPrem artifact + */ + AgentArtifactType[AgentArtifactType["TfsOnPrem"] = 5] = "TfsOnPrem"; + /** + * Indicates GitHub artifact + */ + AgentArtifactType[AgentArtifactType["GitHub"] = 6] = "GitHub"; + /** + * Indicates TFGit artifact + */ + AgentArtifactType[AgentArtifactType["TFGit"] = 7] = "TFGit"; + /** + * Indicates ExternalTfsBuild artifact + */ + AgentArtifactType[AgentArtifactType["ExternalTfsBuild"] = 8] = "ExternalTfsBuild"; + /** + * Indicates Custom artifact + */ + AgentArtifactType[AgentArtifactType["Custom"] = 9] = "Custom"; + /** + * Indicates Tfvc artifact + */ + AgentArtifactType[AgentArtifactType["Tfvc"] = 10] = "Tfvc"; +})(AgentArtifactType = exports.AgentArtifactType || (exports.AgentArtifactType = {})); +var ApprovalExecutionOrder; +(function (ApprovalExecutionOrder) { + /** + * Approvals shown before gates. + */ + ApprovalExecutionOrder[ApprovalExecutionOrder["BeforeGates"] = 1] = "BeforeGates"; + /** + * Approvals shown after successful execution of gates. + */ + ApprovalExecutionOrder[ApprovalExecutionOrder["AfterSuccessfulGates"] = 2] = "AfterSuccessfulGates"; + /** + * Approvals shown always after execution of gates. + */ + ApprovalExecutionOrder[ApprovalExecutionOrder["AfterGatesAlways"] = 4] = "AfterGatesAlways"; +})(ApprovalExecutionOrder = exports.ApprovalExecutionOrder || (exports.ApprovalExecutionOrder = {})); +var ApprovalFilters; +(function (ApprovalFilters) { + /** + * No approvals or approval snapshots. + */ + ApprovalFilters[ApprovalFilters["None"] = 0] = "None"; + /** + * Manual approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). + */ + ApprovalFilters[ApprovalFilters["ManualApprovals"] = 1] = "ManualApprovals"; + /** + * Automated approval steps but no approval snapshots (Use with ApprovalSnapshots for snapshots). + */ + ApprovalFilters[ApprovalFilters["AutomatedApprovals"] = 2] = "AutomatedApprovals"; + /** + * No approval steps, but approval snapshots (Use with either ManualApprovals or AutomatedApprovals for approval steps). + */ + ApprovalFilters[ApprovalFilters["ApprovalSnapshots"] = 4] = "ApprovalSnapshots"; + /** + * All approval steps and approval snapshots. + */ + ApprovalFilters[ApprovalFilters["All"] = 7] = "All"; +})(ApprovalFilters = exports.ApprovalFilters || (exports.ApprovalFilters = {})); +var ApprovalStatus; +(function (ApprovalStatus) { + /** + * Indicates the approval does not have the status set. + */ + ApprovalStatus[ApprovalStatus["Undefined"] = 0] = "Undefined"; + /** + * Indicates the approval is pending. + */ + ApprovalStatus[ApprovalStatus["Pending"] = 1] = "Pending"; + /** + * Indicates the approval is approved. + */ + ApprovalStatus[ApprovalStatus["Approved"] = 2] = "Approved"; + /** + * Indicates the approval is rejected. + */ + ApprovalStatus[ApprovalStatus["Rejected"] = 4] = "Rejected"; + /** + * Indicates the approval is reassigned. + */ + ApprovalStatus[ApprovalStatus["Reassigned"] = 6] = "Reassigned"; + /** + * Indicates the approval is canceled. + */ + ApprovalStatus[ApprovalStatus["Canceled"] = 7] = "Canceled"; + /** + * Indicates the approval is skipped. + */ + ApprovalStatus[ApprovalStatus["Skipped"] = 8] = "Skipped"; +})(ApprovalStatus = exports.ApprovalStatus || (exports.ApprovalStatus = {})); +var ApprovalType; +(function (ApprovalType) { + /** + * Indicates the approval type does not set. + */ + ApprovalType[ApprovalType["Undefined"] = 0] = "Undefined"; + /** + * Indicates the approvals which executed before deployment. + */ + ApprovalType[ApprovalType["PreDeploy"] = 1] = "PreDeploy"; + /** + * Indicates the approvals which executed after deployment. + */ + ApprovalType[ApprovalType["PostDeploy"] = 2] = "PostDeploy"; + /** + * Indicates all approvals. + */ + ApprovalType[ApprovalType["All"] = 3] = "All"; +})(ApprovalType = exports.ApprovalType || (exports.ApprovalType = {})); +var AuditAction; +(function (AuditAction) { + /** + * Indicates the audit add. + */ + AuditAction[AuditAction["Add"] = 1] = "Add"; + /** + * Indicates the audit update. + */ + AuditAction[AuditAction["Update"] = 2] = "Update"; + /** + * Indicates the audit delete. + */ + AuditAction[AuditAction["Delete"] = 3] = "Delete"; + /** + * Indicates the audit undelete. + */ + AuditAction[AuditAction["Undelete"] = 4] = "Undelete"; +})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); +var AuthorizationHeaderFor; +(function (AuthorizationHeaderFor) { + AuthorizationHeaderFor[AuthorizationHeaderFor["RevalidateApproverIdentity"] = 0] = "RevalidateApproverIdentity"; + AuthorizationHeaderFor[AuthorizationHeaderFor["OnBehalfOf"] = 1] = "OnBehalfOf"; +})(AuthorizationHeaderFor = exports.AuthorizationHeaderFor || (exports.AuthorizationHeaderFor = {})); +var ConditionType; +(function (ConditionType) { + /** + * The condition type is undefined. + */ + ConditionType[ConditionType["Undefined"] = 0] = "Undefined"; + /** + * The condition type is event. + */ + ConditionType[ConditionType["Event"] = 1] = "Event"; + /** + * The condition type is environment state. + */ + ConditionType[ConditionType["EnvironmentState"] = 2] = "EnvironmentState"; + /** + * The condition type is artifact. + */ + ConditionType[ConditionType["Artifact"] = 4] = "Artifact"; +})(ConditionType = exports.ConditionType || (exports.ConditionType = {})); +var DeploymentAuthorizationOwner; +(function (DeploymentAuthorizationOwner) { + DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["Automatic"] = 0] = "Automatic"; + DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["DeploymentSubmitter"] = 1] = "DeploymentSubmitter"; + DeploymentAuthorizationOwner[DeploymentAuthorizationOwner["FirstPreDeploymentApprover"] = 2] = "FirstPreDeploymentApprover"; +})(DeploymentAuthorizationOwner = exports.DeploymentAuthorizationOwner || (exports.DeploymentAuthorizationOwner = {})); +var DeploymentExpands; +(function (DeploymentExpands) { + DeploymentExpands[DeploymentExpands["All"] = 0] = "All"; + DeploymentExpands[DeploymentExpands["DeploymentOnly"] = 1] = "DeploymentOnly"; + DeploymentExpands[DeploymentExpands["Approvals"] = 2] = "Approvals"; + DeploymentExpands[DeploymentExpands["Artifacts"] = 4] = "Artifacts"; +})(DeploymentExpands = exports.DeploymentExpands || (exports.DeploymentExpands = {})); +var DeploymentOperationStatus; +(function (DeploymentOperationStatus) { + /** + * The deployment operation status is undefined. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Undefined"] = 0] = "Undefined"; + /** + * The deployment operation status is queued. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Queued"] = 1] = "Queued"; + /** + * The deployment operation status is scheduled. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Scheduled"] = 2] = "Scheduled"; + /** + * The deployment operation status is pending. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Pending"] = 4] = "Pending"; + /** + * The deployment operation status is approved. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Approved"] = 8] = "Approved"; + /** + * The deployment operation status is rejected. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Rejected"] = 16] = "Rejected"; + /** + * The deployment operation status is deferred. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Deferred"] = 32] = "Deferred"; + /** + * The deployment operation status is queued for agent. + */ + DeploymentOperationStatus[DeploymentOperationStatus["QueuedForAgent"] = 64] = "QueuedForAgent"; + /** + * The deployment operation status is phase in progress. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseInProgress"] = 128] = "PhaseInProgress"; + /** + * The deployment operation status is phase succeeded. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseSucceeded"] = 256] = "PhaseSucceeded"; + /** + * The deployment operation status is phase partially succeeded. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhasePartiallySucceeded"] = 512] = "PhasePartiallySucceeded"; + /** + * The deployment operation status is phase failed. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseFailed"] = 1024] = "PhaseFailed"; + /** + * The deployment operation status is canceled. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Canceled"] = 2048] = "Canceled"; + /** + * The deployment operation status is phase canceled. + */ + DeploymentOperationStatus[DeploymentOperationStatus["PhaseCanceled"] = 4096] = "PhaseCanceled"; + /** + * The deployment operation status is manualintervention pending. + */ + DeploymentOperationStatus[DeploymentOperationStatus["ManualInterventionPending"] = 8192] = "ManualInterventionPending"; + /** + * The deployment operation status is queued for pipeline. + */ + DeploymentOperationStatus[DeploymentOperationStatus["QueuedForPipeline"] = 16384] = "QueuedForPipeline"; + /** + * The deployment operation status is cancelling. + */ + DeploymentOperationStatus[DeploymentOperationStatus["Cancelling"] = 32768] = "Cancelling"; + /** + * The deployment operation status is EvaluatingGates. + */ + DeploymentOperationStatus[DeploymentOperationStatus["EvaluatingGates"] = 65536] = "EvaluatingGates"; + /** + * The deployment operation status is GateFailed. + */ + DeploymentOperationStatus[DeploymentOperationStatus["GateFailed"] = 131072] = "GateFailed"; + /** + * The deployment operation status is all. + */ + DeploymentOperationStatus[DeploymentOperationStatus["All"] = 258047] = "All"; +})(DeploymentOperationStatus = exports.DeploymentOperationStatus || (exports.DeploymentOperationStatus = {})); +var DeploymentReason; +(function (DeploymentReason) { + /** + * The deployment reason is none. + */ + DeploymentReason[DeploymentReason["None"] = 0] = "None"; + /** + * The deployment reason is manual. + */ + DeploymentReason[DeploymentReason["Manual"] = 1] = "Manual"; + /** + * The deployment reason is automated. + */ + DeploymentReason[DeploymentReason["Automated"] = 2] = "Automated"; + /** + * The deployment reason is scheduled. + */ + DeploymentReason[DeploymentReason["Scheduled"] = 4] = "Scheduled"; + /** + * The deployment reason is RedeployTrigger. + */ + DeploymentReason[DeploymentReason["RedeployTrigger"] = 8] = "RedeployTrigger"; +})(DeploymentReason = exports.DeploymentReason || (exports.DeploymentReason = {})); +var DeploymentsQueryType; +(function (DeploymentsQueryType) { + DeploymentsQueryType[DeploymentsQueryType["Regular"] = 1] = "Regular"; + DeploymentsQueryType[DeploymentsQueryType["FailingSince"] = 2] = "FailingSince"; +})(DeploymentsQueryType = exports.DeploymentsQueryType || (exports.DeploymentsQueryType = {})); +var DeploymentStatus; +(function (DeploymentStatus) { + /** + * The deployment status is undefined. + */ + DeploymentStatus[DeploymentStatus["Undefined"] = 0] = "Undefined"; + /** + * The deployment status is not deployed. + */ + DeploymentStatus[DeploymentStatus["NotDeployed"] = 1] = "NotDeployed"; + /** + * The deployment status is in progress. + */ + DeploymentStatus[DeploymentStatus["InProgress"] = 2] = "InProgress"; + /** + * The deployment status is succeeded. + */ + DeploymentStatus[DeploymentStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The deployment status is partiallysucceeded. + */ + DeploymentStatus[DeploymentStatus["PartiallySucceeded"] = 8] = "PartiallySucceeded"; + /** + * The deployment status is failed. + */ + DeploymentStatus[DeploymentStatus["Failed"] = 16] = "Failed"; + /** + * The deployment status is all. + */ + DeploymentStatus[DeploymentStatus["All"] = 31] = "All"; +})(DeploymentStatus = exports.DeploymentStatus || (exports.DeploymentStatus = {})); +var DeployPhaseStatus; +(function (DeployPhaseStatus) { + /** + * Phase status not set. + */ + DeployPhaseStatus[DeployPhaseStatus["Undefined"] = 0] = "Undefined"; + /** + * Phase execution not started. + */ + DeployPhaseStatus[DeployPhaseStatus["NotStarted"] = 1] = "NotStarted"; + /** + * Phase execution in progress. + */ + DeployPhaseStatus[DeployPhaseStatus["InProgress"] = 2] = "InProgress"; + /** + * Phase execution partially succeeded. + */ + DeployPhaseStatus[DeployPhaseStatus["PartiallySucceeded"] = 4] = "PartiallySucceeded"; + /** + * Phase execution succeeded. + */ + DeployPhaseStatus[DeployPhaseStatus["Succeeded"] = 8] = "Succeeded"; + /** + * Phase execution failed. + */ + DeployPhaseStatus[DeployPhaseStatus["Failed"] = 16] = "Failed"; + /** + * Phase execution canceled. + */ + DeployPhaseStatus[DeployPhaseStatus["Canceled"] = 32] = "Canceled"; + /** + * Phase execution skipped. + */ + DeployPhaseStatus[DeployPhaseStatus["Skipped"] = 64] = "Skipped"; + /** + * Phase is in cancelling state. + */ + DeployPhaseStatus[DeployPhaseStatus["Cancelling"] = 128] = "Cancelling"; +})(DeployPhaseStatus = exports.DeployPhaseStatus || (exports.DeployPhaseStatus = {})); +var DeployPhaseTypes; +(function (DeployPhaseTypes) { + /** + * Phase type not defined. Don't use this. + */ + DeployPhaseTypes[DeployPhaseTypes["Undefined"] = 0] = "Undefined"; + /** + * Phase type which contains tasks executed on agent. + */ + DeployPhaseTypes[DeployPhaseTypes["AgentBasedDeployment"] = 1] = "AgentBasedDeployment"; + /** + * Phase type which contains tasks executed by server. + */ + DeployPhaseTypes[DeployPhaseTypes["RunOnServer"] = 2] = "RunOnServer"; + /** + * Phase type which contains tasks executed on deployment group machines. + */ + DeployPhaseTypes[DeployPhaseTypes["MachineGroupBasedDeployment"] = 4] = "MachineGroupBasedDeployment"; + /** + * Phase type which contains tasks which acts as Gates for the deployment to go forward. + */ + DeployPhaseTypes[DeployPhaseTypes["DeploymentGates"] = 8] = "DeploymentGates"; +})(DeployPhaseTypes = exports.DeployPhaseTypes || (exports.DeployPhaseTypes = {})); +var EnvironmentStatus; +(function (EnvironmentStatus) { + /** + * Environment status not set. + */ + EnvironmentStatus[EnvironmentStatus["Undefined"] = 0] = "Undefined"; + /** + * Environment is in not started state. + */ + EnvironmentStatus[EnvironmentStatus["NotStarted"] = 1] = "NotStarted"; + /** + * Environment is in progress state. + */ + EnvironmentStatus[EnvironmentStatus["InProgress"] = 2] = "InProgress"; + /** + * Environment is in succeeded state. + */ + EnvironmentStatus[EnvironmentStatus["Succeeded"] = 4] = "Succeeded"; + /** + * Environment is in canceled state. + */ + EnvironmentStatus[EnvironmentStatus["Canceled"] = 8] = "Canceled"; + /** + * Environment is in rejected state. + */ + EnvironmentStatus[EnvironmentStatus["Rejected"] = 16] = "Rejected"; + /** + * Environment is in queued state. + */ + EnvironmentStatus[EnvironmentStatus["Queued"] = 32] = "Queued"; + /** + * Environment is in scheduled state. + */ + EnvironmentStatus[EnvironmentStatus["Scheduled"] = 64] = "Scheduled"; + /** + * Environment is in partially succeeded state. + */ + EnvironmentStatus[EnvironmentStatus["PartiallySucceeded"] = 128] = "PartiallySucceeded"; +})(EnvironmentStatus = exports.EnvironmentStatus || (exports.EnvironmentStatus = {})); +var EnvironmentTriggerType; +(function (EnvironmentTriggerType) { + /** + * Environment trigger type undefined. + */ + EnvironmentTriggerType[EnvironmentTriggerType["Undefined"] = 0] = "Undefined"; + /** + * Environment trigger type is deployment group redeploy. + */ + EnvironmentTriggerType[EnvironmentTriggerType["DeploymentGroupRedeploy"] = 1] = "DeploymentGroupRedeploy"; + /** + * Environment trigger type is Rollback. + */ + EnvironmentTriggerType[EnvironmentTriggerType["RollbackRedeploy"] = 2] = "RollbackRedeploy"; +})(EnvironmentTriggerType = exports.EnvironmentTriggerType || (exports.EnvironmentTriggerType = {})); +var FolderPathQueryOrder; +(function (FolderPathQueryOrder) { + /** + * No order. + */ + FolderPathQueryOrder[FolderPathQueryOrder["None"] = 0] = "None"; + /** + * Order by folder name and path ascending. + */ + FolderPathQueryOrder[FolderPathQueryOrder["Ascending"] = 1] = "Ascending"; + /** + * Order by folder name and path descending. + */ + FolderPathQueryOrder[FolderPathQueryOrder["Descending"] = 2] = "Descending"; +})(FolderPathQueryOrder = exports.FolderPathQueryOrder || (exports.FolderPathQueryOrder = {})); +var GateStatus; +(function (GateStatus) { + /** + * The gate does not have the status set. + */ + GateStatus[GateStatus["None"] = 0] = "None"; + /** + * The gate is in pending state. + */ + GateStatus[GateStatus["Pending"] = 1] = "Pending"; + /** + * The gate is currently in progress. + */ + GateStatus[GateStatus["InProgress"] = 2] = "InProgress"; + /** + * The gate completed successfully. + */ + GateStatus[GateStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The gate execution failed. + */ + GateStatus[GateStatus["Failed"] = 8] = "Failed"; + /** + * The gate execution cancelled. + */ + GateStatus[GateStatus["Canceled"] = 16] = "Canceled"; +})(GateStatus = exports.GateStatus || (exports.GateStatus = {})); +var IssueSource; +(function (IssueSource) { + IssueSource[IssueSource["None"] = 0] = "None"; + IssueSource[IssueSource["User"] = 1] = "User"; + IssueSource[IssueSource["System"] = 2] = "System"; +})(IssueSource = exports.IssueSource || (exports.IssueSource = {})); +var MailSectionType; +(function (MailSectionType) { + MailSectionType[MailSectionType["Details"] = 0] = "Details"; + MailSectionType[MailSectionType["Environments"] = 1] = "Environments"; + MailSectionType[MailSectionType["Issues"] = 2] = "Issues"; + MailSectionType[MailSectionType["TestResults"] = 3] = "TestResults"; + MailSectionType[MailSectionType["WorkItems"] = 4] = "WorkItems"; + MailSectionType[MailSectionType["ReleaseInfo"] = 5] = "ReleaseInfo"; +})(MailSectionType = exports.MailSectionType || (exports.MailSectionType = {})); +/** + * Describes manual intervention status + */ +var ManualInterventionStatus; +(function (ManualInterventionStatus) { + /** + * The manual intervention does not have the status set. + */ + ManualInterventionStatus[ManualInterventionStatus["Unknown"] = 0] = "Unknown"; + /** + * The manual intervention is pending. + */ + ManualInterventionStatus[ManualInterventionStatus["Pending"] = 1] = "Pending"; + /** + * The manual intervention is rejected. + */ + ManualInterventionStatus[ManualInterventionStatus["Rejected"] = 2] = "Rejected"; + /** + * The manual intervention is approved. + */ + ManualInterventionStatus[ManualInterventionStatus["Approved"] = 4] = "Approved"; + /** + * The manual intervention is canceled. + */ + ManualInterventionStatus[ManualInterventionStatus["Canceled"] = 8] = "Canceled"; +})(ManualInterventionStatus = exports.ManualInterventionStatus || (exports.ManualInterventionStatus = {})); +var ParallelExecutionTypes; +(function (ParallelExecutionTypes) { + ParallelExecutionTypes[ParallelExecutionTypes["None"] = 0] = "None"; + ParallelExecutionTypes[ParallelExecutionTypes["MultiConfiguration"] = 1] = "MultiConfiguration"; + ParallelExecutionTypes[ParallelExecutionTypes["MultiMachine"] = 2] = "MultiMachine"; +})(ParallelExecutionTypes = exports.ParallelExecutionTypes || (exports.ParallelExecutionTypes = {})); +var PipelineProcessTypes; +(function (PipelineProcessTypes) { + PipelineProcessTypes[PipelineProcessTypes["Designer"] = 1] = "Designer"; + PipelineProcessTypes[PipelineProcessTypes["Yaml"] = 2] = "Yaml"; +})(PipelineProcessTypes = exports.PipelineProcessTypes || (exports.PipelineProcessTypes = {})); +var PropertySelectorType; +(function (PropertySelectorType) { + /** + * Include in property selector. + */ + PropertySelectorType[PropertySelectorType["Inclusion"] = 0] = "Inclusion"; + /** + * Exclude in property selector. + */ + PropertySelectorType[PropertySelectorType["Exclusion"] = 1] = "Exclusion"; +})(PropertySelectorType = exports.PropertySelectorType || (exports.PropertySelectorType = {})); +var PullRequestSystemType; +(function (PullRequestSystemType) { + PullRequestSystemType[PullRequestSystemType["None"] = 0] = "None"; + PullRequestSystemType[PullRequestSystemType["TfsGit"] = 1] = "TfsGit"; + PullRequestSystemType[PullRequestSystemType["GitHub"] = 2] = "GitHub"; +})(PullRequestSystemType = exports.PullRequestSystemType || (exports.PullRequestSystemType = {})); +var ReleaseDefinitionExpands; +(function (ReleaseDefinitionExpands) { + /** + * Returns top level properties of object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["None"] = 0] = "None"; + /** + * Include environments in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Environments"] = 2] = "Environments"; + /** + * Include artifacts in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Artifacts"] = 4] = "Artifacts"; + /** + * Include triggers in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Triggers"] = 8] = "Triggers"; + /** + * Include variables in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Variables"] = 16] = "Variables"; + /** + * Include tags in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["Tags"] = 32] = "Tags"; + /** + * Include last release in return object. + */ + ReleaseDefinitionExpands[ReleaseDefinitionExpands["LastRelease"] = 64] = "LastRelease"; +})(ReleaseDefinitionExpands = exports.ReleaseDefinitionExpands || (exports.ReleaseDefinitionExpands = {})); +var ReleaseDefinitionQueryOrder; +(function (ReleaseDefinitionQueryOrder) { + /** + * Return results based on release definition Id ascending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdAscending"] = 0] = "IdAscending"; + /** + * Return results based on release definition Id descending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["IdDescending"] = 1] = "IdDescending"; + /** + * Return results based on release definition name ascending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameAscending"] = 2] = "NameAscending"; + /** + * Return results based on release definition name descending order. + */ + ReleaseDefinitionQueryOrder[ReleaseDefinitionQueryOrder["NameDescending"] = 3] = "NameDescending"; +})(ReleaseDefinitionQueryOrder = exports.ReleaseDefinitionQueryOrder || (exports.ReleaseDefinitionQueryOrder = {})); +var ReleaseDefinitionSource; +(function (ReleaseDefinitionSource) { + /** + * Indicates ReleaseDefinition source not defined. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["Undefined"] = 0] = "Undefined"; + /** + * Indicates ReleaseDefinition created using REST API. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["RestApi"] = 1] = "RestApi"; + /** + * Indicates ReleaseDefinition created using UI. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["UserInterface"] = 2] = "UserInterface"; + /** + * Indicates ReleaseDefinition created from Ibiza. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["Ibiza"] = 4] = "Ibiza"; + /** + * Indicates ReleaseDefinition created from PortalExtension API. + */ + ReleaseDefinitionSource[ReleaseDefinitionSource["PortalExtensionApi"] = 8] = "PortalExtensionApi"; +})(ReleaseDefinitionSource = exports.ReleaseDefinitionSource || (exports.ReleaseDefinitionSource = {})); +var ReleaseEnvironmentExpands; +(function (ReleaseEnvironmentExpands) { + /** + * Return top level properties of object. + */ + ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["None"] = 0] = "None"; + /** + * Expand environment with tasks. + */ + ReleaseEnvironmentExpands[ReleaseEnvironmentExpands["Tasks"] = 1] = "Tasks"; +})(ReleaseEnvironmentExpands = exports.ReleaseEnvironmentExpands || (exports.ReleaseEnvironmentExpands = {})); +var ReleaseExpands; +(function (ReleaseExpands) { + ReleaseExpands[ReleaseExpands["None"] = 0] = "None"; + ReleaseExpands[ReleaseExpands["Environments"] = 2] = "Environments"; + ReleaseExpands[ReleaseExpands["Artifacts"] = 4] = "Artifacts"; + ReleaseExpands[ReleaseExpands["Approvals"] = 8] = "Approvals"; + ReleaseExpands[ReleaseExpands["ManualInterventions"] = 16] = "ManualInterventions"; + ReleaseExpands[ReleaseExpands["Variables"] = 32] = "Variables"; + ReleaseExpands[ReleaseExpands["Tags"] = 64] = "Tags"; +})(ReleaseExpands = exports.ReleaseExpands || (exports.ReleaseExpands = {})); +var ReleaseQueryOrder; +(function (ReleaseQueryOrder) { + /** + * Return results in descending order. + */ + ReleaseQueryOrder[ReleaseQueryOrder["Descending"] = 0] = "Descending"; + /** + * Return results in ascending order. + */ + ReleaseQueryOrder[ReleaseQueryOrder["Ascending"] = 1] = "Ascending"; +})(ReleaseQueryOrder = exports.ReleaseQueryOrder || (exports.ReleaseQueryOrder = {})); +var ReleaseReason; +(function (ReleaseReason) { + /** + * Indicates the release triggered reason not set. + */ + ReleaseReason[ReleaseReason["None"] = 0] = "None"; + /** + * Indicates the release triggered manually. + */ + ReleaseReason[ReleaseReason["Manual"] = 1] = "Manual"; + /** + * Indicates the release triggered by continuous integration. + */ + ReleaseReason[ReleaseReason["ContinuousIntegration"] = 2] = "ContinuousIntegration"; + /** + * Indicates the release triggered by schedule. + */ + ReleaseReason[ReleaseReason["Schedule"] = 3] = "Schedule"; + /** + * Indicates the release triggered by PullRequest. + */ + ReleaseReason[ReleaseReason["PullRequest"] = 4] = "PullRequest"; +})(ReleaseReason = exports.ReleaseReason || (exports.ReleaseReason = {})); +var ReleaseStatus; +(function (ReleaseStatus) { + /** + * Release status not set. + */ + ReleaseStatus[ReleaseStatus["Undefined"] = 0] = "Undefined"; + /** + * Release is in draft state. + */ + ReleaseStatus[ReleaseStatus["Draft"] = 1] = "Draft"; + /** + * Release status is in active. + */ + ReleaseStatus[ReleaseStatus["Active"] = 2] = "Active"; + /** + * Release status is in abandoned. + */ + ReleaseStatus[ReleaseStatus["Abandoned"] = 4] = "Abandoned"; +})(ReleaseStatus = exports.ReleaseStatus || (exports.ReleaseStatus = {})); +var ReleaseTriggerType; +(function (ReleaseTriggerType) { + /** + * Release trigger type not set. + */ + ReleaseTriggerType[ReleaseTriggerType["Undefined"] = 0] = "Undefined"; + /** + * Artifact based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["ArtifactSource"] = 1] = "ArtifactSource"; + /** + * Schedule based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["Schedule"] = 2] = "Schedule"; + /** + * Source repository based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["SourceRepo"] = 3] = "SourceRepo"; + /** + * Container image based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["ContainerImage"] = 4] = "ContainerImage"; + /** + * Package based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["Package"] = 5] = "Package"; + /** + * Pull request based release trigger. + */ + ReleaseTriggerType[ReleaseTriggerType["PullRequest"] = 6] = "PullRequest"; +})(ReleaseTriggerType = exports.ReleaseTriggerType || (exports.ReleaseTriggerType = {})); +var ScheduleDays; +(function (ScheduleDays) { + /** + * Scheduled day not set. + */ + ScheduleDays[ScheduleDays["None"] = 0] = "None"; + /** + * Scheduled on Monday. + */ + ScheduleDays[ScheduleDays["Monday"] = 1] = "Monday"; + /** + * Scheduled on Tuesday. + */ + ScheduleDays[ScheduleDays["Tuesday"] = 2] = "Tuesday"; + /** + * Scheduled on Wednesday. + */ + ScheduleDays[ScheduleDays["Wednesday"] = 4] = "Wednesday"; + /** + * Scheduled on Thursday. + */ + ScheduleDays[ScheduleDays["Thursday"] = 8] = "Thursday"; + /** + * Scheduled on Friday. + */ + ScheduleDays[ScheduleDays["Friday"] = 16] = "Friday"; + /** + * Scheduled on Saturday. + */ + ScheduleDays[ScheduleDays["Saturday"] = 32] = "Saturday"; + /** + * Scheduled on Sunday. + */ + ScheduleDays[ScheduleDays["Sunday"] = 64] = "Sunday"; + /** + * Scheduled on all the days in week. + */ + ScheduleDays[ScheduleDays["All"] = 127] = "All"; +})(ScheduleDays = exports.ScheduleDays || (exports.ScheduleDays = {})); +var SenderType; +(function (SenderType) { + SenderType[SenderType["ServiceAccount"] = 1] = "ServiceAccount"; + SenderType[SenderType["RequestingUser"] = 2] = "RequestingUser"; +})(SenderType = exports.SenderType || (exports.SenderType = {})); +var SingleReleaseExpands; +(function (SingleReleaseExpands) { + /** + * Return top level properties of object. + */ + SingleReleaseExpands[SingleReleaseExpands["None"] = 0] = "None"; + /** + * Expand release with tasks. + */ + SingleReleaseExpands[SingleReleaseExpands["Tasks"] = 1] = "Tasks"; +})(SingleReleaseExpands = exports.SingleReleaseExpands || (exports.SingleReleaseExpands = {})); +var TaskStatus; +(function (TaskStatus) { + /** + * The task does not have the status set. + */ + TaskStatus[TaskStatus["Unknown"] = 0] = "Unknown"; + /** + * The task is in pending status. + */ + TaskStatus[TaskStatus["Pending"] = 1] = "Pending"; + /** + * The task is currently in progress. + */ + TaskStatus[TaskStatus["InProgress"] = 2] = "InProgress"; + /** + * The task completed successfully. + */ + TaskStatus[TaskStatus["Success"] = 3] = "Success"; + /** + * The task execution failed. + */ + TaskStatus[TaskStatus["Failure"] = 4] = "Failure"; + /** + * The task execution canceled. + */ + TaskStatus[TaskStatus["Canceled"] = 5] = "Canceled"; + /** + * The task execution skipped. + */ + TaskStatus[TaskStatus["Skipped"] = 6] = "Skipped"; + /** + * The task completed successfully. + */ + TaskStatus[TaskStatus["Succeeded"] = 7] = "Succeeded"; + /** + * The task execution failed. + */ + TaskStatus[TaskStatus["Failed"] = 8] = "Failed"; + /** + * The task execution partially succeeded. + */ + TaskStatus[TaskStatus["PartiallySucceeded"] = 9] = "PartiallySucceeded"; +})(TaskStatus = exports.TaskStatus || (exports.TaskStatus = {})); +var VariableGroupActionFilter; +(function (VariableGroupActionFilter) { + VariableGroupActionFilter[VariableGroupActionFilter["None"] = 0] = "None"; + VariableGroupActionFilter[VariableGroupActionFilter["Manage"] = 2] = "Manage"; + VariableGroupActionFilter[VariableGroupActionFilter["Use"] = 16] = "Use"; +})(VariableGroupActionFilter = exports.VariableGroupActionFilter || (exports.VariableGroupActionFilter = {})); +var YamlFileSourceTypes; +(function (YamlFileSourceTypes) { + YamlFileSourceTypes[YamlFileSourceTypes["None"] = 0] = "None"; + YamlFileSourceTypes[YamlFileSourceTypes["TFSGit"] = 1] = "TFSGit"; +})(YamlFileSourceTypes = exports.YamlFileSourceTypes || (exports.YamlFileSourceTypes = {})); +exports.TypeInfo = { + AgentArtifactDefinition: {}, + AgentArtifactType: { + enumValues: { + "xamlBuild": 0, + "build": 1, + "jenkins": 2, + "fileShare": 3, + "nuget": 4, + "tfsOnPrem": 5, + "gitHub": 6, + "tfGit": 7, + "externalTfsBuild": 8, + "custom": 9, + "tfvc": 10 + } + }, + AgentBasedDeployPhase: {}, + AgentDeploymentInput: {}, + ApprovalExecutionOrder: { + enumValues: { + "beforeGates": 1, + "afterSuccessfulGates": 2, + "afterGatesAlways": 4 + } + }, + ApprovalFilters: { + enumValues: { + "none": 0, + "manualApprovals": 1, + "automatedApprovals": 2, + "approvalSnapshots": 4, + "all": 7 + } + }, + ApprovalOptions: {}, + ApprovalStatus: { + enumValues: { + "undefined": 0, + "pending": 1, + "approved": 2, + "rejected": 4, + "reassigned": 6, + "canceled": 7, + "skipped": 8 + } + }, + ApprovalType: { + enumValues: { + "undefined": 0, + "preDeploy": 1, + "postDeploy": 2, + "all": 3 + } + }, + ArtifactContributionDefinition: {}, + ArtifactMetadata: {}, + ArtifactSourceTrigger: {}, + ArtifactTypeDefinition: {}, + ArtifactVersion: {}, + ArtifactVersionQueryResult: {}, + AuditAction: { + enumValues: { + "add": 1, + "update": 2, + "delete": 3, + "undelete": 4 + } + }, + AuthorizationHeaderFor: { + enumValues: { + "revalidateApproverIdentity": 0, + "onBehalfOf": 1 + } + }, + AutoTriggerIssue: {}, + AzureKeyVaultVariableGroupProviderData: {}, + AzureKeyVaultVariableValue: {}, + BuildVersion: {}, + Change: {}, + CodeRepositoryReference: {}, + Condition: {}, + ConditionType: { + enumValues: { + "undefined": 0, + "event": 1, + "environmentState": 2, + "artifact": 4 + } + }, + ContainerImageTrigger: {}, + ContinuousDeploymentTriggerIssue: {}, + Deployment: {}, + DeploymentApprovalCompletedEvent: {}, + DeploymentApprovalPendingEvent: {}, + DeploymentAttempt: {}, + DeploymentAuthorizationInfo: {}, + DeploymentAuthorizationOwner: { + enumValues: { + "automatic": 0, + "deploymentSubmitter": 1, + "firstPreDeploymentApprover": 2 + } + }, + DeploymentCompletedEvent: {}, + DeploymentExpands: { + enumValues: { + "all": 0, + "deploymentOnly": 1, + "approvals": 2, + "artifacts": 4 + } + }, + DeploymentJob: {}, + DeploymentManualInterventionPendingEvent: {}, + DeploymentOperationStatus: { + enumValues: { + "undefined": 0, + "queued": 1, + "scheduled": 2, + "pending": 4, + "approved": 8, + "rejected": 16, + "deferred": 32, + "queuedForAgent": 64, + "phaseInProgress": 128, + "phaseSucceeded": 256, + "phasePartiallySucceeded": 512, + "phaseFailed": 1024, + "canceled": 2048, + "phaseCanceled": 4096, + "manualInterventionPending": 8192, + "queuedForPipeline": 16384, + "cancelling": 32768, + "evaluatingGates": 65536, + "gateFailed": 131072, + "all": 258047 + } + }, + DeploymentQueryParameters: {}, + DeploymentReason: { + enumValues: { + "none": 0, + "manual": 1, + "automated": 2, + "scheduled": 4, + "redeployTrigger": 8 + } + }, + DeploymentsQueryType: { + enumValues: { + "regular": 1, + "failingSince": 2 + } + }, + DeploymentStartedEvent: {}, + DeploymentStatus: { + enumValues: { + "undefined": 0, + "notDeployed": 1, + "inProgress": 2, + "succeeded": 4, + "partiallySucceeded": 8, + "failed": 16, + "all": 31 + } + }, + DeployPhase: {}, + DeployPhaseStatus: { + enumValues: { + "undefined": 0, + "notStarted": 1, + "inProgress": 2, + "partiallySucceeded": 4, + "succeeded": 8, + "failed": 16, + "canceled": 32, + "skipped": 64, + "cancelling": 128 + } + }, + DeployPhaseTypes: { + enumValues: { + "undefined": 0, + "agentBasedDeployment": 1, + "runOnServer": 2, + "machineGroupBasedDeployment": 4, + "deploymentGates": 8 + } + }, + EnvironmentStatus: { + enumValues: { + "undefined": 0, + "notStarted": 1, + "inProgress": 2, + "succeeded": 4, + "canceled": 8, + "rejected": 16, + "queued": 32, + "scheduled": 64, + "partiallySucceeded": 128 + } + }, + EnvironmentTrigger: {}, + EnvironmentTriggerType: { + enumValues: { + "undefined": 0, + "deploymentGroupRedeploy": 1, + "rollbackRedeploy": 2 + } + }, + ExecutionInput: {}, + Folder: {}, + FolderPathQueryOrder: { + enumValues: { + "none": 0, + "ascending": 1, + "descending": 2 + } + }, + GatesDeployPhase: {}, + GateStatus: { + enumValues: { + "none": 0, + "pending": 1, + "inProgress": 2, + "succeeded": 4, + "failed": 8, + "canceled": 16 + } + }, + IgnoredGate: {}, + IssueSource: { + enumValues: { + "none": 0, + "user": 1, + "system": 2 + } + }, + MachineGroupBasedDeployPhase: {}, + MailMessage: {}, + MailSectionType: { + enumValues: { + "details": 0, + "environments": 1, + "issues": 2, + "testResults": 3, + "workItems": 4, + "releaseInfo": 5 + } + }, + ManualIntervention: {}, + ManualInterventionStatus: { + enumValues: { + "unknown": 0, + "pending": 1, + "rejected": 2, + "approved": 4, + "canceled": 8 + } + }, + ManualInterventionUpdateMetadata: {}, + MultiConfigInput: {}, + MultiMachineInput: {}, + PackageTrigger: {}, + ParallelExecutionInputBase: {}, + ParallelExecutionTypes: { + enumValues: { + "none": 0, + "multiConfiguration": 1, + "multiMachine": 2 + } + }, + PipelineProcess: {}, + PipelineProcessTypes: { + enumValues: { + "designer": 1, + "yaml": 2 + } + }, + PropertySelector: {}, + PropertySelectorType: { + enumValues: { + "inclusion": 0, + "exclusion": 1 + } + }, + PullRequestConfiguration: {}, + PullRequestSystemType: { + enumValues: { + "none": 0, + "tfsGit": 1, + "gitHub": 2 + } + }, + PullRequestTrigger: {}, + Release: {}, + ReleaseAbandonedEvent: {}, + ReleaseApproval: {}, + ReleaseApprovalHistory: {}, + ReleaseApprovalPendingEvent: {}, + ReleaseCondition: {}, + ReleaseCreatedEvent: {}, + ReleaseDefinition: {}, + ReleaseDefinitionApprovals: {}, + ReleaseDefinitionEnvironment: {}, + ReleaseDefinitionEnvironmentTemplate: {}, + ReleaseDefinitionExpands: { + enumValues: { + "none": 0, + "environments": 2, + "artifacts": 4, + "triggers": 8, + "variables": 16, + "tags": 32, + "lastRelease": 64 + } + }, + ReleaseDefinitionQueryOrder: { + enumValues: { + "idAscending": 0, + "idDescending": 1, + "nameAscending": 2, + "nameDescending": 3 + } + }, + ReleaseDefinitionRevision: {}, + ReleaseDefinitionSource: { + enumValues: { + "undefined": 0, + "restApi": 1, + "userInterface": 2, + "ibiza": 4, + "portalExtensionApi": 8 + } + }, + ReleaseDefinitionSummary: {}, + ReleaseDeployPhase: {}, + ReleaseEnvironment: {}, + ReleaseEnvironmentCompletedEvent: {}, + ReleaseEnvironmentExpands: { + enumValues: { + "none": 0, + "tasks": 1 + } + }, + ReleaseEnvironmentStatusUpdatedEvent: {}, + ReleaseEnvironmentUpdateMetadata: {}, + ReleaseExpands: { + enumValues: { + "none": 0, + "environments": 2, + "artifacts": 4, + "approvals": 8, + "manualInterventions": 16, + "variables": 32, + "tags": 64 + } + }, + ReleaseGates: {}, + ReleaseGatesPhase: {}, + ReleaseNotCreatedEvent: {}, + ReleaseQueryOrder: { + enumValues: { + "descending": 0, + "ascending": 1 + } + }, + ReleaseReason: { + enumValues: { + "none": 0, + "manual": 1, + "continuousIntegration": 2, + "schedule": 3, + "pullRequest": 4 + } + }, + ReleaseReference: {}, + ReleaseRevision: {}, + ReleaseSchedule: {}, + ReleaseStartMetadata: {}, + ReleaseStatus: { + enumValues: { + "undefined": 0, + "draft": 1, + "active": 2, + "abandoned": 4 + } + }, + ReleaseTask: {}, + ReleaseTaskAttachment: {}, + ReleaseTasksUpdatedEvent: {}, + ReleaseTriggerBase: {}, + ReleaseTriggerType: { + enumValues: { + "undefined": 0, + "artifactSource": 1, + "schedule": 2, + "sourceRepo": 3, + "containerImage": 4, + "package": 5, + "pullRequest": 6 + } + }, + ReleaseUpdatedEvent: {}, + ReleaseUpdateMetadata: {}, + RunOnServerDeployPhase: {}, + ScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 + } + }, + ScheduledReleaseTrigger: {}, + SenderType: { + enumValues: { + "serviceAccount": 1, + "requestingUser": 2 + } + }, + ServerDeploymentInput: {}, + SingleReleaseExpands: { + enumValues: { + "none": 0, + "tasks": 1 + } + }, + SourcePullRequestVersion: {}, + SourceRepoTrigger: {}, + SummaryMailSection: {}, + TaskStatus: { + enumValues: { + "unknown": 0, + "pending": 1, + "inProgress": 2, + "success": 3, + "failure": 4, + "canceled": 5, + "skipped": 6, + "succeeded": 7, + "failed": 8, + "partiallySucceeded": 9 + } + }, + VariableGroup: {}, + VariableGroupActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + YamlFileSource: {}, + YamlFileSourceTypes: { + enumValues: { + "none": 0, + "tfsGit": 1 + } + }, + YamlPipelineProcess: {}, +}; +exports.TypeInfo.AgentArtifactDefinition.fields = { + artifactType: { + enumType: exports.TypeInfo.AgentArtifactType + } +}; +exports.TypeInfo.AgentBasedDeployPhase.fields = { + deploymentInput: { + typeInfo: exports.TypeInfo.AgentDeploymentInput + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.AgentDeploymentInput.fields = { + parallelExecution: { + typeInfo: exports.TypeInfo.ExecutionInput + } +}; +exports.TypeInfo.ApprovalOptions.fields = { + executionOrder: { + enumType: exports.TypeInfo.ApprovalExecutionOrder + } +}; +exports.TypeInfo.ArtifactContributionDefinition.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.ArtifactMetadata.fields = { + instanceReference: { + typeInfo: exports.TypeInfo.BuildVersion + } +}; +exports.TypeInfo.ArtifactSourceTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ArtifactTypeDefinition.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.ArtifactVersion.fields = { + defaultVersion: { + typeInfo: exports.TypeInfo.BuildVersion + }, + versions: { + isArray: true, + typeInfo: exports.TypeInfo.BuildVersion + } +}; +exports.TypeInfo.ArtifactVersionQueryResult.fields = { + artifactVersions: { + isArray: true, + typeInfo: exports.TypeInfo.ArtifactVersion + } +}; +exports.TypeInfo.AutoTriggerIssue.fields = { + issueSource: { + enumType: exports.TypeInfo.IssueSource + }, + releaseTriggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { + lastRefreshedOn: { + isDate: true, + } +}; +exports.TypeInfo.AzureKeyVaultVariableValue.fields = { + expires: { + isDate: true, + } +}; +exports.TypeInfo.BuildVersion.fields = { + sourcePullRequestVersion: { + typeInfo: exports.TypeInfo.SourcePullRequestVersion + } +}; +exports.TypeInfo.Change.fields = { + timestamp: { + isDate: true, + } +}; +exports.TypeInfo.CodeRepositoryReference.fields = { + systemType: { + enumType: exports.TypeInfo.PullRequestSystemType + } +}; +exports.TypeInfo.Condition.fields = { + conditionType: { + enumType: exports.TypeInfo.ConditionType + } +}; +exports.TypeInfo.ContainerImageTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ContinuousDeploymentTriggerIssue.fields = { + issueSource: { + enumType: exports.TypeInfo.IssueSource + }, + releaseTriggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.Deployment.fields = { + completedOn: { + isDate: true, + }, + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.Condition + }, + deploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus + }, + lastModifiedOn: { + isDate: true, + }, + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + postDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + preDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + queuedOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + scheduledDeploymentTime: { + isDate: true, + }, + startedOn: { + isDate: true, + } +}; +exports.TypeInfo.DeploymentApprovalCompletedEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeploymentApprovalPendingEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions + }, + completedApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + pendingApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeploymentAttempt.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask + }, + lastModifiedOn: { + isDate: true, + }, + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + postDeploymentGates: { + typeInfo: exports.TypeInfo.ReleaseGates + }, + preDeploymentGates: { + typeInfo: exports.TypeInfo.ReleaseGates + }, + queuedOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason + }, + releaseDeployPhases: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseDeployPhase + }, + status: { + enumType: exports.TypeInfo.DeploymentStatus + }, + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask + } +}; +exports.TypeInfo.DeploymentAuthorizationInfo.fields = { + authorizationHeaderFor: { + enumType: exports.TypeInfo.AuthorizationHeaderFor + } +}; +exports.TypeInfo.DeploymentCompletedEvent.fields = { + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + } +}; +exports.TypeInfo.DeploymentJob.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask + }, + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask + } +}; +exports.TypeInfo.DeploymentManualInterventionPendingEvent.fields = { + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + manualIntervention: { + typeInfo: exports.TypeInfo.ManualIntervention + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeploymentQueryParameters.fields = { + deploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus + }, + expands: { + enumType: exports.TypeInfo.DeploymentExpands + }, + maxModifiedTime: { + isDate: true, + }, + minModifiedTime: { + isDate: true, + }, + operationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + queryOrder: { + enumType: exports.TypeInfo.ReleaseQueryOrder + }, + queryType: { + enumType: exports.TypeInfo.DeploymentsQueryType + } +}; +exports.TypeInfo.DeploymentStartedEvent.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.DeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.EnvironmentTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.EnvironmentTriggerType + } +}; +exports.TypeInfo.ExecutionInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.Folder.fields = { + createdOn: { + isDate: true, + }, + lastChangedDate: { + isDate: true, + } +}; +exports.TypeInfo.GatesDeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.IgnoredGate.fields = { + lastModifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.MachineGroupBasedDeployPhase.fields = { + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.MailMessage.fields = { + replyBy: { + isDate: true, + }, + sections: { + isArray: true, + enumType: exports.TypeInfo.MailSectionType + }, + senderType: { + enumType: exports.TypeInfo.SenderType + } +}; +exports.TypeInfo.ManualIntervention.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ManualInterventionStatus + } +}; +exports.TypeInfo.ManualInterventionUpdateMetadata.fields = { + status: { + enumType: exports.TypeInfo.ManualInterventionStatus + } +}; +exports.TypeInfo.MultiConfigInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.MultiMachineInput.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.PackageTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ParallelExecutionInputBase.fields = { + parallelExecutionType: { + enumType: exports.TypeInfo.ParallelExecutionTypes + } +}; +exports.TypeInfo.PipelineProcess.fields = { + type: { + enumType: exports.TypeInfo.PipelineProcessTypes + } +}; +exports.TypeInfo.PropertySelector.fields = { + selectorType: { + enumType: exports.TypeInfo.PropertySelectorType + } +}; +exports.TypeInfo.PullRequestConfiguration.fields = { + codeRepositoryReference: { + typeInfo: exports.TypeInfo.CodeRepositoryReference + } +}; +exports.TypeInfo.PullRequestTrigger.fields = { + pullRequestConfiguration: { + typeInfo: exports.TypeInfo.PullRequestConfiguration + }, + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.Release.fields = { + createdOn: { + isDate: true, + }, + environments: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + modifiedOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason + }, + status: { + enumType: exports.TypeInfo.ReleaseStatus + }, + variableGroups: { + isArray: true, + typeInfo: exports.TypeInfo.VariableGroup + } +}; +exports.TypeInfo.ReleaseAbandonedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseApproval.fields = { + approvalType: { + enumType: exports.TypeInfo.ApprovalType + }, + createdOn: { + isDate: true, + }, + history: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApprovalHistory + }, + modifiedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ApprovalStatus + } +}; +exports.TypeInfo.ReleaseApprovalHistory.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseApprovalPendingEvent.fields = { + approval: { + typeInfo: exports.TypeInfo.ReleaseApproval + }, + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions + }, + completedApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + deployment: { + typeInfo: exports.TypeInfo.Deployment + }, + environments: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + pendingApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + } +}; +exports.TypeInfo.ReleaseCondition.fields = { + conditionType: { + enumType: exports.TypeInfo.ConditionType + } +}; +exports.TypeInfo.ReleaseCreatedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseDefinition.fields = { + createdOn: { + isDate: true, + }, + environments: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment + }, + lastRelease: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + modifiedOn: { + isDate: true, + }, + pipelineProcess: { + typeInfo: exports.TypeInfo.PipelineProcess + }, + source: { + enumType: exports.TypeInfo.ReleaseDefinitionSource + }, + triggers: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTriggerBase + } +}; +exports.TypeInfo.ReleaseDefinitionApprovals.fields = { + approvalOptions: { + typeInfo: exports.TypeInfo.ApprovalOptions + } +}; +exports.TypeInfo.ReleaseDefinitionEnvironment.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.Condition + }, + deployPhases: { + isArray: true, + typeInfo: exports.TypeInfo.DeployPhase + }, + environmentTriggers: { + isArray: true, + typeInfo: exports.TypeInfo.EnvironmentTrigger + }, + postDeployApprovals: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + preDeployApprovals: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseSchedule + } +}; +exports.TypeInfo.ReleaseDefinitionEnvironmentTemplate.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseDefinitionEnvironment + } +}; +exports.TypeInfo.ReleaseDefinitionRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } +}; +exports.TypeInfo.ReleaseDefinitionSummary.fields = { + releases: { + isArray: true, + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseDeployPhase.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob + }, + manualInterventions: { + isArray: true, + typeInfo: exports.TypeInfo.ManualIntervention + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + }, + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.DeployPhaseStatus + } +}; +exports.TypeInfo.ReleaseEnvironment.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseCondition + }, + createdOn: { + isDate: true, + }, + deployPhasesSnapshot: { + isArray: true, + typeInfo: exports.TypeInfo.DeployPhase + }, + deploySteps: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentAttempt + }, + modifiedOn: { + isDate: true, + }, + nextScheduledUtcTime: { + isDate: true, + }, + postApprovalsSnapshot: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + postDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + preApprovalsSnapshot: { + typeInfo: exports.TypeInfo.ReleaseDefinitionApprovals + }, + preDeployApprovals: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseApproval + }, + scheduledDeploymentTime: { + isDate: true, + }, + schedules: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseSchedule + }, + status: { + enumType: exports.TypeInfo.EnvironmentStatus + }, + variableGroups: { + isArray: true, + typeInfo: exports.TypeInfo.VariableGroup + } +}; +exports.TypeInfo.ReleaseEnvironmentCompletedEvent.fields = { + environment: { + typeInfo: exports.TypeInfo.ReleaseEnvironment + }, + reason: { + enumType: exports.TypeInfo.DeploymentReason + } +}; +exports.TypeInfo.ReleaseEnvironmentStatusUpdatedEvent.fields = { + environmentStatus: { + enumType: exports.TypeInfo.EnvironmentStatus + }, + latestDeploymentOperationStatus: { + enumType: exports.TypeInfo.DeploymentOperationStatus + }, + latestDeploymentStatus: { + enumType: exports.TypeInfo.DeploymentStatus + } +}; +exports.TypeInfo.ReleaseEnvironmentUpdateMetadata.fields = { + scheduledDeploymentTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.EnvironmentStatus + } +}; +exports.TypeInfo.ReleaseGates.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob + }, + ignoredGates: { + isArray: true, + typeInfo: exports.TypeInfo.IgnoredGate + }, + lastModifiedOn: { + isDate: true, + }, + stabilizationCompletedOn: { + isDate: true, + }, + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.GateStatus + }, + succeedingSince: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseGatesPhase.fields = { + deploymentJobs: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentJob + }, + ignoredGates: { + isArray: true, + typeInfo: exports.TypeInfo.IgnoredGate + }, + manualInterventions: { + isArray: true, + typeInfo: exports.TypeInfo.ManualIntervention + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + }, + stabilizationCompletedOn: { + isDate: true, + }, + startedOn: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.DeployPhaseStatus + }, + succeedingSince: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseNotCreatedEvent.fields = { + releaseReason: { + enumType: exports.TypeInfo.ReleaseReason + } +}; +exports.TypeInfo.ReleaseReference.fields = { + createdOn: { + isDate: true, + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason + } +}; +exports.TypeInfo.ReleaseRevision.fields = { + changedDate: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseSchedule.fields = { + daysToRelease: { + enumType: exports.TypeInfo.ScheduleDays + } +}; +exports.TypeInfo.ReleaseStartMetadata.fields = { + artifacts: { + isArray: true, + typeInfo: exports.TypeInfo.ArtifactMetadata + }, + reason: { + enumType: exports.TypeInfo.ReleaseReason + } +}; +exports.TypeInfo.ReleaseTask.fields = { + dateEnded: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.TaskStatus + } +}; +exports.TypeInfo.ReleaseTaskAttachment.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseTasksUpdatedEvent.fields = { + job: { + typeInfo: exports.TypeInfo.ReleaseTask + }, + tasks: { + isArray: true, + typeInfo: exports.TypeInfo.ReleaseTask + } +}; +exports.TypeInfo.ReleaseTriggerBase.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ReleaseUpdatedEvent.fields = { + release: { + typeInfo: exports.TypeInfo.Release + } +}; +exports.TypeInfo.ReleaseUpdateMetadata.fields = { + status: { + enumType: exports.TypeInfo.ReleaseStatus + } +}; +exports.TypeInfo.RunOnServerDeployPhase.fields = { + deploymentInput: { + typeInfo: exports.TypeInfo.ServerDeploymentInput + }, + phaseType: { + enumType: exports.TypeInfo.DeployPhaseTypes + } +}; +exports.TypeInfo.ScheduledReleaseTrigger.fields = { + schedule: { + typeInfo: exports.TypeInfo.ReleaseSchedule + }, + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.ServerDeploymentInput.fields = { + parallelExecution: { + typeInfo: exports.TypeInfo.ExecutionInput + } +}; +exports.TypeInfo.SourcePullRequestVersion.fields = { + pullRequestMergedAt: { + isDate: true, + } +}; +exports.TypeInfo.SourceRepoTrigger.fields = { + triggerType: { + enumType: exports.TypeInfo.ReleaseTriggerType + } +}; +exports.TypeInfo.SummaryMailSection.fields = { + sectionType: { + enumType: exports.TypeInfo.MailSectionType + } +}; +exports.TypeInfo.VariableGroup.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.YamlFileSource.fields = { + type: { + enumType: exports.TypeInfo.YamlFileSourceTypes + } +}; +exports.TypeInfo.YamlPipelineProcess.fields = { + fileSource: { + typeInfo: exports.TypeInfo.YamlFileSource + }, + type: { + enumType: exports.TypeInfo.PipelineProcessTypes + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.d.ts new file mode 100644 index 0000000..da0249d --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.d.ts @@ -0,0 +1,82 @@ +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export declare enum RoleAccess { + /** + * Access has been explicitly set. + */ + Assigned = 1, + /** + * Access has been inherited from a higher scope. + */ + Inherited = 2 +} +export interface RoleAssignment { + /** + * Designates the role as explicitly assigned or inherited. + */ + access: RoleAccess; + /** + * User friendly description of access assignment. + */ + accessDisplayName: string; + /** + * The user to whom the role is assigned. + */ + identity: VSSInterfaces.IdentityRef; + /** + * The role assigned to the user. + */ + role: SecurityRole; +} +export interface SecurityRole { + /** + * Permissions the role is allowed. + */ + allowPermissions: number; + /** + * Permissions the role is denied. + */ + denyPermissions: number; + /** + * Description of user access defined by the role + */ + description: string; + /** + * User friendly name of the role. + */ + displayName: string; + /** + * Globally unique identifier for the role. + */ + identifier: string; + /** + * Unique name of the role in the scope. + */ + name: string; + /** + * Returns the id of the ParentScope. + */ + scope: string; +} +export interface UserRoleAssignmentRef { + /** + * The name of the role assigned. + */ + roleName: string; + /** + * Identifier of the user given the role assignment. + */ + uniqueName: string; + /** + * Unique id of the user given the role assignment. + */ + userId: string; +} +export declare var TypeInfo: { + RoleAccess: { + enumValues: { + "assigned": number; + "inherited": number; + }; + }; + RoleAssignment: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.js b/node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.js new file mode 100644 index 0000000..62808fa --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/SecurityRolesInterfaces.js @@ -0,0 +1,36 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var RoleAccess; +(function (RoleAccess) { + /** + * Access has been explicitly set. + */ + RoleAccess[RoleAccess["Assigned"] = 1] = "Assigned"; + /** + * Access has been inherited from a higher scope. + */ + RoleAccess[RoleAccess["Inherited"] = 2] = "Inherited"; +})(RoleAccess = exports.RoleAccess || (exports.RoleAccess = {})); +exports.TypeInfo = { + RoleAccess: { + enumValues: { + "assigned": 1, + "inherited": 2 + } + }, + RoleAssignment: {}, +}; +exports.TypeInfo.RoleAssignment.fields = { + access: { + enumType: exports.TypeInfo.RoleAccess + }, +}; diff --git a/node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.d.ts new file mode 100644 index 0000000..26f6349 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.d.ts @@ -0,0 +1,3829 @@ +import DistributedTaskCommonInterfaces = require("../interfaces/DistributedTaskCommonInterfaces"); +import FormInputInterfaces = require("../interfaces/common/FormInputInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export declare enum AadLoginPromptOption { + /** + * Do not provide a prompt option + */ + NoOption = 0, + /** + * Force the user to login again. + */ + Login = 1, + /** + * Force the user to select which account they are logging in with instead of automatically picking the user up from the session state. NOTE: This does not work for switching between the variants of a dual-homed user. + */ + SelectAccount = 2, + /** + * Force the user to login again. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login. + */ + FreshLogin = 3, + /** + * Force the user to login again with mfa. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login, if MFA is required. + */ + FreshLoginWithMfa = 4 +} +export interface AadOauthTokenRequest { + refresh?: boolean; + resource?: string; + tenantId?: string; + token?: string; +} +export interface AadOauthTokenResult { + accessToken?: string; + refreshTokenCache?: string; +} +export interface AgentChangeEvent { + agent?: TaskAgent; + eventType?: string; + pool?: TaskAgentPoolReference; + poolId?: number; + timeStamp?: Date; +} +export interface AgentJobRequestMessage extends JobRequestMessage { + lockedUntil?: Date; + lockToken?: string; + requestId?: number; + tasks?: TaskInstance[]; +} +export interface AgentPoolEvent { + eventType?: string; + pool?: TaskAgentPool; +} +export interface AgentQueueEvent { + eventType?: string; + queue?: TaskAgentQueue; +} +export interface AgentQueuesEvent { + eventType?: string; + queues?: TaskAgentQueue[]; +} +export interface AgentRefreshMessage { + agentId?: number; + targetVersion?: string; + timeout?: any; +} +export declare enum AuditAction { + Add = 1, + Update = 2, + Delete = 3, + Undelete = 4 +} +export interface AuthenticationSchemeReference { + inputs?: { + [key: string]: string; + }; + type?: string; +} +export interface AuthorizationHeader { + /** + * Gets or sets the name of authorization header. + */ + name?: string; + /** + * Gets or sets the value of authorization header. + */ + value?: string; +} +export interface AzureKeyVaultPermission extends AzureResourcePermission { + vault?: string; +} +export interface AzureKeyVaultVariableGroupProviderData extends VariableGroupProviderData { + lastRefreshedOn?: Date; + serviceEndpointId?: string; + vault?: string; +} +export interface AzureKeyVaultVariableValue extends VariableValue { + contentType?: string; + enabled?: boolean; + expires?: Date; +} +/** + * Azure Management Group + */ +export interface AzureManagementGroup { + /** + * Display name of azure management group + */ + displayName?: string; + /** + * Id of azure management group + */ + id?: string; + /** + * Azure management group name + */ + name?: string; + /** + * Id of tenant from which azure management group belongs + */ + tenantId?: string; +} +/** + * Azure management group query result + */ +export interface AzureManagementGroupQueryResult { + /** + * Error message in case of an exception + */ + errorMessage?: string; + /** + * List of azure management groups + */ + value?: AzureManagementGroup[]; +} +export interface AzurePermission { + provisioned?: boolean; + resourceProvider?: string; +} +export interface AzureResourcePermission extends AzurePermission { + resourceGroup?: string; +} +export interface AzureRoleAssignmentPermission extends AzurePermission { + roleAssignmentId?: string; +} +export interface AzureSpnOperationStatus { + state?: string; + statusMessage?: string; +} +export interface AzureSubscription { + displayName?: string; + subscriptionId?: string; + subscriptionTenantId?: string; + subscriptionTenantName?: string; +} +export interface AzureSubscriptionQueryResult { + errorMessage?: string; + value?: AzureSubscription[]; +} +export interface ClientCertificate { + /** + * Gets or sets the value of client certificate. + */ + value?: string; +} +export interface CounterVariable { + prefix?: string; + seed?: number; + value?: number; +} +export interface DataSource { + authenticationScheme?: AuthenticationSchemeReference; + endpointUrl?: string; + headers?: AuthorizationHeader[]; + name?: string; + resourceUrl?: string; + resultSelector?: string; +} +export interface DataSourceBinding extends DistributedTaskCommonInterfaces.DataSourceBindingBase { +} +export interface DataSourceDetails { + dataSourceName?: string; + dataSourceUrl?: string; + headers?: AuthorizationHeader[]; + parameters?: { + [key: string]: string; + }; + resourceUrl?: string; + resultSelector?: string; +} +export interface Demand { + name?: string; + value?: string; +} +export interface DemandEquals extends Demand { +} +export interface DemandExists extends Demand { +} +export interface DemandMinimumVersion extends Demand { + source?: DemandSource; +} +export interface DemandSource { + sourceName?: string; + sourceType?: DemandSourceType; + sourceVersion?: string; +} +export declare enum DemandSourceType { + Task = 0, + Feature = 1 +} +export interface DependencyBinding { + key?: string; + value?: string; +} +export interface DependencyData { + input?: string; + map?: { + key: string; + value: { + key: string; + value: string; + }[]; + }[]; +} +export interface DependsOn { + input?: string; + map?: DependencyBinding[]; +} +export interface DeploymentGatesChangeEvent { + gateNames?: string[]; +} +/** + * Deployment group. + */ +export interface DeploymentGroup extends DeploymentGroupReference { + /** + * Description of the deployment group. + */ + description?: string; + /** + * Number of deployment targets in the deployment group. + */ + machineCount?: number; + /** + * List of deployment targets in the deployment group. + */ + machines?: DeploymentMachine[]; + /** + * List of unique tags across all deployment targets in the deployment group. + */ + machineTags?: string[]; +} +/** + * This is useful in getting a list of deployment groups, filtered for which caller has permissions to take a particular action. + */ +export declare enum DeploymentGroupActionFilter { + /** + * All deployment groups. + */ + None = 0, + /** + * Only deployment groups for which caller has **manage** permission. + */ + Manage = 2, + /** + * Only deployment groups for which caller has **use** permission. + */ + Use = 16 +} +/** + * Properties to create Deployment group. + */ +export interface DeploymentGroupCreateParameter { + /** + * Description of the deployment group. + */ + description?: string; + /** + * Name of the deployment group. + */ + name?: string; + /** + * Deployment pool in which deployment agents are registered. This is obsolete. Kept for compatibility. Will be marked obsolete explicitly by M132. + */ + pool?: DeploymentGroupCreateParameterPoolProperty; + /** + * Identifier of the deployment pool in which deployment agents are registered. + */ + poolId?: number; +} +/** + * Properties of Deployment pool to create Deployment group. + */ +export interface DeploymentGroupCreateParameterPoolProperty { + /** + * Deployment pool identifier. + */ + id?: number; +} +/** + * Properties to be included or expanded in deployment group objects. This is useful when getting a single or list of deployment grouops. + */ +export declare enum DeploymentGroupExpands { + /** + * No additional properties. + */ + None = 0, + /** + * Deprecated: Include all the deployment targets. + */ + Machines = 2, + /** + * Include unique list of tags across all deployment targets. + */ + Tags = 4 +} +/** + * Deployment group metrics. + */ +export interface DeploymentGroupMetrics { + /** + * List of deployment group properties. And types of metrics provided for those properties. + */ + columnsHeader?: MetricsColumnsHeader; + /** + * Deployment group. + */ + deploymentGroup?: DeploymentGroupReference; + /** + * Values of properties and the metrics. E.g. 1: total count of deployment targets for which 'TargetState' is 'offline'. E.g. 2: Average time of deployment to the deployment targets for which 'LastJobStatus' is 'passed' and 'TargetState' is 'online'. + */ + rows?: MetricsRow[]; +} +/** + * Deployment group reference. This is useful for referring a deployment group in another object. + */ +export interface DeploymentGroupReference { + /** + * Deployment group identifier. + */ + id?: number; + /** + * Name of the deployment group. + */ + name?: string; + /** + * Deployment pool in which deployment agents are registered. + */ + pool?: TaskAgentPoolReference; + /** + * Project to which the deployment group belongs. + */ + project?: ProjectReference; +} +/** + * Deployment group update parameter. + */ +export interface DeploymentGroupUpdateParameter { + /** + * Description of the deployment group. + */ + description?: string; + /** + * Name of the deployment group. + */ + name?: string; +} +/** + * Deployment target. + */ +export interface DeploymentMachine { + /** + * Deployment agent. + */ + agent?: TaskAgent; + /** + * Deployment target Identifier. + */ + id?: number; + /** + * Properties of the deployment target. + */ + properties?: any; + /** + * Tags of the deployment target. + */ + tags?: string[]; +} +export interface DeploymentMachineChangedData extends DeploymentMachine { + addedTags?: string[]; + deletedTags?: string[]; +} +export declare enum DeploymentMachineExpands { + None = 0, + Capabilities = 2, + AssignedRequest = 4 +} +export interface DeploymentMachineGroup extends DeploymentMachineGroupReference { + machines?: DeploymentMachine[]; + size?: number; +} +export interface DeploymentMachineGroupReference { + id?: number; + name?: string; + pool?: TaskAgentPoolReference; + project?: ProjectReference; +} +export interface DeploymentMachinesChangeEvent { + machineGroupReference?: DeploymentGroupReference; + machines?: DeploymentMachineChangedData[]; +} +/** + * Deployment pool summary. + */ +export interface DeploymentPoolSummary { + /** + * List of deployment groups referring to the deployment pool. + */ + deploymentGroups?: DeploymentGroupReference[]; + /** + * Number of deployment agents that are offline. + */ + offlineAgentsCount?: number; + /** + * Number of deployment agents that are online. + */ + onlineAgentsCount?: number; + /** + * Deployment pool. + */ + pool?: TaskAgentPoolReference; + /** + * Virtual machine Resource referring in pool. + */ + resource?: EnvironmentResourceReference; +} +/** + * Properties to be included or expanded in deployment pool summary objects. This is useful when getting a single or list of deployment pool summaries. + */ +export declare enum DeploymentPoolSummaryExpands { + /** + * No additional properties + */ + None = 0, + /** + * Include deployment groups referring to the deployment pool. + */ + DeploymentGroups = 2, + /** + * Include Resource referring to the deployment pool. + */ + Resource = 4 +} +/** + * Properties to be included or expanded in deployment target objects. This is useful when getting a single or list of deployment targets. + */ +export declare enum DeploymentTargetExpands { + /** + * No additional properties. + */ + None = 0, + /** + * Include capabilities of the deployment agent. + */ + Capabilities = 2, + /** + * Include the job request assigned to the deployment agent. + */ + AssignedRequest = 4, + /** + * Include the last completed job request of the deployment agent. + */ + LastCompletedRequest = 8 +} +/** + * Deployment target update parameter. + */ +export interface DeploymentTargetUpdateParameter { + /** + * Identifier of the deployment target. + */ + id?: number; + tags?: string[]; +} +export interface DiagnosticLogMetadata { + agentId?: number; + agentName?: string; + fileName?: string; + phaseName?: string; + phaseResult?: string; + poolId?: number; +} +export interface ElasticAgentPoolResizedEvent { + newSize?: number; + poolId?: number; + poolName?: string; + previousSize?: number; + resourceId?: string; +} +export declare enum ElasticAgentState { + None = 0, + Enabled = 1, + Online = 2, + Assigned = 4 +} +export declare enum ElasticComputeState { + None = 0, + Healthy = 1, + Creating = 2, + Deleting = 3, + Failed = 4, + Stopped = 5 +} +/** + * Data and settings for an elastic node + */ +export interface ElasticNode { + /** + * Distributed Task's Agent Id + */ + agentId?: number; + /** + * Summary of the state of the agent + */ + agentState?: ElasticAgentState; + /** + * Compute Id. VMSS's InstanceId + */ + computeId?: string; + /** + * State of the compute host + */ + computeState?: ElasticComputeState; + /** + * Users can force state changes to specific states (ToReimage, ToDelete, Save) + */ + desiredState?: ElasticNodeState; + /** + * Unique identifier since the agent and/or VM may be null + */ + id?: number; + /** + * Computer name. Used to match a scaleset VM with an agent + */ + name?: string; + /** + * Pool Id that this node belongs to + */ + poolId?: number; + /** + * Last job RequestId assigned to this agent + */ + requestId?: number; + /** + * State of the ElasticNode + */ + state?: ElasticNodeState; + /** + * Last state change. Only updated by SQL. + */ + stateChangedOn?: Date; +} +/** + * Class used for updating an elastic node where only certain members are populated + */ +export interface ElasticNodeSettings { + /** + * State of the ElasticNode + */ + state?: ElasticNodeState; +} +export declare enum ElasticNodeState { + None = 0, + New = 1, + CreatingCompute = 2, + StartingAgent = 3, + Idle = 4, + Assigned = 5, + Offline = 6, + PendingReimage = 7, + PendingDelete = 8, + Saved = 9, + DeletingCompute = 10, + Deleted = 11, + Lost = 12 +} +/** + * Data and settings for an elastic pool + */ +export interface ElasticPool { + /** + * Set whether agents should be configured to run with interactive UI + */ + agentInteractiveUI?: boolean; + /** + * Azure string representing to location of the resource + */ + azureId?: string; + /** + * Number of agents to have ready waiting for jobs + */ + desiredIdle?: number; + /** + * The desired size of the pool + */ + desiredSize?: number; + /** + * Maximum number of nodes that will exist in the elastic pool + */ + maxCapacity?: number; + /** + * Keep nodes in the pool on failure for investigation + */ + maxSavedNodeCount?: number; + /** + * Timestamp the pool was first detected to be offline + */ + offlineSince?: Date; + /** + * Operating system type of the nodes in the pool + */ + osType?: OperatingSystemType; + /** + * Id of the associated TaskAgentPool + */ + poolId?: number; + /** + * Discard node after each job completes + */ + recycleAfterEachUse?: boolean; + /** + * Id of the Service Endpoint used to connect to Azure + */ + serviceEndpointId?: string; + /** + * Scope the Service Endpoint belongs to + */ + serviceEndpointScope?: string; + /** + * The number of sizing attempts executed while trying to achieve a desired size + */ + sizingAttempts?: number; + /** + * State of the pool + */ + state?: ElasticPoolState; + /** + * The minimum time in minutes to keep idle agents alive + */ + timeToLiveMinutes?: number; +} +/** + * Returned result from creating a new elastic pool + */ +export interface ElasticPoolCreationResult { + /** + * Created agent pool + */ + agentPool?: TaskAgentPool; + /** + * Created agent queue + */ + agentQueue?: TaskAgentQueue; + /** + * Created elastic pool + */ + elasticPool?: ElasticPool; +} +/** + * Log data for an Elastic Pool + */ +export interface ElasticPoolLog { + /** + * Log Id + */ + id?: number; + /** + * E.g. error, warning, info + */ + level?: LogLevel; + /** + * Log contents + */ + message?: string; + /** + * Operation that triggered the message being logged + */ + operation?: OperationType; + /** + * Id of the associated TaskAgentPool + */ + poolId?: number; + /** + * Datetime that the log occurred + */ + timestamp?: Date; +} +/** + * Class used for updating an elastic pool where only certain members are populated + */ +export interface ElasticPoolSettings { + /** + * Set whether agents should be configured to run with interactive UI + */ + agentInteractiveUI?: boolean; + /** + * Azure string representing to location of the resource + */ + azureId?: string; + /** + * Number of machines to have ready waiting for jobs + */ + desiredIdle?: number; + /** + * Maximum number of machines that will exist in the elastic pool + */ + maxCapacity?: number; + /** + * Keep machines in the pool on failure for investigation + */ + maxSavedNodeCount?: number; + /** + * Operating system type of the machines in the pool + */ + osType?: OperatingSystemType; + /** + * Discard machines after each job completes + */ + recycleAfterEachUse?: boolean; + /** + * Id of the Service Endpoint used to connect to Azure + */ + serviceEndpointId?: string; + /** + * Scope the Service Endpoint belongs to + */ + serviceEndpointScope?: string; + /** + * The minimum time in minutes to keep idle agents alive + */ + timeToLiveMinutes?: number; +} +export declare enum ElasticPoolState { + /** + * Online and healthy + */ + Online = 0, + Offline = 1, + Unhealthy = 2, + New = 3 +} +export interface EndpointAuthorization { + /** + * Gets or sets the parameters for the selected authorization scheme. + */ + parameters?: { + [key: string]: string; + }; + /** + * Gets or sets the scheme used for service endpoint authentication. + */ + scheme?: string; +} +/** + * Represents url of the service endpoint. + */ +export interface EndpointUrl { + /** + * Gets or sets the dependency bindings. + */ + dependsOn?: DependsOn; + /** + * Gets or sets the display name of service endpoint url. + */ + displayName?: string; + /** + * Gets or sets the help text of service endpoint url. + */ + helpText?: string; + /** + * Gets or sets the visibility of service endpoint url. + */ + isVisible?: string; + /** + * Gets or sets the value of service endpoint url. + */ + value?: string; +} +/** + * This is useful in getting a list of Environments, filtered for which caller has permissions to take a particular action. + */ +export declare enum EnvironmentActionFilter { + /** + * All environments for which user has **view** permission. + */ + None = 0, + /** + * Only environments for which caller has **manage** permission. + */ + Manage = 2, + /** + * Only environments for which caller has **use** permission. + */ + Use = 16 +} +/** + * Properties to create Environment. + */ +export interface EnvironmentCreateParameter { + /** + * Description of the environment. + */ + description?: string; + /** + * Name of the environment. + */ + name?: string; +} +/** + * EnvironmentDeploymentExecutionRecord. + */ +export interface EnvironmentDeploymentExecutionRecord { + /** + * Definition of the environment deployment execution owner + */ + definition?: TaskOrchestrationOwner; + /** + * Id of the Environment + */ + environmentId?: number; + /** + * Finish time of the environment deployment execution + */ + finishTime?: Date; + /** + * Id of the Environment deployment execution history record + */ + id?: number; + /** + * Job Attempt + */ + jobAttempt?: number; + /** + * Job name + */ + jobName?: string; + /** + * Owner of the environment deployment execution record + */ + owner?: TaskOrchestrationOwner; + /** + * Plan Id + */ + planId?: string; + /** + * Plan type of the environment deployment execution record + */ + planType?: string; + /** + * Queue time of the environment deployment execution + */ + queueTime?: Date; + /** + * Request identifier of the Environment deployment execution history record + */ + requestIdentifier?: string; + /** + * Resource Id + */ + resourceId?: number; + /** + * Result of the environment deployment execution + */ + result?: TaskResult; + /** + * Project Id + */ + scopeId?: string; + /** + * Service owner Id + */ + serviceOwner?: string; + /** + * Stage Attempt + */ + stageAttempt?: number; + /** + * Stage name + */ + stageName?: string; + /** + * Start time of the environment deployment execution + */ + startTime?: Date; +} +/** + * Properties to be included or expanded in environment objects. This is useful when getting a single environment. + */ +export declare enum EnvironmentExpands { + /** + * No additional properties + */ + None = 0, + /** + * Include resource references referring to the environment. + */ + ResourceReferences = 1 +} +/** + * Environment. + */ +export interface EnvironmentInstance { + /** + * Identity reference of the user who created the Environment. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Creation time of the Environment + */ + createdOn?: Date; + /** + * Description of the Environment. + */ + description?: string; + /** + * Id of the Environment + */ + id?: number; + /** + * Identity reference of the user who last modified the Environment. + */ + lastModifiedBy?: VSSInterfaces.IdentityRef; + /** + * Last modified time of the Environment + */ + lastModifiedOn?: Date; + /** + * Name of the Environment. + */ + name?: string; + /** + * Project information for environment. + */ + project?: ProjectReference; + resources?: EnvironmentResourceReference[]; +} +/** + * EnvironmentLinkedResourceReference. + */ +export interface EnvironmentLinkedResourceReference { + /** + * Id of the resource. + */ + id?: string; + /** + * Type of resource. + */ + typeName?: string; +} +export interface EnvironmentReference { + id?: number; + name?: string; +} +export interface EnvironmentResource { + createdBy?: VSSInterfaces.IdentityRef; + createdOn?: Date; + environmentReference?: EnvironmentReference; + id?: number; + lastModifiedBy?: VSSInterfaces.IdentityRef; + lastModifiedOn?: Date; + name?: string; + /** + * Tags of the Environment Resource. + */ + tags?: string[]; + /** + * Environment resource type + */ + type?: EnvironmentResourceType; +} +/** + * EnvironmentResourceDeploymentExecutionRecord. + */ +export interface EnvironmentResourceDeploymentExecutionRecord { + /** + * Id of the Environment + */ + environmentId?: number; + /** + * Finish time of the environment resource deployment execution + */ + finishTime?: Date; + /** + * Id of the Environment deployment execution history record + */ + requestId?: number; + /** + * Resource Id + */ + resourceId?: number; + /** + * Result of the environment deployment execution + */ + result?: TaskResult; + /** + * Start time of the environment resource deployment execution + */ + startTime?: Date; +} +/** + * EnvironmentResourceReference. + */ +export interface EnvironmentResourceReference { + /** + * Id of the resource. + */ + id?: number; + /** + * Name of the resource. + */ + name?: string; + /** + * Tags of the Environment Resource Reference. + */ + tags?: string[]; + /** + * Type of the resource. + */ + type?: EnvironmentResourceType; +} +/** + * EnvironmentResourceType. + */ +export declare enum EnvironmentResourceType { + Undefined = 0, + /** + * Unknown resource type + */ + Generic = 1, + /** + * Virtual machine resource type + */ + VirtualMachine = 2, + /** + * Kubernetes resource type + */ + Kubernetes = 4 +} +/** + * Properties to update Environment. + */ +export interface EnvironmentUpdateParameter { + /** + * Description of the environment. + */ + description?: string; + /** + * Name of the environment. + */ + name?: string; +} +export interface EventsConfig { +} +export declare enum ExclusiveLockType { + RunLatest = 0, + Sequential = 1 +} +export interface ExpressionValidationItem extends ValidationItem { +} +export interface HelpLink { + text?: string; + url?: string; +} +export interface InputBindingContext { + /** + * Value of the input + */ + value?: string; +} +export interface InputValidationItem extends ValidationItem { + /** + * Provides binding context for the expression to evaluate + */ + context?: InputBindingContext; +} +export interface InputValidationRequest { + inputs?: { + [key: string]: ValidationItem; + }; +} +export interface Issue { + category?: string; + data?: { + [key: string]: string; + }; + message?: string; + type?: IssueType; +} +export declare enum IssueType { + Error = 1, + Warning = 2 +} +export interface JobAssignedEvent extends JobEvent { + request?: TaskAgentJobRequest; +} +export interface JobCanceledEvent extends JobEvent { + reason?: string; + timeout?: any; +} +export interface JobCancelMessage { + jobId?: string; + timeout?: any; +} +export interface JobCompletedEvent extends JobEvent { + agentShuttingDown?: boolean; + requestId?: number; + result?: TaskResult; +} +/** + * Represents the context of variables and vectors for a job request. + */ +export interface JobEnvironment { + endpoints?: ServiceEndpoint[]; + mask?: MaskHint[]; + options?: { + [key: string]: JobOption; + }; + secureFiles?: SecureFile[]; + /** + * Gets or sets the endpoint used for communicating back to the calling service. + */ + systemConnection?: ServiceEndpoint; + variables?: { + [key: string]: string; + }; +} +export interface JobEvent { + jobId?: string; + name?: string; +} +export interface JobEventConfig { + timeout?: string; +} +export interface JobEventsConfig extends EventsConfig { + jobAssigned?: JobEventConfig; + jobCompleted?: JobEventConfig; + jobStarted?: JobEventConfig; +} +export interface JobMetadataEvent extends JobEvent { + message?: JobMetadataMessage; +} +export interface JobMetadataMessage { + jobId?: string; + postLinesFrequencyMillis?: number; +} +/** + * Represents an option that may affect the way an agent runs the job. + */ +export interface JobOption { + data?: { + [key: string]: string; + }; + /** + * Gets the id of the option. + */ + id?: string; +} +export interface JobRequestMessage { + environment?: JobEnvironment; + jobId?: string; + jobName?: string; + jobRefName?: string; + messageType?: string; + plan?: TaskOrchestrationPlanReference; + timeline?: TimelineReference; +} +export interface JobStartedEvent extends JobEvent { +} +export interface KubernetesResource extends EnvironmentResource { + clusterName?: string; + namespace?: string; + serviceEndpointId?: string; +} +export interface KubernetesResourceCreateParameters { + clusterName?: string; + name?: string; + namespace?: string; + /** + * Tags of the kubernetes resource. + */ + tags?: string[]; +} +export interface KubernetesResourceCreateParametersExistingEndpoint extends KubernetesResourceCreateParameters { + serviceEndpointId?: string; +} +export interface KubernetesResourceCreateParametersNewEndpoint extends KubernetesResourceCreateParameters { + endpoint?: ServiceEndpoint; +} +export interface KubernetesResourcePatchParameters { + authorizationParameters?: { + [key: string]: string; + }; + /** + * Provider type (CustomProvider or AzureKubernetesServiceProvider) of the resource to be updated + */ + providerType?: string; + resourceId?: number; +} +export declare enum LogLevel { + Error = 0, + Warning = 1, + Info = 2 +} +export declare enum MachineGroupActionFilter { + None = 0, + Manage = 2, + Use = 16 +} +/** + * Represents a purchase of resource units in a secondary marketplace. + */ +export interface MarketplacePurchasedLicense { + /** + * The Marketplace display name. + */ + marketplaceName?: string; + /** + * The name of the identity making the purchase as seen by the marketplace + */ + purchaserName?: string; + /** + * The quantity purchased. + */ + purchaseUnitCount?: number; +} +export interface MaskHint { + type?: MaskType; + value?: string; +} +export declare enum MaskType { + Variable = 1, + Regex = 2 +} +/** + * Meta data for a metrics column. + */ +export interface MetricsColumnMetaData { + /** + * Name. + */ + columnName?: string; + /** + * Data type. + */ + columnValueType?: string; +} +/** + * Metrics columns header + */ +export interface MetricsColumnsHeader { + /** + * Properties of deployment group for which metrics are provided. E.g. 1: LastJobStatus E.g. 2: TargetState + */ + dimensions?: MetricsColumnMetaData[]; + /** + * The types of metrics. E.g. 1: total count of deployment targets. E.g. 2: Average time of deployment to the deployment targets. + */ + metrics?: MetricsColumnMetaData[]; +} +/** + * Metrics row. + */ +export interface MetricsRow { + /** + * The values of the properties mentioned as 'Dimensions' in column header. E.g. 1: For a property 'LastJobStatus' - metrics will be provided for 'passed', 'failed', etc. E.g. 2: For a property 'TargetState' - metrics will be provided for 'online', 'offline' targets. + */ + dimensions?: string[]; + /** + * Metrics in serialized format. Should be deserialized based on the data type provided in header. + */ + metrics?: string[]; +} +export declare enum OperatingSystemType { + Windows = 0, + Linux = 1 +} +export declare enum OperationType { + ConfigurationJob = 0, + SizingJob = 1, + IncreaseCapacity = 2, + Reimage = 3, + DeleteVMs = 4 +} +/** + * Represents a downloadable package. + */ +export interface PackageMetadata { + /** + * The date the package was created + */ + createdOn?: Date; + /** + * A direct link to download the package. + */ + downloadUrl?: string; + /** + * The UI uses this to display instructions, i.e. "unzip MyAgent.zip" + */ + filename?: string; + /** + * MD5 hash as a base64 string + */ + hashValue?: string; + /** + * A link to documentation + */ + infoUrl?: string; + /** + * The platform (win7, linux, etc.) + */ + platform?: string; + /** + * The type of package (e.g. "agent") + */ + type?: string; + /** + * The package version. + */ + version?: PackageVersion; +} +export interface PackageVersion { + major?: number; + minor?: number; + patch?: number; +} +export interface PlanEnvironment { + mask?: MaskHint[]; + options?: { + [key: string]: JobOption; + }; + variables?: { + [key: string]: string; + }; +} +export declare enum PlanGroupStatus { + Running = 1, + Queued = 2, + All = 3 +} +export declare enum PlanGroupStatusFilter { + Running = 1, + Queued = 2, + All = 3 +} +export interface ProjectReference { + id?: string; + name?: string; +} +export interface PublishTaskGroupMetadata { + comment?: string; + parentDefinitionRevision?: number; + preview?: boolean; + taskGroupId?: string; + taskGroupRevision?: number; +} +export interface ResourceFilterOptions { + identities?: VSSInterfaces.IdentityRef[]; + resourceTypes?: string[]; +} +export interface ResourceFilters { + createdBy?: string[]; + resourceType?: string[]; + searchText?: string; +} +/** + * Resources include Service Connections, Variable Groups and Secure Files. + */ +export interface ResourceItem { + /** + * Gets or sets the identity who created the resource. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets description of the resource. + */ + description?: string; + /** + * Gets or sets icon url of the resource. + */ + iconUrl?: string; + /** + * Gets or sets Id of the resource. + */ + id?: string; + /** + * Indicates whether resource is shared with other projects or not. + */ + isShared?: boolean; + /** + * Gets or sets name of the resource. + */ + name?: string; + /** + * Gets or sets internal properties of the resource. + */ + properties?: { + [key: string]: string; + }; + /** + * Gets or sets resource type. + */ + resourceType?: string; +} +export interface ResourceLimit { + failedToReachAllProviders?: boolean; + hostId?: string; + isHosted?: boolean; + isPremium?: boolean; + parallelismTag?: string; + resourceLimitsData?: { + [key: string]: string; + }; + totalCount?: number; + totalMinutes?: number; +} +/** + * A request for a resource's exclusive lock + */ +export interface ResourceLockRequest { + /** + * The date/time this request was assigned. + */ + assignTime?: Date; + /** + * The ID of the check run waiting on this request + */ + checkRunId?: string; + /** + * The ID of the pipeline that requested this resource + */ + definitionId?: number; + /** + * The date/time this request was finished. + */ + finishTime?: Date; + /** + * The behavior this request should exhibit in relation to other lock requests + */ + lockType?: ExclusiveLockType; + /** + * Attempt of the graph node + */ + nodeAttempt?: number; + /** + * Name of the graph node (currently stage) requesting this resource + */ + nodeName?: string; + /** + * Internal ID for the orchestration plan connected with this request. + */ + planId?: string; + /** + * The ID of the project of the check run and definition exist in + */ + projectId?: string; + /** + * The date/time this request was queued. + */ + queueTime?: Date; + /** + * ID of the request. + */ + requestId?: number; + /** + * The id of the resource + */ + resourceId?: string; + /** + * The type of the resource + */ + resourceType?: string; + /** + * The result of this request. + */ + status?: ResourceLockStatus; +} +export declare enum ResourceLockStatus { + Queued = 0, + InUse = 1, + Finished = 2, + TimedOut = 3, + Canceled = 4, + Abandoned = 5, + WaitingOnChecks = 6 +} +export interface ResourcesHubData { + continuationToken?: string; + hasProjectLevelManagePermission?: boolean; + resourceFilterOptions?: ResourceFilterOptions; + resourceFilters?: ResourceFilters; + resourceItems?: ResourceItem[]; +} +export interface ResourceUsage { + resourceLimit?: ResourceLimit; + runningRequests?: TaskAgentJobRequest[]; + usedCount?: number; + usedMinutes?: number; +} +export interface ResultTransformationDetails { + resultTemplate?: string; +} +export interface SecureFile { + createdBy?: VSSInterfaces.IdentityRef; + createdOn?: Date; + id?: string; + modifiedBy?: VSSInterfaces.IdentityRef; + modifiedOn?: Date; + name?: string; + properties?: { + [key: string]: string; + }; + ticket?: string; +} +export declare enum SecureFileActionFilter { + None = 0, + Manage = 2, + Use = 16 +} +export interface SecureFileEvent { + eventType?: string; + projectId?: string; + secureFiles?: SecureFile[]; +} +export interface SendJobResponse { + events?: JobEventsConfig; + variables?: { + [key: string]: string; + }; +} +export interface ServerExecutionDefinition { + events?: EventsConfig; + handlerName?: string; +} +export interface ServerTaskRequestMessage extends JobRequestMessage { + taskDefinition?: TaskDefinition; + taskInstance?: TaskInstance; +} +/** + * Represents an endpoint which may be used by an orchestration job. + */ +export interface ServiceEndpoint { + /** + * Gets or sets the identity reference for the administrators group of the service endpoint. + */ + administratorsGroup?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the authorization data for talking to the endpoint. + */ + authorization?: EndpointAuthorization; + /** + * Gets or sets the identity reference for the user who created the Service endpoint. + */ + createdBy?: VSSInterfaces.IdentityRef; + data?: { + [key: string]: string; + }; + /** + * Gets or sets the description of endpoint. + */ + description?: string; + groupScopeId?: string; + /** + * Gets or sets the identifier of this endpoint. + */ + id?: string; + /** + * EndPoint state indicator + */ + isReady?: boolean; + /** + * Indicates whether service endpoint is shared with other projects or not. + */ + isShared?: boolean; + /** + * Gets or sets the friendly name of the endpoint. + */ + name?: string; + /** + * Error message during creation/deletion of endpoint + */ + operationStatus?: any; + /** + * Gets or sets the owner of the endpoint. + */ + owner?: string; + /** + * Gets or sets the identity reference for the readers group of the service endpoint. + */ + readersGroup?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the type of the endpoint. + */ + type?: string; + /** + * Gets or sets the url of the endpoint. + */ + url?: string; +} +export interface ServiceEndpointAuthenticationScheme { + /** + * Gets or sets the authorization headers of service endpoint authentication scheme. + */ + authorizationHeaders?: AuthorizationHeader[]; + /** + * Gets or sets the certificates of service endpoint authentication scheme. + */ + clientCertificates?: ClientCertificate[]; + /** + * Gets or sets the display name for the service endpoint authentication scheme. + */ + displayName?: string; + /** + * Gets or sets the input descriptors for the service endpoint authentication scheme. + */ + inputDescriptors?: FormInputInterfaces.InputDescriptor[]; + /** + * Gets or sets the scheme for service endpoint authentication. + */ + scheme?: string; +} +export interface ServiceEndpointDetails { + authorization?: EndpointAuthorization; + data?: { + [key: string]: string; + }; + type?: string; + url?: string; +} +/** + * Represents service endpoint execution data. + */ +export interface ServiceEndpointExecutionData { + /** + * Gets the definition of service endpoint execution owner. + */ + definition?: TaskOrchestrationOwner; + /** + * Gets the finish time of service endpoint execution. + */ + finishTime?: Date; + /** + * Gets the Id of service endpoint execution data. + */ + id?: number; + /** + * Gets the owner of service endpoint execution data. + */ + owner?: TaskOrchestrationOwner; + /** + * Gets the plan type of service endpoint execution data. + */ + planType?: string; + /** + * Gets the result of service endpoint execution. + */ + result?: TaskResult; + /** + * Gets the start time of service endpoint execution. + */ + startTime?: Date; +} +export interface ServiceEndpointExecutionRecord { + /** + * Gets the execution data of service endpoint execution. + */ + data?: ServiceEndpointExecutionData; + /** + * Gets the Id of service endpoint. + */ + endpointId?: string; +} +export interface ServiceEndpointExecutionRecordsInput { + data?: ServiceEndpointExecutionData; + endpointIds?: string[]; +} +export interface ServiceEndpointRequest { + dataSourceDetails?: DataSourceDetails; + resultTransformationDetails?: ResultTransformationDetails; + serviceEndpointDetails?: ServiceEndpointDetails; +} +export interface ServiceEndpointRequestResult { + errorMessage?: string; + result?: any; + statusCode?: string; +} +/** + * Represents type of the service endpoint. + */ +export interface ServiceEndpointType { + /** + * Authentication scheme of service endpoint type. + */ + authenticationSchemes?: ServiceEndpointAuthenticationScheme[]; + /** + * Data sources of service endpoint type. + */ + dataSources?: DataSource[]; + /** + * Dependency data of service endpoint type. + */ + dependencyData?: DependencyData[]; + /** + * Gets or sets the description of service endpoint type. + */ + description?: string; + /** + * Gets or sets the display name of service endpoint type. + */ + displayName?: string; + /** + * Gets or sets the endpoint url of service endpoint type. + */ + endpointUrl?: EndpointUrl; + /** + * Gets or sets the help link of service endpoint type. + */ + helpLink?: HelpLink; + helpMarkDown?: string; + /** + * Gets or sets the icon url of service endpoint type. + */ + iconUrl?: string; + /** + * Input descriptor of service endpoint type. + */ + inputDescriptors?: FormInputInterfaces.InputDescriptor[]; + /** + * Gets or sets the name of service endpoint type. + */ + name?: string; + /** + * Trusted hosts of a service endpoint type. + */ + trustedHosts?: string[]; + /** + * Gets or sets the ui contribution id of service endpoint type. + */ + uiContributionId?: string; +} +/** + * A task agent. + */ +export interface TaskAgent extends TaskAgentReference { + /** + * The agent cloud request that's currently associated with this agent. + */ + assignedAgentCloudRequest?: TaskAgentCloudRequest; + /** + * The request which is currently assigned to this agent. + */ + assignedRequest?: TaskAgentJobRequest; + /** + * Authorization information for this agent. + */ + authorization?: TaskAgentAuthorization; + /** + * Date on which this agent was created. + */ + createdOn?: Date; + /** + * The last request which was completed by this agent. + */ + lastCompletedRequest?: TaskAgentJobRequest; + /** + * Maximum job parallelism allowed for this agent. + */ + maxParallelism?: number; + /** + * Pending update for this agent. + */ + pendingUpdate?: TaskAgentUpdate; + properties?: any; + /** + * Date on which the last connectivity status change occurred. + */ + statusChangedOn?: Date; + /** + * System-defined capabilities supported by this agent's host. Warning: To set capabilities use the PUT method, PUT will completely overwrite existing capabilities. + */ + systemCapabilities?: { + [key: string]: string; + }; + /** + * User-defined capabilities supported by this agent's host. Warning: To set capabilities use the PUT method, PUT will completely overwrite existing capabilities. + */ + userCapabilities?: { + [key: string]: string; + }; +} +/** + * Provides data necessary for authorizing the agent using OAuth 2.0 authentication flows. + */ +export interface TaskAgentAuthorization { + /** + * Endpoint used to obtain access tokens from the configured token service. + */ + authorizationUrl?: string; + /** + * Client identifier for this agent. + */ + clientId?: string; + /** + * Public key used to verify the identity of this agent. + */ + publicKey?: TaskAgentPublicKey; +} +export interface TaskAgentCloud { + /** + * Gets or sets a AcquireAgentEndpoint using which a request can be made to acquire new agent + */ + acquireAgentEndpoint?: string; + acquisitionTimeout?: number; + agentCloudId?: number; + getAccountParallelismEndpoint?: string; + getAgentDefinitionEndpoint?: string; + getAgentRequestStatusEndpoint?: string; + id?: string; + /** + * Signifies that this Agent Cloud is internal and should not be user-manageable + */ + internal?: boolean; + maxParallelism?: number; + name?: string; + releaseAgentEndpoint?: string; + sharedSecret?: string; + /** + * Gets or sets the type of the endpoint. + */ + type?: string; +} +export interface TaskAgentCloudRequest { + agent?: TaskAgentReference; + agentCloudId?: number; + agentConnectedTime?: Date; + agentData?: any; + agentSpecification?: any; + pool?: TaskAgentPoolReference; + provisionedTime?: Date; + provisionRequestTime?: Date; + releaseRequestTime?: Date; + requestId?: string; +} +export interface TaskAgentCloudType { + /** + * Gets or sets the display name of agent cloud type. + */ + displayName?: string; + /** + * Gets or sets the input descriptors + */ + inputDescriptors?: FormInputInterfaces.InputDescriptor[]; + /** + * Gets or sets the name of agent cloud type. + */ + name?: string; +} +export interface TaskAgentDowngrade extends TaskAgentUpdateReason { +} +export interface TaskAgentJob { + container?: string; + id?: string; + name?: string; + sidecarContainers?: { + [key: string]: string; + }; + steps?: TaskAgentJobStep[]; + variables?: TaskAgentJobVariable[]; +} +/** + * A job request for an agent. + */ +export interface TaskAgentJobRequest { + agentSpecification?: any; + /** + * The date/time this request was assigned. + */ + assignTime?: Date; + /** + * Additional data about the request. + */ + data?: { + [key: string]: string; + }; + /** + * The pipeline definition associated with this request + */ + definition?: TaskOrchestrationOwner; + /** + * A list of demands required to fulfill this request. + */ + demands?: Demand[]; + /** + * The date/time this request was finished. + */ + finishTime?: Date; + /** + * The host which triggered this request. + */ + hostId?: string; + /** + * ID of the job resulting from this request. + */ + jobId?: string; + /** + * Name of the job resulting from this request. + */ + jobName?: string; + /** + * The deadline for the agent to renew the lock. + */ + lockedUntil?: Date; + matchedAgents?: TaskAgentReference[]; + matchesAllAgentsInPool?: boolean; + orchestrationId?: string; + /** + * The pipeline associated with this request + */ + owner?: TaskOrchestrationOwner; + planGroup?: string; + /** + * Internal ID for the orchestration plan connected with this request. + */ + planId?: string; + /** + * Internal detail representing the type of orchestration plan. + */ + planType?: string; + /** + * The ID of the pool this request targets + */ + poolId?: number; + priority?: number; + /** + * The ID of the queue this request targets + */ + queueId?: number; + /** + * The date/time this request was queued. + */ + queueTime?: Date; + /** + * The date/time this request was receieved by an agent. + */ + receiveTime?: Date; + /** + * ID of the request. + */ + requestId?: number; + /** + * The agent allocated for this request. + */ + reservedAgent?: TaskAgentReference; + /** + * The result of this request. + */ + result?: TaskResult; + /** + * Scope of the pipeline; matches the project ID. + */ + scopeId?: string; + /** + * The service which owns this request. + */ + serviceOwner?: string; + statusMessage?: string; + userDelayed?: boolean; +} +/** + * This is useful in getting a list of deployment targets, filtered by the result of their last job. + */ +export declare enum TaskAgentJobResultFilter { + /** + * Only those deployment targets on which last job failed (**Abandoned**, **Canceled**, **Failed**, **Skipped**). + */ + Failed = 1, + /** + * Only those deployment targets on which last job Passed (**Succeeded**, **Succeeded with issues**). + */ + Passed = 2, + /** + * Only those deployment targets that never executed a job. + */ + NeverDeployed = 4, + /** + * All deployment targets. + */ + All = 7 +} +export interface TaskAgentJobStep { + condition?: string; + continueOnError?: boolean; + enabled?: boolean; + env?: { + [key: string]: string; + }; + id?: string; + inputs?: { + [key: string]: string; + }; + name?: string; + retryCountOnTaskFailure?: number; + task?: TaskAgentJobTask; + timeoutInMinutes?: number; + type?: TaskAgentJobStepType; +} +export declare enum TaskAgentJobStepType { + Task = 1, + Action = 2 +} +export interface TaskAgentJobTask { + id?: string; + name?: string; + version?: string; +} +export interface TaskAgentJobVariable { + name?: string; + secret?: boolean; + value?: string; +} +export interface TaskAgentManualUpdate extends TaskAgentUpdateReason { +} +/** + * Provides a contract for receiving messages from the task orchestrator. + */ +export interface TaskAgentMessage { + /** + * Gets or sets the body of the message. If the IV property is provided the body will need to be decrypted using the TaskAgentSession.EncryptionKey value in addition to the IV. + */ + body?: string; + /** + * Gets or sets the initialization vector used to encrypt this message. + */ + iV?: number[]; + /** + * Gets or sets the message identifier. + */ + messageId?: number; + /** + * Gets or sets the message type, describing the data contract found in TaskAgentMessage.Body. + */ + messageType?: string; +} +export interface TaskAgentMinAgentVersionRequiredUpdate extends TaskAgentUpdateReason { + jobDefinition?: TaskOrchestrationOwner; + jobOwner?: TaskOrchestrationOwner; + minAgentVersion?: Demand; +} +/** + * An organization-level grouping of agents. + */ +export interface TaskAgentPool extends TaskAgentPoolReference { + /** + * The ID of the associated agent cloud. + */ + agentCloudId?: number; + /** + * Whether or not a queue should be automatically provisioned for each project collection. + */ + autoProvision?: boolean; + /** + * Whether or not the pool should autosize itself based on the Agent Cloud Provider settings. + */ + autoSize?: boolean; + /** + * Whether or not agents in this pool are allowed to automatically update + */ + autoUpdate?: boolean; + /** + * Creator of the pool. The creator of the pool is automatically added into the administrators group for the pool on creation. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The date/time of the pool creation. + */ + createdOn?: Date; + /** + * Owner or administrator of the pool. + */ + owner?: VSSInterfaces.IdentityRef; + properties?: any; + /** + * Target parallelism. + */ + targetSize?: number; +} +/** + * Filters pools based on whether the calling user has permission to use or manage the pool. + */ +export declare enum TaskAgentPoolActionFilter { + None = 0, + Manage = 2, + Use = 16 +} +export interface TaskAgentPoolMaintenanceDefinition { + /** + * Enable maintenance + */ + enabled?: boolean; + /** + * Id + */ + id?: number; + /** + * Maintenance job timeout per agent + */ + jobTimeoutInMinutes?: number; + /** + * Max percentage of agents within a pool running maintenance job at given time + */ + maxConcurrentAgentsPercentage?: number; + options?: TaskAgentPoolMaintenanceOptions; + /** + * Pool reference for the maintenance definition + */ + pool?: TaskAgentPoolReference; + retentionPolicy?: TaskAgentPoolMaintenanceRetentionPolicy; + scheduleSetting?: TaskAgentPoolMaintenanceSchedule; +} +export interface TaskAgentPoolMaintenanceJob { + /** + * The maintenance definition for the maintenance job + */ + definitionId?: number; + /** + * The total error counts during the maintenance job + */ + errorCount?: number; + /** + * Time that the maintenance job was completed + */ + finishTime?: Date; + /** + * Id of the maintenance job + */ + jobId?: number; + /** + * The log download url for the maintenance job + */ + logsDownloadUrl?: string; + /** + * Orchestration/Plan Id for the maintenance job + */ + orchestrationId?: string; + /** + * Pool reference for the maintenance job + */ + pool?: TaskAgentPoolReference; + /** + * Time that the maintenance job was queued + */ + queueTime?: Date; + /** + * The identity that queued the maintenance job + */ + requestedBy?: VSSInterfaces.IdentityRef; + /** + * The maintenance job result + */ + result?: TaskAgentPoolMaintenanceJobResult; + /** + * Time that the maintenance job was started + */ + startTime?: Date; + /** + * Status of the maintenance job + */ + status?: TaskAgentPoolMaintenanceJobStatus; + targetAgents?: TaskAgentPoolMaintenanceJobTargetAgent[]; + /** + * The total warning counts during the maintenance job + */ + warningCount?: number; +} +export declare enum TaskAgentPoolMaintenanceJobResult { + Succeeded = 1, + Failed = 2, + Canceled = 4 +} +export declare enum TaskAgentPoolMaintenanceJobStatus { + InProgress = 1, + Completed = 2, + Cancelling = 4, + Queued = 8 +} +export interface TaskAgentPoolMaintenanceJobTargetAgent { + agent?: TaskAgentReference; + jobId?: number; + result?: TaskAgentPoolMaintenanceJobResult; + status?: TaskAgentPoolMaintenanceJobStatus; +} +export interface TaskAgentPoolMaintenanceOptions { + /** + * time to consider a System.DefaultWorkingDirectory is stale + */ + workingDirectoryExpirationInDays?: number; +} +export interface TaskAgentPoolMaintenanceRetentionPolicy { + /** + * Number of records to keep for maintenance job executed with this definition. + */ + numberOfHistoryRecordsToKeep?: number; +} +export interface TaskAgentPoolMaintenanceSchedule { + /** + * Days for a build (flags enum for days of the week) + */ + daysToBuild?: TaskAgentPoolMaintenanceScheduleDays; + /** + * The Job Id of the Scheduled job that will queue the pool maintenance job. + */ + scheduleJobId?: string; + /** + * Local timezone hour to start + */ + startHours?: number; + /** + * Local timezone minute to start + */ + startMinutes?: number; + /** + * Time zone of the build schedule (string representation of the time zone id) + */ + timeZoneId?: string; +} +export declare enum TaskAgentPoolMaintenanceScheduleDays { + /** + * Do not run. + */ + None = 0, + /** + * Run on Monday. + */ + Monday = 1, + /** + * Run on Tuesday. + */ + Tuesday = 2, + /** + * Run on Wednesday. + */ + Wednesday = 4, + /** + * Run on Thursday. + */ + Thursday = 8, + /** + * Run on Friday. + */ + Friday = 16, + /** + * Run on Saturday. + */ + Saturday = 32, + /** + * Run on Sunday. + */ + Sunday = 64, + /** + * Run on all days of the week. + */ + All = 127 +} +/** + * Additional settings and descriptors for a TaskAgentPool + */ +export declare enum TaskAgentPoolOptions { + None = 0, + /** + * TaskAgentPool backed by the Elastic pool service + */ + ElasticPool = 1, + /** + * Set to true if agents are re-imaged after each TaskAgentJobRequest + */ + SingleUseAgents = 2, + /** + * Set to true if agents are held for investigation after a TaskAgentJobRequest failure + */ + PreserveAgentOnJobFailure = 4 +} +export interface TaskAgentPoolReference { + id?: number; + /** + * Gets or sets a value indicating whether or not this pool is managed by the service. + */ + isHosted?: boolean; + /** + * Determines whether the pool is legacy. + */ + isLegacy?: boolean; + name?: string; + /** + * Additional pool settings and details + */ + options?: TaskAgentPoolOptions; + /** + * Gets or sets the type of the pool + */ + poolType?: TaskAgentPoolType; + scope?: string; + /** + * Gets the current size of the pool. + */ + size?: number; +} +export interface TaskAgentPoolStatus extends TaskAgentPoolReference { + /** + * Number of requests queued and assigned to an agent. Not running yet. + */ + assignedRequestCount?: number; + /** + * Number of queued requests which are not assigned to any agents + */ + queuedRequestCount?: number; + /** + * Number of currently running requests + */ + runningRequestCount?: number; +} +export interface TaskAgentPoolSummary { + columnsHeader?: MetricsColumnsHeader; + deploymentGroups?: DeploymentGroupReference[]; + pool?: TaskAgentPoolReference; + queues?: TaskAgentQueue[]; + rows?: MetricsRow[]; +} +/** + * The type of agent pool. + */ +export declare enum TaskAgentPoolType { + /** + * A typical pool of task agents + */ + Automation = 1, + /** + * A deployment pool + */ + Deployment = 2 +} +/** + * Represents the public key portion of an RSA asymmetric key. + */ +export interface TaskAgentPublicKey { + /** + * Gets or sets the exponent for the public key. + */ + exponent?: number[]; + /** + * Gets or sets the modulus for the public key. + */ + modulus?: number[]; +} +/** + * An agent queue. + */ +export interface TaskAgentQueue { + /** + * ID of the queue + */ + id?: number; + /** + * Name of the queue + */ + name?: string; + /** + * Pool reference for this queue + */ + pool?: TaskAgentPoolReference; + /** + * Project ID + */ + projectId?: string; +} +/** + * Filters queues based on whether the calling user has permission to use or manage the queue. + */ +export declare enum TaskAgentQueueActionFilter { + None = 0, + Manage = 2, + Use = 16 +} +/** + * A reference to an agent. + */ +export interface TaskAgentReference { + _links?: any; + /** + * This agent's access point. + */ + accessPoint?: string; + /** + * Whether or not this agent should run jobs. + */ + enabled?: boolean; + /** + * Identifier of the agent. + */ + id?: number; + /** + * Name of the agent. + */ + name?: string; + /** + * Agent OS. + */ + oSDescription?: string; + /** + * Provisioning state of this agent. + */ + provisioningState?: string; + /** + * Whether or not the agent is online. + */ + status?: TaskAgentStatus; + /** + * Agent version. + */ + version?: string; +} +export declare enum TaskAgentRequestUpdateOptions { + None = 0, + BumpRequestToTop = 1 +} +/** + * Represents a session for performing message exchanges from an agent. + */ +export interface TaskAgentSession { + /** + * Gets or sets the agent which is the target of the session. + */ + agent?: TaskAgentReference; + /** + * Gets the key used to encrypt message traffic for this session. + */ + encryptionKey?: TaskAgentSessionKey; + /** + * Gets or sets the owner name of this session. Generally this will be the machine of origination. + */ + ownerName?: string; + /** + * Gets the unique identifier for this session. + */ + sessionId?: string; + systemCapabilities?: { + [key: string]: string; + }; +} +/** + * Represents a symmetric key used for message-level encryption for communication sent to an agent. + */ +export interface TaskAgentSessionKey { + /** + * Gets or sets a value indicating whether or not the key value is encrypted. If this value is true, the Value property should be decrypted using the RSA key exchanged with the server during registration. + */ + encrypted?: boolean; + /** + * Gets or sets the symmetric key value. + */ + value?: number[]; +} +export declare enum TaskAgentStatus { + Offline = 1, + Online = 2 +} +/** + * This is useful in getting a list of deployment targets, filtered by the deployment agent status. + */ +export declare enum TaskAgentStatusFilter { + /** + * Only deployment targets that are offline. + */ + Offline = 1, + /** + * Only deployment targets that are online. + */ + Online = 2, + /** + * All deployment targets. + */ + All = 3 +} +/** + * Details about an agent update. + */ +export interface TaskAgentUpdate { + /** + * Current state of this agent update. + */ + currentState?: string; + /** + * Reason for this update. + */ + reason?: TaskAgentUpdateReason; + /** + * Identity which requested this update. + */ + requestedBy?: VSSInterfaces.IdentityRef; + /** + * Date on which this update was requested. + */ + requestTime?: Date; + /** + * Source agent version of the update. + */ + sourceVersion?: PackageVersion; + /** + * Target agent version of the update. + */ + targetVersion?: PackageVersion; +} +export interface TaskAgentUpdateReason { + code?: TaskAgentUpdateReasonType; +} +export declare enum TaskAgentUpdateReasonType { + Manual = 1, + MinAgentVersionRequired = 2, + Downgrade = 3 +} +export interface TaskAssignedEvent extends TaskEvent { +} +export interface TaskAttachment { + _links?: any; + createdOn?: Date; + lastChangedBy?: string; + lastChangedOn?: Date; + name?: string; + recordId?: string; + timelineId?: string; + type?: string; +} +export declare enum TaskCommandMode { + Any = 0, + Restricted = 1 +} +export interface TaskCommandRestrictions { + mode?: TaskCommandMode; +} +export interface TaskCompletedEvent extends TaskEvent { + result?: TaskResult; +} +export interface TaskDefinition { + agentExecution?: TaskExecution; + author?: string; + category?: string; + contentsUploaded?: boolean; + contributionIdentifier?: string; + contributionVersion?: string; + dataSourceBindings?: DataSourceBinding[]; + definitionType?: string; + demands?: Demand[]; + deprecated?: boolean; + description?: string; + disabled?: boolean; + ecosystem?: string; + execution?: { + [key: string]: any; + }; + friendlyName?: string; + groups?: TaskGroupDefinition[]; + helpMarkDown?: string; + helpUrl?: string; + hostType?: string; + iconUrl?: string; + id?: string; + inputs?: TaskInputDefinition[]; + instanceNameFormat?: string; + minimumAgentVersion?: string; + name?: string; + outputVariables?: TaskOutputVariable[]; + packageLocation?: string; + packageType?: string; + postJobExecution?: { + [key: string]: any; + }; + preJobExecution?: { + [key: string]: any; + }; + preview?: boolean; + releaseNotes?: string; + restrictions?: TaskRestrictions; + runsOn?: string[]; + satisfies?: string[]; + serverOwned?: boolean; + showEnvironmentVariables?: boolean; + sourceDefinitions?: TaskSourceDefinition[]; + sourceLocation?: string; + version?: TaskVersion; + visibility?: string[]; +} +export interface TaskDefinitionEndpoint { + /** + * An ID that identifies a service connection to be used for authenticating endpoint requests. + */ + connectionId?: string; + /** + * An Json based keyselector to filter response returned by fetching the endpoint Url.A Json based keyselector must be prefixed with "jsonpath:". KeySelector can be used to specify the filter to get the keys for the values specified with Selector. The following keyselector defines an Json for extracting nodes named 'ServiceName'. endpoint.KeySelector = "jsonpath://ServiceName"; + */ + keySelector?: string; + /** + * The scope as understood by Connected Services. Essentially, a project-id for now. + */ + scope?: string; + /** + * An XPath/Json based selector to filter response returned by fetching the endpoint Url. An XPath based selector must be prefixed with the string "xpath:". A Json based selector must be prefixed with "jsonpath:". The following selector defines an XPath for extracting nodes named 'ServiceName'. endpoint.Selector = "xpath://ServiceName"; + */ + selector?: string; + /** + * TaskId that this endpoint belongs to. + */ + taskId?: string; + /** + * URL to GET. + */ + url?: string; +} +export interface TaskDefinitionReference { + /** + * Gets or sets the definition type. Values can be 'task' or 'metaTask'. + */ + definitionType: string; + /** + * Gets or sets the unique identifier of task. + */ + id: string; + /** + * Gets or sets the version specification of task. + */ + versionSpec: string; +} +export declare enum TaskDefinitionStatus { + Preinstalled = 1, + ReceivedInstallOrUpdate = 2, + Installed = 3, + ReceivedUninstall = 4, + Uninstalled = 5, + RequestedUpdate = 6, + Updated = 7, + AlreadyUpToDate = 8, + InlineUpdateReceived = 9 +} +export interface TaskEvent extends JobEvent { + taskId?: string; +} +export interface TaskExecution { + /** + * The utility task to run. Specifying this means that this task definition is simply a meta task to call another task. This is useful for tasks that call utility tasks like powershell and commandline + */ + execTask?: TaskReference; + /** + * If a task is going to run code, then this provides the type/script etc... information by platform. For example, it might look like. net45: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } net20: { typeName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShellTask", assemblyName: "Microsoft.TeamFoundation.Automation.Tasks.PowerShell.dll" } java: { jar: "powershelltask.tasks.automation.teamfoundation.microsoft.com", } node: { script: "powershellhost.js", } + */ + platformInstructions?: { + [key: string]: { + [key: string]: string; + }; + }; +} +export interface TaskGroup extends TaskDefinition { + /** + * Gets or sets comment. + */ + comment?: string; + /** + * Gets or sets the identity who created. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets date on which it got created. + */ + createdOn?: Date; + /** + * Gets or sets as 'true' to indicate as deleted, 'false' otherwise. + */ + deleted?: boolean; + /** + * Gets or sets the identity who modified. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets date on which it got modified. + */ + modifiedOn?: Date; + /** + * Gets or sets the owner. + */ + owner?: string; + /** + * Gets or sets parent task group Id. This is used while creating a draft task group. + */ + parentDefinitionId?: string; + /** + * Gets or sets revision. + */ + revision?: number; + /** + * Gets or sets the tasks. + */ + tasks?: TaskGroupStep[]; +} +export interface TaskGroupCreateParameter { + /** + * Sets author name of the task group. + */ + author?: string; + /** + * Sets category of the task group. + */ + category?: string; + /** + * Sets description of the task group. + */ + description?: string; + /** + * Sets friendly name of the task group. + */ + friendlyName?: string; + /** + * Sets url icon of the task group. + */ + iconUrl?: string; + /** + * Sets input for the task group. + */ + inputs?: TaskInputDefinition[]; + /** + * Sets display name of the task group. + */ + instanceNameFormat?: string; + /** + * Sets name of the task group. + */ + name?: string; + /** + * Sets parent task group Id. This is used while creating a draft task group. + */ + parentDefinitionId?: string; + /** + * Sets RunsOn of the task group. Value can be 'Agent', 'Server' or 'DeploymentGroup'. + */ + runsOn?: string[]; + /** + * Sets tasks for the task group. + */ + tasks?: TaskGroupStep[]; + /** + * Sets version of the task group. + */ + version?: TaskVersion; +} +export interface TaskGroupDefinition { + displayName?: string; + isExpanded?: boolean; + name?: string; + tags?: string[]; + visibleRule?: string; +} +export declare enum TaskGroupExpands { + None = 0, + Tasks = 2 +} +export interface TaskGroupPublishPreviewParameter extends TaskGroupUpdatePropertiesBase { + /** + * This is to disable previous versions of task group upon publish + */ + disablePriorVersions?: boolean; + /** + * Denotes if task group is in preview + */ + preview?: boolean; + /** + * This is the revision of task group that is getting published + */ + revision?: number; + /** + * This is the version of task group that is getting published + */ + version?: TaskVersion; +} +/** + * Specifies the desired ordering of taskGroups. + */ +export declare enum TaskGroupQueryOrder { + /** + * Order by createdon ascending. + */ + CreatedOnAscending = 0, + /** + * Order by createdon descending. + */ + CreatedOnDescending = 1 +} +export interface TaskGroupRestoreParameter extends TaskGroupUpdatePropertiesBase { + /** + * This is to restore deleted Task Group + */ + restore?: boolean; +} +export interface TaskGroupRevision { + changedBy?: VSSInterfaces.IdentityRef; + changedDate?: Date; + changeType?: AuditAction; + comment?: string; + fileId?: number; + majorVersion?: number; + revision?: number; + taskGroupId?: string; +} +/** + * Represents tasks in the task group. + */ +export interface TaskGroupStep { + /** + * Gets or sets as 'true' to run the task always, 'false' otherwise. + */ + alwaysRun?: boolean; + /** + * Gets or sets condition for the task. + */ + condition?: string; + /** + * Gets or sets as 'true' to continue on error, 'false' otherwise. + */ + continueOnError?: boolean; + /** + * Gets or sets the display name. + */ + displayName?: string; + /** + * Gets or sets as task is enabled or not. + */ + enabled?: boolean; + /** + * Gets dictionary of environment variables. + */ + environment?: { + [key: string]: string; + }; + /** + * Gets or sets dictionary of inputs. + */ + inputs?: { + [key: string]: string; + }; + /** + * Gets or sets the maximum number of retries + */ + retryCountOnTaskFailure?: number; + /** + * Gets or sets the reference of the task. + */ + task?: TaskDefinitionReference; + /** + * Gets or sets the maximum time, in minutes, that a task is allowed to execute on agent before being cancelled by server. A zero value indicates an infinite timeout. + */ + timeoutInMinutes?: number; +} +export interface TaskGroupUpdateParameter { + /** + * Sets author name of the task group. + */ + author?: string; + /** + * Sets category of the task group. + */ + category?: string; + /** + * Sets comment of the task group. + */ + comment?: string; + /** + * Sets description of the task group. + */ + description?: string; + /** + * Sets friendly name of the task group. + */ + friendlyName?: string; + /** + * Sets url icon of the task group. + */ + iconUrl?: string; + /** + * Sets the unique identifier of this field. + */ + id?: string; + /** + * Sets input for the task group. + */ + inputs?: TaskInputDefinition[]; + /** + * Sets display name of the task group. + */ + instanceNameFormat?: string; + /** + * Sets name of the task group. + */ + name?: string; + /** + * Gets or sets parent task group Id. This is used while creating a draft task group. + */ + parentDefinitionId?: string; + /** + * Sets revision of the task group. + */ + revision?: number; + /** + * Sets RunsOn of the task group. Value can be 'Agent', 'Server' or 'DeploymentGroup'. + */ + runsOn?: string[]; + /** + * Sets tasks for the task group. + */ + tasks?: TaskGroupStep[]; + /** + * Sets version of the task group. + */ + version?: TaskVersion; +} +export interface TaskGroupUpdatePropertiesBase { + /** + * Comment for this update request + */ + comment?: string; +} +export interface TaskHubLicenseDetails { + enterpriseUsersCount?: number; + failedToReachAllProviders?: boolean; + freeHostedLicenseCount?: number; + freeLicenseCount?: number; + hasLicenseCountEverUpdated?: boolean; + hostedAgentMinutesFreeCount?: number; + hostedAgentMinutesUsedCount?: number; + hostedLicensesArePremium?: boolean; + msdnUsersCount?: number; + /** + * Microsoft-hosted licenses purchased from VSTS directly. + */ + purchasedHostedLicenseCount?: number; + /** + * Self-hosted licenses purchased from VSTS directly. + */ + purchasedLicenseCount?: number; + totalHostedLicenseCount?: number; + totalLicenseCount?: number; + totalPrivateLicenseCount?: number; +} +export interface TaskInputDefinition extends DistributedTaskCommonInterfaces.TaskInputDefinitionBase { +} +export interface TaskInstance extends TaskReference { + alwaysRun?: boolean; + condition?: string; + continueOnError?: boolean; + displayName?: string; + enabled?: boolean; + environment?: { + [key: string]: string; + }; + instanceId?: string; + refName?: string; + retryCountOnTaskFailure?: number; + timeoutInMinutes?: number; +} +export interface TaskLog extends TaskLogReference { + createdOn?: Date; + indexLocation?: string; + lastChangedOn?: Date; + lineCount?: number; + path?: string; +} +export interface TaskLogReference { + id?: number; + location?: string; +} +export interface TaskOrchestrationContainer extends TaskOrchestrationItem { + children?: TaskOrchestrationItem[]; + continueOnError?: boolean; + data?: { + [key: string]: string; + }; + maxConcurrency?: number; + parallel?: boolean; + rollback?: TaskOrchestrationContainer; +} +export interface TaskOrchestrationItem { + itemType?: TaskOrchestrationItemType; +} +export declare enum TaskOrchestrationItemType { + Container = 0, + Job = 1 +} +export interface TaskOrchestrationJob extends TaskOrchestrationItem { + demands?: Demand[]; + executeAs?: VSSInterfaces.IdentityRef; + executionMode?: string; + executionTimeout?: any; + instanceId?: string; + name?: string; + refName?: string; + tasks?: TaskInstance[]; + variables?: { + [key: string]: string; + }; +} +export interface TaskOrchestrationOwner { + _links?: any; + id?: number; + name?: string; +} +export interface TaskOrchestrationPlan extends TaskOrchestrationPlanReference { + environment?: PlanEnvironment; + expandedYaml?: TaskLogReference; + finishTime?: Date; + implementation?: TaskOrchestrationContainer; + initializationLog?: TaskLogReference; + requestedById?: string; + requestedForId?: string; + result?: TaskResult; + resultCode?: string; + startTime?: Date; + state?: TaskOrchestrationPlanState; + timeline?: TimelineReference; +} +export interface TaskOrchestrationPlanGroup { + planGroup?: string; + project?: ProjectReference; + runningRequests?: TaskAgentJobRequest[]; +} +export interface TaskOrchestrationPlanGroupsQueueMetrics { + count?: number; + status?: PlanGroupStatus; +} +export interface TaskOrchestrationPlanReference { + artifactLocation?: string; + artifactUri?: string; + definition?: TaskOrchestrationOwner; + owner?: TaskOrchestrationOwner; + planGroup?: string; + planId?: string; + planType?: string; + scopeIdentifier?: string; + version?: number; +} +export declare enum TaskOrchestrationPlanState { + InProgress = 1, + Queued = 2, + Completed = 4, + Throttled = 8 +} +export interface TaskOrchestrationQueuedPlan { + assignTime?: Date; + definition?: TaskOrchestrationOwner; + owner?: TaskOrchestrationOwner; + planGroup?: string; + planId?: string; + poolId?: number; + queuePosition?: number; + queueTime?: Date; + scopeIdentifier?: string; +} +export interface TaskOrchestrationQueuedPlanGroup { + definition?: TaskOrchestrationOwner; + owner?: TaskOrchestrationOwner; + planGroup?: string; + plans?: TaskOrchestrationQueuedPlan[]; + project?: ProjectReference; + queuePosition?: number; +} +export interface TaskOutputVariable { + description?: string; + name?: string; +} +export interface TaskPackageMetadata { + /** + * Gets the name of the package. + */ + type?: string; + /** + * Gets the url of the package. + */ + url?: string; + /** + * Gets the version of the package. + */ + version?: string; +} +export interface TaskReference { + id?: string; + inputs?: { + [key: string]: string; + }; + name?: string; + version?: string; +} +export interface TaskRestrictions { + commands?: TaskCommandRestrictions; + settableVariables?: TaskVariableRestrictions; +} +export declare enum TaskResult { + Succeeded = 0, + SucceededWithIssues = 1, + Failed = 2, + Canceled = 3, + Skipped = 4, + Abandoned = 5 +} +export interface TaskSourceDefinition extends DistributedTaskCommonInterfaces.TaskSourceDefinitionBase { +} +export interface TaskStartedEvent extends TaskEvent { +} +export interface TaskVariableRestrictions { + allowed?: string[]; +} +export interface TaskVersion { + isTest?: boolean; + major?: number; + minor?: number; + patch?: number; +} +export interface Timeline extends TimelineReference { + lastChangedBy?: string; + lastChangedOn?: Date; + records?: TimelineRecord[]; +} +export interface TimelineAttempt { + /** + * Gets or sets the attempt of the record. + */ + attempt?: number; + /** + * Gets or sets the unique identifier for the record. + */ + identifier?: string; + /** + * Gets or sets the record identifier located within the specified timeline. + */ + recordId?: string; + /** + * Gets or sets the timeline identifier which owns the record representing this attempt. + */ + timelineId?: string; +} +export interface TimelineRecord { + agentSpecification?: any; + attempt?: number; + changeId?: number; + currentOperation?: string; + details?: TimelineReference; + errorCount?: number; + finishTime?: Date; + id?: string; + identifier?: string; + issues?: Issue[]; + lastModified?: Date; + location?: string; + log?: TaskLogReference; + name?: string; + order?: number; + parentId?: string; + percentComplete?: number; + previousAttempts?: TimelineAttempt[]; + queueId?: number; + refName?: string; + result?: TaskResult; + resultCode?: string; + startTime?: Date; + state?: TimelineRecordState; + task?: TaskReference; + type?: string; + variables?: { + [key: string]: VariableValue; + }; + warningCount?: number; + workerName?: string; +} +export interface TimelineRecordFeedLinesWrapper { + count?: number; + endLine?: number; + startLine?: number; + stepId?: string; + value?: string[]; +} +export declare enum TimelineRecordState { + Pending = 0, + InProgress = 1, + Completed = 2 +} +export interface TimelineReference { + changeId?: number; + id?: string; + location?: string; +} +export interface ValidationItem { + /** + * Tells whether the current input is valid or not + */ + isValid?: boolean; + /** + * Reason for input validation failure + */ + reason?: string; + /** + * Type of validation item + */ + type?: string; + /** + * Value to validate. The conditional expression to validate for the input for "expression" type Eg:eq(variables['Build.SourceBranch'], 'refs/heads/master');eq(value, 'refs/heads/master') + */ + value?: string; +} +/** + * A variable group is a collection of related variables. + */ +export interface VariableGroup { + /** + * Gets or sets the identity who created the variable group. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the time when variable group was created. + */ + createdOn?: Date; + /** + * Gets or sets description of the variable group. + */ + description?: string; + /** + * Gets or sets id of the variable group. + */ + id?: number; + /** + * Indicates whether variable group is shared with other projects or not. + */ + isShared?: boolean; + /** + * Gets or sets the identity who modified the variable group. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * Gets or sets the time when variable group was modified + */ + modifiedOn?: Date; + /** + * Gets or sets name of the variable group. + */ + name?: string; + /** + * Gets or sets provider data. + */ + providerData?: VariableGroupProviderData; + /** + * Gets or sets type of the variable group. + */ + type?: string; + /** + * all project references where the variable group is shared with other projects. + */ + variableGroupProjectReferences?: VariableGroupProjectReference[]; + /** + * Gets or sets variables contained in the variable group. + */ + variables?: { + [key: string]: VariableValue; + }; +} +export declare enum VariableGroupActionFilter { + None = 0, + Manage = 2, + Use = 16 +} +export interface VariableGroupParameters { + /** + * Sets description of the variable group. + */ + description?: string; + /** + * Sets name of the variable group. + */ + name?: string; + /** + * Sets provider data. + */ + providerData?: VariableGroupProviderData; + /** + * Sets type of the variable group. + */ + type?: string; + variableGroupProjectReferences?: VariableGroupProjectReference[]; + /** + * Sets variables contained in the variable group. + */ + variables?: { + [key: string]: VariableValue; + }; +} +/** + * A variable group reference is a shallow reference to variable group. + */ +export interface VariableGroupProjectReference { + /** + * Gets or sets description of the variable group. + */ + description?: string; + /** + * Gets or sets name of the variable group. + */ + name?: string; + /** + * Gets or sets project reference of the variable group. + */ + projectReference?: ProjectReference; +} +/** + * Defines provider data of the variable group. + */ +export interface VariableGroupProviderData { +} +/** + * Specifies the desired ordering of variableGroups. + */ +export declare enum VariableGroupQueryOrder { + /** + * Order by id ascending. + */ + IdAscending = 0, + /** + * Order by id descending. + */ + IdDescending = 1 +} +export interface VariableValue { + isReadOnly?: boolean; + isSecret?: boolean; + value?: string; +} +export interface VirtualMachine { + agent?: TaskAgent; + id?: number; + tags?: string[]; +} +export interface VirtualMachineGroup extends EnvironmentResource { + poolId?: number; +} +export interface VirtualMachineGroupCreateParameters { + name?: string; +} +export interface VirtualMachineResource extends EnvironmentResource { + agent?: TaskAgent; +} +export interface VirtualMachineResourceCreateParameters { + virtualMachineResource?: VirtualMachineResource; +} +export declare var TypeInfo: { + AadLoginPromptOption: { + enumValues: { + "noOption": number; + "login": number; + "selectAccount": number; + "freshLogin": number; + "freshLoginWithMfa": number; + }; + }; + AgentChangeEvent: any; + AgentJobRequestMessage: any; + AgentPoolEvent: any; + AgentQueueEvent: any; + AgentQueuesEvent: any; + AuditAction: { + enumValues: { + "add": number; + "update": number; + "delete": number; + "undelete": number; + }; + }; + AzureKeyVaultVariableGroupProviderData: any; + AzureKeyVaultVariableValue: any; + DemandMinimumVersion: any; + DemandSource: any; + DemandSourceType: { + enumValues: { + "task": number; + "feature": number; + }; + }; + DeploymentGroup: any; + DeploymentGroupActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + DeploymentGroupExpands: { + enumValues: { + "none": number; + "machines": number; + "tags": number; + }; + }; + DeploymentGroupMetrics: any; + DeploymentGroupReference: any; + DeploymentMachine: any; + DeploymentMachineChangedData: any; + DeploymentMachineExpands: { + enumValues: { + "none": number; + "capabilities": number; + "assignedRequest": number; + }; + }; + DeploymentMachineGroup: any; + DeploymentMachineGroupReference: any; + DeploymentMachinesChangeEvent: any; + DeploymentPoolSummary: any; + DeploymentPoolSummaryExpands: { + enumValues: { + "none": number; + "deploymentGroups": number; + "resource": number; + }; + }; + DeploymentTargetExpands: { + enumValues: { + "none": number; + "capabilities": number; + "assignedRequest": number; + "lastCompletedRequest": number; + }; + }; + ElasticAgentState: { + enumValues: { + "none": number; + "enabled": number; + "online": number; + "assigned": number; + }; + }; + ElasticComputeState: { + enumValues: { + "none": number; + "healthy": number; + "creating": number; + "deleting": number; + "failed": number; + "stopped": number; + }; + }; + ElasticNode: any; + ElasticNodeSettings: any; + ElasticNodeState: { + enumValues: { + "none": number; + "new": number; + "creatingCompute": number; + "startingAgent": number; + "idle": number; + "assigned": number; + "offline": number; + "pendingReimage": number; + "pendingDelete": number; + "saved": number; + "deletingCompute": number; + "deleted": number; + "lost": number; + }; + }; + ElasticPool: any; + ElasticPoolCreationResult: any; + ElasticPoolLog: any; + ElasticPoolSettings: any; + ElasticPoolState: { + enumValues: { + "online": number; + "offline": number; + "unhealthy": number; + "new": number; + }; + }; + EnvironmentActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + EnvironmentDeploymentExecutionRecord: any; + EnvironmentExpands: { + enumValues: { + "none": number; + "resourceReferences": number; + }; + }; + EnvironmentInstance: any; + EnvironmentResource: any; + EnvironmentResourceDeploymentExecutionRecord: any; + EnvironmentResourceReference: any; + EnvironmentResourceType: { + enumValues: { + "undefined": number; + "generic": number; + "virtualMachine": number; + "kubernetes": number; + }; + }; + ExclusiveLockType: { + enumValues: { + "runLatest": number; + "sequential": number; + }; + }; + Issue: any; + IssueType: { + enumValues: { + "error": number; + "warning": number; + }; + }; + JobAssignedEvent: any; + JobCompletedEvent: any; + JobEnvironment: any; + JobRequestMessage: any; + KubernetesResource: any; + LogLevel: { + enumValues: { + "error": number; + "warning": number; + "info": number; + }; + }; + MachineGroupActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + MaskHint: any; + MaskType: { + enumValues: { + "variable": number; + "regex": number; + }; + }; + OperatingSystemType: { + enumValues: { + "windows": number; + "linux": number; + }; + }; + OperationType: { + enumValues: { + "configurationJob": number; + "sizingJob": number; + "increaseCapacity": number; + "reimage": number; + "deleteVMs": number; + }; + }; + PackageMetadata: any; + PlanEnvironment: any; + PlanGroupStatus: { + enumValues: { + "running": number; + "queued": number; + "all": number; + }; + }; + PlanGroupStatusFilter: { + enumValues: { + "running": number; + "queued": number; + "all": number; + }; + }; + ResourceLockRequest: any; + ResourceLockStatus: { + enumValues: { + "queued": number; + "inUse": number; + "finished": number; + "timedOut": number; + "canceled": number; + "abandoned": number; + "waitingOnChecks": number; + }; + }; + ResourceUsage: any; + SecureFile: any; + SecureFileActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + SecureFileEvent: any; + ServerTaskRequestMessage: any; + ServiceEndpointAuthenticationScheme: any; + ServiceEndpointExecutionData: any; + ServiceEndpointExecutionRecord: any; + ServiceEndpointExecutionRecordsInput: any; + ServiceEndpointRequestResult: any; + ServiceEndpointType: any; + TaskAgent: any; + TaskAgentCloudRequest: any; + TaskAgentCloudType: any; + TaskAgentDowngrade: any; + TaskAgentJob: any; + TaskAgentJobRequest: any; + TaskAgentJobResultFilter: { + enumValues: { + "failed": number; + "passed": number; + "neverDeployed": number; + "all": number; + }; + }; + TaskAgentJobStep: any; + TaskAgentJobStepType: { + enumValues: { + "task": number; + "action": number; + }; + }; + TaskAgentManualUpdate: any; + TaskAgentMinAgentVersionRequiredUpdate: any; + TaskAgentPool: any; + TaskAgentPoolActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + TaskAgentPoolMaintenanceDefinition: any; + TaskAgentPoolMaintenanceJob: any; + TaskAgentPoolMaintenanceJobResult: { + enumValues: { + "succeeded": number; + "failed": number; + "canceled": number; + }; + }; + TaskAgentPoolMaintenanceJobStatus: { + enumValues: { + "inProgress": number; + "completed": number; + "cancelling": number; + "queued": number; + }; + }; + TaskAgentPoolMaintenanceJobTargetAgent: any; + TaskAgentPoolMaintenanceSchedule: any; + TaskAgentPoolMaintenanceScheduleDays: { + enumValues: { + "none": number; + "monday": number; + "tuesday": number; + "wednesday": number; + "thursday": number; + "friday": number; + "saturday": number; + "sunday": number; + "all": number; + }; + }; + TaskAgentPoolOptions: { + enumValues: { + "none": number; + "elasticPool": number; + "singleUseAgents": number; + "preserveAgentOnJobFailure": number; + }; + }; + TaskAgentPoolReference: any; + TaskAgentPoolStatus: any; + TaskAgentPoolSummary: any; + TaskAgentPoolType: { + enumValues: { + "automation": number; + "deployment": number; + }; + }; + TaskAgentQueue: any; + TaskAgentQueueActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + TaskAgentReference: any; + TaskAgentRequestUpdateOptions: { + enumValues: { + "none": number; + "bumpRequestToTop": number; + }; + }; + TaskAgentSession: any; + TaskAgentStatus: { + enumValues: { + "offline": number; + "online": number; + }; + }; + TaskAgentStatusFilter: { + enumValues: { + "offline": number; + "online": number; + "all": number; + }; + }; + TaskAgentUpdate: any; + TaskAgentUpdateReason: any; + TaskAgentUpdateReasonType: { + enumValues: { + "manual": number; + "minAgentVersionRequired": number; + "downgrade": number; + }; + }; + TaskAttachment: any; + TaskCommandMode: { + enumValues: { + "any": number; + "restricted": number; + }; + }; + TaskCommandRestrictions: any; + TaskCompletedEvent: any; + TaskDefinition: any; + TaskDefinitionStatus: { + enumValues: { + "preinstalled": number; + "receivedInstallOrUpdate": number; + "installed": number; + "receivedUninstall": number; + "uninstalled": number; + "requestedUpdate": number; + "updated": number; + "alreadyUpToDate": number; + "inlineUpdateReceived": number; + }; + }; + TaskGroup: any; + TaskGroupExpands: { + enumValues: { + "none": number; + "tasks": number; + }; + }; + TaskGroupQueryOrder: { + enumValues: { + "createdOnAscending": number; + "createdOnDescending": number; + }; + }; + TaskGroupRevision: any; + TaskLog: any; + TaskOrchestrationContainer: any; + TaskOrchestrationItem: any; + TaskOrchestrationItemType: { + enumValues: { + "container": number; + "job": number; + }; + }; + TaskOrchestrationJob: any; + TaskOrchestrationPlan: any; + TaskOrchestrationPlanGroup: any; + TaskOrchestrationPlanGroupsQueueMetrics: any; + TaskOrchestrationPlanState: { + enumValues: { + "inProgress": number; + "queued": number; + "completed": number; + "throttled": number; + }; + }; + TaskOrchestrationQueuedPlan: any; + TaskOrchestrationQueuedPlanGroup: any; + TaskRestrictions: any; + TaskResult: { + enumValues: { + "succeeded": number; + "succeededWithIssues": number; + "failed": number; + "canceled": number; + "skipped": number; + "abandoned": number; + }; + }; + Timeline: any; + TimelineRecord: any; + TimelineRecordState: { + enumValues: { + "pending": number; + "inProgress": number; + "completed": number; + }; + }; + VariableGroup: any; + VariableGroupActionFilter: { + enumValues: { + "none": number; + "manage": number; + "use": number; + }; + }; + VariableGroupQueryOrder: { + enumValues: { + "idAscending": number; + "idDescending": number; + }; + }; + VirtualMachine: any; + VirtualMachineGroup: any; + VirtualMachineResource: any; + VirtualMachineResourceCreateParameters: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.js b/node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.js new file mode 100644 index 0000000..312ab83 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/TaskAgentInterfaces.js @@ -0,0 +1,1791 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const FormInputInterfaces = require("../interfaces/common/FormInputInterfaces"); +var AadLoginPromptOption; +(function (AadLoginPromptOption) { + /** + * Do not provide a prompt option + */ + AadLoginPromptOption[AadLoginPromptOption["NoOption"] = 0] = "NoOption"; + /** + * Force the user to login again. + */ + AadLoginPromptOption[AadLoginPromptOption["Login"] = 1] = "Login"; + /** + * Force the user to select which account they are logging in with instead of automatically picking the user up from the session state. NOTE: This does not work for switching between the variants of a dual-homed user. + */ + AadLoginPromptOption[AadLoginPromptOption["SelectAccount"] = 2] = "SelectAccount"; + /** + * Force the user to login again. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login. + */ + AadLoginPromptOption[AadLoginPromptOption["FreshLogin"] = 3] = "FreshLogin"; + /** + * Force the user to login again with mfa. Ignore current authentication state and force the user to authenticate again. This option should be used instead of Login, if MFA is required. + */ + AadLoginPromptOption[AadLoginPromptOption["FreshLoginWithMfa"] = 4] = "FreshLoginWithMfa"; +})(AadLoginPromptOption = exports.AadLoginPromptOption || (exports.AadLoginPromptOption = {})); +var AuditAction; +(function (AuditAction) { + AuditAction[AuditAction["Add"] = 1] = "Add"; + AuditAction[AuditAction["Update"] = 2] = "Update"; + AuditAction[AuditAction["Delete"] = 3] = "Delete"; + AuditAction[AuditAction["Undelete"] = 4] = "Undelete"; +})(AuditAction = exports.AuditAction || (exports.AuditAction = {})); +var DemandSourceType; +(function (DemandSourceType) { + DemandSourceType[DemandSourceType["Task"] = 0] = "Task"; + DemandSourceType[DemandSourceType["Feature"] = 1] = "Feature"; +})(DemandSourceType = exports.DemandSourceType || (exports.DemandSourceType = {})); +/** + * This is useful in getting a list of deployment groups, filtered for which caller has permissions to take a particular action. + */ +var DeploymentGroupActionFilter; +(function (DeploymentGroupActionFilter) { + /** + * All deployment groups. + */ + DeploymentGroupActionFilter[DeploymentGroupActionFilter["None"] = 0] = "None"; + /** + * Only deployment groups for which caller has **manage** permission. + */ + DeploymentGroupActionFilter[DeploymentGroupActionFilter["Manage"] = 2] = "Manage"; + /** + * Only deployment groups for which caller has **use** permission. + */ + DeploymentGroupActionFilter[DeploymentGroupActionFilter["Use"] = 16] = "Use"; +})(DeploymentGroupActionFilter = exports.DeploymentGroupActionFilter || (exports.DeploymentGroupActionFilter = {})); +/** + * Properties to be included or expanded in deployment group objects. This is useful when getting a single or list of deployment grouops. + */ +var DeploymentGroupExpands; +(function (DeploymentGroupExpands) { + /** + * No additional properties. + */ + DeploymentGroupExpands[DeploymentGroupExpands["None"] = 0] = "None"; + /** + * Deprecated: Include all the deployment targets. + */ + DeploymentGroupExpands[DeploymentGroupExpands["Machines"] = 2] = "Machines"; + /** + * Include unique list of tags across all deployment targets. + */ + DeploymentGroupExpands[DeploymentGroupExpands["Tags"] = 4] = "Tags"; +})(DeploymentGroupExpands = exports.DeploymentGroupExpands || (exports.DeploymentGroupExpands = {})); +var DeploymentMachineExpands; +(function (DeploymentMachineExpands) { + DeploymentMachineExpands[DeploymentMachineExpands["None"] = 0] = "None"; + DeploymentMachineExpands[DeploymentMachineExpands["Capabilities"] = 2] = "Capabilities"; + DeploymentMachineExpands[DeploymentMachineExpands["AssignedRequest"] = 4] = "AssignedRequest"; +})(DeploymentMachineExpands = exports.DeploymentMachineExpands || (exports.DeploymentMachineExpands = {})); +/** + * Properties to be included or expanded in deployment pool summary objects. This is useful when getting a single or list of deployment pool summaries. + */ +var DeploymentPoolSummaryExpands; +(function (DeploymentPoolSummaryExpands) { + /** + * No additional properties + */ + DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["None"] = 0] = "None"; + /** + * Include deployment groups referring to the deployment pool. + */ + DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["DeploymentGroups"] = 2] = "DeploymentGroups"; + /** + * Include Resource referring to the deployment pool. + */ + DeploymentPoolSummaryExpands[DeploymentPoolSummaryExpands["Resource"] = 4] = "Resource"; +})(DeploymentPoolSummaryExpands = exports.DeploymentPoolSummaryExpands || (exports.DeploymentPoolSummaryExpands = {})); +/** + * Properties to be included or expanded in deployment target objects. This is useful when getting a single or list of deployment targets. + */ +var DeploymentTargetExpands; +(function (DeploymentTargetExpands) { + /** + * No additional properties. + */ + DeploymentTargetExpands[DeploymentTargetExpands["None"] = 0] = "None"; + /** + * Include capabilities of the deployment agent. + */ + DeploymentTargetExpands[DeploymentTargetExpands["Capabilities"] = 2] = "Capabilities"; + /** + * Include the job request assigned to the deployment agent. + */ + DeploymentTargetExpands[DeploymentTargetExpands["AssignedRequest"] = 4] = "AssignedRequest"; + /** + * Include the last completed job request of the deployment agent. + */ + DeploymentTargetExpands[DeploymentTargetExpands["LastCompletedRequest"] = 8] = "LastCompletedRequest"; +})(DeploymentTargetExpands = exports.DeploymentTargetExpands || (exports.DeploymentTargetExpands = {})); +var ElasticAgentState; +(function (ElasticAgentState) { + ElasticAgentState[ElasticAgentState["None"] = 0] = "None"; + ElasticAgentState[ElasticAgentState["Enabled"] = 1] = "Enabled"; + ElasticAgentState[ElasticAgentState["Online"] = 2] = "Online"; + ElasticAgentState[ElasticAgentState["Assigned"] = 4] = "Assigned"; +})(ElasticAgentState = exports.ElasticAgentState || (exports.ElasticAgentState = {})); +var ElasticComputeState; +(function (ElasticComputeState) { + ElasticComputeState[ElasticComputeState["None"] = 0] = "None"; + ElasticComputeState[ElasticComputeState["Healthy"] = 1] = "Healthy"; + ElasticComputeState[ElasticComputeState["Creating"] = 2] = "Creating"; + ElasticComputeState[ElasticComputeState["Deleting"] = 3] = "Deleting"; + ElasticComputeState[ElasticComputeState["Failed"] = 4] = "Failed"; + ElasticComputeState[ElasticComputeState["Stopped"] = 5] = "Stopped"; +})(ElasticComputeState = exports.ElasticComputeState || (exports.ElasticComputeState = {})); +var ElasticNodeState; +(function (ElasticNodeState) { + ElasticNodeState[ElasticNodeState["None"] = 0] = "None"; + ElasticNodeState[ElasticNodeState["New"] = 1] = "New"; + ElasticNodeState[ElasticNodeState["CreatingCompute"] = 2] = "CreatingCompute"; + ElasticNodeState[ElasticNodeState["StartingAgent"] = 3] = "StartingAgent"; + ElasticNodeState[ElasticNodeState["Idle"] = 4] = "Idle"; + ElasticNodeState[ElasticNodeState["Assigned"] = 5] = "Assigned"; + ElasticNodeState[ElasticNodeState["Offline"] = 6] = "Offline"; + ElasticNodeState[ElasticNodeState["PendingReimage"] = 7] = "PendingReimage"; + ElasticNodeState[ElasticNodeState["PendingDelete"] = 8] = "PendingDelete"; + ElasticNodeState[ElasticNodeState["Saved"] = 9] = "Saved"; + ElasticNodeState[ElasticNodeState["DeletingCompute"] = 10] = "DeletingCompute"; + ElasticNodeState[ElasticNodeState["Deleted"] = 11] = "Deleted"; + ElasticNodeState[ElasticNodeState["Lost"] = 12] = "Lost"; +})(ElasticNodeState = exports.ElasticNodeState || (exports.ElasticNodeState = {})); +var ElasticPoolState; +(function (ElasticPoolState) { + /** + * Online and healthy + */ + ElasticPoolState[ElasticPoolState["Online"] = 0] = "Online"; + ElasticPoolState[ElasticPoolState["Offline"] = 1] = "Offline"; + ElasticPoolState[ElasticPoolState["Unhealthy"] = 2] = "Unhealthy"; + ElasticPoolState[ElasticPoolState["New"] = 3] = "New"; +})(ElasticPoolState = exports.ElasticPoolState || (exports.ElasticPoolState = {})); +/** + * This is useful in getting a list of Environments, filtered for which caller has permissions to take a particular action. + */ +var EnvironmentActionFilter; +(function (EnvironmentActionFilter) { + /** + * All environments for which user has **view** permission. + */ + EnvironmentActionFilter[EnvironmentActionFilter["None"] = 0] = "None"; + /** + * Only environments for which caller has **manage** permission. + */ + EnvironmentActionFilter[EnvironmentActionFilter["Manage"] = 2] = "Manage"; + /** + * Only environments for which caller has **use** permission. + */ + EnvironmentActionFilter[EnvironmentActionFilter["Use"] = 16] = "Use"; +})(EnvironmentActionFilter = exports.EnvironmentActionFilter || (exports.EnvironmentActionFilter = {})); +/** + * Properties to be included or expanded in environment objects. This is useful when getting a single environment. + */ +var EnvironmentExpands; +(function (EnvironmentExpands) { + /** + * No additional properties + */ + EnvironmentExpands[EnvironmentExpands["None"] = 0] = "None"; + /** + * Include resource references referring to the environment. + */ + EnvironmentExpands[EnvironmentExpands["ResourceReferences"] = 1] = "ResourceReferences"; +})(EnvironmentExpands = exports.EnvironmentExpands || (exports.EnvironmentExpands = {})); +/** + * EnvironmentResourceType. + */ +var EnvironmentResourceType; +(function (EnvironmentResourceType) { + EnvironmentResourceType[EnvironmentResourceType["Undefined"] = 0] = "Undefined"; + /** + * Unknown resource type + */ + EnvironmentResourceType[EnvironmentResourceType["Generic"] = 1] = "Generic"; + /** + * Virtual machine resource type + */ + EnvironmentResourceType[EnvironmentResourceType["VirtualMachine"] = 2] = "VirtualMachine"; + /** + * Kubernetes resource type + */ + EnvironmentResourceType[EnvironmentResourceType["Kubernetes"] = 4] = "Kubernetes"; +})(EnvironmentResourceType = exports.EnvironmentResourceType || (exports.EnvironmentResourceType = {})); +var ExclusiveLockType; +(function (ExclusiveLockType) { + ExclusiveLockType[ExclusiveLockType["RunLatest"] = 0] = "RunLatest"; + ExclusiveLockType[ExclusiveLockType["Sequential"] = 1] = "Sequential"; +})(ExclusiveLockType = exports.ExclusiveLockType || (exports.ExclusiveLockType = {})); +var IssueType; +(function (IssueType) { + IssueType[IssueType["Error"] = 1] = "Error"; + IssueType[IssueType["Warning"] = 2] = "Warning"; +})(IssueType = exports.IssueType || (exports.IssueType = {})); +var LogLevel; +(function (LogLevel) { + LogLevel[LogLevel["Error"] = 0] = "Error"; + LogLevel[LogLevel["Warning"] = 1] = "Warning"; + LogLevel[LogLevel["Info"] = 2] = "Info"; +})(LogLevel = exports.LogLevel || (exports.LogLevel = {})); +var MachineGroupActionFilter; +(function (MachineGroupActionFilter) { + MachineGroupActionFilter[MachineGroupActionFilter["None"] = 0] = "None"; + MachineGroupActionFilter[MachineGroupActionFilter["Manage"] = 2] = "Manage"; + MachineGroupActionFilter[MachineGroupActionFilter["Use"] = 16] = "Use"; +})(MachineGroupActionFilter = exports.MachineGroupActionFilter || (exports.MachineGroupActionFilter = {})); +var MaskType; +(function (MaskType) { + MaskType[MaskType["Variable"] = 1] = "Variable"; + MaskType[MaskType["Regex"] = 2] = "Regex"; +})(MaskType = exports.MaskType || (exports.MaskType = {})); +var OperatingSystemType; +(function (OperatingSystemType) { + OperatingSystemType[OperatingSystemType["Windows"] = 0] = "Windows"; + OperatingSystemType[OperatingSystemType["Linux"] = 1] = "Linux"; +})(OperatingSystemType = exports.OperatingSystemType || (exports.OperatingSystemType = {})); +var OperationType; +(function (OperationType) { + OperationType[OperationType["ConfigurationJob"] = 0] = "ConfigurationJob"; + OperationType[OperationType["SizingJob"] = 1] = "SizingJob"; + OperationType[OperationType["IncreaseCapacity"] = 2] = "IncreaseCapacity"; + OperationType[OperationType["Reimage"] = 3] = "Reimage"; + OperationType[OperationType["DeleteVMs"] = 4] = "DeleteVMs"; +})(OperationType = exports.OperationType || (exports.OperationType = {})); +var PlanGroupStatus; +(function (PlanGroupStatus) { + PlanGroupStatus[PlanGroupStatus["Running"] = 1] = "Running"; + PlanGroupStatus[PlanGroupStatus["Queued"] = 2] = "Queued"; + PlanGroupStatus[PlanGroupStatus["All"] = 3] = "All"; +})(PlanGroupStatus = exports.PlanGroupStatus || (exports.PlanGroupStatus = {})); +var PlanGroupStatusFilter; +(function (PlanGroupStatusFilter) { + PlanGroupStatusFilter[PlanGroupStatusFilter["Running"] = 1] = "Running"; + PlanGroupStatusFilter[PlanGroupStatusFilter["Queued"] = 2] = "Queued"; + PlanGroupStatusFilter[PlanGroupStatusFilter["All"] = 3] = "All"; +})(PlanGroupStatusFilter = exports.PlanGroupStatusFilter || (exports.PlanGroupStatusFilter = {})); +var ResourceLockStatus; +(function (ResourceLockStatus) { + ResourceLockStatus[ResourceLockStatus["Queued"] = 0] = "Queued"; + ResourceLockStatus[ResourceLockStatus["InUse"] = 1] = "InUse"; + ResourceLockStatus[ResourceLockStatus["Finished"] = 2] = "Finished"; + ResourceLockStatus[ResourceLockStatus["TimedOut"] = 3] = "TimedOut"; + ResourceLockStatus[ResourceLockStatus["Canceled"] = 4] = "Canceled"; + ResourceLockStatus[ResourceLockStatus["Abandoned"] = 5] = "Abandoned"; + ResourceLockStatus[ResourceLockStatus["WaitingOnChecks"] = 6] = "WaitingOnChecks"; +})(ResourceLockStatus = exports.ResourceLockStatus || (exports.ResourceLockStatus = {})); +var SecureFileActionFilter; +(function (SecureFileActionFilter) { + SecureFileActionFilter[SecureFileActionFilter["None"] = 0] = "None"; + SecureFileActionFilter[SecureFileActionFilter["Manage"] = 2] = "Manage"; + SecureFileActionFilter[SecureFileActionFilter["Use"] = 16] = "Use"; +})(SecureFileActionFilter = exports.SecureFileActionFilter || (exports.SecureFileActionFilter = {})); +/** + * This is useful in getting a list of deployment targets, filtered by the result of their last job. + */ +var TaskAgentJobResultFilter; +(function (TaskAgentJobResultFilter) { + /** + * Only those deployment targets on which last job failed (**Abandoned**, **Canceled**, **Failed**, **Skipped**). + */ + TaskAgentJobResultFilter[TaskAgentJobResultFilter["Failed"] = 1] = "Failed"; + /** + * Only those deployment targets on which last job Passed (**Succeeded**, **Succeeded with issues**). + */ + TaskAgentJobResultFilter[TaskAgentJobResultFilter["Passed"] = 2] = "Passed"; + /** + * Only those deployment targets that never executed a job. + */ + TaskAgentJobResultFilter[TaskAgentJobResultFilter["NeverDeployed"] = 4] = "NeverDeployed"; + /** + * All deployment targets. + */ + TaskAgentJobResultFilter[TaskAgentJobResultFilter["All"] = 7] = "All"; +})(TaskAgentJobResultFilter = exports.TaskAgentJobResultFilter || (exports.TaskAgentJobResultFilter = {})); +var TaskAgentJobStepType; +(function (TaskAgentJobStepType) { + TaskAgentJobStepType[TaskAgentJobStepType["Task"] = 1] = "Task"; + TaskAgentJobStepType[TaskAgentJobStepType["Action"] = 2] = "Action"; +})(TaskAgentJobStepType = exports.TaskAgentJobStepType || (exports.TaskAgentJobStepType = {})); +/** + * Filters pools based on whether the calling user has permission to use or manage the pool. + */ +var TaskAgentPoolActionFilter; +(function (TaskAgentPoolActionFilter) { + TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["None"] = 0] = "None"; + TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["Manage"] = 2] = "Manage"; + TaskAgentPoolActionFilter[TaskAgentPoolActionFilter["Use"] = 16] = "Use"; +})(TaskAgentPoolActionFilter = exports.TaskAgentPoolActionFilter || (exports.TaskAgentPoolActionFilter = {})); +var TaskAgentPoolMaintenanceJobResult; +(function (TaskAgentPoolMaintenanceJobResult) { + TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Succeeded"] = 1] = "Succeeded"; + TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Failed"] = 2] = "Failed"; + TaskAgentPoolMaintenanceJobResult[TaskAgentPoolMaintenanceJobResult["Canceled"] = 4] = "Canceled"; +})(TaskAgentPoolMaintenanceJobResult = exports.TaskAgentPoolMaintenanceJobResult || (exports.TaskAgentPoolMaintenanceJobResult = {})); +var TaskAgentPoolMaintenanceJobStatus; +(function (TaskAgentPoolMaintenanceJobStatus) { + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["InProgress"] = 1] = "InProgress"; + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Completed"] = 2] = "Completed"; + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Cancelling"] = 4] = "Cancelling"; + TaskAgentPoolMaintenanceJobStatus[TaskAgentPoolMaintenanceJobStatus["Queued"] = 8] = "Queued"; +})(TaskAgentPoolMaintenanceJobStatus = exports.TaskAgentPoolMaintenanceJobStatus || (exports.TaskAgentPoolMaintenanceJobStatus = {})); +var TaskAgentPoolMaintenanceScheduleDays; +(function (TaskAgentPoolMaintenanceScheduleDays) { + /** + * Do not run. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["None"] = 0] = "None"; + /** + * Run on Monday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Monday"] = 1] = "Monday"; + /** + * Run on Tuesday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Tuesday"] = 2] = "Tuesday"; + /** + * Run on Wednesday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Wednesday"] = 4] = "Wednesday"; + /** + * Run on Thursday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Thursday"] = 8] = "Thursday"; + /** + * Run on Friday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Friday"] = 16] = "Friday"; + /** + * Run on Saturday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Saturday"] = 32] = "Saturday"; + /** + * Run on Sunday. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["Sunday"] = 64] = "Sunday"; + /** + * Run on all days of the week. + */ + TaskAgentPoolMaintenanceScheduleDays[TaskAgentPoolMaintenanceScheduleDays["All"] = 127] = "All"; +})(TaskAgentPoolMaintenanceScheduleDays = exports.TaskAgentPoolMaintenanceScheduleDays || (exports.TaskAgentPoolMaintenanceScheduleDays = {})); +/** + * Additional settings and descriptors for a TaskAgentPool + */ +var TaskAgentPoolOptions; +(function (TaskAgentPoolOptions) { + TaskAgentPoolOptions[TaskAgentPoolOptions["None"] = 0] = "None"; + /** + * TaskAgentPool backed by the Elastic pool service + */ + TaskAgentPoolOptions[TaskAgentPoolOptions["ElasticPool"] = 1] = "ElasticPool"; + /** + * Set to true if agents are re-imaged after each TaskAgentJobRequest + */ + TaskAgentPoolOptions[TaskAgentPoolOptions["SingleUseAgents"] = 2] = "SingleUseAgents"; + /** + * Set to true if agents are held for investigation after a TaskAgentJobRequest failure + */ + TaskAgentPoolOptions[TaskAgentPoolOptions["PreserveAgentOnJobFailure"] = 4] = "PreserveAgentOnJobFailure"; +})(TaskAgentPoolOptions = exports.TaskAgentPoolOptions || (exports.TaskAgentPoolOptions = {})); +/** + * The type of agent pool. + */ +var TaskAgentPoolType; +(function (TaskAgentPoolType) { + /** + * A typical pool of task agents + */ + TaskAgentPoolType[TaskAgentPoolType["Automation"] = 1] = "Automation"; + /** + * A deployment pool + */ + TaskAgentPoolType[TaskAgentPoolType["Deployment"] = 2] = "Deployment"; +})(TaskAgentPoolType = exports.TaskAgentPoolType || (exports.TaskAgentPoolType = {})); +/** + * Filters queues based on whether the calling user has permission to use or manage the queue. + */ +var TaskAgentQueueActionFilter; +(function (TaskAgentQueueActionFilter) { + TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["None"] = 0] = "None"; + TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["Manage"] = 2] = "Manage"; + TaskAgentQueueActionFilter[TaskAgentQueueActionFilter["Use"] = 16] = "Use"; +})(TaskAgentQueueActionFilter = exports.TaskAgentQueueActionFilter || (exports.TaskAgentQueueActionFilter = {})); +var TaskAgentRequestUpdateOptions; +(function (TaskAgentRequestUpdateOptions) { + TaskAgentRequestUpdateOptions[TaskAgentRequestUpdateOptions["None"] = 0] = "None"; + TaskAgentRequestUpdateOptions[TaskAgentRequestUpdateOptions["BumpRequestToTop"] = 1] = "BumpRequestToTop"; +})(TaskAgentRequestUpdateOptions = exports.TaskAgentRequestUpdateOptions || (exports.TaskAgentRequestUpdateOptions = {})); +var TaskAgentStatus; +(function (TaskAgentStatus) { + TaskAgentStatus[TaskAgentStatus["Offline"] = 1] = "Offline"; + TaskAgentStatus[TaskAgentStatus["Online"] = 2] = "Online"; +})(TaskAgentStatus = exports.TaskAgentStatus || (exports.TaskAgentStatus = {})); +/** + * This is useful in getting a list of deployment targets, filtered by the deployment agent status. + */ +var TaskAgentStatusFilter; +(function (TaskAgentStatusFilter) { + /** + * Only deployment targets that are offline. + */ + TaskAgentStatusFilter[TaskAgentStatusFilter["Offline"] = 1] = "Offline"; + /** + * Only deployment targets that are online. + */ + TaskAgentStatusFilter[TaskAgentStatusFilter["Online"] = 2] = "Online"; + /** + * All deployment targets. + */ + TaskAgentStatusFilter[TaskAgentStatusFilter["All"] = 3] = "All"; +})(TaskAgentStatusFilter = exports.TaskAgentStatusFilter || (exports.TaskAgentStatusFilter = {})); +var TaskAgentUpdateReasonType; +(function (TaskAgentUpdateReasonType) { + TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["Manual"] = 1] = "Manual"; + TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["MinAgentVersionRequired"] = 2] = "MinAgentVersionRequired"; + TaskAgentUpdateReasonType[TaskAgentUpdateReasonType["Downgrade"] = 3] = "Downgrade"; +})(TaskAgentUpdateReasonType = exports.TaskAgentUpdateReasonType || (exports.TaskAgentUpdateReasonType = {})); +var TaskCommandMode; +(function (TaskCommandMode) { + TaskCommandMode[TaskCommandMode["Any"] = 0] = "Any"; + TaskCommandMode[TaskCommandMode["Restricted"] = 1] = "Restricted"; +})(TaskCommandMode = exports.TaskCommandMode || (exports.TaskCommandMode = {})); +var TaskDefinitionStatus; +(function (TaskDefinitionStatus) { + TaskDefinitionStatus[TaskDefinitionStatus["Preinstalled"] = 1] = "Preinstalled"; + TaskDefinitionStatus[TaskDefinitionStatus["ReceivedInstallOrUpdate"] = 2] = "ReceivedInstallOrUpdate"; + TaskDefinitionStatus[TaskDefinitionStatus["Installed"] = 3] = "Installed"; + TaskDefinitionStatus[TaskDefinitionStatus["ReceivedUninstall"] = 4] = "ReceivedUninstall"; + TaskDefinitionStatus[TaskDefinitionStatus["Uninstalled"] = 5] = "Uninstalled"; + TaskDefinitionStatus[TaskDefinitionStatus["RequestedUpdate"] = 6] = "RequestedUpdate"; + TaskDefinitionStatus[TaskDefinitionStatus["Updated"] = 7] = "Updated"; + TaskDefinitionStatus[TaskDefinitionStatus["AlreadyUpToDate"] = 8] = "AlreadyUpToDate"; + TaskDefinitionStatus[TaskDefinitionStatus["InlineUpdateReceived"] = 9] = "InlineUpdateReceived"; +})(TaskDefinitionStatus = exports.TaskDefinitionStatus || (exports.TaskDefinitionStatus = {})); +var TaskGroupExpands; +(function (TaskGroupExpands) { + TaskGroupExpands[TaskGroupExpands["None"] = 0] = "None"; + TaskGroupExpands[TaskGroupExpands["Tasks"] = 2] = "Tasks"; +})(TaskGroupExpands = exports.TaskGroupExpands || (exports.TaskGroupExpands = {})); +/** + * Specifies the desired ordering of taskGroups. + */ +var TaskGroupQueryOrder; +(function (TaskGroupQueryOrder) { + /** + * Order by createdon ascending. + */ + TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnAscending"] = 0] = "CreatedOnAscending"; + /** + * Order by createdon descending. + */ + TaskGroupQueryOrder[TaskGroupQueryOrder["CreatedOnDescending"] = 1] = "CreatedOnDescending"; +})(TaskGroupQueryOrder = exports.TaskGroupQueryOrder || (exports.TaskGroupQueryOrder = {})); +var TaskOrchestrationItemType; +(function (TaskOrchestrationItemType) { + TaskOrchestrationItemType[TaskOrchestrationItemType["Container"] = 0] = "Container"; + TaskOrchestrationItemType[TaskOrchestrationItemType["Job"] = 1] = "Job"; +})(TaskOrchestrationItemType = exports.TaskOrchestrationItemType || (exports.TaskOrchestrationItemType = {})); +var TaskOrchestrationPlanState; +(function (TaskOrchestrationPlanState) { + TaskOrchestrationPlanState[TaskOrchestrationPlanState["InProgress"] = 1] = "InProgress"; + TaskOrchestrationPlanState[TaskOrchestrationPlanState["Queued"] = 2] = "Queued"; + TaskOrchestrationPlanState[TaskOrchestrationPlanState["Completed"] = 4] = "Completed"; + TaskOrchestrationPlanState[TaskOrchestrationPlanState["Throttled"] = 8] = "Throttled"; +})(TaskOrchestrationPlanState = exports.TaskOrchestrationPlanState || (exports.TaskOrchestrationPlanState = {})); +var TaskResult; +(function (TaskResult) { + TaskResult[TaskResult["Succeeded"] = 0] = "Succeeded"; + TaskResult[TaskResult["SucceededWithIssues"] = 1] = "SucceededWithIssues"; + TaskResult[TaskResult["Failed"] = 2] = "Failed"; + TaskResult[TaskResult["Canceled"] = 3] = "Canceled"; + TaskResult[TaskResult["Skipped"] = 4] = "Skipped"; + TaskResult[TaskResult["Abandoned"] = 5] = "Abandoned"; +})(TaskResult = exports.TaskResult || (exports.TaskResult = {})); +var TimelineRecordState; +(function (TimelineRecordState) { + TimelineRecordState[TimelineRecordState["Pending"] = 0] = "Pending"; + TimelineRecordState[TimelineRecordState["InProgress"] = 1] = "InProgress"; + TimelineRecordState[TimelineRecordState["Completed"] = 2] = "Completed"; +})(TimelineRecordState = exports.TimelineRecordState || (exports.TimelineRecordState = {})); +var VariableGroupActionFilter; +(function (VariableGroupActionFilter) { + VariableGroupActionFilter[VariableGroupActionFilter["None"] = 0] = "None"; + VariableGroupActionFilter[VariableGroupActionFilter["Manage"] = 2] = "Manage"; + VariableGroupActionFilter[VariableGroupActionFilter["Use"] = 16] = "Use"; +})(VariableGroupActionFilter = exports.VariableGroupActionFilter || (exports.VariableGroupActionFilter = {})); +/** + * Specifies the desired ordering of variableGroups. + */ +var VariableGroupQueryOrder; +(function (VariableGroupQueryOrder) { + /** + * Order by id ascending. + */ + VariableGroupQueryOrder[VariableGroupQueryOrder["IdAscending"] = 0] = "IdAscending"; + /** + * Order by id descending. + */ + VariableGroupQueryOrder[VariableGroupQueryOrder["IdDescending"] = 1] = "IdDescending"; +})(VariableGroupQueryOrder = exports.VariableGroupQueryOrder || (exports.VariableGroupQueryOrder = {})); +exports.TypeInfo = { + AadLoginPromptOption: { + enumValues: { + "noOption": 0, + "login": 1, + "selectAccount": 2, + "freshLogin": 3, + "freshLoginWithMfa": 4 + } + }, + AgentChangeEvent: {}, + AgentJobRequestMessage: {}, + AgentPoolEvent: {}, + AgentQueueEvent: {}, + AgentQueuesEvent: {}, + AuditAction: { + enumValues: { + "add": 1, + "update": 2, + "delete": 3, + "undelete": 4 + } + }, + AzureKeyVaultVariableGroupProviderData: {}, + AzureKeyVaultVariableValue: {}, + DemandMinimumVersion: {}, + DemandSource: {}, + DemandSourceType: { + enumValues: { + "task": 0, + "feature": 1 + } + }, + DeploymentGroup: {}, + DeploymentGroupActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + DeploymentGroupExpands: { + enumValues: { + "none": 0, + "machines": 2, + "tags": 4 + } + }, + DeploymentGroupMetrics: {}, + DeploymentGroupReference: {}, + DeploymentMachine: {}, + DeploymentMachineChangedData: {}, + DeploymentMachineExpands: { + enumValues: { + "none": 0, + "capabilities": 2, + "assignedRequest": 4 + } + }, + DeploymentMachineGroup: {}, + DeploymentMachineGroupReference: {}, + DeploymentMachinesChangeEvent: {}, + DeploymentPoolSummary: {}, + DeploymentPoolSummaryExpands: { + enumValues: { + "none": 0, + "deploymentGroups": 2, + "resource": 4 + } + }, + DeploymentTargetExpands: { + enumValues: { + "none": 0, + "capabilities": 2, + "assignedRequest": 4, + "lastCompletedRequest": 8 + } + }, + ElasticAgentState: { + enumValues: { + "none": 0, + "enabled": 1, + "online": 2, + "assigned": 4 + } + }, + ElasticComputeState: { + enumValues: { + "none": 0, + "healthy": 1, + "creating": 2, + "deleting": 3, + "failed": 4, + "stopped": 5 + } + }, + ElasticNode: {}, + ElasticNodeSettings: {}, + ElasticNodeState: { + enumValues: { + "none": 0, + "new": 1, + "creatingCompute": 2, + "startingAgent": 3, + "idle": 4, + "assigned": 5, + "offline": 6, + "pendingReimage": 7, + "pendingDelete": 8, + "saved": 9, + "deletingCompute": 10, + "deleted": 11, + "lost": 12 + } + }, + ElasticPool: {}, + ElasticPoolCreationResult: {}, + ElasticPoolLog: {}, + ElasticPoolSettings: {}, + ElasticPoolState: { + enumValues: { + "online": 0, + "offline": 1, + "unhealthy": 2, + "new": 3 + } + }, + EnvironmentActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + EnvironmentDeploymentExecutionRecord: {}, + EnvironmentExpands: { + enumValues: { + "none": 0, + "resourceReferences": 1 + } + }, + EnvironmentInstance: {}, + EnvironmentResource: {}, + EnvironmentResourceDeploymentExecutionRecord: {}, + EnvironmentResourceReference: {}, + EnvironmentResourceType: { + enumValues: { + "undefined": 0, + "generic": 1, + "virtualMachine": 2, + "kubernetes": 4 + } + }, + ExclusiveLockType: { + enumValues: { + "runLatest": 0, + "sequential": 1 + } + }, + Issue: {}, + IssueType: { + enumValues: { + "error": 1, + "warning": 2 + } + }, + JobAssignedEvent: {}, + JobCompletedEvent: {}, + JobEnvironment: {}, + JobRequestMessage: {}, + KubernetesResource: {}, + LogLevel: { + enumValues: { + "error": 0, + "warning": 1, + "info": 2 + } + }, + MachineGroupActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + MaskHint: {}, + MaskType: { + enumValues: { + "variable": 1, + "regex": 2 + } + }, + OperatingSystemType: { + enumValues: { + "windows": 0, + "linux": 1 + } + }, + OperationType: { + enumValues: { + "configurationJob": 0, + "sizingJob": 1, + "increaseCapacity": 2, + "reimage": 3, + "deleteVMs": 4 + } + }, + PackageMetadata: {}, + PlanEnvironment: {}, + PlanGroupStatus: { + enumValues: { + "running": 1, + "queued": 2, + "all": 3 + } + }, + PlanGroupStatusFilter: { + enumValues: { + "running": 1, + "queued": 2, + "all": 3 + } + }, + ResourceLockRequest: {}, + ResourceLockStatus: { + enumValues: { + "queued": 0, + "inUse": 1, + "finished": 2, + "timedOut": 3, + "canceled": 4, + "abandoned": 5, + "waitingOnChecks": 6 + } + }, + ResourceUsage: {}, + SecureFile: {}, + SecureFileActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + SecureFileEvent: {}, + ServerTaskRequestMessage: {}, + ServiceEndpointAuthenticationScheme: {}, + ServiceEndpointExecutionData: {}, + ServiceEndpointExecutionRecord: {}, + ServiceEndpointExecutionRecordsInput: {}, + ServiceEndpointRequestResult: {}, + ServiceEndpointType: {}, + TaskAgent: {}, + TaskAgentCloudRequest: {}, + TaskAgentCloudType: {}, + TaskAgentDowngrade: {}, + TaskAgentJob: {}, + TaskAgentJobRequest: {}, + TaskAgentJobResultFilter: { + enumValues: { + "failed": 1, + "passed": 2, + "neverDeployed": 4, + "all": 7 + } + }, + TaskAgentJobStep: {}, + TaskAgentJobStepType: { + enumValues: { + "task": 1, + "action": 2 + } + }, + TaskAgentManualUpdate: {}, + TaskAgentMinAgentVersionRequiredUpdate: {}, + TaskAgentPool: {}, + TaskAgentPoolActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + TaskAgentPoolMaintenanceDefinition: {}, + TaskAgentPoolMaintenanceJob: {}, + TaskAgentPoolMaintenanceJobResult: { + enumValues: { + "succeeded": 1, + "failed": 2, + "canceled": 4 + } + }, + TaskAgentPoolMaintenanceJobStatus: { + enumValues: { + "inProgress": 1, + "completed": 2, + "cancelling": 4, + "queued": 8 + } + }, + TaskAgentPoolMaintenanceJobTargetAgent: {}, + TaskAgentPoolMaintenanceSchedule: {}, + TaskAgentPoolMaintenanceScheduleDays: { + enumValues: { + "none": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 4, + "thursday": 8, + "friday": 16, + "saturday": 32, + "sunday": 64, + "all": 127 + } + }, + TaskAgentPoolOptions: { + enumValues: { + "none": 0, + "elasticPool": 1, + "singleUseAgents": 2, + "preserveAgentOnJobFailure": 4 + } + }, + TaskAgentPoolReference: {}, + TaskAgentPoolStatus: {}, + TaskAgentPoolSummary: {}, + TaskAgentPoolType: { + enumValues: { + "automation": 1, + "deployment": 2 + } + }, + TaskAgentQueue: {}, + TaskAgentQueueActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + TaskAgentReference: {}, + TaskAgentRequestUpdateOptions: { + enumValues: { + "none": 0, + "bumpRequestToTop": 1 + } + }, + TaskAgentSession: {}, + TaskAgentStatus: { + enumValues: { + "offline": 1, + "online": 2 + } + }, + TaskAgentStatusFilter: { + enumValues: { + "offline": 1, + "online": 2, + "all": 3 + } + }, + TaskAgentUpdate: {}, + TaskAgentUpdateReason: {}, + TaskAgentUpdateReasonType: { + enumValues: { + "manual": 1, + "minAgentVersionRequired": 2, + "downgrade": 3 + } + }, + TaskAttachment: {}, + TaskCommandMode: { + enumValues: { + "any": 0, + "restricted": 1 + } + }, + TaskCommandRestrictions: {}, + TaskCompletedEvent: {}, + TaskDefinition: {}, + TaskDefinitionStatus: { + enumValues: { + "preinstalled": 1, + "receivedInstallOrUpdate": 2, + "installed": 3, + "receivedUninstall": 4, + "uninstalled": 5, + "requestedUpdate": 6, + "updated": 7, + "alreadyUpToDate": 8, + "inlineUpdateReceived": 9 + } + }, + TaskGroup: {}, + TaskGroupExpands: { + enumValues: { + "none": 0, + "tasks": 2 + } + }, + TaskGroupQueryOrder: { + enumValues: { + "createdOnAscending": 0, + "createdOnDescending": 1 + } + }, + TaskGroupRevision: {}, + TaskLog: {}, + TaskOrchestrationContainer: {}, + TaskOrchestrationItem: {}, + TaskOrchestrationItemType: { + enumValues: { + "container": 0, + "job": 1 + } + }, + TaskOrchestrationJob: {}, + TaskOrchestrationPlan: {}, + TaskOrchestrationPlanGroup: {}, + TaskOrchestrationPlanGroupsQueueMetrics: {}, + TaskOrchestrationPlanState: { + enumValues: { + "inProgress": 1, + "queued": 2, + "completed": 4, + "throttled": 8 + } + }, + TaskOrchestrationQueuedPlan: {}, + TaskOrchestrationQueuedPlanGroup: {}, + TaskRestrictions: {}, + TaskResult: { + enumValues: { + "succeeded": 0, + "succeededWithIssues": 1, + "failed": 2, + "canceled": 3, + "skipped": 4, + "abandoned": 5 + } + }, + Timeline: {}, + TimelineRecord: {}, + TimelineRecordState: { + enumValues: { + "pending": 0, + "inProgress": 1, + "completed": 2 + } + }, + VariableGroup: {}, + VariableGroupActionFilter: { + enumValues: { + "none": 0, + "manage": 2, + "use": 16 + } + }, + VariableGroupQueryOrder: { + enumValues: { + "idAscending": 0, + "idDescending": 1 + } + }, + VirtualMachine: {}, + VirtualMachineGroup: {}, + VirtualMachineResource: {}, + VirtualMachineResourceCreateParameters: {}, +}; +exports.TypeInfo.AgentChangeEvent.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + timeStamp: { + isDate: true, + } +}; +exports.TypeInfo.AgentJobRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment + }, + lockedUntil: { + isDate: true, + } +}; +exports.TypeInfo.AgentPoolEvent.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPool + } +}; +exports.TypeInfo.AgentQueueEvent.fields = { + queue: { + typeInfo: exports.TypeInfo.TaskAgentQueue + } +}; +exports.TypeInfo.AgentQueuesEvent.fields = { + queues: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentQueue + } +}; +exports.TypeInfo.AzureKeyVaultVariableGroupProviderData.fields = { + lastRefreshedOn: { + isDate: true, + } +}; +exports.TypeInfo.AzureKeyVaultVariableValue.fields = { + expires: { + isDate: true, + } +}; +exports.TypeInfo.DemandMinimumVersion.fields = { + source: { + typeInfo: exports.TypeInfo.DemandSource + } +}; +exports.TypeInfo.DemandSource.fields = { + sourceType: { + enumType: exports.TypeInfo.DemandSourceType + } +}; +exports.TypeInfo.DeploymentGroup.fields = { + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachine + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentGroupMetrics.fields = { + deploymentGroup: { + typeInfo: exports.TypeInfo.DeploymentGroupReference + } +}; +exports.TypeInfo.DeploymentGroupReference.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentMachine.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + } +}; +exports.TypeInfo.DeploymentMachineChangedData.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + } +}; +exports.TypeInfo.DeploymentMachineGroup.fields = { + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachine + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentMachineGroupReference.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.DeploymentMachinesChangeEvent.fields = { + machineGroupReference: { + typeInfo: exports.TypeInfo.DeploymentGroupReference + }, + machines: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentMachineChangedData + } +}; +exports.TypeInfo.DeploymentPoolSummary.fields = { + deploymentGroups: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentGroupReference + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + resource: { + typeInfo: exports.TypeInfo.EnvironmentResourceReference + } +}; +exports.TypeInfo.ElasticNode.fields = { + agentState: { + enumType: exports.TypeInfo.ElasticAgentState + }, + computeState: { + enumType: exports.TypeInfo.ElasticComputeState + }, + desiredState: { + enumType: exports.TypeInfo.ElasticNodeState + }, + state: { + enumType: exports.TypeInfo.ElasticNodeState + }, + stateChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.ElasticNodeSettings.fields = { + state: { + enumType: exports.TypeInfo.ElasticNodeState + } +}; +exports.TypeInfo.ElasticPool.fields = { + offlineSince: { + isDate: true, + }, + osType: { + enumType: exports.TypeInfo.OperatingSystemType + }, + state: { + enumType: exports.TypeInfo.ElasticPoolState + } +}; +exports.TypeInfo.ElasticPoolCreationResult.fields = { + agentPool: { + typeInfo: exports.TypeInfo.TaskAgentPool + }, + agentQueue: { + typeInfo: exports.TypeInfo.TaskAgentQueue + }, + elasticPool: { + typeInfo: exports.TypeInfo.ElasticPool + } +}; +exports.TypeInfo.ElasticPoolLog.fields = { + level: { + enumType: exports.TypeInfo.LogLevel + }, + operation: { + enumType: exports.TypeInfo.OperationType + }, + timestamp: { + isDate: true, + } +}; +exports.TypeInfo.ElasticPoolSettings.fields = { + osType: { + enumType: exports.TypeInfo.OperatingSystemType + } +}; +exports.TypeInfo.EnvironmentDeploymentExecutionRecord.fields = { + finishTime: { + isDate: true, + }, + queueTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.EnvironmentInstance.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + resources: { + isArray: true, + typeInfo: exports.TypeInfo.EnvironmentResourceReference + } +}; +exports.TypeInfo.EnvironmentResource.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.EnvironmentResourceDeploymentExecutionRecord.fields = { + finishTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.EnvironmentResourceReference.fields = { + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.Issue.fields = { + type: { + enumType: exports.TypeInfo.IssueType + } +}; +exports.TypeInfo.JobAssignedEvent.fields = { + request: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + } +}; +exports.TypeInfo.JobCompletedEvent.fields = { + result: { + enumType: exports.TypeInfo.TaskResult + } +}; +exports.TypeInfo.JobEnvironment.fields = { + mask: { + isArray: true, + typeInfo: exports.TypeInfo.MaskHint + }, + secureFiles: { + isArray: true, + typeInfo: exports.TypeInfo.SecureFile + } +}; +exports.TypeInfo.JobRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment + } +}; +exports.TypeInfo.KubernetesResource.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.MaskHint.fields = { + type: { + enumType: exports.TypeInfo.MaskType + } +}; +exports.TypeInfo.PackageMetadata.fields = { + createdOn: { + isDate: true, + } +}; +exports.TypeInfo.PlanEnvironment.fields = { + mask: { + isArray: true, + typeInfo: exports.TypeInfo.MaskHint + } +}; +exports.TypeInfo.ResourceLockRequest.fields = { + assignTime: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + lockType: { + enumType: exports.TypeInfo.ExclusiveLockType + }, + queueTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.ResourceLockStatus + } +}; +exports.TypeInfo.ResourceUsage.fields = { + runningRequests: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentJobRequest + } +}; +exports.TypeInfo.SecureFile.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.SecureFileEvent.fields = { + secureFiles: { + isArray: true, + typeInfo: exports.TypeInfo.SecureFile + } +}; +exports.TypeInfo.ServerTaskRequestMessage.fields = { + environment: { + typeInfo: exports.TypeInfo.JobEnvironment + }, + taskDefinition: { + typeInfo: exports.TypeInfo.TaskDefinition + } +}; +exports.TypeInfo.ServiceEndpointAuthenticationScheme.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.ServiceEndpointExecutionData.fields = { + finishTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.ServiceEndpointExecutionRecord.fields = { + data: { + typeInfo: exports.TypeInfo.ServiceEndpointExecutionData + } +}; +exports.TypeInfo.ServiceEndpointExecutionRecordsInput.fields = { + data: { + typeInfo: exports.TypeInfo.ServiceEndpointExecutionData + } +}; +exports.TypeInfo.ServiceEndpointRequestResult.fields = {}; +exports.TypeInfo.ServiceEndpointType.fields = { + authenticationSchemes: { + isArray: true, + typeInfo: exports.TypeInfo.ServiceEndpointAuthenticationScheme + }, + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.TaskAgent.fields = { + assignedAgentCloudRequest: { + typeInfo: exports.TypeInfo.TaskAgentCloudRequest + }, + assignedRequest: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + }, + createdOn: { + isDate: true, + }, + lastCompletedRequest: { + typeInfo: exports.TypeInfo.TaskAgentJobRequest + }, + pendingUpdate: { + typeInfo: exports.TypeInfo.TaskAgentUpdate + }, + status: { + enumType: exports.TypeInfo.TaskAgentStatus + }, + statusChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.TaskAgentCloudRequest.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference + }, + agentConnectedTime: { + isDate: true, + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + provisionedTime: { + isDate: true, + }, + provisionRequestTime: { + isDate: true, + }, + releaseRequestTime: { + isDate: true, + } +}; +exports.TypeInfo.TaskAgentCloudType.fields = { + inputDescriptors: { + isArray: true, + typeInfo: FormInputInterfaces.TypeInfo.InputDescriptor + } +}; +exports.TypeInfo.TaskAgentDowngrade.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAgentJob.fields = { + steps: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentJobStep + } +}; +exports.TypeInfo.TaskAgentJobRequest.fields = { + assignTime: { + isDate: true, + }, + finishTime: { + isDate: true, + }, + lockedUntil: { + isDate: true, + }, + matchedAgents: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentReference + }, + queueTime: { + isDate: true, + }, + receiveTime: { + isDate: true, + }, + reservedAgent: { + typeInfo: exports.TypeInfo.TaskAgentReference + }, + result: { + enumType: exports.TypeInfo.TaskResult + } +}; +exports.TypeInfo.TaskAgentJobStep.fields = { + type: { + enumType: exports.TypeInfo.TaskAgentJobStepType + } +}; +exports.TypeInfo.TaskAgentManualUpdate.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAgentMinAgentVersionRequiredUpdate.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAgentPool.fields = { + createdOn: { + isDate: true, + }, + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions + }, + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceDefinition.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + scheduleSetting: { + typeInfo: exports.TypeInfo.TaskAgentPoolMaintenanceSchedule + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceJob.fields = { + finishTime: { + isDate: true, + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + queueTime: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobResult + }, + startTime: { + isDate: true, + }, + status: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobStatus + }, + targetAgents: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentPoolMaintenanceJobTargetAgent + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceJobTargetAgent.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference + }, + result: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobResult + }, + status: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceJobStatus + } +}; +exports.TypeInfo.TaskAgentPoolMaintenanceSchedule.fields = { + daysToBuild: { + enumType: exports.TypeInfo.TaskAgentPoolMaintenanceScheduleDays + } +}; +exports.TypeInfo.TaskAgentPoolReference.fields = { + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions + }, + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolStatus.fields = { + options: { + enumType: exports.TypeInfo.TaskAgentPoolOptions + }, + poolType: { + enumType: exports.TypeInfo.TaskAgentPoolType + } +}; +exports.TypeInfo.TaskAgentPoolSummary.fields = { + deploymentGroups: { + isArray: true, + typeInfo: exports.TypeInfo.DeploymentGroupReference + }, + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + }, + queues: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentQueue + } +}; +exports.TypeInfo.TaskAgentQueue.fields = { + pool: { + typeInfo: exports.TypeInfo.TaskAgentPoolReference + } +}; +exports.TypeInfo.TaskAgentReference.fields = { + status: { + enumType: exports.TypeInfo.TaskAgentStatus + } +}; +exports.TypeInfo.TaskAgentSession.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgentReference + } +}; +exports.TypeInfo.TaskAgentUpdate.fields = { + reason: { + typeInfo: exports.TypeInfo.TaskAgentUpdateReason + }, + requestTime: { + isDate: true, + } +}; +exports.TypeInfo.TaskAgentUpdateReason.fields = { + code: { + enumType: exports.TypeInfo.TaskAgentUpdateReasonType + } +}; +exports.TypeInfo.TaskAttachment.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.TaskCommandRestrictions.fields = { + mode: { + enumType: exports.TypeInfo.TaskCommandMode + } +}; +exports.TypeInfo.TaskCompletedEvent.fields = { + result: { + enumType: exports.TypeInfo.TaskResult + } +}; +exports.TypeInfo.TaskDefinition.fields = { + restrictions: { + typeInfo: exports.TypeInfo.TaskRestrictions + } +}; +exports.TypeInfo.TaskGroup.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + }, + restrictions: { + typeInfo: exports.TypeInfo.TaskRestrictions + } +}; +exports.TypeInfo.TaskGroupRevision.fields = { + changedDate: { + isDate: true, + }, + changeType: { + enumType: exports.TypeInfo.AuditAction + } +}; +exports.TypeInfo.TaskLog.fields = { + createdOn: { + isDate: true, + }, + lastChangedOn: { + isDate: true, + } +}; +exports.TypeInfo.TaskOrchestrationContainer.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TaskOrchestrationItem + }, + itemType: { + enumType: exports.TypeInfo.TaskOrchestrationItemType + }, + rollback: { + typeInfo: exports.TypeInfo.TaskOrchestrationContainer + } +}; +exports.TypeInfo.TaskOrchestrationItem.fields = { + itemType: { + enumType: exports.TypeInfo.TaskOrchestrationItemType + } +}; +exports.TypeInfo.TaskOrchestrationJob.fields = { + itemType: { + enumType: exports.TypeInfo.TaskOrchestrationItemType + } +}; +exports.TypeInfo.TaskOrchestrationPlan.fields = { + environment: { + typeInfo: exports.TypeInfo.PlanEnvironment + }, + finishTime: { + isDate: true, + }, + implementation: { + typeInfo: exports.TypeInfo.TaskOrchestrationContainer + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TaskOrchestrationPlanState + } +}; +exports.TypeInfo.TaskOrchestrationPlanGroup.fields = { + runningRequests: { + isArray: true, + typeInfo: exports.TypeInfo.TaskAgentJobRequest + } +}; +exports.TypeInfo.TaskOrchestrationPlanGroupsQueueMetrics.fields = { + status: { + enumType: exports.TypeInfo.PlanGroupStatus + } +}; +exports.TypeInfo.TaskOrchestrationQueuedPlan.fields = { + assignTime: { + isDate: true, + }, + queueTime: { + isDate: true, + } +}; +exports.TypeInfo.TaskOrchestrationQueuedPlanGroup.fields = { + plans: { + isArray: true, + typeInfo: exports.TypeInfo.TaskOrchestrationQueuedPlan + } +}; +exports.TypeInfo.TaskRestrictions.fields = { + commands: { + typeInfo: exports.TypeInfo.TaskCommandRestrictions + } +}; +exports.TypeInfo.Timeline.fields = { + lastChangedOn: { + isDate: true, + }, + records: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineRecord + } +}; +exports.TypeInfo.TimelineRecord.fields = { + finishTime: { + isDate: true, + }, + issues: { + isArray: true, + typeInfo: exports.TypeInfo.Issue + }, + lastModified: { + isDate: true, + }, + result: { + enumType: exports.TypeInfo.TaskResult + }, + startTime: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TimelineRecordState + } +}; +exports.TypeInfo.VariableGroup.fields = { + createdOn: { + isDate: true, + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.VirtualMachine.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + } +}; +exports.TypeInfo.VirtualMachineGroup.fields = { + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.VirtualMachineResource.fields = { + agent: { + typeInfo: exports.TypeInfo.TaskAgent + }, + createdOn: { + isDate: true, + }, + lastModifiedOn: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.EnvironmentResourceType + } +}; +exports.TypeInfo.VirtualMachineResourceCreateParameters.fields = { + virtualMachineResource: { + typeInfo: exports.TypeInfo.VirtualMachineResource + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/TestInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/TestInterfaces.d.ts new file mode 100644 index 0000000..4b010a7 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/TestInterfaces.d.ts @@ -0,0 +1,5345 @@ +import SystemData = require("../interfaces/common/SystemDataInterfaces"); +import TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface AbortTestRunRequest { + options?: number; + projectName?: string; + revision?: number; + testRunId?: number; +} +export interface AfnStrip { + /** + * Auxiliary Url to be consumed by MTM + */ + auxiliaryUrl?: string; + /** + * Creation date of the AfnStrip + */ + creationDate?: Date; + /** + * File name of the attachment created + */ + fileName?: string; + /** + * ID of AfnStrip. This is same as the attachment ID. + */ + id?: number; + /** + * Project identifier which contains AfnStrip + */ + project?: string; + /** + * Service in which this attachment is stored in + */ + storedIn?: string; + /** + * Afn strip stream. + */ + stream?: string; + /** + * ID of the testcase. + */ + testCaseId?: number; + /** + * Backing test result id. + */ + testResultId?: number; + /** + * Backing test run id. + */ + testRunId?: number; + /** + * Byte stream (uncompressed) length of Afn strip. + */ + unCompressedStreamLength?: number; + /** + * Url of the attachment created. + */ + url?: string; +} +export interface AggregatedDataForResultTrend { + /** + * This is tests execution duration. + */ + duration?: any; + resultsByOutcome?: { + [key: number]: AggregatedResultsByOutcome; + }; + runSummaryByState?: { + [key: number]: AggregatedRunsByState; + }; + testResultsContext: TestResultsContext; + totalTests?: number; +} +/** + * Result deatils for a particular test result outcome. + */ +export interface AggregatedResultDetailsByOutcome { + /** + * Number of results for current outcome. + */ + count?: number; + /** + * Time taken by results. + */ + duration?: any; + /** + * Test result outcome + */ + outcome?: TestOutcome; + /** + * Number of results on rerun + */ + rerunResultCount?: number; +} +export interface AggregatedResultsAnalysis { + duration?: any; + notReportedResultsByOutcome?: { + [key: number]: AggregatedResultsByOutcome; + }; + previousContext?: TestResultsContext; + resultsByOutcome?: { + [key: number]: AggregatedResultsByOutcome; + }; + resultsDifference?: AggregatedResultsDifference; + runSummaryByOutcome?: { + [key: number]: AggregatedRunsByOutcome; + }; + runSummaryByState?: { + [key: number]: AggregatedRunsByState; + }; + totalTests?: number; +} +export interface AggregatedResultsByOutcome { + count?: number; + duration?: any; + groupByField?: string; + groupByValue?: any; + outcome?: TestOutcome; + rerunResultCount?: number; +} +export interface AggregatedResultsDifference { + increaseInDuration?: any; + increaseInFailures?: number; + increaseInNonImpactedTests?: number; + increaseInOtherTests?: number; + increaseInPassedTests?: number; + increaseInTotalTests?: number; +} +export interface AggregatedRunsByOutcome { + outcome?: TestRunOutcome; + runsCount?: number; +} +export interface AggregatedRunsByState { + resultsByOutcome?: { + [key: number]: AggregatedResultsByOutcome; + }; + runsCount?: number; + state?: TestRunState; +} +/** + * The types of test attachments. + */ +export declare enum AttachmentType { + /** + * Attachment type GeneralAttachment , use this as default type unless you have other type. + */ + GeneralAttachment = 0, + AfnStrip = 1, + BugFilingData = 2, + /** + * Attachment type CodeCoverage. + */ + CodeCoverage = 3, + IntermediateCollectorData = 4, + RunConfig = 5, + TestImpactDetails = 6, + TmiTestRunDeploymentFiles = 7, + TmiTestRunReverseDeploymentFiles = 8, + TmiTestResultDetail = 9, + TmiTestRunSummary = 10, + /** + * Attachment type ConsoleLog. + */ + ConsoleLog = 11 +} +export interface BatchResponse { + error: string; + responses?: Response[]; + status: string; +} +/** + * BuildConfiguration Details. + */ +export interface BuildConfiguration { + /** + * Branch name for which build is generated. + */ + branchName?: string; + /** + * BuildDefinitionId for build. + */ + buildDefinitionId?: number; + /** + * Build system. + */ + buildSystem?: string; + /** + * Build Creation Date. + */ + creationDate?: Date; + /** + * Build flavor (eg Build/Release). + */ + flavor?: string; + /** + * BuildConfiguration Id. + */ + id?: number; + /** + * Build Number. + */ + number?: string; + /** + * BuildConfiguration Platform. + */ + platform?: string; + /** + * Project associated with this BuildConfiguration. + */ + project?: ShallowReference; + /** + * Repository Guid for the Build. + */ + repositoryGuid?: string; + /** + * Repository Id. + */ + repositoryId?: number; + /** + * Repository Type (eg. TFSGit). + */ + repositoryType?: string; + /** + * Source Version(/first commit) for the build was triggered. + */ + sourceVersion?: string; + /** + * Target BranchName. + */ + targetBranchName?: string; + /** + * Build Uri. + */ + uri?: string; +} +/** + * Build Coverage Detail + */ +export interface BuildCoverage { + /** + * Code Coverage File Url + */ + codeCoverageFileUrl?: string; + /** + * Build Configuration + */ + configuration?: BuildConfiguration; + /** + * Last Error + */ + lastError?: string; + /** + * List of Modules + */ + modules?: ModuleCoverage[]; + /** + * State + */ + state?: string; +} +/** + * Reference to a build. + */ +export interface BuildReference { + /** + * Branch name. + */ + branchName?: string; + /** + * Build system. + */ + buildSystem?: string; + /** + * Build Definition ID. + */ + definitionId?: number; + /** + * Build ID. + */ + id?: number; + /** + * Build Number. + */ + number?: string; + /** + * Repository ID. + */ + repositoryId?: string; + /** + * Build URI. + */ + uri?: string; +} +export interface BuildReference2 { + branchName?: string; + buildConfigurationId?: number; + buildDefinitionId?: number; + buildDeleted?: boolean; + buildFlavor?: string; + buildId?: number; + buildNumber?: string; + buildPlatform?: string; + buildSystem?: string; + buildUri?: string; + coverageId?: number; + createdDate?: Date; + projectId?: string; + repoId?: string; + repoType?: string; + sourceVersion?: string; +} +export interface BulkResultUpdateRequest { + projectName?: string; + requests?: ResultUpdateRequest[]; +} +/** + * Detail About Clone Operation. + */ +export interface CloneOperationInformation { + /** + * Clone Statistics + */ + cloneStatistics?: CloneStatistics; + /** + * If the operation is complete, the DateTime of completion. If operation is not complete, this is DateTime.MaxValue + */ + completionDate?: Date; + /** + * DateTime when the operation was started + */ + creationDate?: Date; + /** + * Shallow reference of the destination + */ + destinationObject?: ShallowReference; + /** + * Shallow reference of the destination + */ + destinationPlan?: ShallowReference; + /** + * Shallow reference of the destination + */ + destinationProject?: ShallowReference; + /** + * If the operation has Failed, Message contains the reason for failure. Null otherwise. + */ + message?: string; + /** + * The ID of the operation + */ + opId?: number; + /** + * The type of the object generated as a result of the Clone operation + */ + resultObjectType?: ResultObjectType; + /** + * Shallow reference of the source + */ + sourceObject?: ShallowReference; + /** + * Shallow reference of the source + */ + sourcePlan?: ShallowReference; + /** + * Shallow reference of the source + */ + sourceProject?: ShallowReference; + /** + * Current state of the operation. When State reaches Succeeded or Failed, the operation is complete + */ + state?: CloneOperationState; + /** + * Url for getting the clone information + */ + url?: string; +} +/** + * Enum of type Clone Operation Type. + */ +export declare enum CloneOperationState { + /** + * value for Failed State + */ + Failed = 2, + /** + * value for Inprogress state + */ + InProgress = 1, + /** + * Value for Queued State + */ + Queued = 0, + /** + * value for Success state + */ + Succeeded = 3 +} +/** + * Clone options for cloning the test suite. + */ +export interface CloneOptions { + /** + * If set to true requirements will be cloned + */ + cloneRequirements?: boolean; + /** + * copy all suites from a source plan + */ + copyAllSuites?: boolean; + /** + * copy ancestor hierarchy + */ + copyAncestorHierarchy?: boolean; + /** + * Name of the workitem type of the clone + */ + destinationWorkItemType?: string; + /** + * Key value pairs where the key value is overridden by the value. + */ + overrideParameters?: { + [key: string]: string; + }; + /** + * Comment on the link that will link the new clone test case to the original Set null for no comment + */ + relatedLinkComment?: string; +} +/** + * Clone Statistics Details. + */ +export interface CloneStatistics { + /** + * Number of requirements cloned so far. + */ + clonedRequirementsCount?: number; + /** + * Number of shared steps cloned so far. + */ + clonedSharedStepsCount?: number; + /** + * Number of test cases cloned so far + */ + clonedTestCasesCount?: number; + /** + * Total number of requirements to be cloned + */ + totalRequirementsCount?: number; + /** + * Total number of test cases to be cloned + */ + totalTestCasesCount?: number; +} +export interface CloneTestCaseOptions { + /** + * If set to true, include the attachments + */ + includeAttachments?: boolean; + /** + * If set to true, include the links + */ + includeLinks?: boolean; + /** + * Comment on the link that will link the new clone test case to the original Set null for no comment + */ + relatedLinkComment?: string; +} +/** + * Represents the build configuration (platform, flavor) and coverage data for the build + */ +export interface CodeCoverageData { + /** + * Flavor of build for which data is retrieved/published + */ + buildFlavor: string; + /** + * Platform of build for which data is retrieved/published + */ + buildPlatform: string; + /** + * List of coverage data for the build + */ + coverageStats: CodeCoverageStatistics[]; +} +/** + * Represents the code coverage statistics for a particular coverage label (modules, statements, blocks, etc.) + */ +export interface CodeCoverageStatistics { + /** + * Covered units + */ + covered: number; + /** + * Delta of coverage + */ + delta?: number; + /** + * Is delta valid + */ + isDeltaAvailable?: boolean; + /** + * Label of coverage data ("Blocks", "Statements", "Modules", etc.) + */ + label: string; + /** + * Position of label + */ + position: number; + /** + * Total units + */ + total: number; +} +/** + * Represents the code coverage summary results Used to publish or retrieve code coverage summary against a build + */ +export interface CodeCoverageSummary { + /** + * Uri of build for which data is retrieved/published + */ + build: ShallowReference; + /** + * List of coverage data and details for the build + */ + coverageData?: CodeCoverageData[]; + /** + * Uri of build against which difference in coverage is computed + */ + deltaBuild?: ShallowReference; + /** + * Uri of build against which difference in coverage is computed + */ + status?: CoverageSummaryStatus; +} +export interface CodeCoverageSummary2 { + buildConfigurationId?: number; + covered?: number; + label?: string; + position?: number; + projectId?: string; + total?: number; +} +export interface Coverage2 { + coverageId?: number; + dateCreated?: Date; + dateModified?: Date; + lastError?: string; + state?: number; +} +/** + * Used to choose which coverage data is returned by a QueryXXXCoverage() call. + */ +export declare enum CoverageQueryFlags { + /** + * If set, the Coverage.Modules property will be populated. + */ + Modules = 1, + /** + * If set, the ModuleCoverage.Functions properties will be populated. + */ + Functions = 2, + /** + * If set, the ModuleCoverage.CoverageData field will be populated. + */ + BlockData = 4 +} +export interface CoverageStatistics { + blocksCovered?: number; + blocksNotCovered?: number; + linesCovered?: number; + linesNotCovered?: number; + linesPartiallyCovered?: number; +} +export declare enum CoverageStatus { + Covered = 0, + NotCovered = 1, + PartiallyCovered = 2 +} +/** + * Represents status of code coverage summary for a build + */ +export declare enum CoverageSummaryStatus { + /** + * No coverage status + */ + None = 0, + /** + * The summary evaluation is in progress + */ + InProgress = 1, + /** + * The summary evaluation for the previous request is completed. Summary can change in future + */ + Completed = 2, + /** + * The summary evaluation is finalized and won't change + */ + Finalized = 3, + /** + * The summary evaluation is pending + */ + Pending = 4, + /** + * Summary evaluation may be ongoing but another merge has been requested. + */ + UpdateRequestQueued = 5 +} +export interface CreateTestMessageLogEntryRequest { + projectName?: string; + testMessageLogEntry?: TestMessageLogEntry[]; + testRunId?: number; +} +export interface CreateTestResultsRequest { + projectName?: string; + results?: LegacyTestCaseResult[]; +} +export interface CreateTestRunRequest { + projectName?: string; + results?: LegacyTestCaseResult[]; + testRun?: LegacyTestRun; + testSettings?: LegacyTestSettings; +} +/** + * A custom field information. Allowed Key : Value pairs - ( AttemptId: int value, IsTestResultFlaky: bool) + */ +export interface CustomTestField { + /** + * Field Name. + */ + fieldName: string; + /** + * Field value. + */ + value: any; +} +export interface CustomTestFieldDefinition { + fieldId?: number; + fieldName: string; + fieldType: CustomTestFieldType; + scope: CustomTestFieldScope; +} +export declare enum CustomTestFieldScope { + None = 0, + TestRun = 1, + TestResult = 2, + System = 4, + All = 7 +} +export declare enum CustomTestFieldType { + Bit = 2, + DateTime = 4, + Int = 8, + Float = 6, + String = 12, + Guid = 14 +} +export interface DatedTestFieldData { + date?: Date; + value?: TestFieldData; +} +export interface DefaultAfnStripBinding { + testCaseId?: number; + testResultId?: number; + testRunId?: number; +} +export interface DeleteTestRunRequest { + projectName?: string; + testRunIds?: number[]; +} +export interface DownloadAttachmentsRequest { + ids?: number[]; + lengths?: number[]; +} +/** + * This is a temporary class to provide the details for the test run environment. + */ +export interface DtlEnvironmentDetails { + csmContent: string; + csmParameters?: string; + subscriptionName?: string; +} +/** + * Failing since information of a test result. + */ +export interface FailingSince { + /** + * Build reference since failing. + */ + build?: BuildReference; + /** + * Time since failing(UTC). + */ + date: Date; + /** + * Release reference since failing. + */ + release?: ReleaseReference; +} +export interface FetchTestResultsRequest { + idAndRevs?: TestCaseResultIdAndRev[]; + includeActionResults?: boolean; + projectName?: string; +} +export interface FetchTestResultsResponse { + actionResults?: TestActionResult[]; + attachments?: TestResultAttachment[]; + deletedIds?: LegacyTestCaseResultIdentifier[]; + results?: LegacyTestCaseResult[]; + testParameters?: TestResultParameter[]; +} +export interface FieldDetailsForTestResults { + /** + * Group by field name + */ + fieldName?: string; + /** + * Group by field values + */ + groupsForField?: any[]; +} +export interface FileCoverage { + /** + * List of line blocks along with their coverage status + */ + lineBlocksCoverage?: LineBlockCoverage[]; + /** + * File path for which coverage information is sought for + */ + path: string; +} +export interface FileCoverageRequest { + filePath: string; + pullRequestBaseIterationId: number; + pullRequestId: number; + pullRequestIterationId: number; + repoId: string; +} +export interface FilterPointQuery { + planId: number; + pointIds: number[]; + pointOutcome: number[]; + resultState: number[]; +} +export interface FlakyDetection { + /** + * FlakyDetectionPipelines defines Pipelines for Detection. + */ + flakyDetectionPipelines?: FlakyDetectionPipelines; + /** + * FlakyDetectionType defines Detection type i.e. 1. System or 2. Manual. + */ + flakyDetectionType: FlakyDetectionType; +} +export interface FlakyDetectionPipelines { + /** + * AllowedPipelines - List All Pipelines allowed for detection. + */ + allowedPipelines?: number[]; + /** + * IsAllPipelinesAllowed if users configure all system's pipelines. + */ + isAllPipelinesAllowed: boolean; +} +export declare enum FlakyDetectionType { + /** + * Custom defines manual detection type. + */ + Custom = 1, + /** + * Defines System detection type. + */ + System = 2 +} +export interface FlakySettings { + /** + * FlakyDetection defines types of detection. + */ + flakyDetection?: FlakyDetection; + /** + * FlakyInSummaryReport defines flaky data should show in summary report or not. + */ + flakyInSummaryReport?: boolean; + /** + * IsFlakyBugCreated defines if there is any bug that has been created with flaky testresult. + */ + isFlakyBugCreated?: boolean; + /** + * ManualMarkUnmarkFlaky defines manual marking unmarking of flaky testcase. + */ + manualMarkUnmarkFlaky?: boolean; +} +export interface FunctionCoverage { + class?: string; + name?: string; + namespace?: string; + sourceFile?: string; + statistics?: CoverageStatistics; +} +export interface FunctionCoverage2 { + blocksCovered?: number; + blocksNotCovered?: number; + class?: string; + coverageId?: number; + functionId?: number; + linesCovered?: number; + linesNotCovered?: number; + linesPartiallyCovered?: number; + moduleId?: number; + name?: string; + namespace?: string; + sourceFile?: string; +} +export interface HttpPostedTcmAttachment { + attachmentContent?: string; + contentLength?: number; + contentType?: string; + fileName?: string; +} +/** + * Job in pipeline. This is related to matrixing in YAML. + */ +export interface JobReference { + /** + * Attempt number of the job + */ + attempt?: number; + /** + * Matrixing in YAML generates copies of a job with different inputs in matrix. JobName is the name of those input. Maximum supported length for name is 256 character. + */ + jobName?: string; +} +/** + * Last result details of test point. + */ +export interface LastResultDetails { + /** + * Completed date of last result. + */ + dateCompleted?: Date; + /** + * Duration of the last result in milliseconds. + */ + duration?: number; + /** + * The user who executed the last result. + */ + runBy?: VSSInterfaces.IdentityRef; +} +export interface LegacyBuildConfiguration { + branchName?: string; + buildConfigurationId?: number; + buildDefinitionId?: number; + buildDefinitionName?: string; + buildFlavor?: string; + buildId?: number; + buildNumber?: string; + buildPlatform?: string; + buildQuality?: string; + buildSystem?: string; + buildUri?: string; + completedDate?: Date; + createdDate?: Date; + oldBuildConfigurationId?: number; + repositoryId?: string; + repositoryType?: string; + sourceVersion?: string; + teamProjectName?: string; +} +export interface LegacyReleaseReference { + attempt?: number; + environmentCreationDate?: Date; + primaryArtifactBuildId?: number; + primaryArtifactProjectId?: string; + primaryArtifactType?: string; + releaseCreationDate?: Date; + releaseDefId?: number; + releaseEnvDefId?: number; + releaseEnvId?: number; + releaseEnvName?: string; + releaseEnvUri?: string; + releaseId?: number; + releaseName?: string; + releaseRefId?: number; + releaseUri?: string; +} +export interface LegacyTestCaseResult { + afnStripId?: number; + areaId?: number; + areaUri?: string; + automatedTestId?: string; + automatedTestName?: string; + automatedTestStorage?: string; + automatedTestType?: string; + automatedTestTypeId?: string; + buildNumber?: string; + buildReference?: LegacyBuildConfiguration; + comment?: string; + computerName?: string; + configurationId?: number; + configurationName?: string; + creationDate?: Date; + customFields?: TestExtensionField[]; + dateCompleted?: Date; + dateStarted?: Date; + duration?: number; + errorMessage?: string; + failingSince?: FailingSince; + failureType?: number; + id?: LegacyTestCaseResultIdentifier; + isRerun?: boolean; + lastUpdated?: Date; + lastUpdatedBy?: string; + lastUpdatedByName?: string; + outcome?: number; + owner?: string; + ownerName?: string; + priority?: number; + releaseReference?: LegacyReleaseReference; + resetCount?: number; + resolutionStateId?: number; + resultGroupType?: ResultGroupType; + revision?: number; + runBy?: string; + runByName?: string; + sequenceId?: number; + stackTrace?: TestExtensionField; + state?: number; + subResultCount?: number; + suiteName?: string; + testCaseArea?: string; + testCaseAreaUri?: string; + testCaseId?: number; + testCaseReferenceId?: number; + testCaseRevision?: number; + testCaseTitle?: string; + testPlanId?: number; + testPointId?: number; + testResultId?: number; + testRunId?: number; + testRunTitle?: string; + testSuiteId?: number; +} +export interface LegacyTestCaseResultIdentifier { + areaUri?: string; + testResultId?: number; + testRunId?: number; +} +export interface LegacyTestRun { + bugsCount?: number; + buildConfigurationId?: number; + buildFlavor?: string; + buildNumber?: string; + buildPlatform?: string; + buildReference?: LegacyBuildConfiguration; + buildUri?: string; + comment?: string; + completeDate?: Date; + configurationIds?: number[]; + controller?: string; + creationDate?: Date; + csmContent?: string; + csmParameters?: string; + customFields?: TestExtensionField[]; + dropLocation?: string; + dtlAutEnvironment?: ShallowReference; + dtlTestEnvironment?: ShallowReference; + dueDate?: Date; + errorMessage?: string; + filter?: RunFilter; + incompleteTests?: number; + isAutomated?: boolean; + isBvt?: boolean; + iteration?: string; + iterationId?: number; + lastUpdated?: Date; + lastUpdatedBy?: string; + lastUpdatedByName?: string; + legacySharePath?: string; + notApplicableTests?: number; + owner?: string; + ownerName?: string; + passedTests?: number; + postProcessState?: number; + publicTestSettingsId?: number; + releaseEnvironmentUri?: string; + releaseReference?: LegacyReleaseReference; + releaseUri?: string; + revision?: number; + rowVersion?: number[]; + runHasDtlEnvironment?: boolean; + runTimeout?: any; + serviceVersion?: string; + sourceWorkflow?: string; + startDate?: Date; + state?: number; + subscriptionName?: string; + substate?: number; + teamProject?: string; + teamProjectUri?: string; + testConfigurationsMapping?: string; + testEnvironmentId?: string; + testMessageLogEntries?: TestMessageLogDetails[]; + testMessageLogId?: number; + testPlanId?: number; + testRunId?: number; + testRunStatistics?: LegacyTestRunStatistic[]; + testSettingsId?: number; + title?: string; + totalTests?: number; + type?: number; + unanalyzedTests?: number; + version?: number; +} +export interface LegacyTestRunStatistic { + count?: number; + outcome?: number; + resolutionState?: TestResolutionState; + state?: number; + testRunId?: number; +} +export interface LegacyTestSettings { + areaId?: number; + areaPath?: string; + createdBy?: string; + createdByName?: string; + createdDate?: Date; + description?: string; + id?: number; + isAutomated?: boolean; + isPublic?: boolean; + lastUpdated?: Date; + lastUpdatedBy?: string; + lastUpdatedByName?: string; + machineRoles?: TestSettingsMachineRole[]; + name?: string; + revision?: number; + settings?: string; + teamProjectUri?: string; +} +export interface LineBlockCoverage { + /** + * End of line block + */ + end: number; + /** + * Start of line block + */ + start: number; + /** + * Coverage status. Covered: 0, NotCovered: 1, PartiallyCovered: 2 + */ + status: number; +} +export interface LinkedWorkItemsQuery { + automatedTestNames?: string[]; + planId?: number; + pointIds?: number[]; + suiteIds?: number[]; + testCaseIds?: number[]; + workItemCategory?: string; +} +export interface LinkedWorkItemsQueryResult { + automatedTestName?: string; + planId?: number; + pointId?: number; + suiteId?: number; + testCaseId?: number; + workItems?: WorkItemReference[]; +} +/** + * Test summary metrics. + */ +export declare enum Metrics { + /** + * To get results of all matrix. + */ + All = 1, + /** + * Get results summary by results outcome + */ + ResultSummary = 2, + /** + * Get results analysis which include failure analysis, increase/decrease in results count analysis. + */ + ResultsAnalysis = 3, + /** + * Get runs summary + */ + RunSummary = 4 +} +export interface ModuleCoverage { + blockCount?: number; + blockData?: number[]; + /** + * Code Coverage File Url + */ + fileUrl?: string; + functions?: FunctionCoverage[]; + name?: string; + signature?: string; + signatureAge?: number; + statistics?: CoverageStatistics; +} +export interface ModuleCoverage2 { + blockCount?: number; + blockData?: number[]; + blockDataLength?: number; + blocksCovered?: number; + blocksNotCovered?: number; + coverageFileUrl?: string; + coverageId?: number; + linesCovered?: number; + linesNotCovered?: number; + linesPartiallyCovered?: number; + moduleId?: number; + name?: string; + signature?: string; + signatureAge?: number; +} +/** + * Name value pair + */ +export interface NameValuePair { + /** + * Name + */ + name?: string; + /** + * Value + */ + value?: string; +} +export interface NewTestResultLoggingSettings { + /** + * LogNewTests defines whether or not we will record new test cases coming into the system + */ + logNewTests?: boolean; +} +export declare enum OperationType { + Add = 1, + Delete = 2 +} +/** + * Phase in pipeline + */ +export interface PhaseReference { + /** + * Attempt number of the phase + */ + attempt?: number; + /** + * Name of the phase. Maximum supported length for name is 256 character. + */ + phaseName?: string; +} +/** + * Pipeline reference + */ +export interface PipelineReference { + /** + * Reference of the job + */ + jobReference?: JobReference; + /** + * Reference of the phase. + */ + phaseReference?: PhaseReference; + /** + * Reference of the pipeline with which this pipeline instance is related. + */ + pipelineId: number; + /** + * Reference of the stage. + */ + stageReference?: StageReference; +} +/** + * Test summary of a pipeline instance. + */ +export interface PipelineTestMetrics { + /** + * Reference of Pipeline instance for which test summary is calculated. + */ + currentContext?: PipelineReference; + /** + * This is the return value for metric ResultsAnalysis Results insights which include failure analysis, increase/decrease in results count analysis. + */ + resultsAnalysis?: ResultsAnalysis; + /** + * This is the return value for metric ResultSummary Results summary based on results outcome. + */ + resultSummary?: ResultSummary; + /** + * This is the return value for metric RunSummary Run summary. + */ + runSummary?: RunSummary; + /** + * Summary at child node. + */ + summaryAtChild?: PipelineTestMetrics[]; +} +/** + * A model class used for creating and updating test plans. + */ +export interface PlanUpdateModel { + /** + * Area path to which the test plan belongs. This should be set to area path of the team that works on this test plan. + */ + area?: ShallowReference; + automatedTestEnvironment?: TestEnvironment; + automatedTestSettings?: TestSettings; + /** + * Build ID of the build whose quality is tested by the tests in this test plan. For automated testing, this build ID is used to find the test binaries that contain automated test methods. + */ + build?: ShallowReference; + /** + * The Build Definition that generates a build associated with this test plan. + */ + buildDefinition?: ShallowReference; + /** + * IDs of configurations to be applied when new test suites and test cases are added to the test plan. + */ + configurationIds?: number[]; + /** + * Description of the test plan. + */ + description?: string; + /** + * End date for the test plan. + */ + endDate?: string; + /** + * Iteration path assigned to the test plan. This indicates when the target iteration by which the testing in this plan is supposed to be complete and the product is ready to be released. + */ + iteration?: string; + manualTestEnvironment?: TestEnvironment; + manualTestSettings?: TestSettings; + /** + * Name of the test plan. + */ + name?: string; + /** + * Owner of the test plan. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Release Environment to be used to deploy the build and run automated tests from this test plan. + */ + releaseEnvironmentDefinition?: ReleaseEnvironmentDefinitionReference; + /** + * Start date for the test plan. + */ + startDate?: string; + /** + * State of the test plan. + */ + state?: string; + status?: string; + /** + * Test Outcome settings + */ + testOutcomeSettings?: TestOutcomeSettings; +} +/** + * Adding test cases to a suite creates one of more test points based on the default configurations and testers assigned to the test suite. PointAssignment is the list of test points that were created for each of the test cases that were added to the test suite. + */ +export interface PointAssignment { + /** + * Configuration that was assigned to the test case. + */ + configuration?: ShallowReference; + /** + * Tester that was assigned to the test case + */ + tester?: VSSInterfaces.IdentityRef; +} +export interface PointLastResult { + lastUpdatedDate?: Date; + pointId?: number; +} +/** + * Filter class for test point. + */ +export interface PointsFilter { + /** + * List of Configurations for filtering. + */ + configurationNames?: string[]; + /** + * List of test case id for filtering. + */ + testcaseIds?: number[]; + /** + * List of tester for filtering. + */ + testers?: VSSInterfaces.IdentityRef[]; +} +export interface PointsReference2 { + planId?: number; + pointId?: number; +} +export interface PointsResults2 { + changeNumber?: number; + lastFailureType?: number; + lastResolutionStateId?: number; + lastResultOutcome?: number; + lastResultState?: number; + lastTestResultId?: number; + lastTestRunId?: number; + lastUpdated?: Date; + lastUpdatedBy?: string; + planId?: number; + pointId?: number; +} +/** + * Model to update test point. + */ +export interface PointUpdateModel { + /** + * Outcome to update. + */ + outcome?: string; + /** + * Reset test point to active. + */ + resetToActive?: boolean; + /** + * Tester to update. Type IdentityRef. + */ + tester?: VSSInterfaces.IdentityRef; +} +/** + * Test point workitem property. + */ +export interface PointWorkItemProperty { + /** + * key value pair of test point work item property. + */ + workItem: { + key: string; + value: any; + }; +} +/** + * The class to represent a Generic store for test session data. + */ +export interface PropertyBag { + /** + * Generic store for test session data + */ + bag?: { + [key: string]: string; + }; +} +export interface QueryByPointRequest { + projectName?: string; + testPlanId?: number; + testPointId?: number; +} +export interface QueryByRunRequest { + includeActionResults?: boolean; + outcome?: number; + owner?: string; + pageSize?: number; + projectName?: string; + state?: number; + testRunId?: number; +} +export interface QueryModel { + query: string; +} +export interface QueryTestActionResultRequest { + identifier?: LegacyTestCaseResultIdentifier; + projectName?: string; +} +export interface QueryTestActionResultResponse { + testActionResults?: TestActionResult[]; + testAttachments?: TestResultAttachment[]; + testResultParameters?: TestResultParameter[]; +} +export interface QueryTestMessageLogEntryRequest { + projectName?: string; + testMessageLogId?: number; + testRunId?: number; +} +export interface QueryTestRuns2Request { + includeStatistics?: boolean; + query?: ResultsStoreQuery; +} +export interface QueryTestRunsRequest { + buildUri?: string; + owner?: string; + planId?: number; + skip?: number; + teamProjectName?: string; + testRunId?: number; + top?: number; +} +export interface QueryTestRunStatsRequest { + teamProjectName?: string; + testRunId?: number; +} +/** + * Reference to release environment resource. + */ +export interface ReleaseEnvironmentDefinitionReference { + /** + * ID of the release definition that contains the release environment definition. + */ + definitionId?: number; + /** + * ID of the release environment definition. + */ + environmentDefinitionId?: number; +} +/** + * Reference to a release. + */ +export interface ReleaseReference { + /** + * Number of Release Attempt. + */ + attempt?: number; + /** + * Release Creation Date(UTC). + */ + creationDate?: Date; + /** + * Release definition ID. + */ + definitionId?: number; + /** + * Environment creation Date(UTC). + */ + environmentCreationDate?: Date; + /** + * Release environment definition ID. + */ + environmentDefinitionId?: number; + /** + * Release environment definition name. + */ + environmentDefinitionName?: string; + /** + * Release environment ID. + */ + environmentId?: number; + /** + * Release environment name. + */ + environmentName?: string; + /** + * Release ID. + */ + id?: number; + /** + * Release name. + */ + name?: string; +} +export interface ReleaseReference2 { + attempt?: number; + environmentCreationDate?: Date; + projectId?: string; + releaseCreationDate?: Date; + releaseDefId?: number; + releaseEnvDefId?: number; + releaseEnvId?: number; + releaseEnvName?: string; + releaseEnvUri?: string; + releaseId?: number; + releaseName?: string; + releaseRefId?: number; + releaseUri?: string; +} +export interface RequirementsToTestsMapping2 { + createdBy?: string; + creationDate?: Date; + deletedBy?: string; + deletionDate?: Date; + isMigratedToWIT?: boolean; + projectId?: string; + testMetadataId?: number; + workItemId?: number; +} +export interface ResetTestResultsRequest { + ids?: LegacyTestCaseResultIdentifier[]; + projectName?: string; +} +export interface Response { + error?: string; + id?: string; + status?: string; + url?: string; +} +/** + * Additional details with test result + */ +export declare enum ResultDetails { + /** + * Core fields of test result. Core fields includes State, Outcome, Priority, AutomatedTestName, AutomatedTestStorage, Comments, ErrorMessage etc. + */ + None = 0, + /** + * Test iteration details in a test result. + */ + Iterations = 1, + /** + * Workitems associated with a test result. + */ + WorkItems = 2, + /** + * Subresults in a test result. + */ + SubResults = 4, + /** + * Point and plan detail in a test result. + */ + Point = 8 +} +/** + * Hierarchy type of the result/subresults. + */ +export declare enum ResultGroupType { + /** + * Leaf node of test result. + */ + None = 0, + /** + * Hierarchy type of test result. + */ + Rerun = 1, + /** + * Hierarchy type of test result. + */ + DataDriven = 2, + /** + * Hierarchy type of test result. + */ + OrderedTest = 3, + /** + * Unknown hierarchy type. + */ + Generic = 4 +} +export declare enum ResultMetadata { + /** + * Rerun metadata + */ + Rerun = 1, + /** + * Flaky metadata + */ + Flaky = 2 +} +/** + * Additional details with test result metadata + */ +export declare enum ResultMetaDataDetails { + /** + * Core fields of test result metadata. + */ + None = 0, + /** + * Test FlakyIdentifiers details in test result metadata. + */ + FlakyIdentifiers = 1 +} +/** + * The top level entity that is being cloned as part of a Clone operation + */ +export declare enum ResultObjectType { + /** + * Suite Clone + */ + TestSuite = 0, + /** + * Plan Clone + */ + TestPlan = 1 +} +/** + * Test result retention settings + */ +export interface ResultRetentionSettings { + /** + * Automated test result retention duration in days + */ + automatedResultsRetentionDuration: number; + /** + * Last Updated by identity + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last updated date + */ + lastUpdatedDate?: Date; + /** + * Manual test result retention duration in days + */ + manualResultsRetentionDuration: number; +} +/** + * Results insights for runs with state completed and NeedInvestigation. + */ +export interface ResultsAnalysis { + /** + * Reference of pipeline instance from which to compare the results. + */ + previousContext?: PipelineReference; + /** + * Increase/Decrease in counts of results for a different outcome with respect to PreviousContext. + */ + resultsDifference?: AggregatedResultsDifference; + /** + * Failure analysis of results with respect to PreviousContext + */ + testFailuresAnalysis?: TestResultFailuresAnalysis; +} +export interface ResultsByQueryRequest { + pageSize?: number; + query?: ResultsStoreQuery; +} +export interface ResultsByQueryResponse { + excessIds?: LegacyTestCaseResultIdentifier[]; + testResults?: LegacyTestCaseResult[]; +} +export interface ResultsFilter { + automatedTestName: string; + branch?: string; + executedIn?: Service; + groupBy?: string; + maxCompleteDate?: Date; + resultsCount?: number; + testCaseId?: number; + testCaseReferenceIds?: number[]; + testPlanId?: number; + testPointIds?: number[]; + testResultsContext?: TestResultsContext; + trendDays?: number; +} +export interface ResultsStoreQuery { + dayPrecision?: boolean; + queryText?: string; + teamProjectName?: string; + timeZone?: string; +} +/** + * Result summary by the outcome of test results. + */ +export interface ResultsSummaryByOutcome { + /** + * Aggregated result details for each test result outcome. + */ + aggregatedResultDetailsByOutcome?: { + [key: number]: AggregatedResultDetailsByOutcome; + }; + /** + * Time taken by results. + */ + duration?: any; + /** + * Total number of not reported test results. + */ + notReportedTestCount?: number; + /** + * Total number of test results. (It includes NotImpacted test results as well which need to exclude while calculating pass/fail test result percentage). + */ + totalTestCount?: number; +} +/** + * Summary of results for a pipeline instance. + */ +export interface ResultSummary { + /** + * Result summary of pipeline, group by TestRun state. + */ + resultSummaryByRunState?: { + [key: number]: ResultsSummaryByOutcome; + }; +} +export interface ResultUpdateRequest { + actionResultDeletes?: TestActionResult[]; + actionResults?: TestActionResult[]; + attachmentDeletes?: TestResultAttachmentIdentity[]; + attachments?: TestResultAttachment[]; + parameterDeletes?: TestResultParameter[]; + parameters?: TestResultParameter[]; + testCaseResult?: LegacyTestCaseResult; + testResultId?: number; + testRunId?: number; +} +export interface ResultUpdateRequestModel { + actionResultDeletes: TestActionResultModel[]; + actionResults: TestActionResultModel[]; + parameterDeletes: TestResultParameterModel[]; + parameters: TestResultParameterModel[]; + testCaseResult: TestCaseResultUpdateModel; +} +export interface ResultUpdateResponse { + attachmentIds?: number[]; + lastUpdated?: Date; + lastUpdatedBy?: string; + lastUpdatedByName?: string; + maxReservedSubResultId?: number; + revision?: number; + testPlanId?: number; + testResultId?: number; +} +export interface ResultUpdateResponseModel { + revision: number; +} +/** + * Test run create details. + */ +export interface RunCreateModel { + /** + * true if test run is automated, false otherwise. By default it will be false. + */ + automated?: boolean; + /** + * An abstracted reference to the build that it belongs. + */ + build?: ShallowReference; + /** + * Drop location of the build used for test run. + */ + buildDropLocation?: string; + /** + * Flavor of the build used for test run. (E.g: Release, Debug) + */ + buildFlavor?: string; + /** + * Platform of the build used for test run. (E.g.: x86, amd64) + */ + buildPlatform?: string; + /** + * BuildReference of the test run. + */ + buildReference?: BuildConfiguration; + /** + * Comments entered by those analyzing the run. + */ + comment?: string; + /** + * Completed date time of the run. + */ + completeDate?: string; + /** + * IDs of the test configurations associated with the run. + */ + configurationIds: number[]; + /** + * Name of the test controller used for automated run. + */ + controller?: string; + /** + * Additional properties of test Run. + */ + customTestFields?: CustomTestField[]; + /** + * An abstracted reference to DtlAutEnvironment. + */ + dtlAutEnvironment?: ShallowReference; + /** + * An abstracted reference to DtlTestEnvironment. + */ + dtlTestEnvironment?: ShallowReference; + /** + * Due date and time for test run. + */ + dueDate?: string; + environmentDetails?: DtlEnvironmentDetails; + /** + * Error message associated with the run. + */ + errorMessage?: string; + /** + * Filter used for discovering the Run. + */ + filter?: RunFilter; + /** + * The iteration in which to create the run. Root iteration of the team project will be default + */ + iteration?: string; + /** + * Name of the test run. + */ + name: string; + /** + * Display name of the owner of the run. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Reference of the pipeline to which this test run belongs. PipelineReference.PipelineId should be equal to RunCreateModel.Build.Id + */ + pipelineReference?: PipelineReference; + /** + * An abstracted reference to the plan that it belongs. + */ + plan: ShallowReference; + /** + * IDs of the test points to use in the run. + */ + pointIds?: number[]; + /** + * URI of release environment associated with the run. + */ + releaseEnvironmentUri?: string; + /** + * Reference to release associated with test run. + */ + releaseReference?: ReleaseReference; + /** + * URI of release associated with the run. + */ + releaseUri?: string; + /** + * Run summary for run Type = NoConfigRun. + */ + runSummary?: RunSummaryModel[]; + /** + * Timespan till the run times out. + */ + runTimeout?: any; + /** + * SourceWorkFlow(CI/CD) of the test run. + */ + sourceWorkflow?: string; + /** + * Start date time of the run. + */ + startDate?: string; + /** + * The state of the run. Type TestRunState Valid states - NotStarted, InProgress, Waiting + */ + state?: string; + /** + * Tags to attach with the test run, maximum of 5 tags can be added to run. + */ + tags?: TestTag[]; + /** + * TestConfigurationMapping of the test run. + */ + testConfigurationsMapping?: string; + /** + * ID of the test environment associated with the run. + */ + testEnvironmentId?: string; + /** + * An abstracted reference to the test settings resource. + */ + testSettings?: ShallowReference; + /** + * Type of the run(RunType) Valid Values : (Unspecified, Normal, Blocking, Web, MtrRunInitiatedFromWeb, RunWithDtlEnv, NoConfigRun) + */ + type?: string; +} +/** + * This class is used to provide the filters used for discovery + */ +export interface RunFilter { + /** + * filter for the test case sources (test containers) + */ + sourceFilter: string; + /** + * filter for the test cases + */ + testCaseFilter?: string; +} +/** + * Test run statistics per outcome. + */ +export interface RunStatistic { + /** + * Test result count fo the given outcome. + */ + count: number; + /** + * Test result outcome + */ + outcome: string; + /** + * Test run Resolution State. + */ + resolutionState?: TestResolutionState; + /** + * ResultMetadata for the given outcome/count. + */ + resultMetadata?: ResultMetadata; + /** + * State of the test run + */ + state: string; +} +/** + * Summary of runs for a pipeline instance. + */ +export interface RunSummary { + /** + * Total time taken by runs with state completed and NeedInvestigation. + */ + duration?: any; + /** + * NoConfig runs count. + */ + noConfigRunsCount?: number; + /** + * Runs count by outcome for runs with state completed and NeedInvestigation runs. + */ + runSummaryByOutcome?: { + [key: number]: number; + }; + /** + * Runs count by state. + */ + runSummaryByState?: { + [key: number]: number; + }; + /** + * Total runs count. + */ + totalRunsCount?: number; +} +/** + * Run summary for each output type of test. + */ +export interface RunSummaryModel { + /** + * Total time taken in milliseconds. + */ + duration?: number; + /** + * Number of results for Outcome TestOutcome + */ + resultCount: number; + /** + * Summary is based on outcome + */ + testOutcome: TestOutcome; +} +export declare enum RunType { + /** + * Only used during an update to preserve the existing value. + */ + Unspecified = 0, + /** + * Normal test run. + */ + Normal = 1, + /** + * Test run created for the blocked result when a test point is blocked. + */ + Blocking = 2, + /** + * Test run created from Web. + */ + Web = 4, + /** + * Run initiated from web through MTR + */ + MtrRunInitiatedFromWeb = 8, + /** + * These test run would require DTL environment. These could be either of automated or manual test run. + */ + RunWithDtlEnv = 16, + /** + * These test run may or may not have published test results but it will have summary like total test, passed test, failed test etc. These are automated tests. + */ + NoConfigRun = 32 +} +export interface RunUpdateModel { + /** + * An abstracted reference to the build that it belongs. + */ + build?: ShallowReference; + /** + * Drop location of the build used for test run. + */ + buildDropLocation?: string; + /** + * Flavor of the build used for test run. (E.g: Release, Debug) + */ + buildFlavor?: string; + /** + * Platform of the build used for test run. (E.g.: x86, amd64) + */ + buildPlatform?: string; + /** + * Comments entered by those analyzing the run. + */ + comment?: string; + /** + * Completed date time of the run. + */ + completedDate?: string; + /** + * Name of the test controller used for automated run. + */ + controller?: string; + /** + * true to delete inProgess Results , false otherwise. + */ + deleteInProgressResults?: boolean; + /** + * An abstracted reference to DtlAutEnvironment. + */ + dtlAutEnvironment?: ShallowReference; + /** + * An abstracted reference to DtlEnvironment. + */ + dtlEnvironment?: ShallowReference; + dtlEnvironmentDetails?: DtlEnvironmentDetails; + /** + * Due date and time for test run. + */ + dueDate?: string; + /** + * Error message associated with the run. + */ + errorMessage?: string; + /** + * The iteration in which to create the run. + */ + iteration?: string; + /** + * Log entries associated with the run. Use a comma-separated list of multiple log entry objects. { logEntry }, { logEntry }, ... + */ + logEntries?: TestMessageLogDetails[]; + /** + * Name of the test run. + */ + name?: string; + /** + * URI of release environment associated with the run. + */ + releaseEnvironmentUri?: string; + /** + * URI of release associated with the run. + */ + releaseUri?: string; + /** + * Run summary for run Type = NoConfigRun. + */ + runSummary?: RunSummaryModel[]; + /** + * SourceWorkFlow(CI/CD) of the test run. + */ + sourceWorkflow?: string; + /** + * Start date time of the run. + */ + startedDate?: string; + /** + * The state of the test run Below are the valid values - NotStarted, InProgress, Completed, Aborted, Waiting + */ + state?: string; + /** + * The types of sub states for test run. + */ + substate?: TestRunSubstate; + /** + * Tags to attach with the test run. + */ + tags?: TestTag[]; + /** + * ID of the test environment associated with the run. + */ + testEnvironmentId?: string; + /** + * An abstracted reference to test setting resource. + */ + testSettings?: ShallowReference; +} +export declare enum Service { + Any = 0, + Tcm = 1, + Tfs = 2 +} +/** + * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. + */ +export interface ShallowReference { + /** + * ID of the resource + */ + id?: string; + /** + * Name of the linked resource (definition name, controller name, etc.) + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +export interface ShallowTestCaseResult { + automatedTestName?: string; + automatedTestStorage?: string; + durationInMs?: number; + id?: number; + isReRun?: boolean; + outcome?: string; + owner?: string; + priority?: number; + refId?: number; + runId?: number; + tags?: string[]; + testCaseTitle?: string; +} +/** + * Reference to shared step workitem. + */ +export interface SharedStepModel { + /** + * WorkItem shared step ID. + */ + id: number; + /** + * Shared step workitem revision. + */ + revision: number; +} +/** + * Stage in pipeline + */ +export interface StageReference { + /** + * Attempt number of stage + */ + attempt?: number; + /** + * Name of the stage. Maximum supported length for name is 256 character. + */ + stageName?: string; +} +/** + * Suite create model + */ +export interface SuiteCreateModel { + /** + * Name of test suite. + */ + name?: string; + /** + * For query based suites, query string that defines the suite. + */ + queryString?: string; + /** + * For requirements test suites, the IDs of the requirements. + */ + requirementIds?: number[]; + /** + * Type of test suite to create. It can have value from DynamicTestSuite, StaticTestSuite and RequirementTestSuite. + */ + suiteType?: string; +} +/** + * A suite entry defines properties for a test suite. + */ +export interface SuiteEntry { + /** + * Id of child suite in the test suite. + */ + childSuiteId?: number; + /** + * Sequence number for the test case or child test suite in the test suite. + */ + sequenceNumber?: number; + /** + * Id for the test suite. + */ + suiteId?: number; + /** + * Id of a test case in the test suite. + */ + testCaseId?: number; +} +/** + * A model to define sequence of test suite entries in a test suite. + */ +export interface SuiteEntryUpdateModel { + /** + * Id of the child suite in the test suite. + */ + childSuiteId?: number; + /** + * Updated sequence number for the test case or child test suite in the test suite. + */ + sequenceNumber?: number; + /** + * Id of the test case in the test suite. + */ + testCaseId?: number; +} +/** + * Option to get details in response + */ +export declare enum SuiteExpand { + /** + * Include children in response. + */ + Children = 1, + /** + * Include default testers in response. + */ + DefaultTesters = 2 +} +/** + * Test case for the suite. + */ +export interface SuiteTestCase { + /** + * Point Assignment for test suite's test case. + */ + pointAssignments?: PointAssignment[]; + /** + * Test case workItem reference. + */ + testCase?: WorkItemReference; +} +/** + * Test suite update model. + */ +export interface SuiteTestCaseUpdateModel { + /** + * Shallow reference of configurations for the test cases in the suite. + */ + configurations?: ShallowReference[]; +} +/** + * Test suite update model. + */ +export interface SuiteUpdateModel { + /** + * Shallow reference of default configurations for the suite. + */ + defaultConfigurations?: ShallowReference[]; + /** + * Shallow reference of test suite. + */ + defaultTesters?: ShallowReference[]; + /** + * Specifies if the default configurations have to be inherited from the parent test suite in which the test suite is created. + */ + inheritDefaultConfigurations?: boolean; + /** + * Test suite name + */ + name?: string; + /** + * Shallow reference of the parent. + */ + parent?: ShallowReference; + /** + * For query based suites, the new query string. + */ + queryString?: string; +} +export interface TCMPropertyBag2 { + artifactId?: number; + artifactType?: number; + name?: string; + value?: string; +} +export declare enum TCMServiceDataMigrationStatus { + /** + * Migration Not Started + */ + NotStarted = 0, + /** + * Migration InProgress + */ + InProgress = 1, + /** + * Migration Completed + */ + Completed = 2, + /** + * Migration Failed + */ + Failed = 3 +} +export interface TestActionResult { + actionPath?: string; + comment?: string; + creationDate?: Date; + dateCompleted?: Date; + dateStarted?: Date; + duration?: number; + errorMessage?: string; + id?: LegacyTestCaseResultIdentifier; + iterationId?: number; + lastUpdated?: Date; + lastUpdatedBy?: string; + outcome?: number; + sharedStepId?: number; + sharedStepRevision?: number; +} +export interface TestActionResult2 { + actionPath?: string; + comment?: string; + creationDate?: Date; + dateCompleted?: Date; + dateStarted?: Date; + duration?: number; + errorMessage?: string; + iterationId?: number; + lastUpdated?: Date; + outcome?: number; + sharedStepId?: number; + sharedStepRevision?: number; + testResultId?: number; + testRunId?: number; +} +/** + * Represents a test step result. + */ +export interface TestActionResultModel extends TestResultModelBase { + /** + * Path identifier for test step in test case workitem. Note: 1) It is represented in Hexadecimal format with 8 digits for a step. 2) Internally, the step ID value for first step starts with 2 so actionPath = 00000002 step 9, will have an ID = 10 and actionPath = 0000000a step 15, will have an ID =16 and actionPath = 00000010 3) actionPath of shared step is concatenated with the parent step of test case. Example, it would be something of type - 0000000300000001 where 00000003 denotes action path of test step and 00000001 denotes action path for shared step + */ + actionPath?: string; + /** + * Iteration ID of test action result. + */ + iterationId?: number; + /** + * Reference to shared step workitem. + */ + sharedStepModel?: SharedStepModel; + /** + * This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + */ + stepIdentifier?: string; + /** + * Url of test action result. Deprecated in hosted environment. + */ + url?: string; +} +export interface TestAttachment { + /** + * Attachment type. + */ + attachmentType?: AttachmentType; + /** + * Comment associated with attachment. + */ + comment?: string; + /** + * Attachment created date. + */ + createdDate?: Date; + /** + * Attachment file name + */ + fileName?: string; + /** + * ID of the attachment. + */ + id: number; + /** + * Attachment size. + */ + size?: number; + /** + * Attachment Url. + */ + url?: string; +} +/** + * Reference to test attachment. + */ +export interface TestAttachmentReference { + /** + * ID of the attachment. + */ + id: number; + /** + * Url to download the attachment. + */ + url: string; +} +/** + * Test attachment request model + */ +export interface TestAttachmentRequestModel { + /** + * Attachment type By Default it will be GeneralAttachment. It can be one of the following type. { GeneralAttachment, AfnStrip, BugFilingData, CodeCoverage, IntermediateCollectorData, RunConfig, TestImpactDetails, TmiTestRunDeploymentFiles, TmiTestRunReverseDeploymentFiles, TmiTestResultDetail, TmiTestRunSummary } + */ + attachmentType?: string; + /** + * Comment associated with attachment + */ + comment?: string; + /** + * Attachment filename + */ + fileName: string; + /** + * Base64 encoded file stream + */ + stream: string; +} +export interface TestAuthoringDetails { + configurationId?: number; + isAutomated?: boolean; + lastUpdated?: Date; + pointId?: number; + priority?: number; + runBy?: string; + state?: TestPointState; + suiteId?: number; + testerId?: string; +} +export interface TestCaseMetadata2 { + container?: string; + name?: string; + projectId?: string; + testMetadataId?: number; +} +export interface TestCaseReference2 { + areaId?: number; + automatedTestId?: string; + automatedTestName?: string; + automatedTestNameHash?: number[]; + automatedTestStorage?: string; + automatedTestStorageHash?: number[]; + automatedTestType?: string; + configurationId?: number; + createdBy?: string; + creationDate?: Date; + lastRefTestRunDate?: Date; + owner?: string; + priority?: number; + projectId?: string; + testCaseId?: number; + testCaseRefId?: number; + testCaseRevision?: number; + testCaseTitle?: string; + testPointId?: number; +} +/** + * Represents a test result. + */ +export interface TestCaseResult { + /** + * Test attachment ID of action recording. + */ + afnStripId?: number; + /** + * Reference to area path of test. + */ + area?: ShallowReference; + /** + * Reference to bugs linked to test result. + */ + associatedBugs?: ShallowReference[]; + /** + * ID representing test method in a dll. + */ + automatedTestId?: string; + /** + * Fully qualified name of test executed. + */ + automatedTestName?: string; + /** + * Container to which test belongs. + */ + automatedTestStorage?: string; + /** + * Type of automated test. + */ + automatedTestType?: string; + /** + * TypeId of automated test. + */ + automatedTestTypeId?: string; + /** + * Shallow reference to build associated with test result. + */ + build?: ShallowReference; + /** + * Reference to build associated with test result. + */ + buildReference?: BuildReference; + /** + * Comment in a test result with maxSize= 1000 chars. + */ + comment?: string; + /** + * Time when test execution completed(UTC). Completed date should be greater than StartedDate. + */ + completedDate?: Date; + /** + * Machine name where test executed. + */ + computerName?: string; + /** + * Reference to test configuration. Type ShallowReference. + */ + configuration?: ShallowReference; + /** + * Timestamp when test result created(UTC). + */ + createdDate?: Date; + /** + * Additional properties of test result. + */ + customFields?: CustomTestField[]; + /** + * Duration of test execution in milliseconds. If not provided value will be set as CompletedDate - StartedDate + */ + durationInMs?: number; + /** + * Error message in test execution. + */ + errorMessage?: string; + /** + * Information when test results started failing. + */ + failingSince?: FailingSince; + /** + * Failure type of test result. Valid Value= (Known Issue, New Issue, Regression, Unknown, None) + */ + failureType?: string; + /** + * ID of a test result. + */ + id?: number; + /** + * Test result details of test iterations used only for Manual Testing. + */ + iterationDetails?: TestIterationDetailsModel[]; + /** + * Reference to identity last updated test result. + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last updated datetime of test result(UTC). + */ + lastUpdatedDate?: Date; + /** + * Test outcome of test result. Valid values = (Unspecified, None, Passed, Failed, Inconclusive, Timeout, Aborted, Blocked, NotExecuted, Warning, Error, NotApplicable, Paused, InProgress, NotImpacted) + */ + outcome?: string; + /** + * Reference to test owner. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Priority of test executed. + */ + priority?: number; + /** + * Reference to team project. + */ + project?: ShallowReference; + /** + * Shallow reference to release associated with test result. + */ + release?: ShallowReference; + /** + * Reference to release associated with test result. + */ + releaseReference?: ReleaseReference; + /** + * ResetCount. + */ + resetCount?: number; + /** + * Resolution state of test result. + */ + resolutionState?: string; + /** + * ID of resolution state. + */ + resolutionStateId?: number; + /** + * Hierarchy type of the result, default value of None means its leaf node. + */ + resultGroupType?: ResultGroupType; + /** + * Revision number of test result. + */ + revision?: number; + /** + * Reference to identity executed the test. + */ + runBy?: VSSInterfaces.IdentityRef; + /** + * Stacktrace with maxSize= 1000 chars. + */ + stackTrace?: string; + /** + * Time when test execution started(UTC). + */ + startedDate?: Date; + /** + * State of test result. Type TestRunState. + */ + state?: string; + /** + * List of sub results inside a test result, if ResultGroupType is not None, it holds corresponding type sub results. + */ + subResults?: TestSubResult[]; + /** + * Reference to the test executed. + */ + testCase?: ShallowReference; + /** + * Reference ID of test used by test result. Type TestResultMetaData + */ + testCaseReferenceId?: number; + /** + * TestCaseRevision Number. + */ + testCaseRevision?: number; + /** + * Name of test. + */ + testCaseTitle?: string; + /** + * Reference to test plan test case workitem is part of. + */ + testPlan?: ShallowReference; + /** + * Reference to the test point executed. + */ + testPoint?: ShallowReference; + /** + * Reference to test run. + */ + testRun?: ShallowReference; + /** + * Reference to test suite test case workitem is part of. + */ + testSuite?: ShallowReference; + /** + * Url of test result. + */ + url?: string; +} +/** + * Test attachment information in a test iteration. + */ +export interface TestCaseResultAttachmentModel { + /** + * Path identifier test step in test case workitem. + */ + actionPath?: string; + /** + * Attachment ID. + */ + id: number; + /** + * Iteration ID. + */ + iterationId: number; + /** + * Name of attachment. + */ + name: string; + /** + * Attachment size. + */ + size: number; + /** + * Url to attachment. + */ + url: string; +} +export interface TestCaseResultIdAndRev { + id?: LegacyTestCaseResultIdentifier; + revision?: number; +} +/** + * Reference to a test result. + */ +export interface TestCaseResultIdentifier { + /** + * Test result ID. + */ + testResultId: number; + /** + * Test run ID. + */ + testRunId: number; +} +export interface TestCaseResultUpdateModel { + associatedWorkItems?: number[]; + automatedTestTypeId?: string; + comment?: string; + completedDate?: string; + computerName?: string; + customFields?: CustomTestField[]; + durationInMs?: string; + errorMessage?: string; + failureType?: string; + outcome?: string; + owner?: VSSInterfaces.IdentityRef; + resolutionState?: string; + runBy?: VSSInterfaces.IdentityRef; + stackTrace?: string; + startedDate?: string; + state?: string; + testCasePriority?: string; + testResult?: ShallowReference; +} +/** + * Test configuration + */ +export interface TestConfiguration { + /** + * Area of the configuration + */ + area?: ShallowReference; + /** + * Description of the configuration + */ + description?: string; + /** + * Id of the configuration + */ + id: number; + /** + * Is the configuration a default for the test plans + */ + isDefault?: boolean; + /** + * Last Updated By Reference + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last Updated Data + */ + lastUpdatedDate?: Date; + /** + * Name of the configuration + */ + name: string; + /** + * Project to which the configuration belongs + */ + project?: ShallowReference; + /** + * Revision of the the configuration + */ + revision?: number; + /** + * State of the configuration + */ + state?: TestConfigurationState; + /** + * Url of Configuration Resource + */ + url?: string; + /** + * Dictionary of Test Variable, Selected Value + */ + values?: NameValuePair[]; +} +/** + * Represents the state of an ITestConfiguration object. + */ +export declare enum TestConfigurationState { + /** + * The configuration can be used for new test runs. + */ + Active = 1, + /** + * The configuration has been retired and should not be used for new test runs. + */ + Inactive = 2 +} +/** + * Test environment Detail. + */ +export interface TestEnvironment { + /** + * Test Environment Id. + */ + environmentId: string; + /** + * Test Environment Name. + */ + environmentName: string; +} +export interface TestExecutionReportData { + reportData?: DatedTestFieldData[]; +} +export interface TestExtensionField { + field?: TestExtensionFieldDetails; + value?: any; +} +export interface TestExtensionFieldDetails { + id?: number; + isResultScoped?: boolean; + isRunScoped?: boolean; + isSystemField?: boolean; + name?: string; + type?: SystemData.SqlDbType; +} +export interface TestFailureDetails { + count?: number; + testResults?: TestCaseResultIdentifier[]; +} +export interface TestFailuresAnalysis { + existingFailures?: TestFailureDetails; + fixedTests?: TestFailureDetails; + newFailures?: TestFailureDetails; + previousContext?: TestResultsContext; +} +export interface TestFailureType { + id: number; + name: string; + project: ShallowReference; +} +export interface TestFieldData { + dimensions?: { + [key: string]: any; + }; + measure?: number; +} +export interface TestFieldsEx2 { + fieldId?: number; + fieldName?: string; + fieldType?: number; + isResultScoped?: boolean; + isRunScoped?: boolean; + isSystemField?: boolean; + projectId?: string; +} +/** + * Test Flaky Identifier + */ +export interface TestFlakyIdentifier { + /** + * Branch Name where Flakiness has to be Marked/Unmarked + */ + branchName: string; + /** + * State for Flakiness + */ + isFlaky: boolean; +} +/** + * Filter to get TestCase result history. + */ +export interface TestHistoryQuery { + /** + * Automated test name of the TestCase. + */ + automatedTestName: string; + /** + * Results to be get for a particular branches. + */ + branch?: string; + /** + * Get the results history only for this BuildDefinitionId. This to get used in query GroupBy should be Branch. If this is provided, Branch will have no use. + */ + buildDefinitionId?: number; + /** + * It will be filled by server. If not null means there are some results still to be get, and we need to call this REST API with this ContinuousToken. It is not supposed to be created (or altered, if received from server in last batch) by user. + */ + continuationToken?: string; + /** + * Group the result on the basis of TestResultGroupBy. This can be Branch, Environment or null(if results are fetched by BuildDefinitionId) + */ + groupBy: TestResultGroupBy; + /** + * History to get between time interval MaxCompleteDate and (MaxCompleteDate - TrendDays). Default is current date time. + */ + maxCompleteDate?: Date; + /** + * Get the results history only for this ReleaseEnvDefinitionId. This to get used in query GroupBy should be Environment. + */ + releaseEnvDefinitionId?: number; + /** + * List of TestResultHistoryForGroup which are grouped by GroupBy + */ + resultsForGroup?: TestResultHistoryForGroup[]; + /** + * Get the results history only for this testCaseId. This to get used in query to filter the result along with automatedtestname + */ + testCaseId?: number; + /** + * Number of days for which history to collect. Maximum supported value is 7 days. Default is 7 days. + */ + trendDays?: number; +} +/** + * Represents a test iteration result. + */ +export interface TestIterationDetailsModel { + /** + * Test step results in an iteration. + */ + actionResults?: TestActionResultModel[]; + /** + * Reference to attachments in test iteration result. + */ + attachments?: TestCaseResultAttachmentModel[]; + /** + * Comment in test iteration result. + */ + comment?: string; + /** + * Time when execution completed(UTC). + */ + completedDate?: Date; + /** + * Duration of execution. + */ + durationInMs?: number; + /** + * Error message in test iteration result execution. + */ + errorMessage?: string; + /** + * ID of test iteration result. + */ + id?: number; + /** + * Test outcome if test iteration result. + */ + outcome?: string; + /** + * Test parameters in an iteration. + */ + parameters?: TestResultParameterModel[]; + /** + * Time when execution started(UTC). + */ + startedDate?: Date; + /** + * Url to test iteration result. + */ + url?: string; +} +/** + * Represents Test Log Result object. + */ +export interface TestLog { + /** + * Test Log Context run, build + */ + logReference: TestLogReference; + /** + * Meta data for Log file + */ + metaData?: { + [key: string]: string; + }; + /** + * LastUpdatedDate for Log file + */ + modifiedOn?: Date; + /** + * Size in Bytes for Log file + */ + size?: number; +} +/** + * Test Log Reference object + */ +export interface TestLogReference { + /** + * BuildId for test log, if context is build + */ + buildId: number; + /** + * FileName for log file + */ + filePath: string; + /** + * ReleaseEnvId for test log, if context is Release + */ + releaseEnvId?: number; + /** + * ReleaseId for test log, if context is Release + */ + releaseId?: number; + /** + * Resultid for test log, if context is run and log is related to result + */ + resultId: number; + /** + * runid for test log, if context is run + */ + runId: number; + /** + * Test Log Scope + */ + scope: TestLogScope; + /** + * SubResultid for test log, if context is run and log is related to subresult + */ + subResultId: number; + /** + * Log Type + */ + type: TestLogType; +} +/** + * Test Log Context + */ +export declare enum TestLogScope { + /** + * Log file is associated with Run, result, subresult + */ + Run = 0, + /** + * Log File associated with Build + */ + Build = 1, + /** + * Log File associated with Release + */ + Release = 2 +} +/** + * Represents Test Log Status object. + */ +export interface TestLogStatus { + /** + * Exception message + */ + exception: string; + /** + * Test Log Status code + */ + status: TestLogStatusCode; + /** + * Blob Transfer Error code + */ + transferFailureType: string; +} +/** + * Test Log Status codes. + */ +export declare enum TestLogStatusCode { + /** + * Operation is successful + */ + Success = 0, + /** + * Operation failed + */ + Failed = 1, + /** + * Operation failed due to file already exist + */ + FileAlreadyExists = 2, + /** + * Invalid input provided by user + */ + InvalidInput = 3, + /** + * Invalid file name provided by user + */ + InvalidFileName = 4, + /** + * Error occurred while operating on container + */ + InvalidContainer = 5, + /** + * Blob Transfer Error + */ + TransferFailed = 6, + /** + * TestLogStore feature is not enabled + */ + FeatureDisabled = 7, + /** + * Build for which operation is requested does not exist + */ + BuildDoesNotExist = 8, + /** + * Run for which operation is requested does not exist + */ + RunDoesNotExist = 9, + /** + * Container cannot be created + */ + ContainerNotCreated = 10, + /** + * Api is not supported + */ + APINotSupported = 11, + /** + * File size is greater than the limitation + */ + FileSizeExceeds = 12, + /** + * Container is not found for which operation is requested + */ + ContainerNotFound = 13, + /** + * File cannot be found + */ + FileNotFound = 14, + /** + * Directory cannot be found + */ + DirectoryNotFound = 15, + /** + * Storage capacity exceeded + */ + StorageCapacityExceeded = 16 +} +/** + * Represents Test Log store endpoint details. + */ +export interface TestLogStoreEndpointDetails { + /** + * Test log store connection Uri. + */ + endpointSASUri?: string; + /** + * Test log store endpoint type. + */ + endpointType?: TestLogStoreEndpointType; + /** + * Test log store status code + */ + status?: TestLogStatusCode; +} +/** + * Specifies set of possible log store endpoint type. + */ +export declare enum TestLogStoreEndpointType { + /** + * Endpoint type is scoped to root + */ + Root = 1, + /** + * Endpoint type is scoped to file + */ + File = 2 +} +/** + * Specifies set of possible operation type on log store. + */ +export declare enum TestLogStoreOperationType { + /** + * Operation is scoped to read data only. + */ + Read = 1, + /** + * Operation is scoped to create data only. + */ + Create = 2, + /** + * Operation is scoped to read and create data. + */ + ReadAndCreate = 3 +} +/** + * Test Log Types + */ +export declare enum TestLogType { + /** + * Any gereric attachment. + */ + GeneralAttachment = 1, + /** + * Code Coverage files + */ + CodeCoverage = 2, + /** + * Test Impact details. + */ + TestImpact = 3, + /** + * Temporary files + */ + Intermediate = 4, + /** + * Subresult Attachment + */ + System = 5 +} +export interface TestMessageLog2 { + testMessageLogId?: number; +} +/** + * An abstracted reference to some other resource. This class is used to provide the build data contracts with a uniform way to reference other resources in a way that provides easy traversal through links. + */ +export interface TestMessageLogDetails { + /** + * Date when the resource is created + */ + dateCreated?: Date; + /** + * Id of the resource + */ + entryId?: number; + /** + * Message of the resource + */ + message?: string; +} +export interface TestMessageLogEntry { + dateCreated?: Date; + entryId?: number; + logLevel?: number; + logUser?: string; + logUserName?: string; + message?: string; + testMessageLogId?: number; +} +export interface TestMessageLogEntry2 { + dateCreated?: Date; + entryId?: number; + logLevel?: number; + logUser?: string; + message?: string; + testMessageLogId?: number; +} +export interface TestMethod { + container?: string; + name: string; +} +/** + * Class representing a reference to an operation. + */ +export interface TestOperationReference { + id?: string; + status?: string; + url?: string; +} +/** + * Valid TestOutcome values. + */ +export declare enum TestOutcome { + /** + * Only used during an update to preserve the existing value. + */ + Unspecified = 0, + /** + * Test has not been completed, or the test type does not report pass/failure. + */ + None = 1, + /** + * Test was executed w/o any issues. + */ + Passed = 2, + /** + * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. + */ + Failed = 3, + /** + * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... + */ + Inconclusive = 4, + /** + * The test timed out + */ + Timeout = 5, + /** + * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. + */ + Aborted = 6, + /** + * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. + */ + Blocked = 7, + /** + * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. + */ + NotExecuted = 8, + /** + * To be used by Run level results. This is not a failure. + */ + Warning = 9, + /** + * There was a system error while we were trying to execute a test. + */ + Error = 10, + /** + * Test is Not Applicable for execution. + */ + NotApplicable = 11, + /** + * Test is paused. + */ + Paused = 12, + /** + * Test is currently executing. Added this for TCM charts + */ + InProgress = 13, + /** + * Test is not impacted. Added fot TIA. + */ + NotImpacted = 14, + MaxValue = 14 +} +/** + * Test outcome settings + */ +export interface TestOutcomeSettings { + /** + * Value to configure how test outcomes for the same tests across suites are shown + */ + syncOutcomeAcrossSuites?: boolean; +} +export interface TestParameter2 { + actionPath?: string; + actual?: number[]; + creationDate?: Date; + dataType?: number; + dateModified?: Date; + expected?: number[]; + iterationId?: number; + parameterName?: string; + testResultId?: number; + testRunId?: number; +} +/** + * The test plan resource. + */ +export interface TestPlan { + /** + * Area of the test plan. + */ + area?: ShallowReference; + automatedTestEnvironment?: TestEnvironment; + automatedTestSettings?: TestSettings; + /** + * Build to be tested. + */ + build?: ShallowReference; + /** + * The Build Definition that generates a build associated with this test plan. + */ + buildDefinition?: ShallowReference; + clientUrl: string; + /** + * Description of the test plan. + */ + description?: string; + /** + * End date for the test plan. + */ + endDate?: Date; + /** + * ID of the test plan. + */ + id: number; + /** + * Iteration path of the test plan. + */ + iteration: string; + manualTestEnvironment?: TestEnvironment; + manualTestSettings?: TestSettings; + /** + * Name of the test plan. + */ + name: string; + /** + * Owner of the test plan. + */ + owner?: VSSInterfaces.IdentityRef; + previousBuild?: ShallowReference; + /** + * Project which contains the test plan. + */ + project?: ShallowReference; + /** + * Release Environment to be used to deploy the build and run automated tests from this test plan. + */ + releaseEnvironmentDefinition?: ReleaseEnvironmentDefinitionReference; + /** + * Revision of the test plan. + */ + revision?: number; + /** + * Root test suite of the test plan. + */ + rootSuite: ShallowReference; + /** + * Start date for the test plan. + */ + startDate?: Date; + /** + * State of the test plan. + */ + state?: string; + /** + * Value to configure how same tests across test suites under a test plan need to behave + */ + testOutcomeSettings?: TestOutcomeSettings; + updatedBy?: VSSInterfaces.IdentityRef; + updatedDate?: Date; + /** + * URL of the test plan resource. + */ + url?: string; +} +export interface TestPlanCloneRequest { + destinationTestPlan?: TestPlan; + options?: CloneOptions; + suiteIds?: number[]; +} +export interface TestPlanHubData { + selectedSuiteId: number; + testPlan: TestPlan; + testPoints: TestPoint[]; + testSuites: TestSuite[]; + totalTestPoints: number; +} +export interface TestPlansWithSelection { + lastSelectedPlan?: number; + lastSelectedSuite?: number; + plans: TestPlan[]; +} +/** + * Test point. + */ +export interface TestPoint { + /** + * AssignedTo. Type IdentityRef. + */ + assignedTo?: VSSInterfaces.IdentityRef; + /** + * Automated. + */ + automated?: boolean; + /** + * Comment associated with test point. + */ + comment?: string; + /** + * Configuration. Type ShallowReference. + */ + configuration: ShallowReference; + /** + * Failure type of test point. + */ + failureType?: string; + /** + * ID of the test point. + */ + id: number; + /** + * Last date when test point was reset to Active. + */ + lastResetToActive?: Date; + /** + * Last resolution state id of test point. + */ + lastResolutionStateId?: number; + /** + * Last result of test point. Type ShallowReference. + */ + lastResult?: ShallowReference; + /** + * Last result details of test point. Type LastResultDetails. + */ + lastResultDetails?: LastResultDetails; + /** + * Last result state of test point. + */ + lastResultState?: string; + /** + * LastRun build number of test point. + */ + lastRunBuildNumber?: string; + /** + * Last testRun of test point. Type ShallowReference. + */ + lastTestRun?: ShallowReference; + /** + * Test point last updated by. Type IdentityRef. + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last updated date of test point. + */ + lastUpdatedDate?: Date; + /** + * Outcome of test point. + */ + outcome: string; + /** + * Revision number. + */ + revision?: number; + /** + * State of test point. + */ + state?: string; + /** + * Suite of test point. Type ShallowReference. + */ + suite?: ShallowReference; + /** + * TestCase associated to test point. Type WorkItemReference. + */ + testCase: WorkItemReference; + /** + * TestPlan of test point. Type ShallowReference. + */ + testPlan?: ShallowReference; + /** + * Test point Url. + */ + url: string; + /** + * Work item properties of test point. + */ + workItemProperties: any[]; +} +export interface TestPointReference { + id: number; + state?: TestPointState; +} +export interface TestPointsEvent { + projectName?: string; + testPoints: TestPointReference[]; +} +/** + * Test point query class. + */ +export interface TestPointsQuery { + /** + * Order by results. + */ + orderBy?: string; + /** + * List of test points + */ + points?: TestPoint[]; + /** + * Filter + */ + pointsFilter?: PointsFilter; + /** + * List of workitem fields to get. + */ + witFields?: string[]; +} +export declare enum TestPointState { + /** + * Default + */ + None = 0, + /** + * The test point needs to be executed in order for the test pass to be considered complete. Either the test has not been run before or the previous run failed. + */ + Ready = 1, + /** + * The test has passed successfully and does not need to be re-run for the test pass to be considered complete. + */ + Completed = 2, + /** + * The test point needs to be executed but is not able to. + */ + NotReady = 3, + /** + * The test is being executed. + */ + InProgress = 4, + MaxValue = 4 +} +export interface TestPointsUpdatedEvent extends TestPointsEvent { +} +/** + * Test Resolution State Details. + */ +export interface TestResolutionState { + /** + * Test Resolution state Id. + */ + id: number; + /** + * Test Resolution State Name. + */ + name: string; + project: ShallowReference; +} +export interface TestResult2 { + afnStripId?: number; + computerName?: string; + creationDate?: Date; + dateCompleted?: Date; + dateStarted?: Date; + effectivePointState?: number; + failureType?: number; + lastUpdated?: Date; + lastUpdatedBy?: string; + outcome?: number; + owner?: string; + projectId?: string; + resetCount?: number; + resolutionStateId?: number; + revision?: number; + runBy?: string; + state?: number; + testCaseRefId?: number; + testResultId?: number; + testRunId?: number; +} +export interface TestResultAcrossProjectResponse { + projectName?: string; + testResult?: LegacyTestCaseResult; +} +export interface TestResultAttachment { + actionPath?: string; + attachmentType?: AttachmentType; + comment?: string; + creationDate?: Date; + downloadQueryString?: string; + fileName?: string; + id?: number; + isComplete?: boolean; + iterationId?: number; + length?: number; + sessionId?: number; + testResultId?: number; + testRunId?: number; + tmiRunId?: string; +} +export interface TestResultAttachmentIdentity { + attachmentId?: number; + sessionId?: number; + testResultId?: number; + testRunId?: number; +} +export interface TestResultCreateModel { + area?: ShallowReference; + associatedWorkItems?: number[]; + automatedTestId?: string; + automatedTestName?: string; + automatedTestStorage?: string; + automatedTestType?: string; + automatedTestTypeId?: string; + comment?: string; + completedDate?: string; + computerName?: string; + configuration?: ShallowReference; + customFields?: CustomTestField[]; + durationInMs?: string; + errorMessage?: string; + failureType?: string; + outcome?: string; + owner?: VSSInterfaces.IdentityRef; + resolutionState?: string; + runBy?: VSSInterfaces.IdentityRef; + stackTrace?: string; + startedDate?: string; + state?: string; + testCase?: ShallowReference; + testCasePriority?: string; + testCaseTitle?: string; + testPoint?: ShallowReference; +} +export interface TestResultDocument { + operationReference?: TestOperationReference; + payload?: TestResultPayload; +} +export interface TestResultFailuresAnalysis { + existingFailures?: TestFailureDetails; + fixedTests?: TestFailureDetails; + newFailures?: TestFailureDetails; +} +/** + * Group by for results + */ +export declare enum TestResultGroupBy { + /** + * Group the results by branches + */ + Branch = 1, + /** + * Group the results by environment + */ + Environment = 2 +} +export interface TestResultHistory { + groupByField?: string; + resultsForGroup?: TestResultHistoryDetailsForGroup[]; +} +export interface TestResultHistoryDetailsForGroup { + groupByValue?: any; + latestResult?: TestCaseResult; +} +/** + * List of test results filtered on the basis of GroupByValue + */ +export interface TestResultHistoryForGroup { + /** + * Display name of the group. + */ + displayName?: string; + /** + * Name or Id of the group identifier by which results are grouped together. + */ + groupByValue: string; + /** + * List of results for GroupByValue + */ + results?: TestCaseResult[]; +} +/** + * Represents a Meta Data of a test result. + */ +export interface TestResultMetaData { + /** + * AutomatedTestName of test result. + */ + automatedTestName?: string; + /** + * AutomatedTestStorage of test result. + */ + automatedTestStorage?: string; + /** + * List of Flaky Identifier for TestCaseReferenceId + */ + flakyIdentifiers?: TestFlakyIdentifier[]; + /** + * Owner of test result. + */ + owner?: string; + /** + * Priority of test result. + */ + priority?: number; + /** + * ID of TestCaseReference. + */ + testCaseReferenceId?: number; + /** + * TestCaseTitle of test result. + */ + testCaseTitle?: string; +} +/** + * Represents a TestResultMetaData Input + */ +export interface TestResultMetaDataUpdateInput { + /** + * List of Flaky Identifiers + */ + flakyIdentifiers?: TestFlakyIdentifier[]; +} +export interface TestResultMetaDataUpdateResponse { + status?: string; +} +export interface TestResultModelBase { + /** + * Comment in result. + */ + comment?: string; + /** + * Time when execution completed(UTC). + */ + completedDate?: Date; + /** + * Duration of execution. + */ + durationInMs?: number; + /** + * Error message in result. + */ + errorMessage?: string; + /** + * Test outcome of result. + */ + outcome?: string; + /** + * Time when execution started(UTC). + */ + startedDate?: Date; +} +export interface TestResultParameter { + actionPath?: string; + actual?: number[]; + expected?: number[]; + iterationId?: number; + parameterName?: string; + testResultId?: number; + testRunId?: number; +} +/** + * Test parameter information in a test iteration. + */ +export interface TestResultParameterModel { + /** + * Test step path where parameter is referenced. + */ + actionPath?: string; + /** + * Iteration ID. + */ + iterationId?: number; + /** + * Name of parameter. + */ + parameterName?: string; + /** + * This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1" + */ + stepIdentifier?: string; + /** + * Url of test parameter. Deprecated in hosted environment. + */ + url?: string; + /** + * Value of parameter. + */ + value?: string; +} +export interface TestResultPayload { + comment?: string; + name?: string; + stream?: string; +} +export interface TestResultReset2 { + auditIdentity?: string; + dateModified?: Date; + projectId?: string; + revision?: number; + testResultId?: number; + testResultRV?: number[]; + testRunId?: number; +} +export interface TestResultsContext { + build?: BuildReference; + contextType?: TestResultsContextType; + pipelineReference?: PipelineReference; + release?: ReleaseReference; +} +export declare enum TestResultsContextType { + Build = 1, + Release = 2, + Pipeline = 3 +} +export interface TestResultsDetails { + groupByField?: string; + resultsForGroup?: TestResultsDetailsForGroup[]; +} +export interface TestResultsDetailsForGroup { + groupByValue?: any; + results?: TestCaseResult[]; + resultsCountByOutcome?: { + [key: number]: AggregatedResultsByOutcome; + }; + tags?: string[]; +} +export interface TestResultsEx2 { + bitValue?: boolean; + creationDate?: Date; + dateTimeValue?: Date; + fieldId?: number; + fieldName?: string; + floatValue?: number; + guidValue?: string; + intValue?: number; + projectId?: string; + stringValue?: string; + testResultId?: number; + testRunId?: number; +} +export interface TestResultsGroupsForBuild { + /** + * BuildId for which groupby result is fetched. + */ + buildId: number; + /** + * The group by results + */ + fields?: FieldDetailsForTestResults[]; +} +export interface TestResultsGroupsForRelease { + /** + * The group by results + */ + fields?: FieldDetailsForTestResults[]; + /** + * Release Environment Id for which groupby result is fetched. + */ + releaseEnvId?: number; + /** + * ReleaseId for which groupby result is fetched. + */ + releaseId: number; +} +export interface TestResultsQuery { + fields?: string[]; + results?: TestCaseResult[]; + resultsFilter?: ResultsFilter; +} +export interface TestResultsSettings { + /** + * IsRequired and EmitDefaultValue are passed as false as if users doesn't pass anything, should not come for serialisation and deserialisation. + */ + flakySettings?: FlakySettings; + newTestResultLoggingSettings?: NewTestResultLoggingSettings; +} +export declare enum TestResultsSettingsType { + /** + * Returns All Test Settings. + */ + All = 1, + /** + * Returns Flaky Test Settings. + */ + Flaky = 2, + /** + * Returns whether to log new tests or not + */ + NewTestLogging = 3 +} +export interface TestResultSummary { + aggregatedResultsAnalysis?: AggregatedResultsAnalysis; + noConfigRunsCount?: number; + teamProject?: TfsCoreInterfaces.TeamProjectReference; + testFailures?: TestFailuresAnalysis; + testResultsContext?: TestResultsContext; + totalRunsCount?: number; +} +export interface TestResultsUpdateSettings { + /** + * FlakySettings defines Flaky Settings Data. + */ + flakySettings?: FlakySettings; + /** + * NewTestResultLoggingSettings defines the setting for logging new test results + */ + newTestResultLoggingSettings?: NewTestResultLoggingSettings; +} +export interface TestResultsWithWatermark { + changedDate?: Date; + pointsResults?: PointsResults2[]; + resultId?: number; + runId?: number; +} +export interface TestResultTrendFilter { + branchNames?: string[]; + buildCount?: number; + definitionIds: number[]; + envDefinitionIds?: number[]; + maxCompleteDate?: Date; + publishContext?: string; + testRunTitles?: string[]; + trendDays?: number; +} +/** + * Test run details. + */ +export interface TestRun { + /** + * Build associated with this test run. + */ + build?: ShallowReference; + /** + * Build configuration details associated with this test run. + */ + buildConfiguration?: BuildConfiguration; + /** + * Comments entered by those analyzing the run. + */ + comment?: string; + /** + * Completed date time of the run. + */ + completedDate?: Date; + /** + * Test Run Controller. + */ + controller?: string; + /** + * Test Run CreatedDate. + */ + createdDate?: Date; + /** + * List of Custom Fields for TestRun. + */ + customFields?: CustomTestField[]; + /** + * Drop Location for the test Run. + */ + dropLocation?: string; + dtlAutEnvironment?: ShallowReference; + dtlEnvironment?: ShallowReference; + dtlEnvironmentCreationDetails?: DtlEnvironmentDetails; + /** + * Due date and time for test run. + */ + dueDate?: Date; + /** + * Error message associated with the run. + */ + errorMessage?: string; + filter?: RunFilter; + /** + * ID of the test run. + */ + id: number; + /** + * Number of Incomplete Tests. + */ + incompleteTests?: number; + /** + * true if test run is automated, false otherwise. + */ + isAutomated: boolean; + /** + * The iteration to which the run belongs. + */ + iteration?: string; + /** + * Team foundation ID of the last updated the test run. + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last updated date and time + */ + lastUpdatedDate?: Date; + /** + * Name of the test run. + */ + name: string; + /** + * Number of Not Applicable Tests. + */ + notApplicableTests?: number; + /** + * Team Foundation ID of the owner of the runs. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Number of passed tests in the run + */ + passedTests?: number; + /** + * Phase/State for the testRun. + */ + phase?: string; + /** + * Reference of the pipeline to which this test run belongs. + */ + pipelineReference?: PipelineReference; + /** + * Test plan associated with this test run. + */ + plan?: ShallowReference; + /** + * Post Process State. + */ + postProcessState?: string; + /** + * Project associated with this run. + */ + project?: ShallowReference; + /** + * Release Reference for the Test Run. + */ + release?: ReleaseReference; + /** + * Release Environment Uri for TestRun. + */ + releaseEnvironmentUri?: string; + /** + * Release Uri for TestRun. + */ + releaseUri?: string; + revision?: number; + /** + * RunSummary by outcome. + */ + runStatistics?: RunStatistic[]; + /** + * Start date time of the run. + */ + startedDate?: Date; + /** + * The state of the run. Type TestRunState Valid states - Unspecified ,NotStarted, InProgress, Completed, Waiting, Aborted, NeedsInvestigation + */ + state?: string; + /** + * TestRun Substate. + */ + substate?: TestRunSubstate; + /** + * Tags attached with this test run. + */ + tags?: TestTag[]; + /** + * Test environment associated with the run. + */ + testEnvironment?: TestEnvironment; + testMessageLogId?: number; + testSettings?: ShallowReference; + /** + * Total tests in the run + */ + totalTests?: number; + /** + * Number of failed tests in the run. + */ + unanalyzedTests?: number; + /** + * Url of the test run + */ + url: string; + /** + * Web Access Url for TestRun. + */ + webAccessUrl?: string; +} +export interface TestRun2 { + buildConfigurationId?: number; + buildNumber?: string; + comment?: string; + completeDate?: Date; + controller?: string; + coverageId?: number; + creationDate?: Date; + deletedOn?: Date; + dropLocation?: string; + dueDate?: Date; + errorMessage?: string; + incompleteTests?: number; + isAutomated?: boolean; + isBvt?: boolean; + isMigrated?: boolean; + iterationId?: number; + lastUpdated?: Date; + lastUpdatedBy?: string; + legacySharePath?: string; + maxReservedResultId?: number; + notApplicableTests?: number; + owner?: string; + passedTests?: number; + postProcessState?: number; + projectId?: string; + publicTestSettingsId?: number; + releaseEnvironmentUri?: string; + releaseUri?: string; + revision?: number; + startDate?: Date; + state?: number; + testEnvironmentId?: string; + testMessageLogId?: number; + testPlanId?: number; + testRunContextId?: number; + testRunId?: number; + testSettingsId?: number; + title?: string; + totalTests?: number; + type?: number; + unanalyzedTests?: number; + version?: number; +} +export interface TestRunCanceledEvent extends TestRunEvent { +} +export interface TestRunContext2 { + buildRefId?: number; + projectId?: string; + releaseRefId?: number; + sourceWorkflow?: string; + testRunContextId?: number; +} +/** + * Test Run Code Coverage Details + */ +export interface TestRunCoverage { + /** + * Last Error + */ + lastError?: string; + /** + * List of Modules Coverage + */ + modules?: ModuleCoverage[]; + /** + * State + */ + state?: string; + /** + * Reference of test Run. + */ + testRun?: ShallowReference; +} +export interface TestRunCreatedEvent extends TestRunEvent { +} +export interface TestRunEvent { + testRun: TestRun; +} +export interface TestRunEx2 { + bitValue?: boolean; + createdDate?: Date; + dateTimeValue?: Date; + fieldId?: number; + fieldName?: string; + floatValue?: number; + guidValue?: string; + intValue?: number; + projectId?: string; + stringValue?: string; + testRunId?: number; +} +export interface TestRunExtended2 { + autEnvironmentUrl?: string; + csmContent?: string; + csmParameters?: string; + projectId?: string; + sourceFilter?: string; + subscriptionName?: string; + substate?: number; + testCaseFilter?: string; + testEnvironmentUrl?: string; + testRunId?: number; +} +/** + * The types of outcomes for test run. + */ +export declare enum TestRunOutcome { + /** + * Run with zero failed tests and has at least one impacted test + */ + Passed = 0, + /** + * Run with at-least one failed test. + */ + Failed = 1, + /** + * Run with no impacted tests. + */ + NotImpacted = 2, + /** + * Runs with All tests in other category. + */ + Others = 3 +} +/** + * The types of publish context for run. + */ +export declare enum TestRunPublishContext { + /** + * Run is published for Build Context. + */ + Build = 1, + /** + * Run is published for Release Context. + */ + Release = 2, + /** + * Run is published for any Context. + */ + All = 3 +} +export interface TestRunStartedEvent extends TestRunEvent { +} +/** + * The types of states for test run. + */ +export declare enum TestRunState { + /** + * Only used during an update to preserve the existing value. + */ + Unspecified = 0, + /** + * The run is still being created. No tests have started yet. + */ + NotStarted = 1, + /** + * Tests are running. + */ + InProgress = 2, + /** + * All tests have completed or been skipped. + */ + Completed = 3, + /** + * Run is stopped and remaining tests have been aborted + */ + Aborted = 4, + /** + * Run is currently initializing This is a legacy state and should not be used any more + */ + Waiting = 5, + /** + * Run requires investigation because of a test point failure This is a legacy state and should not be used any more + */ + NeedsInvestigation = 6 +} +/** + * Test run statistics. + */ +export interface TestRunStatistic { + run: ShallowReference; + runStatistics?: RunStatistic[]; +} +/** + * The types of sub states for test run. It gives the user more info about the test run beyond the high level test run state + */ +export declare enum TestRunSubstate { + /** + * Run with noState. + */ + None = 0, + /** + * Run state while Creating Environment. + */ + CreatingEnvironment = 1, + /** + * Run state while Running Tests. + */ + RunningTests = 2, + /** + * Run state while Creating Environment. + */ + CanceledByUser = 3, + /** + * Run state when it is Aborted By the System. + */ + AbortedBySystem = 4, + /** + * Run state when run has timedOut. + */ + TimedOut = 5, + /** + * Run state while Pending Analysis. + */ + PendingAnalysis = 6, + /** + * Run state after being Analysed. + */ + Analyzed = 7, + /** + * Run state when cancellation is in Progress. + */ + CancellationInProgress = 8 +} +export interface TestRunSummary2 { + isRerun?: boolean; + projectId?: string; + resultCount?: number; + resultDuration?: number; + runDuration?: number; + testOutcome?: number; + testRunCompletedDate?: Date; + testRunContextId?: number; + testRunId?: number; + testRunStatsId?: number; +} +export interface TestRunWithDtlEnvEvent extends TestRunEvent { + configurationIds: number[]; + mappedTestRunEventType: string; + runTimeout: any; + testConfigurationsMapping: string; +} +/** + * Test Session + */ +export interface TestSession { + /** + * Area path of the test session + */ + area?: ShallowReference; + /** + * Comments in the test session + */ + comment?: string; + /** + * Duration of the session + */ + endDate?: Date; + /** + * Id of the test session + */ + id: number; + /** + * Last Updated By Reference + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last updated date + */ + lastUpdatedDate?: Date; + /** + * Owner of the test session + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Project to which the test session belongs + */ + project?: ShallowReference; + /** + * Generic store for test session data + */ + propertyBag?: PropertyBag; + /** + * Revision of the test session + */ + revision?: number; + /** + * Source of the test session + */ + source?: TestSessionSource; + /** + * Start date + */ + startDate?: Date; + /** + * State of the test session + */ + state?: TestSessionState; + /** + * Title of the test session + */ + title: string; + /** + * Url of Test Session Resource + */ + url?: string; +} +export interface TestSessionExploredWorkItemReference extends TestSessionWorkItemReference { + /** + * Workitem references of workitems filed as a part of the current workitem exploration. + */ + associatedWorkItems?: TestSessionWorkItemReference[]; + /** + * Time when exploration of workitem ended. + */ + endTime?: Date; + /** + * Time when explore of workitem was started. + */ + startTime?: Date; +} +/** + * Represents the source from which the test session was created + */ +export declare enum TestSessionSource { + /** + * Source of test session uncertain as it is stale + */ + Unknown = 0, + /** + * The session was created from Microsoft Test Manager exploratory desktop tool. + */ + XTDesktop = 1, + /** + * The session was created from feedback client. + */ + FeedbackDesktop = 2, + /** + * The session was created from browser extension. + */ + XTWeb = 3, + /** + * The session was created from browser extension. + */ + FeedbackWeb = 4, + /** + * The session was created from web access using Microsoft Test Manager exploratory desktop tool. + */ + XTDesktop2 = 5, + /** + * To show sessions from all supported sources. + */ + SessionInsightsForAll = 6 +} +/** + * Represents the state of the test session. + */ +export declare enum TestSessionState { + /** + * Only used during an update to preserve the existing value. + */ + Unspecified = 0, + /** + * The session is still being created. + */ + NotStarted = 1, + /** + * The session is running. + */ + InProgress = 2, + /** + * The session has paused. + */ + Paused = 3, + /** + * The session has completed. + */ + Completed = 4, + /** + * This is required for Feedback session which are declined + */ + Declined = 5 +} +export interface TestSessionWorkItemReference { + /** + * Id of the workitem + */ + id: number; + /** + * Type of the workitem + */ + type?: string; +} +/** + * Represents the test settings of the run. Used to create test settings and fetch test settings + */ +export interface TestSettings { + /** + * Area path required to create test settings + */ + areaPath?: string; + /** + * Description of the test settings. Used in create test settings. + */ + description?: string; + /** + * Indicates if the tests settings is public or private.Used in create test settings. + */ + isPublic?: boolean; + /** + * Xml string of machine roles. Used in create test settings. + */ + machineRoles?: string; + /** + * Test settings content. + */ + testSettingsContent: string; + /** + * Test settings id. + */ + testSettingsId?: number; + /** + * Test settings name. + */ + testSettingsName: string; +} +/** + * Represents the test settings of the run. Used to create test settings and fetch test settings + */ +export interface TestSettings2 { + /** + * Area path required to create test settings + */ + areaPath?: string; + createdBy?: VSSInterfaces.IdentityRef; + createdDate?: Date; + /** + * Description of the test settings. Used in create test settings. + */ + description?: string; + /** + * Indicates if the tests settings is public or private.Used in create test settings. + */ + isPublic?: boolean; + lastUpdatedBy?: VSSInterfaces.IdentityRef; + lastUpdatedDate?: Date; + /** + * Xml string of machine roles. Used in create test settings. + */ + machineRoles?: string; + /** + * Test settings content. + */ + testSettingsContent: string; + /** + * Test settings id. + */ + testSettingsId?: number; + /** + * Test settings name. + */ + testSettingsName: string; +} +export interface TestSettingsMachineRole { + isExecution?: boolean; + name?: string; +} +/** + * Represents a sub result of a test result. + */ +export interface TestSubResult { + /** + * Comment in sub result. + */ + comment?: string; + /** + * Time when test execution completed(UTC). + */ + completedDate?: Date; + /** + * Machine where test executed. + */ + computerName?: string; + /** + * Reference to test configuration. + */ + configuration?: ShallowReference; + /** + * Additional properties of sub result. + */ + customFields?: CustomTestField[]; + /** + * Name of sub result. + */ + displayName?: string; + /** + * Duration of test execution. + */ + durationInMs?: number; + /** + * Error message in sub result. + */ + errorMessage?: string; + /** + * ID of sub result. + */ + id?: number; + /** + * Time when result last updated(UTC). + */ + lastUpdatedDate?: Date; + /** + * Outcome of sub result. + */ + outcome?: string; + /** + * Immediate parent ID of sub result. + */ + parentId?: number; + /** + * Hierarchy type of the result, default value of None means its leaf node. + */ + resultGroupType?: ResultGroupType; + /** + * Index number of sub result. + */ + sequenceId?: number; + /** + * Stacktrace. + */ + stackTrace?: string; + /** + * Time when test execution started(UTC). + */ + startedDate?: Date; + /** + * List of sub results inside a sub result, if ResultGroupType is not None, it holds corresponding type sub results. + */ + subResults?: TestSubResult[]; + /** + * Reference to test result. + */ + testResult?: TestCaseResultIdentifier; + /** + * Url of sub result. + */ + url?: string; +} +/** + * Test suite + */ +export interface TestSuite { + /** + * Area uri of the test suite. + */ + areaUri?: string; + /** + * Child test suites of current test suite. + */ + children?: TestSuite[]; + /** + * Test suite default configuration. + */ + defaultConfigurations?: ShallowReference[]; + /** + * Test suite default testers. + */ + defaultTesters?: ShallowReference[]; + /** + * Id of test suite. + */ + id: number; + /** + * Default configuration was inherited or not. + */ + inheritDefaultConfigurations?: boolean; + /** + * Last error for test suite. + */ + lastError?: string; + /** + * Last populated date. + */ + lastPopulatedDate?: Date; + /** + * IdentityRef of user who has updated test suite recently. + */ + lastUpdatedBy?: VSSInterfaces.IdentityRef; + /** + * Last update date. + */ + lastUpdatedDate?: Date; + /** + * Name of test suite. + */ + name: string; + /** + * Test suite parent shallow reference. + */ + parent?: ShallowReference; + /** + * Test plan to which the test suite belongs. + */ + plan: ShallowReference; + /** + * Test suite project shallow reference. + */ + project?: ShallowReference; + /** + * Test suite query string, for dynamic suites. + */ + queryString?: string; + /** + * Test suite requirement id. + */ + requirementId?: number; + /** + * Test suite revision. + */ + revision?: number; + /** + * State of test suite. + */ + state?: string; + /** + * List of shallow reference of suites. + */ + suites?: ShallowReference[]; + /** + * Test suite type. + */ + suiteType?: string; + /** + * Test cases count. + */ + testCaseCount?: number; + /** + * Test case url. + */ + testCasesUrl?: string; + /** + * Used in tree view. If test suite is root suite then, it is name of plan otherwise title of the suite. + */ + text?: string; + /** + * Url of test suite. + */ + url?: string; +} +/** + * Test suite clone request + */ +export interface TestSuiteCloneRequest { + /** + * Clone options for cloning the test suite. + */ + cloneOptions?: CloneOptions; + /** + * Suite id under which, we have to clone the suite. + */ + destinationSuiteId?: number; + /** + * Destination suite project name. + */ + destinationSuiteProjectName?: string; +} +export interface TestSummaryForWorkItem { + summary?: AggregatedDataForResultTrend; + workItem: WorkItemReference; +} +/** + * Tag attached to a run or result. + */ +export interface TestTag { + /** + * Name of the tag, alphanumeric value less than 30 chars + */ + name: string; +} +/** + * Test tag summary for build or release grouped by test run. + */ +export interface TestTagSummary { + /** + * Dictionary which contains tags associated with a test run. + */ + tagsGroupByTestArtifact?: { + [key: number]: TestTag[]; + }; +} +/** + * Tags to update to a run or result. + */ +export interface TestTagsUpdateModel { + tags?: { + key: OperationType; + value: TestTag[]; + }[]; +} +export interface TestToWorkItemLinks { + test: TestMethod; + workItems?: WorkItemReference[]; +} +export interface TestVariable { + /** + * Description of the test variable + */ + description?: string; + /** + * Id of the test variable + */ + id: number; + /** + * Name of the test variable + */ + name: string; + /** + * Project to which the test variable belongs + */ + project?: ShallowReference; + /** + * Revision + */ + revision?: number; + /** + * Url of the test variable + */ + url?: string; + /** + * List of allowed values + */ + values?: string[]; +} +export interface UpdatedProperties { + id?: number; + lastUpdated?: Date; + lastUpdatedBy?: string; + lastUpdatedByName?: string; + revision?: number; +} +export interface UpdateTestRunRequest { + attachmentsToAdd?: TestResultAttachment[]; + attachmentsToDelete?: TestResultAttachmentIdentity[]; + projectName?: string; + shouldHyderate?: boolean; + testRun?: LegacyTestRun; +} +export interface UpdateTestRunResponse { + attachmentIds?: number[]; + updatedProperties?: UpdatedProperties; +} +export interface UploadAttachmentsRequest { + attachments?: HttpPostedTcmAttachment[]; + requestParams?: { + [key: string]: string; + }; +} +/** + * WorkItem reference Details. + */ +export interface WorkItemReference { + /** + * WorkItem Id. + */ + id?: string; + /** + * WorkItem Name. + */ + name?: string; + /** + * WorkItem Type. + */ + type?: string; + /** + * WorkItem Url. Valid Values : (Bug, Task, User Story, Test Case) + */ + url?: string; + /** + * WorkItem WebUrl. + */ + webUrl?: string; +} +export interface WorkItemToTestLinks { + executedIn?: Service; + tests?: TestMethod[]; + workItem: WorkItemReference; +} +export declare var TypeInfo: { + AfnStrip: any; + AggregatedDataForResultTrend: any; + AggregatedResultDetailsByOutcome: any; + AggregatedResultsAnalysis: any; + AggregatedResultsByOutcome: any; + AggregatedRunsByOutcome: any; + AggregatedRunsByState: any; + AttachmentType: { + enumValues: { + "generalAttachment": number; + "afnStrip": number; + "bugFilingData": number; + "codeCoverage": number; + "intermediateCollectorData": number; + "runConfig": number; + "testImpactDetails": number; + "tmiTestRunDeploymentFiles": number; + "tmiTestRunReverseDeploymentFiles": number; + "tmiTestResultDetail": number; + "tmiTestRunSummary": number; + "consoleLog": number; + }; + }; + BatchResponse: any; + BuildConfiguration: any; + BuildCoverage: any; + BuildReference2: any; + BulkResultUpdateRequest: any; + CloneOperationInformation: any; + CloneOperationState: { + enumValues: { + "failed": number; + "inProgress": number; + "queued": number; + "succeeded": number; + }; + }; + CodeCoverageSummary: any; + Coverage2: any; + CoverageQueryFlags: { + enumValues: { + "modules": number; + "functions": number; + "blockData": number; + }; + }; + CoverageStatus: { + enumValues: { + "covered": number; + "notCovered": number; + "partiallyCovered": number; + }; + }; + CoverageSummaryStatus: { + enumValues: { + "none": number; + "inProgress": number; + "completed": number; + "finalized": number; + "pending": number; + "updateRequestQueued": number; + }; + }; + CreateTestMessageLogEntryRequest: any; + CreateTestResultsRequest: any; + CreateTestRunRequest: any; + CustomTestFieldDefinition: any; + CustomTestFieldScope: { + enumValues: { + "none": number; + "testRun": number; + "testResult": number; + "system": number; + "all": number; + }; + }; + CustomTestFieldType: { + enumValues: { + "bit": number; + "dateTime": number; + "int": number; + "float": number; + "string": number; + "guid": number; + }; + }; + DatedTestFieldData: any; + FailingSince: any; + FetchTestResultsResponse: any; + FlakyDetection: any; + FlakyDetectionType: { + enumValues: { + "custom": number; + "system": number; + }; + }; + FlakySettings: any; + LastResultDetails: any; + LegacyBuildConfiguration: any; + LegacyReleaseReference: any; + LegacyTestCaseResult: any; + LegacyTestRun: any; + LegacyTestSettings: any; + Metrics: { + enumValues: { + "all": number; + "resultSummary": number; + "resultsAnalysis": number; + "runSummary": number; + }; + }; + OperationType: { + enumValues: { + "add": number; + "delete": number; + }; + }; + PipelineTestMetrics: any; + PointLastResult: any; + PointsResults2: any; + QueryTestActionResultResponse: any; + ReleaseReference: any; + ReleaseReference2: any; + RequirementsToTestsMapping2: any; + Response: any; + ResultDetails: { + enumValues: { + "none": number; + "iterations": number; + "workItems": number; + "subResults": number; + "point": number; + }; + }; + ResultGroupType: { + enumValues: { + "none": number; + "rerun": number; + "dataDriven": number; + "orderedTest": number; + "generic": number; + }; + }; + ResultMetadata: { + enumValues: { + "rerun": number; + "flaky": number; + }; + }; + ResultMetaDataDetails: { + enumValues: { + "none": number; + "flakyIdentifiers": number; + }; + }; + ResultObjectType: { + enumValues: { + "testSuite": number; + "testPlan": number; + }; + }; + ResultRetentionSettings: any; + ResultsByQueryResponse: any; + ResultsFilter: any; + ResultsSummaryByOutcome: any; + ResultSummary: any; + ResultUpdateRequest: any; + ResultUpdateRequestModel: any; + ResultUpdateResponse: any; + RunCreateModel: any; + RunStatistic: any; + RunSummary: any; + RunSummaryModel: any; + RunType: { + enumValues: { + "unspecified": number; + "normal": number; + "blocking": number; + "web": number; + "mtrRunInitiatedFromWeb": number; + "runWithDtlEnv": number; + "noConfigRun": number; + }; + }; + RunUpdateModel: any; + Service: { + enumValues: { + "any": number; + "tcm": number; + "tfs": number; + }; + }; + SuiteExpand: { + enumValues: { + "children": number; + "defaultTesters": number; + }; + }; + TCMServiceDataMigrationStatus: { + enumValues: { + "notStarted": number; + "inProgress": number; + "completed": number; + "failed": number; + }; + }; + TestActionResult: any; + TestActionResult2: any; + TestActionResultModel: any; + TestAttachment: any; + TestAuthoringDetails: any; + TestCaseReference2: any; + TestCaseResult: any; + TestConfiguration: any; + TestConfigurationState: { + enumValues: { + "active": number; + "inactive": number; + }; + }; + TestExecutionReportData: any; + TestExtensionField: any; + TestExtensionFieldDetails: any; + TestFailuresAnalysis: any; + TestHistoryQuery: any; + TestIterationDetailsModel: any; + TestLog: any; + TestLogReference: any; + TestLogScope: { + enumValues: { + "run": number; + "build": number; + "release": number; + }; + }; + TestLogStatus: any; + TestLogStatusCode: { + enumValues: { + "success": number; + "failed": number; + "fileAlreadyExists": number; + "invalidInput": number; + "invalidFileName": number; + "invalidContainer": number; + "transferFailed": number; + "featureDisabled": number; + "buildDoesNotExist": number; + "runDoesNotExist": number; + "containerNotCreated": number; + "apiNotSupported": number; + "fileSizeExceeds": number; + "containerNotFound": number; + "fileNotFound": number; + "directoryNotFound": number; + "storageCapacityExceeded": number; + }; + }; + TestLogStoreEndpointDetails: any; + TestLogStoreEndpointType: { + enumValues: { + "root": number; + "file": number; + }; + }; + TestLogStoreOperationType: { + enumValues: { + "read": number; + "create": number; + "readAndCreate": number; + }; + }; + TestLogType: { + enumValues: { + "generalAttachment": number; + "codeCoverage": number; + "testImpact": number; + "intermediate": number; + "system": number; + }; + }; + TestMessageLogDetails: any; + TestMessageLogEntry: any; + TestMessageLogEntry2: any; + TestOutcome: { + enumValues: { + "unspecified": number; + "none": number; + "passed": number; + "failed": number; + "inconclusive": number; + "timeout": number; + "aborted": number; + "blocked": number; + "notExecuted": number; + "warning": number; + "error": number; + "notApplicable": number; + "paused": number; + "inProgress": number; + "notImpacted": number; + "maxValue": number; + }; + }; + TestParameter2: any; + TestPlan: any; + TestPlanCloneRequest: any; + TestPlanHubData: any; + TestPlansWithSelection: any; + TestPoint: any; + TestPointReference: any; + TestPointsEvent: any; + TestPointsQuery: any; + TestPointState: { + enumValues: { + "none": number; + "ready": number; + "completed": number; + "notReady": number; + "inProgress": number; + "maxValue": number; + }; + }; + TestPointsUpdatedEvent: any; + TestResult2: any; + TestResultAcrossProjectResponse: any; + TestResultAttachment: any; + TestResultGroupBy: { + enumValues: { + "branch": number; + "environment": number; + }; + }; + TestResultHistory: any; + TestResultHistoryDetailsForGroup: any; + TestResultHistoryForGroup: any; + TestResultModelBase: any; + TestResultReset2: any; + TestResultsContext: any; + TestResultsContextType: { + enumValues: { + "build": number; + "release": number; + "pipeline": number; + }; + }; + TestResultsDetails: any; + TestResultsDetailsForGroup: any; + TestResultsEx2: any; + TestResultsQuery: any; + TestResultsSettings: any; + TestResultsSettingsType: { + enumValues: { + "all": number; + "flaky": number; + "newTestLogging": number; + }; + }; + TestResultSummary: any; + TestResultsUpdateSettings: any; + TestResultsWithWatermark: any; + TestResultTrendFilter: any; + TestRun: any; + TestRun2: any; + TestRunCanceledEvent: any; + TestRunCreatedEvent: any; + TestRunEvent: any; + TestRunEx2: any; + TestRunOutcome: { + enumValues: { + "passed": number; + "failed": number; + "notImpacted": number; + "others": number; + }; + }; + TestRunPublishContext: { + enumValues: { + "build": number; + "release": number; + "all": number; + }; + }; + TestRunStartedEvent: any; + TestRunState: { + enumValues: { + "unspecified": number; + "notStarted": number; + "inProgress": number; + "completed": number; + "aborted": number; + "waiting": number; + "needsInvestigation": number; + }; + }; + TestRunStatistic: any; + TestRunSubstate: { + enumValues: { + "none": number; + "creatingEnvironment": number; + "runningTests": number; + "canceledByUser": number; + "abortedBySystem": number; + "timedOut": number; + "pendingAnalysis": number; + "analyzed": number; + "cancellationInProgress": number; + }; + }; + TestRunSummary2: any; + TestRunWithDtlEnvEvent: any; + TestSession: any; + TestSessionExploredWorkItemReference: any; + TestSessionSource: { + enumValues: { + "unknown": number; + "xtDesktop": number; + "feedbackDesktop": number; + "xtWeb": number; + "feedbackWeb": number; + "xtDesktop2": number; + "sessionInsightsForAll": number; + }; + }; + TestSessionState: { + enumValues: { + "unspecified": number; + "notStarted": number; + "inProgress": number; + "paused": number; + "completed": number; + "declined": number; + }; + }; + TestSettings2: any; + TestSubResult: any; + TestSuite: any; + TestSummaryForWorkItem: any; + UpdatedProperties: any; + UpdateTestRunRequest: any; + UpdateTestRunResponse: any; + WorkItemToTestLinks: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/TestInterfaces.js b/node_modules/azure-devops-node-api/interfaces/TestInterfaces.js new file mode 100644 index 0000000..970cbeb --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/TestInterfaces.js @@ -0,0 +1,2289 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const SystemData = require("../interfaces/common/SystemDataInterfaces"); +const TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +/** + * The types of test attachments. + */ +var AttachmentType; +(function (AttachmentType) { + /** + * Attachment type GeneralAttachment , use this as default type unless you have other type. + */ + AttachmentType[AttachmentType["GeneralAttachment"] = 0] = "GeneralAttachment"; + AttachmentType[AttachmentType["AfnStrip"] = 1] = "AfnStrip"; + AttachmentType[AttachmentType["BugFilingData"] = 2] = "BugFilingData"; + /** + * Attachment type CodeCoverage. + */ + AttachmentType[AttachmentType["CodeCoverage"] = 3] = "CodeCoverage"; + AttachmentType[AttachmentType["IntermediateCollectorData"] = 4] = "IntermediateCollectorData"; + AttachmentType[AttachmentType["RunConfig"] = 5] = "RunConfig"; + AttachmentType[AttachmentType["TestImpactDetails"] = 6] = "TestImpactDetails"; + AttachmentType[AttachmentType["TmiTestRunDeploymentFiles"] = 7] = "TmiTestRunDeploymentFiles"; + AttachmentType[AttachmentType["TmiTestRunReverseDeploymentFiles"] = 8] = "TmiTestRunReverseDeploymentFiles"; + AttachmentType[AttachmentType["TmiTestResultDetail"] = 9] = "TmiTestResultDetail"; + AttachmentType[AttachmentType["TmiTestRunSummary"] = 10] = "TmiTestRunSummary"; + /** + * Attachment type ConsoleLog. + */ + AttachmentType[AttachmentType["ConsoleLog"] = 11] = "ConsoleLog"; +})(AttachmentType = exports.AttachmentType || (exports.AttachmentType = {})); +/** + * Enum of type Clone Operation Type. + */ +var CloneOperationState; +(function (CloneOperationState) { + /** + * value for Failed State + */ + CloneOperationState[CloneOperationState["Failed"] = 2] = "Failed"; + /** + * value for Inprogress state + */ + CloneOperationState[CloneOperationState["InProgress"] = 1] = "InProgress"; + /** + * Value for Queued State + */ + CloneOperationState[CloneOperationState["Queued"] = 0] = "Queued"; + /** + * value for Success state + */ + CloneOperationState[CloneOperationState["Succeeded"] = 3] = "Succeeded"; +})(CloneOperationState = exports.CloneOperationState || (exports.CloneOperationState = {})); +/** + * Used to choose which coverage data is returned by a QueryXXXCoverage() call. + */ +var CoverageQueryFlags; +(function (CoverageQueryFlags) { + /** + * If set, the Coverage.Modules property will be populated. + */ + CoverageQueryFlags[CoverageQueryFlags["Modules"] = 1] = "Modules"; + /** + * If set, the ModuleCoverage.Functions properties will be populated. + */ + CoverageQueryFlags[CoverageQueryFlags["Functions"] = 2] = "Functions"; + /** + * If set, the ModuleCoverage.CoverageData field will be populated. + */ + CoverageQueryFlags[CoverageQueryFlags["BlockData"] = 4] = "BlockData"; +})(CoverageQueryFlags = exports.CoverageQueryFlags || (exports.CoverageQueryFlags = {})); +var CoverageStatus; +(function (CoverageStatus) { + CoverageStatus[CoverageStatus["Covered"] = 0] = "Covered"; + CoverageStatus[CoverageStatus["NotCovered"] = 1] = "NotCovered"; + CoverageStatus[CoverageStatus["PartiallyCovered"] = 2] = "PartiallyCovered"; +})(CoverageStatus = exports.CoverageStatus || (exports.CoverageStatus = {})); +/** + * Represents status of code coverage summary for a build + */ +var CoverageSummaryStatus; +(function (CoverageSummaryStatus) { + /** + * No coverage status + */ + CoverageSummaryStatus[CoverageSummaryStatus["None"] = 0] = "None"; + /** + * The summary evaluation is in progress + */ + CoverageSummaryStatus[CoverageSummaryStatus["InProgress"] = 1] = "InProgress"; + /** + * The summary evaluation for the previous request is completed. Summary can change in future + */ + CoverageSummaryStatus[CoverageSummaryStatus["Completed"] = 2] = "Completed"; + /** + * The summary evaluation is finalized and won't change + */ + CoverageSummaryStatus[CoverageSummaryStatus["Finalized"] = 3] = "Finalized"; + /** + * The summary evaluation is pending + */ + CoverageSummaryStatus[CoverageSummaryStatus["Pending"] = 4] = "Pending"; + /** + * Summary evaluation may be ongoing but another merge has been requested. + */ + CoverageSummaryStatus[CoverageSummaryStatus["UpdateRequestQueued"] = 5] = "UpdateRequestQueued"; +})(CoverageSummaryStatus = exports.CoverageSummaryStatus || (exports.CoverageSummaryStatus = {})); +var CustomTestFieldScope; +(function (CustomTestFieldScope) { + CustomTestFieldScope[CustomTestFieldScope["None"] = 0] = "None"; + CustomTestFieldScope[CustomTestFieldScope["TestRun"] = 1] = "TestRun"; + CustomTestFieldScope[CustomTestFieldScope["TestResult"] = 2] = "TestResult"; + CustomTestFieldScope[CustomTestFieldScope["System"] = 4] = "System"; + CustomTestFieldScope[CustomTestFieldScope["All"] = 7] = "All"; +})(CustomTestFieldScope = exports.CustomTestFieldScope || (exports.CustomTestFieldScope = {})); +var CustomTestFieldType; +(function (CustomTestFieldType) { + CustomTestFieldType[CustomTestFieldType["Bit"] = 2] = "Bit"; + CustomTestFieldType[CustomTestFieldType["DateTime"] = 4] = "DateTime"; + CustomTestFieldType[CustomTestFieldType["Int"] = 8] = "Int"; + CustomTestFieldType[CustomTestFieldType["Float"] = 6] = "Float"; + CustomTestFieldType[CustomTestFieldType["String"] = 12] = "String"; + CustomTestFieldType[CustomTestFieldType["Guid"] = 14] = "Guid"; +})(CustomTestFieldType = exports.CustomTestFieldType || (exports.CustomTestFieldType = {})); +var FlakyDetectionType; +(function (FlakyDetectionType) { + /** + * Custom defines manual detection type. + */ + FlakyDetectionType[FlakyDetectionType["Custom"] = 1] = "Custom"; + /** + * Defines System detection type. + */ + FlakyDetectionType[FlakyDetectionType["System"] = 2] = "System"; +})(FlakyDetectionType = exports.FlakyDetectionType || (exports.FlakyDetectionType = {})); +/** + * Test summary metrics. + */ +var Metrics; +(function (Metrics) { + /** + * To get results of all matrix. + */ + Metrics[Metrics["All"] = 1] = "All"; + /** + * Get results summary by results outcome + */ + Metrics[Metrics["ResultSummary"] = 2] = "ResultSummary"; + /** + * Get results analysis which include failure analysis, increase/decrease in results count analysis. + */ + Metrics[Metrics["ResultsAnalysis"] = 3] = "ResultsAnalysis"; + /** + * Get runs summary + */ + Metrics[Metrics["RunSummary"] = 4] = "RunSummary"; +})(Metrics = exports.Metrics || (exports.Metrics = {})); +var OperationType; +(function (OperationType) { + OperationType[OperationType["Add"] = 1] = "Add"; + OperationType[OperationType["Delete"] = 2] = "Delete"; +})(OperationType = exports.OperationType || (exports.OperationType = {})); +/** + * Additional details with test result + */ +var ResultDetails; +(function (ResultDetails) { + /** + * Core fields of test result. Core fields includes State, Outcome, Priority, AutomatedTestName, AutomatedTestStorage, Comments, ErrorMessage etc. + */ + ResultDetails[ResultDetails["None"] = 0] = "None"; + /** + * Test iteration details in a test result. + */ + ResultDetails[ResultDetails["Iterations"] = 1] = "Iterations"; + /** + * Workitems associated with a test result. + */ + ResultDetails[ResultDetails["WorkItems"] = 2] = "WorkItems"; + /** + * Subresults in a test result. + */ + ResultDetails[ResultDetails["SubResults"] = 4] = "SubResults"; + /** + * Point and plan detail in a test result. + */ + ResultDetails[ResultDetails["Point"] = 8] = "Point"; +})(ResultDetails = exports.ResultDetails || (exports.ResultDetails = {})); +/** + * Hierarchy type of the result/subresults. + */ +var ResultGroupType; +(function (ResultGroupType) { + /** + * Leaf node of test result. + */ + ResultGroupType[ResultGroupType["None"] = 0] = "None"; + /** + * Hierarchy type of test result. + */ + ResultGroupType[ResultGroupType["Rerun"] = 1] = "Rerun"; + /** + * Hierarchy type of test result. + */ + ResultGroupType[ResultGroupType["DataDriven"] = 2] = "DataDriven"; + /** + * Hierarchy type of test result. + */ + ResultGroupType[ResultGroupType["OrderedTest"] = 3] = "OrderedTest"; + /** + * Unknown hierarchy type. + */ + ResultGroupType[ResultGroupType["Generic"] = 4] = "Generic"; +})(ResultGroupType = exports.ResultGroupType || (exports.ResultGroupType = {})); +var ResultMetadata; +(function (ResultMetadata) { + /** + * Rerun metadata + */ + ResultMetadata[ResultMetadata["Rerun"] = 1] = "Rerun"; + /** + * Flaky metadata + */ + ResultMetadata[ResultMetadata["Flaky"] = 2] = "Flaky"; +})(ResultMetadata = exports.ResultMetadata || (exports.ResultMetadata = {})); +/** + * Additional details with test result metadata + */ +var ResultMetaDataDetails; +(function (ResultMetaDataDetails) { + /** + * Core fields of test result metadata. + */ + ResultMetaDataDetails[ResultMetaDataDetails["None"] = 0] = "None"; + /** + * Test FlakyIdentifiers details in test result metadata. + */ + ResultMetaDataDetails[ResultMetaDataDetails["FlakyIdentifiers"] = 1] = "FlakyIdentifiers"; +})(ResultMetaDataDetails = exports.ResultMetaDataDetails || (exports.ResultMetaDataDetails = {})); +/** + * The top level entity that is being cloned as part of a Clone operation + */ +var ResultObjectType; +(function (ResultObjectType) { + /** + * Suite Clone + */ + ResultObjectType[ResultObjectType["TestSuite"] = 0] = "TestSuite"; + /** + * Plan Clone + */ + ResultObjectType[ResultObjectType["TestPlan"] = 1] = "TestPlan"; +})(ResultObjectType = exports.ResultObjectType || (exports.ResultObjectType = {})); +var RunType; +(function (RunType) { + /** + * Only used during an update to preserve the existing value. + */ + RunType[RunType["Unspecified"] = 0] = "Unspecified"; + /** + * Normal test run. + */ + RunType[RunType["Normal"] = 1] = "Normal"; + /** + * Test run created for the blocked result when a test point is blocked. + */ + RunType[RunType["Blocking"] = 2] = "Blocking"; + /** + * Test run created from Web. + */ + RunType[RunType["Web"] = 4] = "Web"; + /** + * Run initiated from web through MTR + */ + RunType[RunType["MtrRunInitiatedFromWeb"] = 8] = "MtrRunInitiatedFromWeb"; + /** + * These test run would require DTL environment. These could be either of automated or manual test run. + */ + RunType[RunType["RunWithDtlEnv"] = 16] = "RunWithDtlEnv"; + /** + * These test run may or may not have published test results but it will have summary like total test, passed test, failed test etc. These are automated tests. + */ + RunType[RunType["NoConfigRun"] = 32] = "NoConfigRun"; +})(RunType = exports.RunType || (exports.RunType = {})); +var Service; +(function (Service) { + Service[Service["Any"] = 0] = "Any"; + Service[Service["Tcm"] = 1] = "Tcm"; + Service[Service["Tfs"] = 2] = "Tfs"; +})(Service = exports.Service || (exports.Service = {})); +/** + * Option to get details in response + */ +var SuiteExpand; +(function (SuiteExpand) { + /** + * Include children in response. + */ + SuiteExpand[SuiteExpand["Children"] = 1] = "Children"; + /** + * Include default testers in response. + */ + SuiteExpand[SuiteExpand["DefaultTesters"] = 2] = "DefaultTesters"; +})(SuiteExpand = exports.SuiteExpand || (exports.SuiteExpand = {})); +var TCMServiceDataMigrationStatus; +(function (TCMServiceDataMigrationStatus) { + /** + * Migration Not Started + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["NotStarted"] = 0] = "NotStarted"; + /** + * Migration InProgress + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["InProgress"] = 1] = "InProgress"; + /** + * Migration Completed + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Completed"] = 2] = "Completed"; + /** + * Migration Failed + */ + TCMServiceDataMigrationStatus[TCMServiceDataMigrationStatus["Failed"] = 3] = "Failed"; +})(TCMServiceDataMigrationStatus = exports.TCMServiceDataMigrationStatus || (exports.TCMServiceDataMigrationStatus = {})); +/** + * Represents the state of an ITestConfiguration object. + */ +var TestConfigurationState; +(function (TestConfigurationState) { + /** + * The configuration can be used for new test runs. + */ + TestConfigurationState[TestConfigurationState["Active"] = 1] = "Active"; + /** + * The configuration has been retired and should not be used for new test runs. + */ + TestConfigurationState[TestConfigurationState["Inactive"] = 2] = "Inactive"; +})(TestConfigurationState = exports.TestConfigurationState || (exports.TestConfigurationState = {})); +/** + * Test Log Context + */ +var TestLogScope; +(function (TestLogScope) { + /** + * Log file is associated with Run, result, subresult + */ + TestLogScope[TestLogScope["Run"] = 0] = "Run"; + /** + * Log File associated with Build + */ + TestLogScope[TestLogScope["Build"] = 1] = "Build"; + /** + * Log File associated with Release + */ + TestLogScope[TestLogScope["Release"] = 2] = "Release"; +})(TestLogScope = exports.TestLogScope || (exports.TestLogScope = {})); +/** + * Test Log Status codes. + */ +var TestLogStatusCode; +(function (TestLogStatusCode) { + /** + * Operation is successful + */ + TestLogStatusCode[TestLogStatusCode["Success"] = 0] = "Success"; + /** + * Operation failed + */ + TestLogStatusCode[TestLogStatusCode["Failed"] = 1] = "Failed"; + /** + * Operation failed due to file already exist + */ + TestLogStatusCode[TestLogStatusCode["FileAlreadyExists"] = 2] = "FileAlreadyExists"; + /** + * Invalid input provided by user + */ + TestLogStatusCode[TestLogStatusCode["InvalidInput"] = 3] = "InvalidInput"; + /** + * Invalid file name provided by user + */ + TestLogStatusCode[TestLogStatusCode["InvalidFileName"] = 4] = "InvalidFileName"; + /** + * Error occurred while operating on container + */ + TestLogStatusCode[TestLogStatusCode["InvalidContainer"] = 5] = "InvalidContainer"; + /** + * Blob Transfer Error + */ + TestLogStatusCode[TestLogStatusCode["TransferFailed"] = 6] = "TransferFailed"; + /** + * TestLogStore feature is not enabled + */ + TestLogStatusCode[TestLogStatusCode["FeatureDisabled"] = 7] = "FeatureDisabled"; + /** + * Build for which operation is requested does not exist + */ + TestLogStatusCode[TestLogStatusCode["BuildDoesNotExist"] = 8] = "BuildDoesNotExist"; + /** + * Run for which operation is requested does not exist + */ + TestLogStatusCode[TestLogStatusCode["RunDoesNotExist"] = 9] = "RunDoesNotExist"; + /** + * Container cannot be created + */ + TestLogStatusCode[TestLogStatusCode["ContainerNotCreated"] = 10] = "ContainerNotCreated"; + /** + * Api is not supported + */ + TestLogStatusCode[TestLogStatusCode["APINotSupported"] = 11] = "APINotSupported"; + /** + * File size is greater than the limitation + */ + TestLogStatusCode[TestLogStatusCode["FileSizeExceeds"] = 12] = "FileSizeExceeds"; + /** + * Container is not found for which operation is requested + */ + TestLogStatusCode[TestLogStatusCode["ContainerNotFound"] = 13] = "ContainerNotFound"; + /** + * File cannot be found + */ + TestLogStatusCode[TestLogStatusCode["FileNotFound"] = 14] = "FileNotFound"; + /** + * Directory cannot be found + */ + TestLogStatusCode[TestLogStatusCode["DirectoryNotFound"] = 15] = "DirectoryNotFound"; + /** + * Storage capacity exceeded + */ + TestLogStatusCode[TestLogStatusCode["StorageCapacityExceeded"] = 16] = "StorageCapacityExceeded"; +})(TestLogStatusCode = exports.TestLogStatusCode || (exports.TestLogStatusCode = {})); +/** + * Specifies set of possible log store endpoint type. + */ +var TestLogStoreEndpointType; +(function (TestLogStoreEndpointType) { + /** + * Endpoint type is scoped to root + */ + TestLogStoreEndpointType[TestLogStoreEndpointType["Root"] = 1] = "Root"; + /** + * Endpoint type is scoped to file + */ + TestLogStoreEndpointType[TestLogStoreEndpointType["File"] = 2] = "File"; +})(TestLogStoreEndpointType = exports.TestLogStoreEndpointType || (exports.TestLogStoreEndpointType = {})); +/** + * Specifies set of possible operation type on log store. + */ +var TestLogStoreOperationType; +(function (TestLogStoreOperationType) { + /** + * Operation is scoped to read data only. + */ + TestLogStoreOperationType[TestLogStoreOperationType["Read"] = 1] = "Read"; + /** + * Operation is scoped to create data only. + */ + TestLogStoreOperationType[TestLogStoreOperationType["Create"] = 2] = "Create"; + /** + * Operation is scoped to read and create data. + */ + TestLogStoreOperationType[TestLogStoreOperationType["ReadAndCreate"] = 3] = "ReadAndCreate"; +})(TestLogStoreOperationType = exports.TestLogStoreOperationType || (exports.TestLogStoreOperationType = {})); +/** + * Test Log Types + */ +var TestLogType; +(function (TestLogType) { + /** + * Any gereric attachment. + */ + TestLogType[TestLogType["GeneralAttachment"] = 1] = "GeneralAttachment"; + /** + * Code Coverage files + */ + TestLogType[TestLogType["CodeCoverage"] = 2] = "CodeCoverage"; + /** + * Test Impact details. + */ + TestLogType[TestLogType["TestImpact"] = 3] = "TestImpact"; + /** + * Temporary files + */ + TestLogType[TestLogType["Intermediate"] = 4] = "Intermediate"; + /** + * Subresult Attachment + */ + TestLogType[TestLogType["System"] = 5] = "System"; +})(TestLogType = exports.TestLogType || (exports.TestLogType = {})); +/** + * Valid TestOutcome values. + */ +var TestOutcome; +(function (TestOutcome) { + /** + * Only used during an update to preserve the existing value. + */ + TestOutcome[TestOutcome["Unspecified"] = 0] = "Unspecified"; + /** + * Test has not been completed, or the test type does not report pass/failure. + */ + TestOutcome[TestOutcome["None"] = 1] = "None"; + /** + * Test was executed w/o any issues. + */ + TestOutcome[TestOutcome["Passed"] = 2] = "Passed"; + /** + * Test was executed, but there were issues. Issues may involve exceptions or failed assertions. + */ + TestOutcome[TestOutcome["Failed"] = 3] = "Failed"; + /** + * Test has completed, but we can't say if it passed or failed. May be used for aborted tests... + */ + TestOutcome[TestOutcome["Inconclusive"] = 4] = "Inconclusive"; + /** + * The test timed out + */ + TestOutcome[TestOutcome["Timeout"] = 5] = "Timeout"; + /** + * Test was aborted. This was not caused by a user gesture, but rather by a framework decision. + */ + TestOutcome[TestOutcome["Aborted"] = 6] = "Aborted"; + /** + * Test had it chance for been executed but was not, as ITestElement.IsRunnable == false. + */ + TestOutcome[TestOutcome["Blocked"] = 7] = "Blocked"; + /** + * Test was not executed. This was caused by a user gesture - e.g. user hit stop button. + */ + TestOutcome[TestOutcome["NotExecuted"] = 8] = "NotExecuted"; + /** + * To be used by Run level results. This is not a failure. + */ + TestOutcome[TestOutcome["Warning"] = 9] = "Warning"; + /** + * There was a system error while we were trying to execute a test. + */ + TestOutcome[TestOutcome["Error"] = 10] = "Error"; + /** + * Test is Not Applicable for execution. + */ + TestOutcome[TestOutcome["NotApplicable"] = 11] = "NotApplicable"; + /** + * Test is paused. + */ + TestOutcome[TestOutcome["Paused"] = 12] = "Paused"; + /** + * Test is currently executing. Added this for TCM charts + */ + TestOutcome[TestOutcome["InProgress"] = 13] = "InProgress"; + /** + * Test is not impacted. Added fot TIA. + */ + TestOutcome[TestOutcome["NotImpacted"] = 14] = "NotImpacted"; + TestOutcome[TestOutcome["MaxValue"] = 14] = "MaxValue"; +})(TestOutcome = exports.TestOutcome || (exports.TestOutcome = {})); +var TestPointState; +(function (TestPointState) { + /** + * Default + */ + TestPointState[TestPointState["None"] = 0] = "None"; + /** + * The test point needs to be executed in order for the test pass to be considered complete. Either the test has not been run before or the previous run failed. + */ + TestPointState[TestPointState["Ready"] = 1] = "Ready"; + /** + * The test has passed successfully and does not need to be re-run for the test pass to be considered complete. + */ + TestPointState[TestPointState["Completed"] = 2] = "Completed"; + /** + * The test point needs to be executed but is not able to. + */ + TestPointState[TestPointState["NotReady"] = 3] = "NotReady"; + /** + * The test is being executed. + */ + TestPointState[TestPointState["InProgress"] = 4] = "InProgress"; + TestPointState[TestPointState["MaxValue"] = 4] = "MaxValue"; +})(TestPointState = exports.TestPointState || (exports.TestPointState = {})); +/** + * Group by for results + */ +var TestResultGroupBy; +(function (TestResultGroupBy) { + /** + * Group the results by branches + */ + TestResultGroupBy[TestResultGroupBy["Branch"] = 1] = "Branch"; + /** + * Group the results by environment + */ + TestResultGroupBy[TestResultGroupBy["Environment"] = 2] = "Environment"; +})(TestResultGroupBy = exports.TestResultGroupBy || (exports.TestResultGroupBy = {})); +var TestResultsContextType; +(function (TestResultsContextType) { + TestResultsContextType[TestResultsContextType["Build"] = 1] = "Build"; + TestResultsContextType[TestResultsContextType["Release"] = 2] = "Release"; + TestResultsContextType[TestResultsContextType["Pipeline"] = 3] = "Pipeline"; +})(TestResultsContextType = exports.TestResultsContextType || (exports.TestResultsContextType = {})); +var TestResultsSettingsType; +(function (TestResultsSettingsType) { + /** + * Returns All Test Settings. + */ + TestResultsSettingsType[TestResultsSettingsType["All"] = 1] = "All"; + /** + * Returns Flaky Test Settings. + */ + TestResultsSettingsType[TestResultsSettingsType["Flaky"] = 2] = "Flaky"; + /** + * Returns whether to log new tests or not + */ + TestResultsSettingsType[TestResultsSettingsType["NewTestLogging"] = 3] = "NewTestLogging"; +})(TestResultsSettingsType = exports.TestResultsSettingsType || (exports.TestResultsSettingsType = {})); +/** + * The types of outcomes for test run. + */ +var TestRunOutcome; +(function (TestRunOutcome) { + /** + * Run with zero failed tests and has at least one impacted test + */ + TestRunOutcome[TestRunOutcome["Passed"] = 0] = "Passed"; + /** + * Run with at-least one failed test. + */ + TestRunOutcome[TestRunOutcome["Failed"] = 1] = "Failed"; + /** + * Run with no impacted tests. + */ + TestRunOutcome[TestRunOutcome["NotImpacted"] = 2] = "NotImpacted"; + /** + * Runs with All tests in other category. + */ + TestRunOutcome[TestRunOutcome["Others"] = 3] = "Others"; +})(TestRunOutcome = exports.TestRunOutcome || (exports.TestRunOutcome = {})); +/** + * The types of publish context for run. + */ +var TestRunPublishContext; +(function (TestRunPublishContext) { + /** + * Run is published for Build Context. + */ + TestRunPublishContext[TestRunPublishContext["Build"] = 1] = "Build"; + /** + * Run is published for Release Context. + */ + TestRunPublishContext[TestRunPublishContext["Release"] = 2] = "Release"; + /** + * Run is published for any Context. + */ + TestRunPublishContext[TestRunPublishContext["All"] = 3] = "All"; +})(TestRunPublishContext = exports.TestRunPublishContext || (exports.TestRunPublishContext = {})); +/** + * The types of states for test run. + */ +var TestRunState; +(function (TestRunState) { + /** + * Only used during an update to preserve the existing value. + */ + TestRunState[TestRunState["Unspecified"] = 0] = "Unspecified"; + /** + * The run is still being created. No tests have started yet. + */ + TestRunState[TestRunState["NotStarted"] = 1] = "NotStarted"; + /** + * Tests are running. + */ + TestRunState[TestRunState["InProgress"] = 2] = "InProgress"; + /** + * All tests have completed or been skipped. + */ + TestRunState[TestRunState["Completed"] = 3] = "Completed"; + /** + * Run is stopped and remaining tests have been aborted + */ + TestRunState[TestRunState["Aborted"] = 4] = "Aborted"; + /** + * Run is currently initializing This is a legacy state and should not be used any more + */ + TestRunState[TestRunState["Waiting"] = 5] = "Waiting"; + /** + * Run requires investigation because of a test point failure This is a legacy state and should not be used any more + */ + TestRunState[TestRunState["NeedsInvestigation"] = 6] = "NeedsInvestigation"; +})(TestRunState = exports.TestRunState || (exports.TestRunState = {})); +/** + * The types of sub states for test run. It gives the user more info about the test run beyond the high level test run state + */ +var TestRunSubstate; +(function (TestRunSubstate) { + /** + * Run with noState. + */ + TestRunSubstate[TestRunSubstate["None"] = 0] = "None"; + /** + * Run state while Creating Environment. + */ + TestRunSubstate[TestRunSubstate["CreatingEnvironment"] = 1] = "CreatingEnvironment"; + /** + * Run state while Running Tests. + */ + TestRunSubstate[TestRunSubstate["RunningTests"] = 2] = "RunningTests"; + /** + * Run state while Creating Environment. + */ + TestRunSubstate[TestRunSubstate["CanceledByUser"] = 3] = "CanceledByUser"; + /** + * Run state when it is Aborted By the System. + */ + TestRunSubstate[TestRunSubstate["AbortedBySystem"] = 4] = "AbortedBySystem"; + /** + * Run state when run has timedOut. + */ + TestRunSubstate[TestRunSubstate["TimedOut"] = 5] = "TimedOut"; + /** + * Run state while Pending Analysis. + */ + TestRunSubstate[TestRunSubstate["PendingAnalysis"] = 6] = "PendingAnalysis"; + /** + * Run state after being Analysed. + */ + TestRunSubstate[TestRunSubstate["Analyzed"] = 7] = "Analyzed"; + /** + * Run state when cancellation is in Progress. + */ + TestRunSubstate[TestRunSubstate["CancellationInProgress"] = 8] = "CancellationInProgress"; +})(TestRunSubstate = exports.TestRunSubstate || (exports.TestRunSubstate = {})); +/** + * Represents the source from which the test session was created + */ +var TestSessionSource; +(function (TestSessionSource) { + /** + * Source of test session uncertain as it is stale + */ + TestSessionSource[TestSessionSource["Unknown"] = 0] = "Unknown"; + /** + * The session was created from Microsoft Test Manager exploratory desktop tool. + */ + TestSessionSource[TestSessionSource["XTDesktop"] = 1] = "XTDesktop"; + /** + * The session was created from feedback client. + */ + TestSessionSource[TestSessionSource["FeedbackDesktop"] = 2] = "FeedbackDesktop"; + /** + * The session was created from browser extension. + */ + TestSessionSource[TestSessionSource["XTWeb"] = 3] = "XTWeb"; + /** + * The session was created from browser extension. + */ + TestSessionSource[TestSessionSource["FeedbackWeb"] = 4] = "FeedbackWeb"; + /** + * The session was created from web access using Microsoft Test Manager exploratory desktop tool. + */ + TestSessionSource[TestSessionSource["XTDesktop2"] = 5] = "XTDesktop2"; + /** + * To show sessions from all supported sources. + */ + TestSessionSource[TestSessionSource["SessionInsightsForAll"] = 6] = "SessionInsightsForAll"; +})(TestSessionSource = exports.TestSessionSource || (exports.TestSessionSource = {})); +/** + * Represents the state of the test session. + */ +var TestSessionState; +(function (TestSessionState) { + /** + * Only used during an update to preserve the existing value. + */ + TestSessionState[TestSessionState["Unspecified"] = 0] = "Unspecified"; + /** + * The session is still being created. + */ + TestSessionState[TestSessionState["NotStarted"] = 1] = "NotStarted"; + /** + * The session is running. + */ + TestSessionState[TestSessionState["InProgress"] = 2] = "InProgress"; + /** + * The session has paused. + */ + TestSessionState[TestSessionState["Paused"] = 3] = "Paused"; + /** + * The session has completed. + */ + TestSessionState[TestSessionState["Completed"] = 4] = "Completed"; + /** + * This is required for Feedback session which are declined + */ + TestSessionState[TestSessionState["Declined"] = 5] = "Declined"; +})(TestSessionState = exports.TestSessionState || (exports.TestSessionState = {})); +exports.TypeInfo = { + AfnStrip: {}, + AggregatedDataForResultTrend: {}, + AggregatedResultDetailsByOutcome: {}, + AggregatedResultsAnalysis: {}, + AggregatedResultsByOutcome: {}, + AggregatedRunsByOutcome: {}, + AggregatedRunsByState: {}, + AttachmentType: { + enumValues: { + "generalAttachment": 0, + "afnStrip": 1, + "bugFilingData": 2, + "codeCoverage": 3, + "intermediateCollectorData": 4, + "runConfig": 5, + "testImpactDetails": 6, + "tmiTestRunDeploymentFiles": 7, + "tmiTestRunReverseDeploymentFiles": 8, + "tmiTestResultDetail": 9, + "tmiTestRunSummary": 10, + "consoleLog": 11 + } + }, + BatchResponse: {}, + BuildConfiguration: {}, + BuildCoverage: {}, + BuildReference2: {}, + BulkResultUpdateRequest: {}, + CloneOperationInformation: {}, + CloneOperationState: { + enumValues: { + "failed": 2, + "inProgress": 1, + "queued": 0, + "succeeded": 3 + } + }, + CodeCoverageSummary: {}, + Coverage2: {}, + CoverageQueryFlags: { + enumValues: { + "modules": 1, + "functions": 2, + "blockData": 4 + } + }, + CoverageStatus: { + enumValues: { + "covered": 0, + "notCovered": 1, + "partiallyCovered": 2 + } + }, + CoverageSummaryStatus: { + enumValues: { + "none": 0, + "inProgress": 1, + "completed": 2, + "finalized": 3, + "pending": 4, + "updateRequestQueued": 5 + } + }, + CreateTestMessageLogEntryRequest: {}, + CreateTestResultsRequest: {}, + CreateTestRunRequest: {}, + CustomTestFieldDefinition: {}, + CustomTestFieldScope: { + enumValues: { + "none": 0, + "testRun": 1, + "testResult": 2, + "system": 4, + "all": 7 + } + }, + CustomTestFieldType: { + enumValues: { + "bit": 2, + "dateTime": 4, + "int": 8, + "float": 6, + "string": 12, + "guid": 14 + } + }, + DatedTestFieldData: {}, + FailingSince: {}, + FetchTestResultsResponse: {}, + FlakyDetection: {}, + FlakyDetectionType: { + enumValues: { + "custom": 1, + "system": 2 + } + }, + FlakySettings: {}, + LastResultDetails: {}, + LegacyBuildConfiguration: {}, + LegacyReleaseReference: {}, + LegacyTestCaseResult: {}, + LegacyTestRun: {}, + LegacyTestSettings: {}, + Metrics: { + enumValues: { + "all": 1, + "resultSummary": 2, + "resultsAnalysis": 3, + "runSummary": 4 + } + }, + OperationType: { + enumValues: { + "add": 1, + "delete": 2 + } + }, + PipelineTestMetrics: {}, + PointLastResult: {}, + PointsResults2: {}, + QueryTestActionResultResponse: {}, + ReleaseReference: {}, + ReleaseReference2: {}, + RequirementsToTestsMapping2: {}, + Response: {}, + ResultDetails: { + enumValues: { + "none": 0, + "iterations": 1, + "workItems": 2, + "subResults": 4, + "point": 8 + } + }, + ResultGroupType: { + enumValues: { + "none": 0, + "rerun": 1, + "dataDriven": 2, + "orderedTest": 3, + "generic": 4 + } + }, + ResultMetadata: { + enumValues: { + "rerun": 1, + "flaky": 2 + } + }, + ResultMetaDataDetails: { + enumValues: { + "none": 0, + "flakyIdentifiers": 1 + } + }, + ResultObjectType: { + enumValues: { + "testSuite": 0, + "testPlan": 1 + } + }, + ResultRetentionSettings: {}, + ResultsByQueryResponse: {}, + ResultsFilter: {}, + ResultsSummaryByOutcome: {}, + ResultSummary: {}, + ResultUpdateRequest: {}, + ResultUpdateRequestModel: {}, + ResultUpdateResponse: {}, + RunCreateModel: {}, + RunStatistic: {}, + RunSummary: {}, + RunSummaryModel: {}, + RunType: { + enumValues: { + "unspecified": 0, + "normal": 1, + "blocking": 2, + "web": 4, + "mtrRunInitiatedFromWeb": 8, + "runWithDtlEnv": 16, + "noConfigRun": 32 + } + }, + RunUpdateModel: {}, + Service: { + enumValues: { + "any": 0, + "tcm": 1, + "tfs": 2 + } + }, + SuiteExpand: { + enumValues: { + "children": 1, + "defaultTesters": 2 + } + }, + TCMServiceDataMigrationStatus: { + enumValues: { + "notStarted": 0, + "inProgress": 1, + "completed": 2, + "failed": 3 + } + }, + TestActionResult: {}, + TestActionResult2: {}, + TestActionResultModel: {}, + TestAttachment: {}, + TestAuthoringDetails: {}, + TestCaseReference2: {}, + TestCaseResult: {}, + TestConfiguration: {}, + TestConfigurationState: { + enumValues: { + "active": 1, + "inactive": 2 + } + }, + TestExecutionReportData: {}, + TestExtensionField: {}, + TestExtensionFieldDetails: {}, + TestFailuresAnalysis: {}, + TestHistoryQuery: {}, + TestIterationDetailsModel: {}, + TestLog: {}, + TestLogReference: {}, + TestLogScope: { + enumValues: { + "run": 0, + "build": 1, + "release": 2 + } + }, + TestLogStatus: {}, + TestLogStatusCode: { + enumValues: { + "success": 0, + "failed": 1, + "fileAlreadyExists": 2, + "invalidInput": 3, + "invalidFileName": 4, + "invalidContainer": 5, + "transferFailed": 6, + "featureDisabled": 7, + "buildDoesNotExist": 8, + "runDoesNotExist": 9, + "containerNotCreated": 10, + "apiNotSupported": 11, + "fileSizeExceeds": 12, + "containerNotFound": 13, + "fileNotFound": 14, + "directoryNotFound": 15, + "storageCapacityExceeded": 16 + } + }, + TestLogStoreEndpointDetails: {}, + TestLogStoreEndpointType: { + enumValues: { + "root": 1, + "file": 2 + } + }, + TestLogStoreOperationType: { + enumValues: { + "read": 1, + "create": 2, + "readAndCreate": 3 + } + }, + TestLogType: { + enumValues: { + "generalAttachment": 1, + "codeCoverage": 2, + "testImpact": 3, + "intermediate": 4, + "system": 5 + } + }, + TestMessageLogDetails: {}, + TestMessageLogEntry: {}, + TestMessageLogEntry2: {}, + TestOutcome: { + enumValues: { + "unspecified": 0, + "none": 1, + "passed": 2, + "failed": 3, + "inconclusive": 4, + "timeout": 5, + "aborted": 6, + "blocked": 7, + "notExecuted": 8, + "warning": 9, + "error": 10, + "notApplicable": 11, + "paused": 12, + "inProgress": 13, + "notImpacted": 14, + "maxValue": 14 + } + }, + TestParameter2: {}, + TestPlan: {}, + TestPlanCloneRequest: {}, + TestPlanHubData: {}, + TestPlansWithSelection: {}, + TestPoint: {}, + TestPointReference: {}, + TestPointsEvent: {}, + TestPointsQuery: {}, + TestPointState: { + enumValues: { + "none": 0, + "ready": 1, + "completed": 2, + "notReady": 3, + "inProgress": 4, + "maxValue": 4 + } + }, + TestPointsUpdatedEvent: {}, + TestResult2: {}, + TestResultAcrossProjectResponse: {}, + TestResultAttachment: {}, + TestResultGroupBy: { + enumValues: { + "branch": 1, + "environment": 2 + } + }, + TestResultHistory: {}, + TestResultHistoryDetailsForGroup: {}, + TestResultHistoryForGroup: {}, + TestResultModelBase: {}, + TestResultReset2: {}, + TestResultsContext: {}, + TestResultsContextType: { + enumValues: { + "build": 1, + "release": 2, + "pipeline": 3 + } + }, + TestResultsDetails: {}, + TestResultsDetailsForGroup: {}, + TestResultsEx2: {}, + TestResultsQuery: {}, + TestResultsSettings: {}, + TestResultsSettingsType: { + enumValues: { + "all": 1, + "flaky": 2, + "newTestLogging": 3 + } + }, + TestResultSummary: {}, + TestResultsUpdateSettings: {}, + TestResultsWithWatermark: {}, + TestResultTrendFilter: {}, + TestRun: {}, + TestRun2: {}, + TestRunCanceledEvent: {}, + TestRunCreatedEvent: {}, + TestRunEvent: {}, + TestRunEx2: {}, + TestRunOutcome: { + enumValues: { + "passed": 0, + "failed": 1, + "notImpacted": 2, + "others": 3 + } + }, + TestRunPublishContext: { + enumValues: { + "build": 1, + "release": 2, + "all": 3 + } + }, + TestRunStartedEvent: {}, + TestRunState: { + enumValues: { + "unspecified": 0, + "notStarted": 1, + "inProgress": 2, + "completed": 3, + "aborted": 4, + "waiting": 5, + "needsInvestigation": 6 + } + }, + TestRunStatistic: {}, + TestRunSubstate: { + enumValues: { + "none": 0, + "creatingEnvironment": 1, + "runningTests": 2, + "canceledByUser": 3, + "abortedBySystem": 4, + "timedOut": 5, + "pendingAnalysis": 6, + "analyzed": 7, + "cancellationInProgress": 8 + } + }, + TestRunSummary2: {}, + TestRunWithDtlEnvEvent: {}, + TestSession: {}, + TestSessionExploredWorkItemReference: {}, + TestSessionSource: { + enumValues: { + "unknown": 0, + "xtDesktop": 1, + "feedbackDesktop": 2, + "xtWeb": 3, + "feedbackWeb": 4, + "xtDesktop2": 5, + "sessionInsightsForAll": 6 + } + }, + TestSessionState: { + enumValues: { + "unspecified": 0, + "notStarted": 1, + "inProgress": 2, + "paused": 3, + "completed": 4, + "declined": 5 + } + }, + TestSettings2: {}, + TestSubResult: {}, + TestSuite: {}, + TestSummaryForWorkItem: {}, + UpdatedProperties: {}, + UpdateTestRunRequest: {}, + UpdateTestRunResponse: {}, + WorkItemToTestLinks: {}, +}; +exports.TypeInfo.AfnStrip.fields = { + creationDate: { + isDate: true, + } +}; +exports.TypeInfo.AggregatedDataForResultTrend.fields = { + resultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + }, + runSummaryByState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByState + }, + testResultsContext: { + typeInfo: exports.TypeInfo.TestResultsContext + } +}; +exports.TypeInfo.AggregatedResultDetailsByOutcome.fields = { + outcome: { + enumType: exports.TypeInfo.TestOutcome + } +}; +exports.TypeInfo.AggregatedResultsAnalysis.fields = { + notReportedResultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + }, + previousContext: { + typeInfo: exports.TypeInfo.TestResultsContext + }, + resultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + }, + runSummaryByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByOutcome + }, + runSummaryByState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedRunsByState + } +}; +exports.TypeInfo.AggregatedResultsByOutcome.fields = { + outcome: { + enumType: exports.TypeInfo.TestOutcome + } +}; +exports.TypeInfo.AggregatedRunsByOutcome.fields = { + outcome: { + enumType: exports.TypeInfo.TestRunOutcome + } +}; +exports.TypeInfo.AggregatedRunsByState.fields = { + resultsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + }, + state: { + enumType: exports.TypeInfo.TestRunState + } +}; +exports.TypeInfo.BatchResponse.fields = { + responses: { + isArray: true, + typeInfo: exports.TypeInfo.Response + }, +}; +exports.TypeInfo.BuildConfiguration.fields = { + creationDate: { + isDate: true, + } +}; +exports.TypeInfo.BuildCoverage.fields = { + configuration: { + typeInfo: exports.TypeInfo.BuildConfiguration + } +}; +exports.TypeInfo.BuildReference2.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.BulkResultUpdateRequest.fields = { + requests: { + isArray: true, + typeInfo: exports.TypeInfo.ResultUpdateRequest + } +}; +exports.TypeInfo.CloneOperationInformation.fields = { + completionDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + resultObjectType: { + enumType: exports.TypeInfo.ResultObjectType + }, + state: { + enumType: exports.TypeInfo.CloneOperationState + } +}; +exports.TypeInfo.CodeCoverageSummary.fields = { + status: { + enumType: exports.TypeInfo.CoverageSummaryStatus + } +}; +exports.TypeInfo.Coverage2.fields = { + dateCreated: { + isDate: true, + }, + dateModified: { + isDate: true, + } +}; +exports.TypeInfo.CreateTestMessageLogEntryRequest.fields = { + testMessageLogEntry: { + isArray: true, + typeInfo: exports.TypeInfo.TestMessageLogEntry + } +}; +exports.TypeInfo.CreateTestResultsRequest.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.CreateTestRunRequest.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult + }, + testRun: { + typeInfo: exports.TypeInfo.LegacyTestRun + }, + testSettings: { + typeInfo: exports.TypeInfo.LegacyTestSettings + } +}; +exports.TypeInfo.CustomTestFieldDefinition.fields = { + fieldType: { + enumType: exports.TypeInfo.CustomTestFieldType + }, + scope: { + enumType: exports.TypeInfo.CustomTestFieldScope + } +}; +exports.TypeInfo.DatedTestFieldData.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.FailingSince.fields = { + date: { + isDate: true, + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + } +}; +exports.TypeInfo.FetchTestResultsResponse.fields = { + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResult + }, + attachments: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment + }, + results: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.FlakyDetection.fields = { + flakyDetectionType: { + enumType: exports.TypeInfo.FlakyDetectionType + } +}; +exports.TypeInfo.FlakySettings.fields = { + flakyDetection: { + typeInfo: exports.TypeInfo.FlakyDetection + } +}; +exports.TypeInfo.LastResultDetails.fields = { + dateCompleted: { + isDate: true, + } +}; +exports.TypeInfo.LegacyBuildConfiguration.fields = { + completedDate: { + isDate: true, + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.LegacyReleaseReference.fields = { + environmentCreationDate: { + isDate: true, + }, + releaseCreationDate: { + isDate: true, + } +}; +exports.TypeInfo.LegacyTestCaseResult.fields = { + buildReference: { + typeInfo: exports.TypeInfo.LegacyBuildConfiguration + }, + creationDate: { + isDate: true, + }, + customFields: { + isArray: true, + typeInfo: exports.TypeInfo.TestExtensionField + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + failingSince: { + typeInfo: exports.TypeInfo.FailingSince + }, + lastUpdated: { + isDate: true, + }, + releaseReference: { + typeInfo: exports.TypeInfo.LegacyReleaseReference + }, + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + stackTrace: { + typeInfo: exports.TypeInfo.TestExtensionField + } +}; +exports.TypeInfo.LegacyTestRun.fields = { + buildReference: { + typeInfo: exports.TypeInfo.LegacyBuildConfiguration + }, + completeDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + customFields: { + isArray: true, + typeInfo: exports.TypeInfo.TestExtensionField + }, + dueDate: { + isDate: true, + }, + lastUpdated: { + isDate: true, + }, + releaseReference: { + typeInfo: exports.TypeInfo.LegacyReleaseReference + }, + startDate: { + isDate: true, + }, + testMessageLogEntries: { + isArray: true, + typeInfo: exports.TypeInfo.TestMessageLogDetails + } +}; +exports.TypeInfo.LegacyTestSettings.fields = { + createdDate: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.PipelineTestMetrics.fields = { + resultSummary: { + typeInfo: exports.TypeInfo.ResultSummary + }, + runSummary: { + typeInfo: exports.TypeInfo.RunSummary + }, + summaryAtChild: { + isArray: true, + typeInfo: exports.TypeInfo.PipelineTestMetrics + } +}; +exports.TypeInfo.PointLastResult.fields = { + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.PointsResults2.fields = { + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.QueryTestActionResultResponse.fields = { + testActionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResult + }, + testAttachments: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment + } +}; +exports.TypeInfo.ReleaseReference.fields = { + creationDate: { + isDate: true, + }, + environmentCreationDate: { + isDate: true, + } +}; +exports.TypeInfo.ReleaseReference2.fields = { + environmentCreationDate: { + isDate: true, + }, + releaseCreationDate: { + isDate: true, + } +}; +exports.TypeInfo.RequirementsToTestsMapping2.fields = { + creationDate: { + isDate: true, + }, + deletionDate: { + isDate: true, + } +}; +exports.TypeInfo.Response.fields = {}; +exports.TypeInfo.ResultRetentionSettings.fields = { + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.ResultsByQueryResponse.fields = { + testResults: { + isArray: true, + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.ResultsFilter.fields = { + executedIn: { + enumType: exports.TypeInfo.Service + }, + maxCompleteDate: { + isDate: true, + }, + testResultsContext: { + typeInfo: exports.TypeInfo.TestResultsContext + } +}; +exports.TypeInfo.ResultsSummaryByOutcome.fields = { + aggregatedResultDetailsByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultDetailsByOutcome + } +}; +exports.TypeInfo.ResultSummary.fields = { + resultSummaryByRunState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + dictionaryValueTypeInfo: exports.TypeInfo.ResultsSummaryByOutcome + } +}; +exports.TypeInfo.ResultUpdateRequest.fields = { + actionResultDeletes: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResult + }, + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResult + }, + attachments: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment + }, + testCaseResult: { + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.ResultUpdateRequestModel.fields = { + actionResultDeletes: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + }, + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + } +}; +exports.TypeInfo.ResultUpdateResponse.fields = { + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.RunCreateModel.fields = { + buildReference: { + typeInfo: exports.TypeInfo.BuildConfiguration + }, + releaseReference: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + runSummary: { + isArray: true, + typeInfo: exports.TypeInfo.RunSummaryModel + } +}; +exports.TypeInfo.RunStatistic.fields = { + resultMetadata: { + enumType: exports.TypeInfo.ResultMetadata + } +}; +exports.TypeInfo.RunSummary.fields = { + runSummaryByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunOutcome, + }, + runSummaryByState: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestRunState, + } +}; +exports.TypeInfo.RunSummaryModel.fields = { + testOutcome: { + enumType: exports.TypeInfo.TestOutcome + } +}; +exports.TypeInfo.RunUpdateModel.fields = { + logEntries: { + isArray: true, + typeInfo: exports.TypeInfo.TestMessageLogDetails + }, + runSummary: { + isArray: true, + typeInfo: exports.TypeInfo.RunSummaryModel + }, + substate: { + enumType: exports.TypeInfo.TestRunSubstate + } +}; +exports.TypeInfo.TestActionResult.fields = { + creationDate: { + isDate: true, + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestActionResult2.fields = { + creationDate: { + isDate: true, + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestActionResultModel.fields = { + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TestAuthoringDetails.fields = { + lastUpdated: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestPointState + } +}; +exports.TypeInfo.TestCaseReference2.fields = { + creationDate: { + isDate: true, + }, + lastRefTestRunDate: { + isDate: true, + } +}; +exports.TypeInfo.TestCaseResult.fields = { + completedDate: { + isDate: true, + }, + createdDate: { + isDate: true, + }, + failingSince: { + typeInfo: exports.TypeInfo.FailingSince + }, + iterationDetails: { + isArray: true, + typeInfo: exports.TypeInfo.TestIterationDetailsModel + }, + lastUpdatedDate: { + isDate: true, + }, + releaseReference: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + startedDate: { + isDate: true, + }, + subResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestSubResult + } +}; +exports.TypeInfo.TestConfiguration.fields = { + lastUpdatedDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestConfigurationState + } +}; +exports.TypeInfo.TestExecutionReportData.fields = { + reportData: { + isArray: true, + typeInfo: exports.TypeInfo.DatedTestFieldData + } +}; +exports.TypeInfo.TestExtensionField.fields = { + field: { + typeInfo: exports.TypeInfo.TestExtensionFieldDetails + } +}; +exports.TypeInfo.TestExtensionFieldDetails.fields = { + type: { + enumType: SystemData.TypeInfo.SqlDbType + } +}; +exports.TypeInfo.TestFailuresAnalysis.fields = { + previousContext: { + typeInfo: exports.TypeInfo.TestResultsContext + } +}; +exports.TypeInfo.TestHistoryQuery.fields = { + groupBy: { + enumType: exports.TypeInfo.TestResultGroupBy + }, + maxCompleteDate: { + isDate: true, + }, + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultHistoryForGroup + } +}; +exports.TypeInfo.TestIterationDetailsModel.fields = { + actionResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestActionResultModel + }, + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestLog.fields = { + logReference: { + typeInfo: exports.TypeInfo.TestLogReference + }, + modifiedOn: { + isDate: true, + } +}; +exports.TypeInfo.TestLogReference.fields = { + scope: { + enumType: exports.TypeInfo.TestLogScope + }, + type: { + enumType: exports.TypeInfo.TestLogType + } +}; +exports.TypeInfo.TestLogStatus.fields = { + status: { + enumType: exports.TypeInfo.TestLogStatusCode + } +}; +exports.TypeInfo.TestLogStoreEndpointDetails.fields = { + endpointType: { + enumType: exports.TypeInfo.TestLogStoreEndpointType + }, + status: { + enumType: exports.TypeInfo.TestLogStatusCode + } +}; +exports.TypeInfo.TestMessageLogDetails.fields = { + dateCreated: { + isDate: true, + } +}; +exports.TypeInfo.TestMessageLogEntry.fields = { + dateCreated: { + isDate: true, + } +}; +exports.TypeInfo.TestMessageLogEntry2.fields = { + dateCreated: { + isDate: true, + } +}; +exports.TypeInfo.TestParameter2.fields = { + creationDate: { + isDate: true, + }, + dateModified: { + isDate: true, + } +}; +exports.TypeInfo.TestPlan.fields = { + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + updatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPlanCloneRequest.fields = { + destinationTestPlan: { + typeInfo: exports.TypeInfo.TestPlan + } +}; +exports.TypeInfo.TestPlanHubData.fields = { + testPlan: { + typeInfo: exports.TypeInfo.TestPlan + }, + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint + }, + testSuites: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite + } +}; +exports.TypeInfo.TestPlansWithSelection.fields = { + plans: { + isArray: true, + typeInfo: exports.TypeInfo.TestPlan + } +}; +exports.TypeInfo.TestPoint.fields = { + lastResetToActive: { + isDate: true, + }, + lastResultDetails: { + typeInfo: exports.TypeInfo.LastResultDetails + }, + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestPointReference.fields = { + state: { + enumType: exports.TypeInfo.TestPointState + } +}; +exports.TypeInfo.TestPointsEvent.fields = { + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPointReference + } +}; +exports.TypeInfo.TestPointsQuery.fields = { + points: { + isArray: true, + typeInfo: exports.TypeInfo.TestPoint + } +}; +exports.TypeInfo.TestPointsUpdatedEvent.fields = { + testPoints: { + isArray: true, + typeInfo: exports.TypeInfo.TestPointReference + } +}; +exports.TypeInfo.TestResult2.fields = { + creationDate: { + isDate: true, + }, + dateCompleted: { + isDate: true, + }, + dateStarted: { + isDate: true, + }, + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.TestResultAcrossProjectResponse.fields = { + testResult: { + typeInfo: exports.TypeInfo.LegacyTestCaseResult + } +}; +exports.TypeInfo.TestResultAttachment.fields = { + attachmentType: { + enumType: exports.TypeInfo.AttachmentType + }, + creationDate: { + isDate: true, + } +}; +exports.TypeInfo.TestResultHistory.fields = { + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultHistoryDetailsForGroup + } +}; +exports.TypeInfo.TestResultHistoryDetailsForGroup.fields = { + latestResult: { + typeInfo: exports.TypeInfo.TestCaseResult + } +}; +exports.TypeInfo.TestResultHistoryForGroup.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseResult + } +}; +exports.TypeInfo.TestResultModelBase.fields = { + completedDate: { + isDate: true, + }, + startedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestResultReset2.fields = { + dateModified: { + isDate: true, + } +}; +exports.TypeInfo.TestResultsContext.fields = { + contextType: { + enumType: exports.TypeInfo.TestResultsContextType + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + } +}; +exports.TypeInfo.TestResultsDetails.fields = { + resultsForGroup: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultsDetailsForGroup + } +}; +exports.TypeInfo.TestResultsDetailsForGroup.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseResult + }, + resultsCountByOutcome: { + isDictionary: true, + dictionaryKeyEnumType: exports.TypeInfo.TestOutcome, + dictionaryValueTypeInfo: exports.TypeInfo.AggregatedResultsByOutcome + } +}; +exports.TypeInfo.TestResultsEx2.fields = { + creationDate: { + isDate: true, + }, + dateTimeValue: { + isDate: true, + } +}; +exports.TypeInfo.TestResultsQuery.fields = { + results: { + isArray: true, + typeInfo: exports.TypeInfo.TestCaseResult + }, + resultsFilter: { + typeInfo: exports.TypeInfo.ResultsFilter + } +}; +exports.TypeInfo.TestResultsSettings.fields = { + flakySettings: { + typeInfo: exports.TypeInfo.FlakySettings + } +}; +exports.TypeInfo.TestResultSummary.fields = { + aggregatedResultsAnalysis: { + typeInfo: exports.TypeInfo.AggregatedResultsAnalysis + }, + teamProject: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + }, + testFailures: { + typeInfo: exports.TypeInfo.TestFailuresAnalysis + }, + testResultsContext: { + typeInfo: exports.TypeInfo.TestResultsContext + } +}; +exports.TypeInfo.TestResultsUpdateSettings.fields = { + flakySettings: { + typeInfo: exports.TypeInfo.FlakySettings + } +}; +exports.TypeInfo.TestResultsWithWatermark.fields = { + changedDate: { + isDate: true, + }, + pointsResults: { + isArray: true, + typeInfo: exports.TypeInfo.PointsResults2 + } +}; +exports.TypeInfo.TestResultTrendFilter.fields = { + maxCompleteDate: { + isDate: true, + } +}; +exports.TypeInfo.TestRun.fields = { + buildConfiguration: { + typeInfo: exports.TypeInfo.BuildConfiguration + }, + completedDate: { + isDate: true, + }, + createdDate: { + isDate: true, + }, + dueDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + release: { + typeInfo: exports.TypeInfo.ReleaseReference + }, + runStatistics: { + isArray: true, + typeInfo: exports.TypeInfo.RunStatistic + }, + startedDate: { + isDate: true, + }, + substate: { + enumType: exports.TypeInfo.TestRunSubstate + } +}; +exports.TypeInfo.TestRun2.fields = { + completeDate: { + isDate: true, + }, + creationDate: { + isDate: true, + }, + deletedOn: { + isDate: true, + }, + dueDate: { + isDate: true, + }, + lastUpdated: { + isDate: true, + }, + startDate: { + isDate: true, + } +}; +exports.TypeInfo.TestRunCanceledEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestRunCreatedEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestRunEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestRunEx2.fields = { + createdDate: { + isDate: true, + }, + dateTimeValue: { + isDate: true, + } +}; +exports.TypeInfo.TestRunStartedEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestRunStatistic.fields = { + runStatistics: { + isArray: true, + typeInfo: exports.TypeInfo.RunStatistic + } +}; +exports.TypeInfo.TestRunSummary2.fields = { + testRunCompletedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestRunWithDtlEnvEvent.fields = { + testRun: { + typeInfo: exports.TypeInfo.TestRun + } +}; +exports.TypeInfo.TestSession.fields = { + endDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + source: { + enumType: exports.TypeInfo.TestSessionSource + }, + startDate: { + isDate: true, + }, + state: { + enumType: exports.TypeInfo.TestSessionState + } +}; +exports.TypeInfo.TestSessionExploredWorkItemReference.fields = { + endTime: { + isDate: true, + }, + startTime: { + isDate: true, + } +}; +exports.TypeInfo.TestSettings2.fields = { + createdDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestSubResult.fields = { + completedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + }, + resultGroupType: { + enumType: exports.TypeInfo.ResultGroupType + }, + startedDate: { + isDate: true, + }, + subResults: { + isArray: true, + typeInfo: exports.TypeInfo.TestSubResult + } +}; +exports.TypeInfo.TestSuite.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TestSuite + }, + lastPopulatedDate: { + isDate: true, + }, + lastUpdatedDate: { + isDate: true, + } +}; +exports.TypeInfo.TestSummaryForWorkItem.fields = { + summary: { + typeInfo: exports.TypeInfo.AggregatedDataForResultTrend + } +}; +exports.TypeInfo.UpdatedProperties.fields = { + lastUpdated: { + isDate: true, + } +}; +exports.TypeInfo.UpdateTestRunRequest.fields = { + attachmentsToAdd: { + isArray: true, + typeInfo: exports.TypeInfo.TestResultAttachment + }, + testRun: { + typeInfo: exports.TypeInfo.LegacyTestRun + } +}; +exports.TypeInfo.UpdateTestRunResponse.fields = { + updatedProperties: { + typeInfo: exports.TypeInfo.UpdatedProperties + } +}; +exports.TypeInfo.WorkItemToTestLinks.fields = { + executedIn: { + enumType: exports.TypeInfo.Service + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.d.ts new file mode 100644 index 0000000..e9538d4 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.d.ts @@ -0,0 +1,794 @@ +import TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface AssociatedWorkItem { + assignedTo?: string; + /** + * Id of associated the work item. + */ + id?: number; + state?: string; + title?: string; + /** + * REST Url of the work item. + */ + url?: string; + webUrl?: string; + workItemType?: string; +} +export interface Change { + /** + * The type of change that was made to the item. + */ + changeType?: VersionControlChangeType; + /** + * Current version. + */ + item?: T; + /** + * Content of the item after the change. + */ + newContent?: ItemContent; + /** + * Path of the item on the server. + */ + sourceServerItem?: string; + /** + * URL to retrieve the item. + */ + url?: string; +} +export interface CheckinNote { + name?: string; + value?: string; +} +export interface FileContentMetadata { + contentType?: string; + encoding?: number; + extension?: string; + fileName?: string; + isBinary?: boolean; + isImage?: boolean; + vsLink?: string; +} +export interface GitRepository { + _links?: any; + defaultBranch?: string; + id?: string; + /** + * True if the repository is disabled. False otherwise. + */ + isDisabled?: boolean; + /** + * True if the repository was created as a fork. + */ + isFork?: boolean; + name?: string; + parentRepository?: GitRepositoryRef; + project?: TfsCoreInterfaces.TeamProjectReference; + remoteUrl?: string; + /** + * Compressed size (bytes) of the repository. + */ + size?: number; + sshUrl?: string; + url?: string; + validRemoteUrls?: string[]; + webUrl?: string; +} +export interface GitRepositoryRef { + /** + * Team Project Collection where this Fork resides + */ + collection?: TfsCoreInterfaces.TeamProjectCollectionReference; + id?: string; + /** + * True if the repository was created as a fork + */ + isFork?: boolean; + name?: string; + project?: TfsCoreInterfaces.TeamProjectReference; + remoteUrl?: string; + sshUrl?: string; + url?: string; +} +export interface ItemContent { + content?: string; + contentType?: ItemContentType; +} +export declare enum ItemContentType { + RawText = 0, + Base64Encoded = 1 +} +export interface ItemModel { + _links?: any; + content?: string; + contentMetadata?: FileContentMetadata; + isFolder?: boolean; + isSymLink?: boolean; + path?: string; + url?: string; +} +/** + * Class representing a branch object. + */ +export interface TfvcBranch extends TfvcBranchRef { + /** + * List of children for the branch. + */ + children?: TfvcBranch[]; + /** + * List of branch mappings. + */ + mappings?: TfvcBranchMapping[]; + /** + * Path of the branch's parent. + */ + parent?: TfvcShallowBranchRef; + /** + * List of paths of the related branches. + */ + relatedBranches?: TfvcShallowBranchRef[]; +} +/** + * A branch mapping. + */ +export interface TfvcBranchMapping { + /** + * Depth of the branch. + */ + depth?: string; + /** + * Server item for the branch. + */ + serverItem?: string; + /** + * Type of the branch. + */ + type?: string; +} +/** + * Metadata for a branchref. + */ +export interface TfvcBranchRef extends TfvcShallowBranchRef { + /** + * A collection of REST reference links. + */ + _links?: any; + /** + * Creation date of the branch. + */ + createdDate?: Date; + /** + * Branch description. + */ + description?: string; + /** + * Is the branch deleted? + */ + isDeleted?: boolean; + /** + * Alias or display name of user + */ + owner?: VSSInterfaces.IdentityRef; + /** + * URL to retrieve the item. + */ + url?: string; +} +/** + * A change. + */ +export interface TfvcChange extends Change { + /** + * List of merge sources in case of rename or branch creation. + */ + mergeSources?: TfvcMergeSource[]; + /** + * Version at which a (shelved) change was pended against + */ + pendingVersion?: number; +} +/** + * A collection of changes. + */ +export interface TfvcChangeset extends TfvcChangesetRef { + /** + * Changeset Account Id also known as Organization Id. + */ + accountId?: string; + /** + * List of associated changes. + */ + changes?: TfvcChange[]; + /** + * List of Checkin Notes for the changeset. + */ + checkinNotes?: CheckinNote[]; + /** + * Changeset collection Id. + */ + collectionId?: string; + /** + * True if more changes are available. + */ + hasMoreChanges?: boolean; + /** + * Policy Override for the changeset. + */ + policyOverride?: TfvcPolicyOverrideInfo; + /** + * Team Project Ids for the changeset. + */ + teamProjectIds?: string[]; + /** + * List of work items associated with the changeset. + */ + workItems?: AssociatedWorkItem[]; +} +/** + * Metadata for a changeset. + */ +export interface TfvcChangesetRef { + /** + * A collection of REST reference links. + */ + _links?: any; + /** + * Alias or display name of user. + */ + author?: VSSInterfaces.IdentityRef; + /** + * Changeset Id. + */ + changesetId?: number; + /** + * Alias or display name of user. + */ + checkedInBy?: VSSInterfaces.IdentityRef; + /** + * Comment for the changeset. + */ + comment?: string; + /** + * Was the Comment result truncated? + */ + commentTruncated?: boolean; + /** + * Creation date of the changeset. + */ + createdDate?: Date; + /** + * URL to retrieve the item. + */ + url?: string; +} +/** + * Criteria used in a search for change lists. + */ +export interface TfvcChangesetSearchCriteria { + /** + * Alias or display name of user who made the changes. + */ + author?: string; + /** + * Whether or not to follow renames for the given item being queried. + */ + followRenames?: boolean; + /** + * If provided, only include changesets created after this date (string). + */ + fromDate?: string; + /** + * If provided, only include changesets after this changesetID. + */ + fromId?: number; + /** + * Whether to include the _links field on the shallow references. + */ + includeLinks?: boolean; + /** + * Path of item to search under. + */ + itemPath?: string; + mappings?: TfvcMappingFilter[]; + /** + * If provided, only include changesets created before this date (string). + */ + toDate?: string; + /** + * If provided, a version descriptor for the latest change list to include. + */ + toId?: number; +} +/** + * Request body for Get batched changesets. + */ +export interface TfvcChangesetsRequestData { + /** + * List of changeset Ids. + */ + changesetIds?: number[]; + /** + * Max length of the comment. + */ + commentLength?: number; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; +} +/** + * Metadata for an item. + */ +export interface TfvcItem extends ItemModel { + /** + * Item changed datetime. + */ + changeDate?: Date; + /** + * Greater than 0 if item is deleted. + */ + deletionId?: number; + /** + * File encoding from database, -1 represents binary. + */ + encoding?: number; + /** + * MD5 hash as a base 64 string, applies to files only. + */ + hashValue?: string; + /** + * True if item is a branch. + */ + isBranch?: boolean; + /** + * True if there is a change pending. + */ + isPendingChange?: boolean; + /** + * The size of the file, if applicable. + */ + size?: number; + /** + * Changeset version Id. + */ + version?: number; +} +/** + * Item path and Version descriptor properties + */ +export interface TfvcItemDescriptor { + /** + * Item path. + */ + path?: string; + /** + * Defaults to OneLevel. + */ + recursionLevel?: VersionControlRecursionType; + /** + * Specify the desired version, can be null or empty string only if VersionType is latest or tip. + */ + version?: string; + /** + * Defaults to None. + */ + versionOption?: TfvcVersionOption; + /** + * Defaults to Latest. + */ + versionType?: TfvcVersionType; +} +/** + * Request body used by Get Items Batch + */ +export interface TfvcItemRequestData { + /** + * If true, include metadata about the file type + */ + includeContentMetadata?: boolean; + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + itemDescriptors?: TfvcItemDescriptor[]; +} +/** + * Metadata for a label. + */ +export interface TfvcLabel extends TfvcLabelRef { + /** + * List of items. + */ + items?: TfvcItem[]; +} +/** + * Metadata for a Label. + */ +export interface TfvcLabelRef { + /** + * Collection of reference links. + */ + _links?: any; + /** + * Label description. + */ + description?: string; + /** + * Label Id. + */ + id?: number; + /** + * Label scope. + */ + labelScope?: string; + /** + * Last modified datetime for the label. + */ + modifiedDate?: Date; + /** + * Label name. + */ + name?: string; + /** + * Label owner. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Label Url. + */ + url?: string; +} +export interface TfvcLabelRequestData { + /** + * Whether to include the _links field on the shallow references + */ + includeLinks?: boolean; + itemLabelFilter?: string; + labelScope?: string; + maxItemCount?: number; + name?: string; + owner?: string; +} +/** + * MappingFilter can be used to include or exclude specific paths. + */ +export interface TfvcMappingFilter { + /** + * True if ServerPath should be excluded. + */ + exclude?: boolean; + /** + * Path to be included or excluded. + */ + serverPath?: string; +} +export interface TfvcMergeSource { + /** + * Indicates if this a rename source. If false, it is a merge source. + */ + isRename?: boolean; + /** + * The server item of the merge source. + */ + serverItem?: string; + /** + * Start of the version range. + */ + versionFrom?: number; + /** + * End of the version range. + */ + versionTo?: number; +} +/** + * Policy failure information. + */ +export interface TfvcPolicyFailureInfo { + /** + * Policy failure message. + */ + message?: string; + /** + * Name of the policy that failed. + */ + policyName?: string; +} +/** + * Information on the policy override. + */ +export interface TfvcPolicyOverrideInfo { + /** + * Overidden policy comment. + */ + comment?: string; + /** + * Information on the failed policy that was overridden. + */ + policyFailures?: TfvcPolicyFailureInfo[]; +} +/** + * This is the shallow branchref class. + */ +export interface TfvcShallowBranchRef { + /** + * Path for the branch. + */ + path?: string; +} +/** + * Metadata for a shelveset. + */ +export interface TfvcShelveset extends TfvcShelvesetRef { + /** + * List of changes. + */ + changes?: TfvcChange[]; + /** + * List of checkin notes. + */ + notes?: CheckinNote[]; + /** + * Policy override information if applicable. + */ + policyOverride?: TfvcPolicyOverrideInfo; + /** + * List of associated workitems. + */ + workItems?: AssociatedWorkItem[]; +} +/** + * Metadata for a shallow shelveset. + */ +export interface TfvcShelvesetRef { + /** + * List of reference links for the shelveset. + */ + _links?: any; + /** + * Shelveset comment. + */ + comment?: string; + /** + * Shelveset comment truncated as applicable. + */ + commentTruncated?: boolean; + /** + * Shelveset create date. + */ + createdDate?: Date; + /** + * Shelveset Id. + */ + id?: string; + /** + * Shelveset name. + */ + name?: string; + /** + * Shelveset Owner. + */ + owner?: VSSInterfaces.IdentityRef; + /** + * Shelveset Url. + */ + url?: string; +} +export interface TfvcShelvesetRequestData { + /** + * Whether to include policyOverride and notes Only applies when requesting a single deep shelveset + */ + includeDetails?: boolean; + /** + * Whether to include the _links field on the shallow references. Does not apply when requesting a single deep shelveset object. Links will always be included in the deep shelveset. + */ + includeLinks?: boolean; + /** + * Whether to include workItems + */ + includeWorkItems?: boolean; + /** + * Max number of changes to include + */ + maxChangeCount?: number; + /** + * Max length of comment + */ + maxCommentLength?: number; + /** + * Shelveset name + */ + name?: string; + /** + * Owner's ID. Could be a name or a guid. + */ + owner?: string; +} +export interface TfvcStatistics { + /** + * Id of the last changeset the stats are based on. + */ + changesetId?: number; + /** + * Count of files at the requested scope. + */ + fileCountTotal?: number; +} +/** + * Version descriptor properties. + */ +export interface TfvcVersionDescriptor { + /** + * Version object. + */ + version?: string; + versionOption?: TfvcVersionOption; + versionType?: TfvcVersionType; +} +/** + * Options for Version handling. + */ +export declare enum TfvcVersionOption { + /** + * None. + */ + None = 0, + /** + * Return the previous version. + */ + Previous = 1, + /** + * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. + */ + UseRename = 2 +} +/** + * Type of Version object + */ +export declare enum TfvcVersionType { + /** + * Version is treated as a ChangesetId. + */ + None = 0, + /** + * Version is treated as a ChangesetId. + */ + Changeset = 1, + /** + * Version is treated as a Shelveset name and owner. + */ + Shelveset = 2, + /** + * Version is treated as a Change. + */ + Change = 3, + /** + * Version is treated as a Date. + */ + Date = 4, + /** + * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. + */ + Latest = 5, + /** + * Version will be treated as a Tip, if no version is defined latest will be used. + */ + Tip = 6, + /** + * Version will be treated as a MergeSource. + */ + MergeSource = 7 +} +export declare enum VersionControlChangeType { + None = 0, + Add = 1, + Edit = 2, + Encoding = 4, + Rename = 8, + Delete = 16, + Undelete = 32, + Branch = 64, + Merge = 128, + Lock = 256, + Rollback = 512, + SourceRename = 1024, + TargetRename = 2048, + Property = 4096, + All = 8191 +} +export interface VersionControlProjectInfo { + defaultSourceControlType?: TfsCoreInterfaces.SourceControlTypes; + project?: TfsCoreInterfaces.TeamProjectReference; + supportsGit?: boolean; + supportsTFVC?: boolean; +} +export declare enum VersionControlRecursionType { + /** + * Only return the specified item. + */ + None = 0, + /** + * Return the specified item and its direct children. + */ + OneLevel = 1, + /** + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + */ + OneLevelPlusNestedEmptyFolders = 4, + /** + * Return specified item and all descendants + */ + Full = 120 +} +export declare var TypeInfo: { + Change: any; + GitRepository: any; + GitRepositoryRef: any; + ItemContent: any; + ItemContentType: { + enumValues: { + "rawText": number; + "base64Encoded": number; + }; + }; + TfvcBranch: any; + TfvcBranchRef: any; + TfvcChange: any; + TfvcChangeset: any; + TfvcChangesetRef: any; + TfvcItem: any; + TfvcItemDescriptor: any; + TfvcItemRequestData: any; + TfvcLabel: any; + TfvcLabelRef: any; + TfvcShelveset: any; + TfvcShelvesetRef: any; + TfvcVersionDescriptor: any; + TfvcVersionOption: { + enumValues: { + "none": number; + "previous": number; + "useRename": number; + }; + }; + TfvcVersionType: { + enumValues: { + "none": number; + "changeset": number; + "shelveset": number; + "change": number; + "date": number; + "latest": number; + "tip": number; + "mergeSource": number; + }; + }; + VersionControlChangeType: { + enumValues: { + "none": number; + "add": number; + "edit": number; + "encoding": number; + "rename": number; + "delete": number; + "undelete": number; + "branch": number; + "merge": number; + "lock": number; + "rollback": number; + "sourceRename": number; + "targetRename": number; + "property": number; + "all": number; + }; + }; + VersionControlProjectInfo: any; + VersionControlRecursionType: { + enumValues: { + "none": number; + "oneLevel": number; + "oneLevelPlusNestedEmptyFolders": number; + "full": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.js b/node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.js new file mode 100644 index 0000000..b044fd8 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/TfvcInterfaces.js @@ -0,0 +1,310 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const TfsCoreInterfaces = require("../interfaces/CoreInterfaces"); +var ItemContentType; +(function (ItemContentType) { + ItemContentType[ItemContentType["RawText"] = 0] = "RawText"; + ItemContentType[ItemContentType["Base64Encoded"] = 1] = "Base64Encoded"; +})(ItemContentType = exports.ItemContentType || (exports.ItemContentType = {})); +/** + * Options for Version handling. + */ +var TfvcVersionOption; +(function (TfvcVersionOption) { + /** + * None. + */ + TfvcVersionOption[TfvcVersionOption["None"] = 0] = "None"; + /** + * Return the previous version. + */ + TfvcVersionOption[TfvcVersionOption["Previous"] = 1] = "Previous"; + /** + * Only usuable with versiontype MergeSource and integer versions, uses RenameSource identifier instead of Merge identifier. + */ + TfvcVersionOption[TfvcVersionOption["UseRename"] = 2] = "UseRename"; +})(TfvcVersionOption = exports.TfvcVersionOption || (exports.TfvcVersionOption = {})); +/** + * Type of Version object + */ +var TfvcVersionType; +(function (TfvcVersionType) { + /** + * Version is treated as a ChangesetId. + */ + TfvcVersionType[TfvcVersionType["None"] = 0] = "None"; + /** + * Version is treated as a ChangesetId. + */ + TfvcVersionType[TfvcVersionType["Changeset"] = 1] = "Changeset"; + /** + * Version is treated as a Shelveset name and owner. + */ + TfvcVersionType[TfvcVersionType["Shelveset"] = 2] = "Shelveset"; + /** + * Version is treated as a Change. + */ + TfvcVersionType[TfvcVersionType["Change"] = 3] = "Change"; + /** + * Version is treated as a Date. + */ + TfvcVersionType[TfvcVersionType["Date"] = 4] = "Date"; + /** + * If Version is defined the Latest of that Version will be used, if no version is defined the latest ChangesetId will be used. + */ + TfvcVersionType[TfvcVersionType["Latest"] = 5] = "Latest"; + /** + * Version will be treated as a Tip, if no version is defined latest will be used. + */ + TfvcVersionType[TfvcVersionType["Tip"] = 6] = "Tip"; + /** + * Version will be treated as a MergeSource. + */ + TfvcVersionType[TfvcVersionType["MergeSource"] = 7] = "MergeSource"; +})(TfvcVersionType = exports.TfvcVersionType || (exports.TfvcVersionType = {})); +var VersionControlChangeType; +(function (VersionControlChangeType) { + VersionControlChangeType[VersionControlChangeType["None"] = 0] = "None"; + VersionControlChangeType[VersionControlChangeType["Add"] = 1] = "Add"; + VersionControlChangeType[VersionControlChangeType["Edit"] = 2] = "Edit"; + VersionControlChangeType[VersionControlChangeType["Encoding"] = 4] = "Encoding"; + VersionControlChangeType[VersionControlChangeType["Rename"] = 8] = "Rename"; + VersionControlChangeType[VersionControlChangeType["Delete"] = 16] = "Delete"; + VersionControlChangeType[VersionControlChangeType["Undelete"] = 32] = "Undelete"; + VersionControlChangeType[VersionControlChangeType["Branch"] = 64] = "Branch"; + VersionControlChangeType[VersionControlChangeType["Merge"] = 128] = "Merge"; + VersionControlChangeType[VersionControlChangeType["Lock"] = 256] = "Lock"; + VersionControlChangeType[VersionControlChangeType["Rollback"] = 512] = "Rollback"; + VersionControlChangeType[VersionControlChangeType["SourceRename"] = 1024] = "SourceRename"; + VersionControlChangeType[VersionControlChangeType["TargetRename"] = 2048] = "TargetRename"; + VersionControlChangeType[VersionControlChangeType["Property"] = 4096] = "Property"; + VersionControlChangeType[VersionControlChangeType["All"] = 8191] = "All"; +})(VersionControlChangeType = exports.VersionControlChangeType || (exports.VersionControlChangeType = {})); +var VersionControlRecursionType; +(function (VersionControlRecursionType) { + /** + * Only return the specified item. + */ + VersionControlRecursionType[VersionControlRecursionType["None"] = 0] = "None"; + /** + * Return the specified item and its direct children. + */ + VersionControlRecursionType[VersionControlRecursionType["OneLevel"] = 1] = "OneLevel"; + /** + * Return the specified item and its direct children, as well as recursive chains of nested child folders that only contain a single folder. + */ + VersionControlRecursionType[VersionControlRecursionType["OneLevelPlusNestedEmptyFolders"] = 4] = "OneLevelPlusNestedEmptyFolders"; + /** + * Return specified item and all descendants + */ + VersionControlRecursionType[VersionControlRecursionType["Full"] = 120] = "Full"; +})(VersionControlRecursionType = exports.VersionControlRecursionType || (exports.VersionControlRecursionType = {})); +exports.TypeInfo = { + Change: {}, + GitRepository: {}, + GitRepositoryRef: {}, + ItemContent: {}, + ItemContentType: { + enumValues: { + "rawText": 0, + "base64Encoded": 1 + } + }, + TfvcBranch: {}, + TfvcBranchRef: {}, + TfvcChange: {}, + TfvcChangeset: {}, + TfvcChangesetRef: {}, + TfvcItem: {}, + TfvcItemDescriptor: {}, + TfvcItemRequestData: {}, + TfvcLabel: {}, + TfvcLabelRef: {}, + TfvcShelveset: {}, + TfvcShelvesetRef: {}, + TfvcVersionDescriptor: {}, + TfvcVersionOption: { + enumValues: { + "none": 0, + "previous": 1, + "useRename": 2 + } + }, + TfvcVersionType: { + enumValues: { + "none": 0, + "changeset": 1, + "shelveset": 2, + "change": 3, + "date": 4, + "latest": 5, + "tip": 6, + "mergeSource": 7 + } + }, + VersionControlChangeType: { + enumValues: { + "none": 0, + "add": 1, + "edit": 2, + "encoding": 4, + "rename": 8, + "delete": 16, + "undelete": 32, + "branch": 64, + "merge": 128, + "lock": 256, + "rollback": 512, + "sourceRename": 1024, + "targetRename": 2048, + "property": 4096, + "all": 8191 + } + }, + VersionControlProjectInfo: {}, + VersionControlRecursionType: { + enumValues: { + "none": 0, + "oneLevel": 1, + "oneLevelPlusNestedEmptyFolders": 4, + "full": 120 + } + }, +}; +exports.TypeInfo.Change.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.GitRepository.fields = { + parentRepository: { + typeInfo: exports.TypeInfo.GitRepositoryRef + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.GitRepositoryRef.fields = { + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; +exports.TypeInfo.ItemContent.fields = { + contentType: { + enumType: exports.TypeInfo.ItemContentType + } +}; +exports.TypeInfo.TfvcBranch.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcBranch + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcBranchRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcChange.fields = { + changeType: { + enumType: exports.TypeInfo.VersionControlChangeType + }, + newContent: { + typeInfo: exports.TypeInfo.ItemContent + } +}; +exports.TypeInfo.TfvcChangeset.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcChange + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcChangesetRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcItem.fields = { + changeDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcItemDescriptor.fields = { + recursionLevel: { + enumType: exports.TypeInfo.VersionControlRecursionType + }, + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption + }, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } +}; +exports.TypeInfo.TfvcItemRequestData.fields = { + itemDescriptors: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItemDescriptor + } +}; +exports.TypeInfo.TfvcLabel.fields = { + items: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcItem + }, + modifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcLabelRef.fields = { + modifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcShelveset.fields = { + changes: { + isArray: true, + typeInfo: exports.TypeInfo.TfvcChange + }, + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcShelvesetRef.fields = { + createdDate: { + isDate: true, + } +}; +exports.TypeInfo.TfvcVersionDescriptor.fields = { + versionOption: { + enumType: exports.TypeInfo.TfvcVersionOption + }, + versionType: { + enumType: exports.TypeInfo.TfvcVersionType + } +}; +exports.TypeInfo.VersionControlProjectInfo.fields = { + defaultSourceControlType: { + enumType: TfsCoreInterfaces.TypeInfo.SourceControlTypes + }, + project: { + typeInfo: TfsCoreInterfaces.TypeInfo.TeamProjectReference + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WikiInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/WikiInterfaces.d.ts new file mode 100644 index 0000000..3afbb62 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WikiInterfaces.d.ts @@ -0,0 +1,344 @@ +import GitInterfaces = require("../interfaces/GitInterfaces"); +/** + * Defines a wiki repository which encapsulates the git repository backing the wiki. + */ +export interface Wiki extends WikiCreateParameters { + /** + * The head commit associated with the git repository backing up the wiki. + */ + headCommit?: string; + /** + * The ID of the wiki which is same as the ID of the Git repository that it is backed by. + */ + id?: string; + /** + * The git repository that backs up the wiki. + */ + repository?: GitInterfaces.GitRepository; +} +/** + * Defines properties for wiki attachment file. + */ +export interface WikiAttachment { + /** + * Name of the wiki attachment file. + */ + name?: string; + /** + * Path of the wiki attachment file. + */ + path?: string; +} +/** + * Response contract for the Wiki Attachments API + */ +export interface WikiAttachmentResponse { + /** + * Defines properties for wiki attachment file. + */ + attachment?: WikiAttachment; + /** + * Contains the list of ETag values from the response header of the attachments API call. The first item in the list contains the version of the wiki attachment. + */ + eTag?: string[]; +} +/** + * Base wiki creation parameters. + */ +export interface WikiCreateBaseParameters { + /** + * Folder path inside repository which is shown as Wiki. Not required for ProjectWiki type. + */ + mappedPath?: string; + /** + * Wiki name. + */ + name?: string; + /** + * ID of the project in which the wiki is to be created. + */ + projectId?: string; + /** + * ID of the git repository that backs up the wiki. Not required for ProjectWiki type. + */ + repositoryId?: string; + /** + * Type of the wiki. + */ + type?: WikiType; +} +/** + * Wiki creations parameters. + */ +export interface WikiCreateParameters { + /** + * Wiki name. + */ + name?: string; + /** + * ID of the project in which the wiki is to be created. + */ + projectId?: string; +} +/** + * Wiki creation parameters. + */ +export interface WikiCreateParametersV2 extends WikiCreateBaseParameters { + /** + * Version of the wiki. Not required for ProjectWiki type. + */ + version?: GitInterfaces.GitVersionDescriptor; +} +/** + * Defines a page in a wiki. + */ +export interface WikiPage extends WikiPageCreateOrUpdateParameters { + /** + * Path of the git item corresponding to the wiki page stored in the backing Git repository. + */ + gitItemPath?: string; + /** + * When present, permanent identifier for the wiki page + */ + id?: number; + /** + * True if a page is non-conforming, i.e. 1) if the name doesn't match page naming standards. 2) if the page does not have a valid entry in the appropriate order file. + */ + isNonConformant?: boolean; + /** + * True if this page has subpages under its path. + */ + isParentPage?: boolean; + /** + * Order of the wiki page, relative to other pages in the same hierarchy level. + */ + order?: number; + /** + * Path of the wiki page. + */ + path?: string; + /** + * Remote web url to the wiki page. + */ + remoteUrl?: string; + /** + * List of subpages of the current page. + */ + subPages?: WikiPage[]; + /** + * REST url for this wiki page. + */ + url?: string; +} +/** + * Contract encapsulating parameters for the page create or update operations. + */ +export interface WikiPageCreateOrUpdateParameters { + /** + * Content of the wiki page. + */ + content?: string; +} +/** + * Defines a page with its metedata in a wiki. + */ +export interface WikiPageDetail { + /** + * When present, permanent identifier for the wiki page + */ + id?: number; + /** + * Path of the wiki page. + */ + path?: string; + /** + * Path of the wiki page. + */ + viewStats?: WikiPageStat[]; +} +/** + * Request contract for Wiki Page Move. + */ +export interface WikiPageMove extends WikiPageMoveParameters { + /** + * Resultant page of this page move operation. + */ + page?: WikiPage; +} +/** + * Contract encapsulating parameters for the page move operation. + */ +export interface WikiPageMoveParameters { + /** + * New order of the wiki page. + */ + newOrder?: number; + /** + * New path of the wiki page. + */ + newPath?: string; + /** + * Current path of the wiki page. + */ + path?: string; +} +/** + * Response contract for the Wiki Page Move API. + */ +export interface WikiPageMoveResponse { + /** + * Contains the list of ETag values from the response header of the page move API call. The first item in the list contains the version of the wiki page subject to page move. + */ + eTag?: string[]; + /** + * Defines properties for wiki page move. + */ + pageMove?: WikiPageMove; +} +/** + * Response contract for the Wiki Pages PUT, PATCH and DELETE APIs. + */ +export interface WikiPageResponse { + /** + * Contains the list of ETag values from the response header of the pages API call. The first item in the list contains the version of the wiki page. + */ + eTag?: string[]; + /** + * Defines properties for wiki page. + */ + page?: WikiPage; +} +/** + * Contract encapsulating parameters for the pages batch. + */ +export interface WikiPagesBatchRequest { + /** + * If the list of page data returned is not complete, a continuation token to query next batch of pages is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of Wiki Page Data. + */ + continuationToken?: string; + /** + * last N days from the current day for which page views is to be returned. It's inclusive of current day. + */ + pageViewsForDays?: number; + /** + * Total count of pages on a wiki to return. + */ + top?: number; +} +/** + * Defines properties for wiki page stat. + */ +export interface WikiPageStat { + /** + * the count of the stat for the Day + */ + count?: number; + /** + * Day of the stat + */ + day?: Date; +} +/** + * Defines properties for wiki page view stats. + */ +export interface WikiPageViewStats { + /** + * Wiki page view count. + */ + count?: number; + /** + * Wiki page last viewed time. + */ + lastViewedTime?: Date; + /** + * Wiki page path. + */ + path?: string; +} +/** + * Wiki types. + */ +export declare enum WikiType { + /** + * Indicates that the wiki is provisioned for the team project + */ + ProjectWiki = 0, + /** + * Indicates that the wiki is published from a git repository + */ + CodeWiki = 1 +} +export interface WikiUpdatedNotificationMessage { + /** + * Collection host Id for which the wikis are updated. + */ + collectionId?: string; + /** + * Project Id for which the wikis are updated. + */ + projectId?: string; + /** + * Repository Id associated with the particular wiki which is added, updated or deleted. + */ + repositoryId?: string; +} +/** + * Wiki update parameters. + */ +export interface WikiUpdateParameters { + /** + * Name for wiki. + */ + name?: string; + /** + * Versions of the wiki. + */ + versions?: GitInterfaces.GitVersionDescriptor[]; +} +/** + * Defines a wiki resource. + */ +export interface WikiV2 extends WikiCreateBaseParameters { + /** + * ID of the wiki. + */ + id?: string; + /** + * Is wiki repository disabled + */ + isDisabled?: boolean; + /** + * Properties of the wiki. + */ + properties?: { + [key: string]: string; + }; + /** + * Remote web url to the wiki. + */ + remoteUrl?: string; + /** + * REST url for this wiki. + */ + url?: string; + /** + * Versions of the wiki. + */ + versions?: GitInterfaces.GitVersionDescriptor[]; +} +export declare var TypeInfo: { + Wiki: any; + WikiCreateBaseParameters: any; + WikiCreateParametersV2: any; + WikiPageDetail: any; + WikiPageStat: any; + WikiPageViewStats: any; + WikiType: { + enumValues: { + "projectWiki": number; + "codeWiki": number; + }; + }; + WikiUpdateParameters: any; + WikiV2: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WikiInterfaces.js b/node_modules/azure-devops-node-api/interfaces/WikiInterfaces.js new file mode 100644 index 0000000..d77baa8 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WikiInterfaces.js @@ -0,0 +1,91 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const GitInterfaces = require("../interfaces/GitInterfaces"); +/** + * Wiki types. + */ +var WikiType; +(function (WikiType) { + /** + * Indicates that the wiki is provisioned for the team project + */ + WikiType[WikiType["ProjectWiki"] = 0] = "ProjectWiki"; + /** + * Indicates that the wiki is published from a git repository + */ + WikiType[WikiType["CodeWiki"] = 1] = "CodeWiki"; +})(WikiType = exports.WikiType || (exports.WikiType = {})); +exports.TypeInfo = { + Wiki: {}, + WikiCreateBaseParameters: {}, + WikiCreateParametersV2: {}, + WikiPageDetail: {}, + WikiPageStat: {}, + WikiPageViewStats: {}, + WikiType: { + enumValues: { + "projectWiki": 0, + "codeWiki": 1 + } + }, + WikiUpdateParameters: {}, + WikiV2: {}, +}; +exports.TypeInfo.Wiki.fields = { + repository: { + typeInfo: GitInterfaces.TypeInfo.GitRepository + } +}; +exports.TypeInfo.WikiCreateBaseParameters.fields = { + type: { + enumType: exports.TypeInfo.WikiType + } +}; +exports.TypeInfo.WikiCreateParametersV2.fields = { + type: { + enumType: exports.TypeInfo.WikiType + }, + version: { + typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor + } +}; +exports.TypeInfo.WikiPageDetail.fields = { + viewStats: { + isArray: true, + typeInfo: exports.TypeInfo.WikiPageStat + } +}; +exports.TypeInfo.WikiPageStat.fields = { + day: { + isDate: true, + } +}; +exports.TypeInfo.WikiPageViewStats.fields = { + lastViewedTime: { + isDate: true, + } +}; +exports.TypeInfo.WikiUpdateParameters.fields = { + versions: { + isArray: true, + typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor + } +}; +exports.TypeInfo.WikiV2.fields = { + type: { + enumType: exports.TypeInfo.WikiType + }, + versions: { + isArray: true, + typeInfo: GitInterfaces.TypeInfo.GitVersionDescriptor + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/WorkInterfaces.d.ts new file mode 100644 index 0000000..58e1f75 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkInterfaces.d.ts @@ -0,0 +1,1411 @@ +import SystemInterfaces = require("../interfaces/common/System"); +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +import WorkItemTrackingInterfaces = require("../interfaces/WorkItemTrackingInterfaces"); +export interface Activity { + capacityPerDay?: number; + name?: string; +} +export interface attribute { +} +export interface BacklogColumn { + columnFieldReference?: WorkItemTrackingInterfaces.WorkItemFieldReference; + width?: number; +} +export interface BacklogConfiguration { + /** + * Behavior/type field mapping + */ + backlogFields?: BacklogFields; + /** + * Bugs behavior + */ + bugsBehavior?: BugsBehavior; + /** + * Hidden Backlog + */ + hiddenBacklogs?: string[]; + /** + * Is BugsBehavior Configured in the process + */ + isBugsBehaviorConfigured?: boolean; + /** + * Portfolio backlog descriptors + */ + portfolioBacklogs?: BacklogLevelConfiguration[]; + /** + * Requirement backlog + */ + requirementBacklog?: BacklogLevelConfiguration; + /** + * Task backlog + */ + taskBacklog?: BacklogLevelConfiguration; + url?: string; + /** + * Mapped states for work item types + */ + workItemTypeMappedStates?: WorkItemTypeStateInfo[]; +} +export interface BacklogFields { + /** + * Field Type (e.g. Order, Activity) to Field Reference Name map + */ + typeFields?: { + [key: string]: string; + }; +} +/** + * Contract representing a backlog level + */ +export interface BacklogLevel { + /** + * Reference name of the corresponding WIT category + */ + categoryReferenceName?: string; + /** + * Plural name for the backlog level + */ + pluralName?: string; + /** + * Collection of work item states that are included in the plan. The server will filter to only these work item types. + */ + workItemStates?: string[]; + /** + * Collection of valid workitem type names for the given backlog level + */ + workItemTypes?: string[]; +} +export interface BacklogLevelConfiguration { + /** + * List of fields to include in Add Panel + */ + addPanelFields?: WorkItemTrackingInterfaces.WorkItemFieldReference[]; + /** + * Color for the backlog level + */ + color?: string; + /** + * Default list of columns for the backlog + */ + columnFields?: BacklogColumn[]; + /** + * Default Work Item Type for the backlog + */ + defaultWorkItemType?: WorkItemTrackingInterfaces.WorkItemTypeReference; + /** + * Backlog Id (for Legacy Backlog Level from process config it can be categoryref name) + */ + id?: string; + /** + * Indicates whether the backlog level is hidden + */ + isHidden?: boolean; + /** + * Backlog Name + */ + name?: string; + /** + * Backlog Rank (Taskbacklog is 0) + */ + rank?: number; + /** + * The type of this backlog level + */ + type?: BacklogType; + /** + * Max number of work items to show in the given backlog + */ + workItemCountLimit?: number; + /** + * Work Item types participating in this backlog as known by the project/Process, can be overridden by team settings for bugs + */ + workItemTypes?: WorkItemTrackingInterfaces.WorkItemTypeReference[]; +} +/** + * Represents work items in a backlog level + */ +export interface BacklogLevelWorkItems { + /** + * A list of work items within a backlog level + */ + workItems?: WorkItemTrackingInterfaces.WorkItemLink[]; +} +/** + * Definition of the type of backlog level + */ +export declare enum BacklogType { + /** + * Portfolio backlog level + */ + Portfolio = 0, + /** + * Requirement backlog level + */ + Requirement = 1, + /** + * Task backlog level + */ + Task = 2 +} +export interface Board extends BoardReference { + _links?: any; + allowedMappings?: { + [key: string]: { + [key: string]: string[]; + }; + }; + canEdit?: boolean; + columns?: BoardColumn[]; + fields?: BoardFields; + isValid?: boolean; + revision?: number; + rows?: BoardRow[]; +} +/** + * Represents a board badge. + */ +export interface BoardBadge { + /** + * The ID of the board represented by this badge. + */ + boardId?: string; + /** + * A link to the SVG resource. + */ + imageUrl?: string; +} +/** + * Determines what columns to include on the board badge + */ +export declare enum BoardBadgeColumnOptions { + /** + * Only include In Progress columns + */ + InProgressColumns = 0, + /** + * Include all columns + */ + AllColumns = 1, + /** + * Include a custom set of columns + */ + CustomColumns = 2 +} +export interface BoardCardRuleSettings { + _links?: any; + rules?: { + [key: string]: Rule[]; + }; + url?: string; +} +export interface BoardCardSettings { + cards?: { + [key: string]: FieldSetting[]; + }; +} +export interface BoardChart extends BoardChartReference { + /** + * The links for the resource + */ + _links?: any; + /** + * The settings for the resource + */ + settings?: { + [key: string]: any; + }; +} +export interface BoardChartReference { + /** + * Name of the resource + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +export interface BoardColumn { + columnType?: BoardColumnType; + description?: string; + id?: string; + isSplit?: boolean; + itemLimit?: number; + name?: string; + stateMappings?: { + [key: string]: string; + }; +} +export declare enum BoardColumnType { + Incoming = 0, + InProgress = 1, + Outgoing = 2 +} +export interface BoardFields { + columnField?: FieldReference; + doneField?: FieldReference; + rowField?: FieldReference; +} +export interface BoardReference { + /** + * Id of the resource + */ + id?: string; + /** + * Name of the resource + */ + name?: string; + /** + * Full http link to the resource + */ + url?: string; +} +export interface BoardRow { + id?: string; + name?: string; +} +export interface BoardSuggestedValue { + name?: string; +} +export interface BoardUserSettings { + autoRefreshState?: boolean; +} +/** + * The behavior of the work item types that are in the work item category specified in the BugWorkItems section in the Process Configuration + */ +export declare enum BugsBehavior { + Off = 0, + AsRequirements = 1, + AsTasks = 2 +} +export interface CapacityContractBase extends TeamSettingsDataContractBase { + /** + * Collection of capacities associated with the team member + */ + activities?: Activity[]; + /** + * The days off associated with the team member + */ + daysOff?: DateRange[]; +} +/** + * Expected data from PATCH + */ +export interface CapacityPatch { + activities?: Activity[]; + daysOff?: DateRange[]; +} +/** + * Card settings, such as fields and rules + */ +export interface CardFieldSettings { + /** + * A collection of field information of additional fields on cards. The index in the collection signifies the order of the field among the additional fields. Currently unused. Should be used with User Story 691539: Card setting: additional fields + */ + additionalFields?: FieldInfo[]; + /** + * Display format for the assigned to field + */ + assignedToDisplayFormat?: IdentityDisplayFormat; + /** + * A collection of field information of rendered core fields on cards. + */ + coreFields?: FieldInfo[]; + /** + * Flag indicating whether to show assigned to field on cards. When true, AssignedToDisplayFormat will determine how the field will be displayed + */ + showAssignedTo?: boolean; + /** + * Flag indicating whether to show child rollup on cards + */ + showChildRollup?: boolean; + /** + * Flag indicating whether to show empty fields on cards + */ + showEmptyFields?: boolean; + /** + * Flag indicating whether to show ID on cards + */ + showId?: boolean; + /** + * Flag indicating whether to show show parent field on cards + */ + showParent?: boolean; + /** + * Flag indicating whether to show state field on cards + */ + showState?: boolean; + /** + * Flag indicating whether to show tags on cards + */ + showTags?: boolean; +} +/** + * Card settings, such as fields and rules + */ +export interface CardSettings { + /** + * A collection of settings related to rendering of fields on cards + */ + fields: CardFieldSettings; +} +/** + * Details about a given backlog category + */ +export interface CategoryConfiguration { + /** + * Name + */ + name?: string; + /** + * Category Reference Name + */ + referenceName?: string; + /** + * Work item types for the backlog category + */ + workItemTypes?: WorkItemTrackingInterfaces.WorkItemTypeReference[]; +} +export interface CreatePlan { + /** + * Description of the plan + */ + description?: string; + /** + * Name of the plan to create. + */ + name?: string; + /** + * Plan properties. + */ + properties?: any; + /** + * Type of plan to create. + */ + type?: PlanType; +} +export interface DateRange { + /** + * End of the date range. + */ + end?: Date; + /** + * Start of the date range. + */ + start?: Date; +} +/** + * Data contract for Data of Delivery View + */ +export interface DeliveryViewData extends PlanViewData { + /** + * Work item child id to parent id map + */ + childIdToParentIdMap?: { + [key: number]: number; + }; + /** + * Filter criteria status of the timeline + */ + criteriaStatus?: TimelineCriteriaStatus; + /** + * The end date of the delivery view data + */ + endDate?: Date; + /** + * Max number of teams that can be configured for a delivery plan + */ + maxExpandedTeams?: number; + /** + * Mapping between parent id, title and all the child work item ids + */ + parentItemMaps?: ParentChildWIMap[]; + /** + * The start date for the delivery view data + */ + startDate?: Date; + /** + * All the team data + */ + teams?: TimelineTeamData[]; + /** + * List of all work item ids that have a dependency but not a violation + */ + workItemDependencies?: number[]; + /** + * List of all work item ids that have a violation + */ + workItemViolations?: number[]; +} +/** + * Collection of properties, specific to the DeliveryTimelineView + */ +export interface DeliveryViewPropertyCollection { + /** + * Card settings + */ + cardSettings?: CardSettings; + /** + * Field criteria + */ + criteria?: FilterClause[]; + /** + * Markers. Will be missing/null if there are no markers. + */ + markers?: Marker[]; + /** + * Card style settings + */ + styleSettings?: Rule[]; + /** + * tag style settings + */ + tagStyleSettings?: Rule[]; + /** + * Team backlog mappings + */ + teamBacklogMappings?: TeamBacklogMapping[]; +} +/** + * Object bag storing the set of permissions relevant to this plan + */ +export interface FieldInfo { + /** + * The additional field display name + */ + displayName?: string; + /** + * The additional field type + */ + fieldType?: FieldType; + /** + * Indicates if the field definition is for an identity field. + */ + isIdentity?: boolean; + /** + * The additional field reference name + */ + referenceName?: string; +} +/** + * An abstracted reference to a field + */ +export interface FieldReference { + /** + * fieldRefName for the field + */ + referenceName?: string; + /** + * Full http link to more information about the field + */ + url?: string; +} +export interface FieldSetting { +} +export declare enum FieldType { + String = 0, + PlainText = 1, + Integer = 2, + DateTime = 3, + TreePath = 4, + Boolean = 5, + Double = 6 +} +export interface FilterClause { + fieldName?: string; + index?: number; + logicalOperator?: string; + operator?: string; + value?: string; +} +export interface FilterGroup { + end?: number; + level?: number; + start?: number; +} +/** + * Enum for the various modes of identity picker + */ +export declare enum IdentityDisplayFormat { + /** + * Display avatar only + */ + AvatarOnly = 0, + /** + * Display Full name only + */ + FullName = 1, + /** + * Display Avatar and Full name + */ + AvatarAndFullName = 2 +} +export interface ITaskboardColumnMapping { + state?: string; + workItemType?: string; +} +/** + * Capacity and teams for all teams in an iteration + */ +export interface IterationCapacity { + teams?: TeamCapacityTotals[]; + totalIterationCapacityPerDay?: number; + totalIterationDaysOff?: number; +} +/** + * Represents work items in an iteration backlog + */ +export interface IterationWorkItems extends TeamSettingsDataContractBase { + /** + * Work item relations + */ + workItemRelations?: WorkItemTrackingInterfaces.WorkItemLink[]; +} +/** + * Client serialization contract for Delivery Timeline Markers. + */ +export interface Marker { + /** + * Color associated with the marker. + */ + color?: string; + /** + * Where the marker should be displayed on the timeline. + */ + date?: Date; + /** + * Label/title for the marker. + */ + label?: string; +} +export interface Member { + displayName?: string; + id?: string; + imageUrl?: string; + uniqueName?: string; + url?: string; +} +export interface ParentChildWIMap { + childWorkItemIds?: number[]; + id?: number; + title?: string; + workItemTypeName?: string; +} +/** + * Data contract for the plan definition + */ +export interface Plan { + /** + * Identity that created this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. + */ + createdByIdentity?: VSSInterfaces.IdentityRef; + /** + * Date when the plan was created + */ + createdDate?: Date; + /** + * Description of the plan + */ + description?: string; + /** + * Id of the plan + */ + id?: string; + /** + * Identity that last modified this plan. Defaults to null for records before upgrading to ScaledAgileViewComponent4. + */ + modifiedByIdentity?: VSSInterfaces.IdentityRef; + /** + * Date when the plan was last modified. Default to CreatedDate when the plan is first created. + */ + modifiedDate?: Date; + /** + * Name of the plan + */ + name?: string; + /** + * The PlanPropertyCollection instance associated with the plan. These are dependent on the type of the plan. For example, DeliveryTimelineView, it would be of type DeliveryViewPropertyCollection. + */ + properties?: any; + /** + * Revision of the plan. Used to safeguard users from overwriting each other's changes. + */ + revision?: number; + /** + * Type of the plan + */ + type?: PlanType; + /** + * The resource url to locate the plan via rest api + */ + url?: string; + /** + * Bit flag indicating set of permissions a user has to the plan. + */ + userPermissions?: PlanUserPermissions; +} +/** + * Metadata about a plan definition that is stored in favorites service + */ +export interface PlanMetadata { + /** + * Identity of the creator of the plan + */ + createdByIdentity?: VSSInterfaces.IdentityRef; + /** + * Description of plan + */ + description?: string; + /** + * Last modified date of the plan + */ + modifiedDate?: Date; + /** + * Bit flag indicating set of permissions a user has to the plan. + */ + userPermissions?: PlanUserPermissions; +} +/** + * Enum for the various types of plans + */ +export declare enum PlanType { + DeliveryTimelineView = 0 +} +/** + * Flag for permissions a user can have for this plan. + */ +export declare enum PlanUserPermissions { + /** + * None + */ + None = 0, + /** + * Permission to view this plan. + */ + View = 1, + /** + * Permission to update this plan. + */ + Edit = 2, + /** + * Permission to delete this plan. + */ + Delete = 4, + /** + * Permission to manage this plan. + */ + Manage = 8, + /** + * Full control permission for this plan. + */ + AllPermissions = 15 +} +/** + * Base class for plan view data contracts. Anything common goes here. + */ +export interface PlanViewData { + id?: string; + revision?: number; +} +/** + * Represents a single pre-defined query. + */ +export interface PredefinedQuery { + /** + * Whether or not the query returned the complete set of data or if the data was truncated. + */ + hasMore?: boolean; + /** + * Id of the query + */ + id?: string; + /** + * Localized name of the query + */ + name?: string; + /** + * The results of the query. This will be a set of WorkItem objects with only the 'id' set. The client is responsible for paging in the data as needed. + */ + results?: WorkItemTrackingInterfaces.WorkItem[]; + /** + * REST API Url to use to retrieve results for this query + */ + url?: string; + /** + * Url to use to display a page in the browser with the results of this query + */ + webUrl?: string; +} +/** + * Process Configurations for the project + */ +export interface ProcessConfiguration { + /** + * Details about bug work items + */ + bugWorkItems?: CategoryConfiguration; + /** + * Details about portfolio backlogs + */ + portfolioBacklogs?: CategoryConfiguration[]; + /** + * Details of requirement backlog + */ + requirementBacklog?: CategoryConfiguration; + /** + * Details of task backlog + */ + taskBacklog?: CategoryConfiguration; + /** + * Type fields for the process configuration + */ + typeFields?: { + [key: string]: WorkItemTrackingInterfaces.WorkItemFieldReference; + }; + url?: string; +} +/** + * Represents a reorder request for one or more work items. + */ +export interface ReorderOperation { + /** + * IDs of the work items to be reordered. Must be valid WorkItem Ids. + */ + ids?: number[]; + /** + * IterationPath for reorder operation. This is only used when we reorder from the Iteration Backlog + */ + iterationPath?: string; + /** + * ID of the work item that should be after the reordered items. Can use 0 to specify the end of the list. + */ + nextId?: number; + /** + * Parent ID for all of the work items involved in this operation. Can use 0 to indicate the items don't have a parent. + */ + parentId?: number; + /** + * ID of the work item that should be before the reordered items. Can use 0 to specify the beginning of the list. + */ + previousId?: number; +} +/** + * Represents a reorder result for a work item. + */ +export interface ReorderResult { + /** + * The ID of the work item that was reordered. + */ + id?: number; + /** + * The updated order value of the work item that was reordered. + */ + order?: number; +} +export interface Rule { + clauses?: FilterClause[]; + filter?: string; + isEnabled?: string; + name?: string; + settings?: attribute; +} +/** + * Represents the taskbord column + */ +export interface TaskboardColumn { + /** + * Column ID + */ + id?: string; + /** + * Work item type states mapped to this column to support auto state update when column is updated. + */ + mappings?: ITaskboardColumnMapping[]; + /** + * Column name + */ + name?: string; + /** + * Column position relative to other columns in the same board + */ + order?: number; +} +/** + * Represents the state to column mapping per work item type This allows auto state update when the column changes + */ +export interface TaskboardColumnMapping { + /** + * State of the work item type mapped to the column + */ + state?: string; + /** + * Work Item Type name who's state is mapped to the column + */ + workItemType?: string; +} +export interface TaskboardColumns { + columns?: TaskboardColumn[]; + /** + * Are the columns cutomized for this team + */ + isCustomized?: boolean; + /** + * Specifies if the referenced WIT and State is valid + */ + isValid?: boolean; + /** + * Details of validation failure if the state to column mapping is invalid + */ + validationMesssage?: string; +} +/** + * Column value of a work item in the taskboard + */ +export interface TaskboardWorkItemColumn { + /** + * Work item column value in the taskboard + */ + column?: string; + /** + * Work item column id in the taskboard + */ + columnId?: string; + /** + * Work Item state value + */ + state?: string; + /** + * Work item id + */ + workItemId?: number; +} +/** + * Mapping of teams to the corresponding work item category + */ +export interface TeamBacklogMapping { + categoryReferenceName?: string; + teamId?: string; +} +/** + * Represents team member capacity with totals aggregated + */ +export interface TeamCapacity { + teamMembers?: TeamMemberCapacityIdentityRef[]; + totalCapacityPerDay?: number; + totalDaysOff?: number; +} +/** + * Team information with total capacity and days off + */ +export interface TeamCapacityTotals { + teamCapacityPerDay?: number; + teamId?: string; + teamTotalDaysOff?: number; +} +/** + * Represents a single TeamFieldValue + */ +export interface TeamFieldValue { + includeChildren?: boolean; + value?: string; +} +/** + * Essentially a collection of team field values + */ +export interface TeamFieldValues extends TeamSettingsDataContractBase { + /** + * The default team field value + */ + defaultValue?: string; + /** + * Shallow ref to the field being used as a team field + */ + field?: FieldReference; + /** + * Collection of all valid team field values + */ + values?: TeamFieldValue[]; +} +/** + * Expected data from PATCH + */ +export interface TeamFieldValuesPatch { + defaultValue?: string; + values?: TeamFieldValue[]; +} +export interface TeamIterationAttributes { + /** + * Finish date of the iteration. Date-only, correct unadjusted at midnight in UTC. + */ + finishDate?: Date; + /** + * Start date of the iteration. Date-only, correct unadjusted at midnight in UTC. + */ + startDate?: Date; + /** + * Time frame of the iteration, such as past, current or future. + */ + timeFrame?: TimeFrame; +} +/** + * Represents capacity for a specific team member + */ +export interface TeamMemberCapacity extends CapacityContractBase { + /** + * Shallow Ref to the associated team member + */ + teamMember?: Member; +} +/** + * Represents capacity for a specific team member + */ +export interface TeamMemberCapacityIdentityRef extends CapacityContractBase { + /** + * Identity ref of the associated team member + */ + teamMember?: VSSInterfaces.IdentityRef; +} +/** + * Data contract for TeamSettings + */ +export interface TeamSetting extends TeamSettingsDataContractBase { + /** + * Backlog Iteration + */ + backlogIteration: TeamSettingsIteration; + /** + * Information about categories that are visible on the backlog. + */ + backlogVisibilities: { + [key: string]: boolean; + }; + /** + * BugsBehavior (Off, AsTasks, AsRequirements, ...) + */ + bugsBehavior: BugsBehavior; + /** + * Default Iteration, the iteration used when creating a new work item on the queries page. + */ + defaultIteration?: TeamSettingsIteration; + /** + * Default Iteration macro (if any) + */ + defaultIterationMacro?: string; + /** + * Days that the team is working + */ + workingDays: SystemInterfaces.DayOfWeek[]; +} +/** + * Base class for TeamSettings data contracts. Anything common goes here. + */ +export interface TeamSettingsDataContractBase { + /** + * Collection of links relevant to resource + */ + _links?: any; + /** + * Full http link to the resource + */ + url?: string; +} +export interface TeamSettingsDaysOff extends TeamSettingsDataContractBase { + daysOff?: DateRange[]; +} +export interface TeamSettingsDaysOffPatch { + daysOff?: DateRange[]; +} +/** + * Represents a shallow ref for a single iteration. + */ +export interface TeamSettingsIteration extends TeamSettingsDataContractBase { + /** + * Attributes of the iteration such as start and end date. + */ + attributes?: TeamIterationAttributes; + /** + * Id of the iteration. + */ + id?: string; + /** + * Name of the iteration. + */ + name?: string; + /** + * Relative path of the iteration. + */ + path?: string; +} +/** + * Data contract for what we expect to receive when PATCH + */ +export interface TeamSettingsPatch { + backlogIteration?: string; + backlogVisibilities?: { + [key: string]: boolean; + }; + bugsBehavior?: BugsBehavior; + defaultIteration?: string; + defaultIterationMacro?: string; + workingDays?: SystemInterfaces.DayOfWeek[]; +} +export declare enum TimeFrame { + Past = 0, + Current = 1, + Future = 2 +} +export interface TimelineCriteriaStatus { + message?: string; + type?: TimelineCriteriaStatusCode; +} +export declare enum TimelineCriteriaStatusCode { + /** + * No error - filter is good. + */ + OK = 0, + /** + * One of the filter clause is invalid. + */ + InvalidFilterClause = 1, + /** + * Unknown error. + */ + Unknown = 2 +} +export interface TimelineIterationStatus { + message?: string; + type?: TimelineIterationStatusCode; +} +export declare enum TimelineIterationStatusCode { + /** + * No error - iteration data is good. + */ + OK = 0, + /** + * This iteration overlaps with another iteration, no data is returned for this iteration. + */ + IsOverlapping = 1 +} +export interface TimelineTeamData { + /** + * Backlog matching the mapped backlog associated with this team. + */ + backlog?: BacklogLevel; + /** + * The field reference names of the work item data + */ + fieldReferenceNames?: string[]; + /** + * The id of the team + */ + id?: string; + /** + * Was iteration and work item data retrieved for this team. Teams with IsExpanded false have not had their iteration, work item, and field related data queried and will never contain this data. If true then these items are queried and, if there are items in the queried range, there will be data. + */ + isExpanded?: boolean; + /** + * The iteration data, including the work items, in the queried date range. + */ + iterations?: TimelineTeamIteration[]; + /** + * The name of the team + */ + name?: string; + /** + * The order by field name of this team + */ + orderByField?: string; + /** + * The field reference names of the partially paged work items, such as ID, WorkItemType + */ + partiallyPagedFieldReferenceNames?: string[]; + partiallyPagedWorkItems?: any[][]; + /** + * The project id the team belongs team + */ + projectId?: string; + /** + * Work item types for which we will collect roll up data on the client side + */ + rollupWorkItemTypes?: string[]; + /** + * Status for this team. + */ + status?: TimelineTeamStatus; + /** + * The team field default value + */ + teamFieldDefaultValue?: string; + /** + * The team field name of this team + */ + teamFieldName?: string; + /** + * The team field values + */ + teamFieldValues?: TeamFieldValue[]; + /** + * Work items associated with the team that are not under any of the team's iterations + */ + workItems?: any[][]; + /** + * Colors for the work item types. + */ + workItemTypeColors?: WorkItemColor[]; +} +export interface TimelineTeamIteration { + /** + * The iteration CSS Node Id + */ + cssNodeId?: string; + /** + * The end date of the iteration + */ + finishDate?: Date; + /** + * The iteration name + */ + name?: string; + /** + * All the partially paged workitems in this iteration. + */ + partiallyPagedWorkItems?: any[][]; + /** + * The iteration path + */ + path?: string; + /** + * The start date of the iteration + */ + startDate?: Date; + /** + * The status of this iteration + */ + status?: TimelineIterationStatus; + /** + * The work items that have been paged in this iteration + */ + workItems?: any[][]; +} +export interface TimelineTeamStatus { + message?: string; + type?: TimelineTeamStatusCode; +} +export declare enum TimelineTeamStatusCode { + /** + * No error - all data for team is good. + */ + OK = 0, + /** + * Team does not exist or access is denied. + */ + DoesntExistOrAccessDenied = 1, + /** + * Maximum number of teams was exceeded. No team data will be returned for this team. + */ + MaxTeamsExceeded = 2, + /** + * Maximum number of team fields (ie Area paths) have been exceeded. No team data will be returned for this team. + */ + MaxTeamFieldsExceeded = 3, + /** + * Backlog does not exist or is missing crucial information. + */ + BacklogInError = 4, + /** + * Team field value is not set for this team. No team data will be returned for this team + */ + MissingTeamFieldValue = 5, + /** + * Team does not have a single iteration with date range. + */ + NoIterationsExist = 6 +} +export interface UpdatePlan { + /** + * Description of the plan + */ + description?: string; + /** + * Name of the plan to create. + */ + name?: string; + /** + * Plan properties. + */ + properties?: any; + /** + * Revision of the plan that was updated - the value used here should match the one the server gave the client in the Plan. + */ + revision?: number; + /** + * Type of the plan + */ + type?: PlanType; +} +export interface UpdateTaskboardColumn { + /** + * Column ID, keep it null for new column + */ + id?: string; + /** + * Work item type states mapped to this column to support auto state update when column is updated. + */ + mappings?: TaskboardColumnMapping[]; + /** + * Column name is required + */ + name?: string; + /** + * Column position relative to other columns in the same board + */ + order?: number; +} +export interface UpdateTaskboardWorkItemColumn { + newColumn?: string; +} +/** + * Work item color and icon. + */ +export interface WorkItemColor { + icon?: string; + primaryColor?: string; + workItemTypeName?: string; +} +export interface WorkItemTypeStateInfo { + /** + * State name to state category map + */ + states?: { + [key: string]: string; + }; + /** + * Work Item type name + */ + workItemTypeName?: string; +} +export declare var TypeInfo: { + BacklogConfiguration: any; + BacklogLevelConfiguration: any; + BacklogType: { + enumValues: { + "portfolio": number; + "requirement": number; + "task": number; + }; + }; + Board: any; + BoardBadgeColumnOptions: { + enumValues: { + "inProgressColumns": number; + "allColumns": number; + "customColumns": number; + }; + }; + BoardColumn: any; + BoardColumnType: { + enumValues: { + "incoming": number; + "inProgress": number; + "outgoing": number; + }; + }; + BugsBehavior: { + enumValues: { + "off": number; + "asRequirements": number; + "asTasks": number; + }; + }; + CapacityContractBase: any; + CapacityPatch: any; + CardFieldSettings: any; + CardSettings: any; + CreatePlan: any; + DateRange: any; + DeliveryViewData: any; + DeliveryViewPropertyCollection: any; + FieldInfo: any; + FieldType: { + enumValues: { + "string": number; + "plainText": number; + "integer": number; + "dateTime": number; + "treePath": number; + "boolean": number; + "double": number; + }; + }; + IdentityDisplayFormat: { + enumValues: { + "avatarOnly": number; + "fullName": number; + "avatarAndFullName": number; + }; + }; + Marker: any; + Plan: any; + PlanMetadata: any; + PlanType: { + enumValues: { + "deliveryTimelineView": number; + }; + }; + PlanUserPermissions: { + enumValues: { + "none": number; + "view": number; + "edit": number; + "delete": number; + "manage": number; + "allPermissions": number; + }; + }; + TeamCapacity: any; + TeamIterationAttributes: any; + TeamMemberCapacity: any; + TeamMemberCapacityIdentityRef: any; + TeamSetting: any; + TeamSettingsDaysOff: any; + TeamSettingsDaysOffPatch: any; + TeamSettingsIteration: any; + TeamSettingsPatch: any; + TimeFrame: { + enumValues: { + "past": number; + "current": number; + "future": number; + }; + }; + TimelineCriteriaStatus: any; + TimelineCriteriaStatusCode: { + enumValues: { + "ok": number; + "invalidFilterClause": number; + "unknown": number; + }; + }; + TimelineIterationStatus: any; + TimelineIterationStatusCode: { + enumValues: { + "ok": number; + "isOverlapping": number; + }; + }; + TimelineTeamData: any; + TimelineTeamIteration: any; + TimelineTeamStatus: any; + TimelineTeamStatusCode: { + enumValues: { + "ok": number; + "doesntExistOrAccessDenied": number; + "maxTeamsExceeded": number; + "maxTeamFieldsExceeded": number; + "backlogInError": number; + "missingTeamFieldValue": number; + "noIterationsExist": number; + }; + }; + UpdatePlan: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkInterfaces.js b/node_modules/azure-devops-node-api/interfaces/WorkInterfaces.js new file mode 100644 index 0000000..4e89312 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkInterfaces.js @@ -0,0 +1,556 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const SystemInterfaces = require("../interfaces/common/System"); +/** + * Definition of the type of backlog level + */ +var BacklogType; +(function (BacklogType) { + /** + * Portfolio backlog level + */ + BacklogType[BacklogType["Portfolio"] = 0] = "Portfolio"; + /** + * Requirement backlog level + */ + BacklogType[BacklogType["Requirement"] = 1] = "Requirement"; + /** + * Task backlog level + */ + BacklogType[BacklogType["Task"] = 2] = "Task"; +})(BacklogType = exports.BacklogType || (exports.BacklogType = {})); +/** + * Determines what columns to include on the board badge + */ +var BoardBadgeColumnOptions; +(function (BoardBadgeColumnOptions) { + /** + * Only include In Progress columns + */ + BoardBadgeColumnOptions[BoardBadgeColumnOptions["InProgressColumns"] = 0] = "InProgressColumns"; + /** + * Include all columns + */ + BoardBadgeColumnOptions[BoardBadgeColumnOptions["AllColumns"] = 1] = "AllColumns"; + /** + * Include a custom set of columns + */ + BoardBadgeColumnOptions[BoardBadgeColumnOptions["CustomColumns"] = 2] = "CustomColumns"; +})(BoardBadgeColumnOptions = exports.BoardBadgeColumnOptions || (exports.BoardBadgeColumnOptions = {})); +var BoardColumnType; +(function (BoardColumnType) { + BoardColumnType[BoardColumnType["Incoming"] = 0] = "Incoming"; + BoardColumnType[BoardColumnType["InProgress"] = 1] = "InProgress"; + BoardColumnType[BoardColumnType["Outgoing"] = 2] = "Outgoing"; +})(BoardColumnType = exports.BoardColumnType || (exports.BoardColumnType = {})); +/** + * The behavior of the work item types that are in the work item category specified in the BugWorkItems section in the Process Configuration + */ +var BugsBehavior; +(function (BugsBehavior) { + BugsBehavior[BugsBehavior["Off"] = 0] = "Off"; + BugsBehavior[BugsBehavior["AsRequirements"] = 1] = "AsRequirements"; + BugsBehavior[BugsBehavior["AsTasks"] = 2] = "AsTasks"; +})(BugsBehavior = exports.BugsBehavior || (exports.BugsBehavior = {})); +var FieldType; +(function (FieldType) { + FieldType[FieldType["String"] = 0] = "String"; + FieldType[FieldType["PlainText"] = 1] = "PlainText"; + FieldType[FieldType["Integer"] = 2] = "Integer"; + FieldType[FieldType["DateTime"] = 3] = "DateTime"; + FieldType[FieldType["TreePath"] = 4] = "TreePath"; + FieldType[FieldType["Boolean"] = 5] = "Boolean"; + FieldType[FieldType["Double"] = 6] = "Double"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +/** + * Enum for the various modes of identity picker + */ +var IdentityDisplayFormat; +(function (IdentityDisplayFormat) { + /** + * Display avatar only + */ + IdentityDisplayFormat[IdentityDisplayFormat["AvatarOnly"] = 0] = "AvatarOnly"; + /** + * Display Full name only + */ + IdentityDisplayFormat[IdentityDisplayFormat["FullName"] = 1] = "FullName"; + /** + * Display Avatar and Full name + */ + IdentityDisplayFormat[IdentityDisplayFormat["AvatarAndFullName"] = 2] = "AvatarAndFullName"; +})(IdentityDisplayFormat = exports.IdentityDisplayFormat || (exports.IdentityDisplayFormat = {})); +/** + * Enum for the various types of plans + */ +var PlanType; +(function (PlanType) { + PlanType[PlanType["DeliveryTimelineView"] = 0] = "DeliveryTimelineView"; +})(PlanType = exports.PlanType || (exports.PlanType = {})); +/** + * Flag for permissions a user can have for this plan. + */ +var PlanUserPermissions; +(function (PlanUserPermissions) { + /** + * None + */ + PlanUserPermissions[PlanUserPermissions["None"] = 0] = "None"; + /** + * Permission to view this plan. + */ + PlanUserPermissions[PlanUserPermissions["View"] = 1] = "View"; + /** + * Permission to update this plan. + */ + PlanUserPermissions[PlanUserPermissions["Edit"] = 2] = "Edit"; + /** + * Permission to delete this plan. + */ + PlanUserPermissions[PlanUserPermissions["Delete"] = 4] = "Delete"; + /** + * Permission to manage this plan. + */ + PlanUserPermissions[PlanUserPermissions["Manage"] = 8] = "Manage"; + /** + * Full control permission for this plan. + */ + PlanUserPermissions[PlanUserPermissions["AllPermissions"] = 15] = "AllPermissions"; +})(PlanUserPermissions = exports.PlanUserPermissions || (exports.PlanUserPermissions = {})); +var TimeFrame; +(function (TimeFrame) { + TimeFrame[TimeFrame["Past"] = 0] = "Past"; + TimeFrame[TimeFrame["Current"] = 1] = "Current"; + TimeFrame[TimeFrame["Future"] = 2] = "Future"; +})(TimeFrame = exports.TimeFrame || (exports.TimeFrame = {})); +var TimelineCriteriaStatusCode; +(function (TimelineCriteriaStatusCode) { + /** + * No error - filter is good. + */ + TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["OK"] = 0] = "OK"; + /** + * One of the filter clause is invalid. + */ + TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["InvalidFilterClause"] = 1] = "InvalidFilterClause"; + /** + * Unknown error. + */ + TimelineCriteriaStatusCode[TimelineCriteriaStatusCode["Unknown"] = 2] = "Unknown"; +})(TimelineCriteriaStatusCode = exports.TimelineCriteriaStatusCode || (exports.TimelineCriteriaStatusCode = {})); +var TimelineIterationStatusCode; +(function (TimelineIterationStatusCode) { + /** + * No error - iteration data is good. + */ + TimelineIterationStatusCode[TimelineIterationStatusCode["OK"] = 0] = "OK"; + /** + * This iteration overlaps with another iteration, no data is returned for this iteration. + */ + TimelineIterationStatusCode[TimelineIterationStatusCode["IsOverlapping"] = 1] = "IsOverlapping"; +})(TimelineIterationStatusCode = exports.TimelineIterationStatusCode || (exports.TimelineIterationStatusCode = {})); +var TimelineTeamStatusCode; +(function (TimelineTeamStatusCode) { + /** + * No error - all data for team is good. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["OK"] = 0] = "OK"; + /** + * Team does not exist or access is denied. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["DoesntExistOrAccessDenied"] = 1] = "DoesntExistOrAccessDenied"; + /** + * Maximum number of teams was exceeded. No team data will be returned for this team. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["MaxTeamsExceeded"] = 2] = "MaxTeamsExceeded"; + /** + * Maximum number of team fields (ie Area paths) have been exceeded. No team data will be returned for this team. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["MaxTeamFieldsExceeded"] = 3] = "MaxTeamFieldsExceeded"; + /** + * Backlog does not exist or is missing crucial information. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["BacklogInError"] = 4] = "BacklogInError"; + /** + * Team field value is not set for this team. No team data will be returned for this team + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["MissingTeamFieldValue"] = 5] = "MissingTeamFieldValue"; + /** + * Team does not have a single iteration with date range. + */ + TimelineTeamStatusCode[TimelineTeamStatusCode["NoIterationsExist"] = 6] = "NoIterationsExist"; +})(TimelineTeamStatusCode = exports.TimelineTeamStatusCode || (exports.TimelineTeamStatusCode = {})); +exports.TypeInfo = { + BacklogConfiguration: {}, + BacklogLevelConfiguration: {}, + BacklogType: { + enumValues: { + "portfolio": 0, + "requirement": 1, + "task": 2 + } + }, + Board: {}, + BoardBadgeColumnOptions: { + enumValues: { + "inProgressColumns": 0, + "allColumns": 1, + "customColumns": 2 + } + }, + BoardColumn: {}, + BoardColumnType: { + enumValues: { + "incoming": 0, + "inProgress": 1, + "outgoing": 2 + } + }, + BugsBehavior: { + enumValues: { + "off": 0, + "asRequirements": 1, + "asTasks": 2 + } + }, + CapacityContractBase: {}, + CapacityPatch: {}, + CardFieldSettings: {}, + CardSettings: {}, + CreatePlan: {}, + DateRange: {}, + DeliveryViewData: {}, + DeliveryViewPropertyCollection: {}, + FieldInfo: {}, + FieldType: { + enumValues: { + "string": 0, + "plainText": 1, + "integer": 2, + "dateTime": 3, + "treePath": 4, + "boolean": 5, + "double": 6 + } + }, + IdentityDisplayFormat: { + enumValues: { + "avatarOnly": 0, + "fullName": 1, + "avatarAndFullName": 2 + } + }, + Marker: {}, + Plan: {}, + PlanMetadata: {}, + PlanType: { + enumValues: { + "deliveryTimelineView": 0 + } + }, + PlanUserPermissions: { + enumValues: { + "none": 0, + "view": 1, + "edit": 2, + "delete": 4, + "manage": 8, + "allPermissions": 15 + } + }, + TeamCapacity: {}, + TeamIterationAttributes: {}, + TeamMemberCapacity: {}, + TeamMemberCapacityIdentityRef: {}, + TeamSetting: {}, + TeamSettingsDaysOff: {}, + TeamSettingsDaysOffPatch: {}, + TeamSettingsIteration: {}, + TeamSettingsPatch: {}, + TimeFrame: { + enumValues: { + "past": 0, + "current": 1, + "future": 2 + } + }, + TimelineCriteriaStatus: {}, + TimelineCriteriaStatusCode: { + enumValues: { + "ok": 0, + "invalidFilterClause": 1, + "unknown": 2 + } + }, + TimelineIterationStatus: {}, + TimelineIterationStatusCode: { + enumValues: { + "ok": 0, + "isOverlapping": 1 + } + }, + TimelineTeamData: {}, + TimelineTeamIteration: {}, + TimelineTeamStatus: {}, + TimelineTeamStatusCode: { + enumValues: { + "ok": 0, + "doesntExistOrAccessDenied": 1, + "maxTeamsExceeded": 2, + "maxTeamFieldsExceeded": 3, + "backlogInError": 4, + "missingTeamFieldValue": 5, + "noIterationsExist": 6 + } + }, + UpdatePlan: {}, +}; +exports.TypeInfo.BacklogConfiguration.fields = { + bugsBehavior: { + enumType: exports.TypeInfo.BugsBehavior + }, + portfolioBacklogs: { + isArray: true, + typeInfo: exports.TypeInfo.BacklogLevelConfiguration + }, + requirementBacklog: { + typeInfo: exports.TypeInfo.BacklogLevelConfiguration + }, + taskBacklog: { + typeInfo: exports.TypeInfo.BacklogLevelConfiguration + } +}; +exports.TypeInfo.BacklogLevelConfiguration.fields = { + type: { + enumType: exports.TypeInfo.BacklogType + } +}; +exports.TypeInfo.Board.fields = { + columns: { + isArray: true, + typeInfo: exports.TypeInfo.BoardColumn + } +}; +exports.TypeInfo.BoardColumn.fields = { + columnType: { + enumType: exports.TypeInfo.BoardColumnType + } +}; +exports.TypeInfo.CapacityContractBase.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange + } +}; +exports.TypeInfo.CapacityPatch.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange + } +}; +exports.TypeInfo.CardFieldSettings.fields = { + additionalFields: { + isArray: true, + typeInfo: exports.TypeInfo.FieldInfo + }, + assignedToDisplayFormat: { + enumType: exports.TypeInfo.IdentityDisplayFormat + }, + coreFields: { + isArray: true, + typeInfo: exports.TypeInfo.FieldInfo + } +}; +exports.TypeInfo.CardSettings.fields = { + fields: { + typeInfo: exports.TypeInfo.CardFieldSettings + } +}; +exports.TypeInfo.CreatePlan.fields = { + type: { + enumType: exports.TypeInfo.PlanType + } +}; +exports.TypeInfo.DateRange.fields = { + end: { + isDate: true, + }, + start: { + isDate: true, + } +}; +exports.TypeInfo.DeliveryViewData.fields = { + criteriaStatus: { + typeInfo: exports.TypeInfo.TimelineCriteriaStatus + }, + endDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + teams: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineTeamData + } +}; +exports.TypeInfo.DeliveryViewPropertyCollection.fields = { + cardSettings: { + typeInfo: exports.TypeInfo.CardSettings + }, + markers: { + isArray: true, + typeInfo: exports.TypeInfo.Marker + } +}; +exports.TypeInfo.FieldInfo.fields = { + fieldType: { + enumType: exports.TypeInfo.FieldType + } +}; +exports.TypeInfo.Marker.fields = { + date: { + isDate: true, + } +}; +exports.TypeInfo.Plan.fields = { + createdDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + type: { + enumType: exports.TypeInfo.PlanType + }, + userPermissions: { + enumType: exports.TypeInfo.PlanUserPermissions + } +}; +exports.TypeInfo.PlanMetadata.fields = { + modifiedDate: { + isDate: true, + }, + userPermissions: { + enumType: exports.TypeInfo.PlanUserPermissions + } +}; +exports.TypeInfo.TeamCapacity.fields = { + teamMembers: { + isArray: true, + typeInfo: exports.TypeInfo.TeamMemberCapacityIdentityRef + } +}; +exports.TypeInfo.TeamIterationAttributes.fields = { + finishDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + timeFrame: { + enumType: exports.TypeInfo.TimeFrame + } +}; +exports.TypeInfo.TeamMemberCapacity.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange + } +}; +exports.TypeInfo.TeamMemberCapacityIdentityRef.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange + } +}; +exports.TypeInfo.TeamSetting.fields = { + backlogIteration: { + typeInfo: exports.TypeInfo.TeamSettingsIteration + }, + bugsBehavior: { + enumType: exports.TypeInfo.BugsBehavior + }, + defaultIteration: { + typeInfo: exports.TypeInfo.TeamSettingsIteration + }, + workingDays: { + isArray: true, + enumType: SystemInterfaces.TypeInfo.DayOfWeek + } +}; +exports.TypeInfo.TeamSettingsDaysOff.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange + } +}; +exports.TypeInfo.TeamSettingsDaysOffPatch.fields = { + daysOff: { + isArray: true, + typeInfo: exports.TypeInfo.DateRange + } +}; +exports.TypeInfo.TeamSettingsIteration.fields = { + attributes: { + typeInfo: exports.TypeInfo.TeamIterationAttributes + } +}; +exports.TypeInfo.TeamSettingsPatch.fields = { + bugsBehavior: { + enumType: exports.TypeInfo.BugsBehavior + }, + workingDays: { + isArray: true, + enumType: SystemInterfaces.TypeInfo.DayOfWeek + } +}; +exports.TypeInfo.TimelineCriteriaStatus.fields = { + type: { + enumType: exports.TypeInfo.TimelineCriteriaStatusCode + } +}; +exports.TypeInfo.TimelineIterationStatus.fields = { + type: { + enumType: exports.TypeInfo.TimelineIterationStatusCode + } +}; +exports.TypeInfo.TimelineTeamData.fields = { + iterations: { + isArray: true, + typeInfo: exports.TypeInfo.TimelineTeamIteration + }, + status: { + typeInfo: exports.TypeInfo.TimelineTeamStatus + } +}; +exports.TypeInfo.TimelineTeamIteration.fields = { + finishDate: { + isDate: true, + }, + startDate: { + isDate: true, + }, + status: { + typeInfo: exports.TypeInfo.TimelineIterationStatus + } +}; +exports.TypeInfo.TimelineTeamStatus.fields = { + type: { + enumType: exports.TypeInfo.TimelineTeamStatusCode + } +}; +exports.TypeInfo.UpdatePlan.fields = { + type: { + enumType: exports.TypeInfo.PlanType + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.d.ts new file mode 100644 index 0000000..eb39219 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.d.ts @@ -0,0 +1,2139 @@ +import VSSInterfaces = require("../interfaces/common/VSSInterfaces"); +export interface AccountMyWorkResult { + /** + * True, when length of WorkItemDetails is same as the limit + */ + querySizeLimitExceeded?: boolean; + /** + * WorkItem Details + */ + workItemDetails?: AccountWorkWorkItemModel[]; +} +/** + * Represents Work Item Recent Activity + */ +export interface AccountRecentActivityWorkItemModel extends AccountRecentActivityWorkItemModelBase { + /** + * Assigned To + */ + assignedTo?: string; +} +/** + * Represents Work Item Recent Activity + */ +export interface AccountRecentActivityWorkItemModel2 extends AccountRecentActivityWorkItemModelBase { + /** + * Assigned To + */ + assignedTo?: VSSInterfaces.IdentityRef; +} +/** + * Represents Work Item Recent Activity + */ +export interface AccountRecentActivityWorkItemModelBase { + /** + * Date of the last Activity by the user + */ + activityDate?: Date; + /** + * Type of the activity + */ + activityType?: WorkItemRecentActivityType; + /** + * Last changed date of the work item + */ + changedDate?: Date; + /** + * Work Item Id + */ + id?: number; + /** + * TeamFoundationId of the user this activity belongs to + */ + identityId?: string; + /** + * State of the work item + */ + state?: string; + /** + * Team project the work item belongs to + */ + teamProject?: string; + /** + * Title of the work item + */ + title?: string; + /** + * Type of Work Item + */ + workItemType?: string; +} +/** + * Represents Recent Mention Work Item + */ +export interface AccountRecentMentionWorkItemModel { + /** + * Assigned To + */ + assignedTo?: string; + /** + * Work Item Id + */ + id?: number; + /** + * Latest date that the user were mentioned + */ + mentionedDateField?: Date; + /** + * State of the work item + */ + state?: string; + /** + * Team project the work item belongs to + */ + teamProject?: string; + /** + * Title of the work item + */ + title?: string; + /** + * Type of Work Item + */ + workItemType?: string; +} +export interface AccountWorkWorkItemModel { + assignedTo?: string; + changedDate?: Date; + id?: number; + state?: string; + teamProject?: string; + title?: string; + workItemType?: string; +} +/** + * Contains criteria for querying work items based on artifact URI. + */ +export interface ArtifactUriQuery { + /** + * List of artifact URIs to use for querying work items. + */ + artifactUris?: string[]; +} +/** + * Defines result of artifact URI query on work items. Contains mapping of work item IDs to artifact URI. + */ +export interface ArtifactUriQueryResult { + /** + * A Dictionary that maps a list of work item references to the given list of artifact URI. + */ + artifactUrisQueryResult?: { + [key: string]: WorkItemReference[]; + }; +} +export interface AttachmentReference { + id?: string; + url?: string; +} +/** + * Flag to control error policy in a batch classification nodes get request. + */ +export declare enum ClassificationNodesErrorPolicy { + Fail = 1, + Omit = 2 +} +/** + * Comment on a Work Item. + */ +export interface Comment extends WorkItemTrackingResource { + /** + * IdentityRef of the creator of the comment. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The creation date of the comment. + */ + createdDate?: Date; + /** + * Effective Date/time value for adding the comment. Can be optionally different from CreatedDate. + */ + createdOnBehalfDate?: Date; + /** + * Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy. + */ + createdOnBehalfOf?: VSSInterfaces.IdentityRef; + /** + * The id assigned to the comment. + */ + id?: number; + /** + * Indicates if the comment has been deleted. + */ + isDeleted?: boolean; + /** + * The mentions of the comment. + */ + mentions?: CommentMention[]; + /** + * IdentityRef of the user who last modified the comment. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * The last modification date of the comment. + */ + modifiedDate?: Date; + /** + * The reactions of the comment. + */ + reactions?: CommentReaction[]; + /** + * The text of the comment. + */ + text?: string; + /** + * The current version of the comment. + */ + version?: number; + /** + * The id of the work item this comment belongs to. + */ + workItemId?: number; +} +/** + * Represents a request to create a work item comment. + */ +export interface CommentCreate { + /** + * The text of the comment. + */ + text: string; +} +/** + * Specifies the additional data retrieval options for work item comments. + */ +export declare enum CommentExpandOptions { + None = 0, + /** + * Include comment reactions. + */ + Reactions = 1, + /** + * Include the rendered text (html) in addition to MD text. + */ + RenderedText = 8, + /** + * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes. + */ + RenderedTextOnly = 16, + All = -17 +} +/** + * Represents a list of work item comments. + */ +export interface CommentList extends WorkItemTrackingResource { + /** + * List of comments in the current batch. + */ + comments?: Comment[]; + /** + * A string token that can be used to retrieving next page of comments if available. Otherwise null. + */ + continuationToken?: string; + /** + * The count of comments in the current batch. + */ + count?: number; + /** + * Uri to the next page of comments if it is available. Otherwise null. + */ + nextPage?: string; + /** + * Total count of comments on a work item. + */ + totalCount?: number; +} +export interface CommentMention extends WorkItemTrackingResource { + /** + * The artifact portion of the parsed text. (i.e. the work item's id) + */ + artifactId?: string; + /** + * The type the parser assigned to the mention. (i.e. person, work item, etc) + */ + artifactType?: string; + /** + * The comment id of the mention. + */ + commentId?: number; + /** + * The resolved target of the mention. An example of this could be a user's tfid + */ + targetId?: string; +} +/** + * Contains information about work item comment reaction for a particular reaction type. + */ +export interface CommentReaction extends WorkItemTrackingResource { + /** + * The id of the comment this reaction belongs to. + */ + commentId?: number; + /** + * Total number of reactions for the CommentReactionType. + */ + count?: number; + /** + * Flag to indicate if the current user has engaged on this particular EngagementType (e.g. if they liked the associated comment). + */ + isCurrentUserEngaged?: boolean; + /** + * Type of the reaction. + */ + type?: CommentReactionType; +} +/** + * Represents different reaction types for a work item comment. + */ +export declare enum CommentReactionType { + Like = 0, + Dislike = 1, + Heart = 2, + Hooray = 3, + Smile = 4, + Confused = 5 +} +export declare enum CommentSortOrder { + /** + * The results will be sorted in Ascending order. + */ + Asc = 1, + /** + * The results will be sorted in Descending order. + */ + Desc = 2 +} +/** + * Represents a request to update a work item comment. + */ +export interface CommentUpdate { + /** + * The updated text of the comment. + */ + text: string; +} +/** + * Represents a specific version of a comment on a work item. + */ +export interface CommentVersion extends WorkItemTrackingResource { + /** + * IdentityRef of the creator of the comment. + */ + createdBy?: VSSInterfaces.IdentityRef; + /** + * The creation date of the comment. + */ + createdDate?: Date; + /** + * Effective Date/time value for adding the comment. Can be optionally different from CreatedDate. + */ + createdOnBehalfDate?: Date; + /** + * Identity on whose behalf this comment has been added. Can be optionally different from CreatedBy. + */ + createdOnBehalfOf?: VSSInterfaces.IdentityRef; + /** + * The id assigned to the comment. + */ + id?: number; + /** + * Indicates if the comment has been deleted at this version. + */ + isDeleted?: boolean; + /** + * IdentityRef of the user who modified the comment at this version. + */ + modifiedBy?: VSSInterfaces.IdentityRef; + /** + * The modification date of the comment for this version. + */ + modifiedDate?: Date; + /** + * The rendered content of the comment at this version. + */ + renderedText?: string; + /** + * The text of the comment at this version. + */ + text?: string; + /** + * The version number. + */ + version?: number; +} +export interface EmailRecipients { + /** + * Plaintext email addresses. + */ + emailAddresses?: string[]; + /** + * TfIds + */ + tfIds?: string[]; + /** + * Unresolved entity ids + */ + unresolvedEntityIds?: string[]; +} +export interface ExternalDeployment { + artifactId?: string; + createdBy?: string; + description?: string; + displayName?: string; + environment?: ExternalEnvironment; + group?: string; + pipeline?: ExternalPipeline; + relatedWorkItemIds?: number[]; + runId?: number; + sequenceNumber?: number; + status?: string; + statusDate?: Date; + url?: string; +} +export interface ExternalEnvironment { + displayName?: string; + id?: number; + type?: string; +} +export interface ExternalPipeline { + displayName?: string; + id?: number; + url?: string; +} +/** + * Describes a list of dependent fields for a rule. + */ +export interface FieldDependentRule extends WorkItemTrackingResource { + /** + * The dependent fields. + */ + dependentFields?: WorkItemFieldReference[]; +} +/** + * Enum for field types. + */ +export declare enum FieldType { + /** + * String field type. + */ + String = 0, + /** + * Integer field type. + */ + Integer = 1, + /** + * Datetime field type. + */ + DateTime = 2, + /** + * Plain text field type. + */ + PlainText = 3, + /** + * HTML (Multiline) field type. + */ + Html = 4, + /** + * Treepath field type. + */ + TreePath = 5, + /** + * History field type. + */ + History = 6, + /** + * Double field type. + */ + Double = 7, + /** + * Guid field type. + */ + Guid = 8, + /** + * Boolean field type. + */ + Boolean = 9, + /** + * Identity field type. + */ + Identity = 10, + /** + * String picklist field type. When creating a string picklist field from REST API, use "String" FieldType. + */ + PicklistString = 11, + /** + * Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType. + */ + PicklistInteger = 12, + /** + * Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType. + */ + PicklistDouble = 13 +} +/** + * Enum for field usages. + */ +export declare enum FieldUsage { + /** + * Empty usage. + */ + None = 0, + /** + * Work item field usage. + */ + WorkItem = 1, + /** + * Work item link field usage. + */ + WorkItemLink = 2, + /** + * Treenode field usage. + */ + Tree = 3, + /** + * Work Item Type Extension usage. + */ + WorkItemTypeExtension = 4 +} +/** + * Flag to expand types of fields. + */ +export declare enum GetFieldsExpand { + /** + * Default behavior. + */ + None = 0, + /** + * Adds extension fields to the response. + */ + ExtensionFields = 1, + /** + * Includes fields that have been deleted. + */ + IncludeDeleted = 2 +} +/** + * Describes a reference to an identity. + */ +export interface IdentityReference extends VSSInterfaces.IdentityRef { + id?: string; + /** + * Legacy back-compat property. This has been the WIT specific value from Constants. Will be hidden (but exists) on the client unless they are targeting the newest version + */ + name?: string; +} +/** + * Link description. + */ +export interface Link { + /** + * Collection of link attributes. + */ + attributes?: { + [key: string]: any; + }; + /** + * Relation type. + */ + rel?: string; + /** + * Link url. + */ + url?: string; +} +/** + * The link query mode which determines the behavior of the query. + */ +export declare enum LinkQueryMode { + /** + * Returns flat list of work items. + */ + WorkItems = 0, + /** + * Returns work items where the source, target, and link criteria are all satisfied. + */ + LinksOneHopMustContain = 1, + /** + * Returns work items that satisfy the source and link criteria, even if no linked work item satisfies the target criteria. + */ + LinksOneHopMayContain = 2, + /** + * Returns work items that satisfy the source, only if no linked work item satisfies the link and target criteria. + */ + LinksOneHopDoesNotContain = 3, + LinksRecursiveMustContain = 4, + /** + * Returns work items a hierarchy of work items that by default satisfy the source + */ + LinksRecursiveMayContain = 5, + LinksRecursiveDoesNotContain = 6 +} +export declare enum LogicalOperation { + NONE = 0, + AND = 1, + OR = 2 +} +export interface MailMessage { + /** + * The mail body in HTML format. + */ + body?: string; + /** + * CC recipients. + */ + cC?: EmailRecipients; + /** + * The in-reply-to header value + */ + inReplyTo?: string; + /** + * The Message Id value + */ + messageId?: string; + /** + * Reply To recipients. + */ + replyTo?: EmailRecipients; + /** + * The mail subject. + */ + subject?: string; + /** + * To recipients + */ + to?: EmailRecipients; +} +/** + * Stores process ID. + */ +export interface ProcessIdModel { + /** + * The ID of the process. + */ + typeId?: string; +} +/** + * Stores project ID and its process ID. + */ +export interface ProcessMigrationResultModel { + /** + * The ID of the process. + */ + processId?: string; + /** + * The ID of the project. + */ + projectId?: string; +} +/** + * Project work item type state colors + */ +export interface ProjectWorkItemStateColors { + /** + * Project name + */ + projectName?: string; + /** + * State colors for all work item type in a project + */ + workItemTypeStateColors?: WorkItemTypeStateColors[]; +} +/** + * Enumerates the possible provisioning actions that can be triggered on process template update. + */ +export declare enum ProvisioningActionType { + Import = 0, + Validate = 1 +} +/** + * Result of an update work item type XML update operation. + */ +export interface ProvisioningResult { + /** + * Details about of the provisioning import events. + */ + provisioningImportEvents?: string[]; +} +/** + * Describes a request to get a list of queries + */ +export interface QueryBatchGetRequest { + /** + * The expand parameters for queries. Possible options are { None, Wiql, Clauses, All, Minimal } + */ + $expand?: QueryExpand; + /** + * The flag to control error policy in a query batch request. Possible options are { Fail, Omit }. + */ + errorPolicy?: QueryErrorPolicy; + /** + * The requested query ids + */ + ids?: string[]; +} +/** + * Enum to control error policy in a query batch request. + */ +export declare enum QueryErrorPolicy { + Fail = 1, + Omit = 2 +} +/** + * Determines which set of additional query properties to display + */ +export declare enum QueryExpand { + /** + * Expands Columns, Links and ChangeInfo + */ + None = 0, + /** + * Expands Columns, Links, ChangeInfo and WIQL text + */ + Wiql = 1, + /** + * Expands Columns, Links, ChangeInfo, WIQL text and clauses + */ + Clauses = 2, + /** + * Expands all properties + */ + All = 3, + /** + * Displays minimal properties and the WIQL text + */ + Minimal = 4 +} +/** + * Represents an item in the work item query hierarchy. This can be either a query or a folder. + */ +export interface QueryHierarchyItem extends WorkItemTrackingResource { + /** + * The child query items inside a query folder. + */ + children?: QueryHierarchyItem[]; + /** + * The clauses for a flat query. + */ + clauses?: WorkItemQueryClause; + /** + * The columns of the query. + */ + columns?: WorkItemFieldReference[]; + /** + * The identity who created the query item. + */ + createdBy?: IdentityReference; + /** + * When the query item was created. + */ + createdDate?: Date; + /** + * The link query mode. + */ + filterOptions?: LinkQueryMode; + /** + * If this is a query folder, indicates if it contains any children. + */ + hasChildren?: boolean; + /** + * The id of the query item. + */ + id?: string; + /** + * Indicates if this query item is deleted. Setting this to false on a deleted query item will undelete it. Undeleting a query or folder will not bring back the permission changes that were previously applied to it. + */ + isDeleted?: boolean; + /** + * Indicates if this is a query folder or a query. + */ + isFolder?: boolean; + /** + * Indicates if the WIQL of this query is invalid. This could be due to invalid syntax or a no longer valid area/iteration path. + */ + isInvalidSyntax?: boolean; + /** + * Indicates if this query item is public or private. + */ + isPublic?: boolean; + /** + * The identity who last ran the query. + */ + lastExecutedBy?: IdentityReference; + /** + * When the query was last run. + */ + lastExecutedDate?: Date; + /** + * The identity who last modified the query item. + */ + lastModifiedBy?: IdentityReference; + /** + * When the query item was last modified. + */ + lastModifiedDate?: Date; + /** + * The link query clause. + */ + linkClauses?: WorkItemQueryClause; + /** + * The name of the query item. + */ + name?: string; + /** + * The path of the query item. + */ + path?: string; + /** + * The recursion option for use in a tree query. + */ + queryRecursionOption?: QueryRecursionOption; + /** + * The type of query. + */ + queryType?: QueryType; + /** + * The sort columns of the query. + */ + sortColumns?: WorkItemQuerySortColumn[]; + /** + * The source clauses in a tree or one-hop link query. + */ + sourceClauses?: WorkItemQueryClause; + /** + * The target clauses in a tree or one-hop link query. + */ + targetClauses?: WorkItemQueryClause; + /** + * The WIQL text of the query + */ + wiql?: string; +} +export interface QueryHierarchyItemsResult { + /** + * The count of items. + */ + count?: number; + /** + * Indicates if the max return limit was hit but there are still more items + */ + hasMore?: boolean; + /** + * The list of items + */ + value?: QueryHierarchyItem[]; +} +export declare enum QueryOption { + Doing = 1, + Done = 2, + Followed = 3 +} +/** + * Determines whether a tree query matches parents or children first. + */ +export declare enum QueryRecursionOption { + /** + * Returns work items that satisfy the source, even if no linked work item satisfies the target and link criteria. + */ + ParentFirst = 0, + /** + * Returns work items that satisfy the target criteria, even if no work item satisfies the source and link criteria. + */ + ChildFirst = 1 +} +/** + * The query result type + */ +export declare enum QueryResultType { + /** + * A list of work items (for flat queries). + */ + WorkItem = 1, + /** + * A list of work item links (for OneHop and Tree queries). + */ + WorkItemLink = 2 +} +/** + * The type of query. + */ +export declare enum QueryType { + /** + * Gets a flat list of work items. + */ + Flat = 1, + /** + * Gets a tree of work items showing their link hierarchy. + */ + Tree = 2, + /** + * Gets a list of work items and their direct links. + */ + OneHop = 3 +} +/** + * The reporting revision expand level. + */ +export declare enum ReportingRevisionsExpand { + /** + * Default behavior. + */ + None = 0, + /** + * Add fields to the response. + */ + Fields = 1 +} +export interface ReportingWorkItemLinksBatch extends StreamedBatch { +} +export interface ReportingWorkItemRevisionsBatch extends StreamedBatch { +} +/** + * The class represents the reporting work item revision filer. + */ +export interface ReportingWorkItemRevisionsFilter { + /** + * A list of fields to return in work item revisions. Omit this parameter to get all reportable fields. + */ + fields?: string[]; + /** + * Include deleted work item in the result. + */ + includeDeleted?: boolean; + /** + * Return an identity reference instead of a string value for identity fields. + */ + includeIdentityRef?: boolean; + /** + * Include only the latest version of a work item, skipping over all previous revisions of the work item. + */ + includeLatestOnly?: boolean; + /** + * Include tag reference instead of string value for System.Tags field + */ + includeTagRef?: boolean; + /** + * A list of types to filter the results to specific work item types. Omit this parameter to get work item revisions of all work item types. + */ + types?: string[]; +} +export interface SendMailBody { + fields?: string[]; + ids?: number[]; + message?: MailMessage; + persistenceId?: string; + projectId?: string; + sortFields?: string[]; + tempQueryId?: string; + wiql?: string; +} +/** + * The class describes reporting work item revision batch. + */ +export interface StreamedBatch { + /** + * ContinuationToken acts as a waterMark. Used while querying large results. + */ + continuationToken?: string; + /** + * Returns 'true' if it's last batch, 'false' otherwise. + */ + isLastBatch?: boolean; + /** + * The next link for the work item. + */ + nextLink?: string; + /** + * Values such as rel, sourceId, TargetId, ChangedDate, isActive. + */ + values?: T[]; +} +/** + * Enumerates types of supported xml templates used for customization. + */ +export declare enum TemplateType { + WorkItemType = 0, + GlobalWorkflow = 1 +} +/** + * Types of tree node structures. + */ +export declare enum TreeNodeStructureType { + /** + * Area type. + */ + Area = 0, + /** + * Iteration type. + */ + Iteration = 1 +} +/** + * Types of tree structures groups. + */ +export declare enum TreeStructureGroup { + Areas = 0, + Iterations = 1 +} +/** + * Describes an update request for a work item field. + */ +export interface UpdateWorkItemField { + /** + * Indicates whether the user wants to restore the field. + */ + isDeleted?: boolean; +} +/** + * A WIQL query + */ +export interface Wiql { + /** + * The text of the WIQL query + */ + query?: string; +} +/** + * A work artifact link describes an outbound artifact link type. + */ +export interface WorkArtifactLink { + /** + * Target artifact type. + */ + artifactType?: string; + /** + * Outbound link type. + */ + linkType?: string; + /** + * Target tool type. + */ + toolType?: string; +} +/** + * Describes a work item. + */ +export interface WorkItem extends WorkItemTrackingResource { + /** + * Reference to a specific version of the comment added/edited/deleted in this revision. + */ + commentVersionRef?: WorkItemCommentVersionRef; + /** + * Map of field and values for the work item. + */ + fields?: { + [key: string]: any; + }; + /** + * The work item ID. + */ + id?: number; + /** + * Relations of the work item. + */ + relations?: WorkItemRelation[]; + /** + * Revision number of the work item. + */ + rev?: number; +} +/** + * Describes a request to get a set of work items + */ +export interface WorkItemBatchGetRequest { + /** + * The expand parameters for work item attributes. Possible options are { None, Relations, Fields, Links, All } + */ + $expand?: WorkItemExpand; + /** + * AsOf UTC date time string + */ + asOf?: Date; + /** + * The flag to control error policy in a bulk get work items request. Possible options are {Fail, Omit}. + */ + errorPolicy?: WorkItemErrorPolicy; + /** + * The requested fields + */ + fields?: string[]; + /** + * The requested work item ids + */ + ids?: number[]; +} +/** + * Defines a classification node for work item tracking. + */ +export interface WorkItemClassificationNode extends WorkItemTrackingResource { + /** + * Dictionary that has node attributes like start/finish date for iteration nodes. + */ + attributes?: { + [key: string]: any; + }; + /** + * List of child nodes fetched. + */ + children?: WorkItemClassificationNode[]; + /** + * Flag that indicates if the classification node has any child nodes. + */ + hasChildren?: boolean; + /** + * Integer ID of the classification node. + */ + id?: number; + /** + * GUID ID of the classification node. + */ + identifier?: string; + /** + * Name of the classification node. + */ + name?: string; + /** + * Path of the classification node. + */ + path?: string; + /** + * Node structure type. + */ + structureType?: TreeNodeStructureType; +} +/** + * Comment on Work Item + */ +export interface WorkItemComment extends WorkItemTrackingResource { + /** + * Identity of user who added the comment. + */ + revisedBy?: IdentityReference; + /** + * The date of comment. + */ + revisedDate?: Date; + /** + * The work item revision number. + */ + revision?: number; + /** + * The text of the comment. + */ + text?: string; +} +/** + * Collection of comments. + */ +export interface WorkItemComments extends WorkItemTrackingResource { + /** + * Comments collection. + */ + comments?: WorkItemComment[]; + /** + * The count of comments. + */ + count?: number; + /** + * Count of comments from the revision. + */ + fromRevisionCount?: number; + /** + * Total count of comments. + */ + totalCount?: number; +} +/** + * Represents the reference to a specific version of a comment on a Work Item. + */ +export interface WorkItemCommentVersionRef extends WorkItemTrackingResourceReference { + /** + * The id assigned to the comment. + */ + commentId?: number; + /** + * [Internal] The work item revision where this comment was originally added. + */ + createdInRevision?: number; + /** + * [Internal] Specifies whether comment was deleted. + */ + isDeleted?: boolean; + /** + * [Internal] The text of the comment. + */ + text?: string; + /** + * The version number. + */ + version?: number; +} +/** + * Full deleted work item object. Includes the work item itself. + */ +export interface WorkItemDelete extends WorkItemDeleteReference { + /** + * The work item object that was deleted. + */ + resource?: WorkItem; +} +/** + * Reference to a deleted work item. + */ +export interface WorkItemDeleteReference { + /** + * The HTTP status code for work item operation in a batch request. + */ + code?: number; + /** + * The user who deleted the work item type. + */ + deletedBy?: string; + /** + * The work item deletion date. + */ + deletedDate?: string; + /** + * Work item ID. + */ + id?: number; + /** + * The exception message for work item operation in a batch request. + */ + message?: string; + /** + * Name or title of the work item. + */ + name?: string; + /** + * Parent project of the deleted work item. + */ + project?: string; + /** + * Type of work item. + */ + type?: string; + /** + * REST API URL of the resource + */ + url?: string; +} +/** + * Shallow Reference to a deleted work item. + */ +export interface WorkItemDeleteShallowReference { + /** + * Work item ID. + */ + id?: number; + /** + * REST API URL of the resource + */ + url?: string; +} +/** + * Describes an update request for a deleted work item. + */ +export interface WorkItemDeleteUpdate { + /** + * Sets a value indicating whether this work item is deleted. + */ + isDeleted?: boolean; +} +/** + * Enum to control error policy in a bulk get work items request. + */ +export declare enum WorkItemErrorPolicy { + /** + * Fail work error policy. + */ + Fail = 1, + /** + * Omit work error policy. + */ + Omit = 2 +} +/** + * Flag to control payload properties from get work item command. + */ +export declare enum WorkItemExpand { + /** + * Default behavior. + */ + None = 0, + /** + * Relations work item expand. + */ + Relations = 1, + /** + * Fields work item expand. + */ + Fields = 2, + /** + * Links work item expand. + */ + Links = 3, + /** + * Expands all. + */ + All = 4 +} +/** + * Describes a field on a work item and it's properties specific to that work item type. + */ +export interface WorkItemField extends WorkItemTrackingResource { + /** + * Indicates whether the field is sortable in server queries. + */ + canSortBy?: boolean; + /** + * The description of the field. + */ + description?: string; + /** + * Indicates whether this field is deleted. + */ + isDeleted?: boolean; + /** + * Indicates whether this field is an identity field. + */ + isIdentity?: boolean; + /** + * Indicates whether this instance is picklist. + */ + isPicklist?: boolean; + /** + * Indicates whether this instance is a suggested picklist . + */ + isPicklistSuggested?: boolean; + /** + * Indicates whether the field can be queried in the server. + */ + isQueryable?: boolean; + /** + * The name of the field. + */ + name?: string; + /** + * If this field is picklist, the identifier of the picklist associated, otherwise null + */ + picklistId?: string; + /** + * Indicates whether the field is [read only]. + */ + readOnly?: boolean; + /** + * The reference name of the field. + */ + referenceName?: string; + /** + * The supported operations on this field. + */ + supportedOperations?: WorkItemFieldOperation[]; + /** + * The type of the field. + */ + type?: FieldType; + /** + * The usage of the field. + */ + usage?: FieldUsage; +} +/** + * Describes a work item field operation. + */ +export interface WorkItemFieldOperation { + /** + * Friendly name of the operation. + */ + name?: string; + /** + * Reference name of the operation. + */ + referenceName?: string; +} +/** + * Reference to a field in a work item + */ +export interface WorkItemFieldReference { + /** + * The friendly name of the field. + */ + name?: string; + /** + * The reference name of the field. + */ + referenceName?: string; + /** + * The REST URL of the resource. + */ + url?: string; +} +/** + * Describes an update to a work item field. + */ +export interface WorkItemFieldUpdate { + /** + * The new value of the field. + */ + newValue?: any; + /** + * The old value of the field. + */ + oldValue?: any; +} +export interface WorkItemHistory extends WorkItemTrackingResource { + rev?: number; + revisedBy?: IdentityReference; + revisedDate?: Date; + value?: string; +} +/** + * Reference to a work item icon. + */ +export interface WorkItemIcon { + /** + * The identifier of the icon. + */ + id?: string; + /** + * The REST URL of the resource. + */ + url?: string; +} +/** + * A link between two work items. + */ +export interface WorkItemLink { + /** + * The type of link. + */ + rel?: string; + /** + * The source work item. + */ + source?: WorkItemReference; + /** + * The target work item. + */ + target?: WorkItemReference; +} +/** + * Describes the next state for a work item. + */ +export interface WorkItemNextStateOnTransition { + /** + * Error code if there is no next state transition possible. + */ + errorCode?: string; + /** + * Work item ID. + */ + id?: number; + /** + * Error message if there is no next state transition possible. + */ + message?: string; + /** + * Name of the next state on transition. + */ + stateOnTransition?: string; +} +/** + * Represents a clause in a work item query. This shows the structure of a work item query. + */ +export interface WorkItemQueryClause { + /** + * Child clauses if the current clause is a logical operator + */ + clauses?: WorkItemQueryClause[]; + /** + * Field associated with condition + */ + field?: WorkItemFieldReference; + /** + * Right side of the condition when a field to field comparison + */ + fieldValue?: WorkItemFieldReference; + /** + * Determines if this is a field to field comparison + */ + isFieldValue?: boolean; + /** + * Logical operator separating the condition clause + */ + logicalOperator?: LogicalOperation; + /** + * The field operator + */ + operator?: WorkItemFieldOperation; + /** + * Right side of the condition when a field to value comparison + */ + value?: string; +} +/** + * The result of a work item query. + */ +export interface WorkItemQueryResult { + /** + * The date the query was run in the context of. + */ + asOf?: Date; + /** + * The columns of the query. + */ + columns?: WorkItemFieldReference[]; + /** + * The result type + */ + queryResultType?: QueryResultType; + /** + * The type of the query + */ + queryType?: QueryType; + /** + * The sort columns of the query. + */ + sortColumns?: WorkItemQuerySortColumn[]; + /** + * The work item links returned by the query. + */ + workItemRelations?: WorkItemLink[]; + /** + * The work items returned by the query. + */ + workItems?: WorkItemReference[]; +} +/** + * A sort column. + */ +export interface WorkItemQuerySortColumn { + /** + * The direction to sort by. + */ + descending?: boolean; + /** + * A work item field. + */ + field?: WorkItemFieldReference; +} +/** + * Type of the activity + */ +export declare enum WorkItemRecentActivityType { + Visited = 0, + Edited = 1, + Deleted = 2, + Restored = 3 +} +/** + * Contains reference to a work item. + */ +export interface WorkItemReference { + /** + * Work item ID. + */ + id?: number; + /** + * REST API URL of the resource + */ + url?: string; +} +export interface WorkItemRelation extends Link { +} +/** + * Represents the work item type relation type. + */ +export interface WorkItemRelationType extends WorkItemTrackingReference { + /** + * The collection of relation type attributes. + */ + attributes?: { + [key: string]: any; + }; +} +/** + * Describes updates to a work item's relations. + */ +export interface WorkItemRelationUpdates { + /** + * List of newly added relations. + */ + added?: WorkItemRelation[]; + /** + * List of removed relations. + */ + removed?: WorkItemRelation[]; + /** + * List of updated relations. + */ + updated?: WorkItemRelation[]; +} +/** + * Work item type state name, color and state category + */ +export interface WorkItemStateColor { + /** + * Category of state + */ + category?: string; + /** + * Color value + */ + color?: string; + /** + * Work item type state name + */ + name?: string; +} +/** + * Describes a state transition in a work item. + */ +export interface WorkItemStateTransition { + /** + * Gets a list of actions needed to transition to that state. + */ + actions?: string[]; + /** + * Name of the next state. + */ + to?: string; +} +export interface WorkItemTagDefinition { + id?: string; + name?: string; + url?: string; +} +/** + * Describes a work item template. + */ +export interface WorkItemTemplate extends WorkItemTemplateReference { + /** + * Mapping of field and its templated value. + */ + fields: { + [key: string]: string; + }; +} +/** + * Describes a shallow reference to a work item template. + */ +export interface WorkItemTemplateReference extends WorkItemTrackingResource { + /** + * The description of the work item template. + */ + description?: string; + /** + * The identifier of the work item template. + */ + id?: string; + /** + * The name of the work item template. + */ + name: string; + /** + * The name of the work item type. + */ + workItemTypeName: string; +} +export interface WorkItemTrackingReference extends WorkItemTrackingResource { + /** + * The name. + */ + name?: string; + /** + * The reference name. + */ + referenceName?: string; +} +/** + * Base class for WIT REST resources. + */ +export interface WorkItemTrackingResource extends WorkItemTrackingResourceReference { + /** + * Link references to related REST resources. + */ + _links?: any; +} +/** + * Base class for work item tracking resource references. + */ +export interface WorkItemTrackingResourceReference { + url?: string; +} +/** + * Describes a work item type. + */ +export interface WorkItemType extends WorkItemTrackingResource { + /** + * The color. + */ + color?: string; + /** + * The description of the work item type. + */ + description?: string; + /** + * The fields that exist on the work item type. + */ + fieldInstances?: WorkItemTypeFieldInstance[]; + /** + * The fields that exist on the work item type. + */ + fields?: WorkItemTypeFieldInstance[]; + /** + * The icon of the work item type. + */ + icon?: WorkItemIcon; + /** + * True if work item type is disabled + */ + isDisabled?: boolean; + /** + * Gets the name of the work item type. + */ + name?: string; + /** + * The reference name of the work item type. + */ + referenceName?: string; + /** + * Gets state information for the work item type. + */ + states?: WorkItemStateColor[]; + /** + * Gets the various state transition mappings in the work item type. + */ + transitions?: { + [key: string]: WorkItemStateTransition[]; + }; + /** + * The XML form. + */ + xmlForm?: string; +} +/** + * Describes a work item type category. + */ +export interface WorkItemTypeCategory extends WorkItemTrackingResource { + /** + * Gets or sets the default type of the work item. + */ + defaultWorkItemType?: WorkItemTypeReference; + /** + * The name of the category. + */ + name?: string; + /** + * The reference name of the category. + */ + referenceName?: string; + /** + * The work item types that belong to the category. + */ + workItemTypes?: WorkItemTypeReference[]; +} +/** + * Describes a work item type's colors. + */ +export interface WorkItemTypeColor { + /** + * Gets or sets the color of the primary. + */ + primaryColor?: string; + /** + * Gets or sets the color of the secondary. + */ + secondaryColor?: string; + /** + * The name of the work item type. + */ + workItemTypeName?: string; +} +/** + * Describes work item type nam, its icon and color. + */ +export interface WorkItemTypeColorAndIcon { + /** + * The color of the work item type in hex format. + */ + color?: string; + /** + * The work item type icon. + */ + icon?: string; + /** + * The name of the work item type. + */ + workItemTypeName?: string; +} +/** + * Field instance of a work item type. + */ +export interface WorkItemTypeFieldInstance extends WorkItemTypeFieldInstanceBase { + /** + * The list of field allowed values. + */ + allowedValues?: string[]; + /** + * Represents the default value of the field. + */ + defaultValue?: string; +} +/** + * Base field instance for workItemType fields. + */ +export interface WorkItemTypeFieldInstanceBase extends WorkItemFieldReference { + /** + * Indicates whether field value is always required. + */ + alwaysRequired?: boolean; + /** + * The list of dependent fields. + */ + dependentFields?: WorkItemFieldReference[]; + /** + * Gets the help text for the field. + */ + helpText?: string; +} +/** + * Expand options for the work item field(s) request. + */ +export declare enum WorkItemTypeFieldsExpandLevel { + /** + * Includes only basic properties of the field. + */ + None = 0, + /** + * Includes allowed values for the field. + */ + AllowedValues = 1, + /** + * Includes dependent fields of the field. + */ + DependentFields = 2, + /** + * Includes allowed values and dependent fields of the field. + */ + All = 3 +} +/** + * Field Instance of a workItemype with detailed references. + */ +export interface WorkItemTypeFieldWithReferences extends WorkItemTypeFieldInstanceBase { + /** + * The list of field allowed values. + */ + allowedValues?: any[]; + /** + * Represents the default value of the field. + */ + defaultValue?: any; +} +/** + * Reference to a work item type. + */ +export interface WorkItemTypeReference extends WorkItemTrackingResourceReference { + /** + * Name of the work item type. + */ + name?: string; +} +/** + * State colors for a work item type + */ +export interface WorkItemTypeStateColors { + /** + * Work item type state colors + */ + stateColors?: WorkItemStateColor[]; + /** + * Work item type name + */ + workItemTypeName?: string; +} +/** + * Describes a work item type template. + */ +export interface WorkItemTypeTemplate { + /** + * XML template in string format. + */ + template?: string; +} +/** + * Describes a update work item type template request body. + */ +export interface WorkItemTypeTemplateUpdateModel { + /** + * Describes the type of the action for the update request. + */ + actionType?: ProvisioningActionType; + /** + * Methodology to which the template belongs, eg. Agile, Scrum, CMMI. + */ + methodology?: string; + /** + * String representation of the work item type template. + */ + template?: string; + /** + * The type of the template described in the request body. + */ + templateType?: TemplateType; +} +/** + * Describes an update to a work item. + */ +export interface WorkItemUpdate extends WorkItemTrackingResource { + /** + * List of updates to fields. + */ + fields?: { + [key: string]: WorkItemFieldUpdate; + }; + /** + * ID of update. + */ + id?: number; + /** + * List of updates to relations. + */ + relations?: WorkItemRelationUpdates; + /** + * The revision number of work item update. + */ + rev?: number; + /** + * Identity for the work item update. + */ + revisedBy?: IdentityReference; + /** + * The work item updates revision date. + */ + revisedDate?: Date; + /** + * The work item ID. + */ + workItemId?: number; +} +export declare var TypeInfo: { + AccountMyWorkResult: any; + AccountRecentActivityWorkItemModel: any; + AccountRecentActivityWorkItemModel2: any; + AccountRecentActivityWorkItemModelBase: any; + AccountRecentMentionWorkItemModel: any; + AccountWorkWorkItemModel: any; + ClassificationNodesErrorPolicy: { + enumValues: { + "fail": number; + "omit": number; + }; + }; + Comment: any; + CommentExpandOptions: { + enumValues: { + "none": number; + "reactions": number; + "renderedText": number; + "renderedTextOnly": number; + "all": number; + }; + }; + CommentList: any; + CommentReaction: any; + CommentReactionType: { + enumValues: { + "like": number; + "dislike": number; + "heart": number; + "hooray": number; + "smile": number; + "confused": number; + }; + }; + CommentSortOrder: { + enumValues: { + "asc": number; + "desc": number; + }; + }; + CommentVersion: any; + ExternalDeployment: any; + FieldType: { + enumValues: { + "string": number; + "integer": number; + "dateTime": number; + "plainText": number; + "html": number; + "treePath": number; + "history": number; + "double": number; + "guid": number; + "boolean": number; + "identity": number; + "picklistString": number; + "picklistInteger": number; + "picklistDouble": number; + }; + }; + FieldUsage: { + enumValues: { + "none": number; + "workItem": number; + "workItemLink": number; + "tree": number; + "workItemTypeExtension": number; + }; + }; + GetFieldsExpand: { + enumValues: { + "none": number; + "extensionFields": number; + "includeDeleted": number; + }; + }; + LinkQueryMode: { + enumValues: { + "workItems": number; + "linksOneHopMustContain": number; + "linksOneHopMayContain": number; + "linksOneHopDoesNotContain": number; + "linksRecursiveMustContain": number; + "linksRecursiveMayContain": number; + "linksRecursiveDoesNotContain": number; + }; + }; + LogicalOperation: { + enumValues: { + "none": number; + "and": number; + "or": number; + }; + }; + ProvisioningActionType: { + enumValues: { + "import": number; + "validate": number; + }; + }; + QueryBatchGetRequest: any; + QueryErrorPolicy: { + enumValues: { + "fail": number; + "omit": number; + }; + }; + QueryExpand: { + enumValues: { + "none": number; + "wiql": number; + "clauses": number; + "all": number; + "minimal": number; + }; + }; + QueryHierarchyItem: any; + QueryHierarchyItemsResult: any; + QueryOption: { + enumValues: { + "doing": number; + "done": number; + "followed": number; + }; + }; + QueryRecursionOption: { + enumValues: { + "parentFirst": number; + "childFirst": number; + }; + }; + QueryResultType: { + enumValues: { + "workItem": number; + "workItemLink": number; + }; + }; + QueryType: { + enumValues: { + "flat": number; + "tree": number; + "oneHop": number; + }; + }; + ReportingRevisionsExpand: { + enumValues: { + "none": number; + "fields": number; + }; + }; + TemplateType: { + enumValues: { + "workItemType": number; + "globalWorkflow": number; + }; + }; + TreeNodeStructureType: { + enumValues: { + "area": number; + "iteration": number; + }; + }; + TreeStructureGroup: { + enumValues: { + "areas": number; + "iterations": number; + }; + }; + WorkItemBatchGetRequest: any; + WorkItemClassificationNode: any; + WorkItemComment: any; + WorkItemComments: any; + WorkItemErrorPolicy: { + enumValues: { + "fail": number; + "omit": number; + }; + }; + WorkItemExpand: { + enumValues: { + "none": number; + "relations": number; + "fields": number; + "links": number; + "all": number; + }; + }; + WorkItemField: any; + WorkItemHistory: any; + WorkItemQueryClause: any; + WorkItemQueryResult: any; + WorkItemRecentActivityType: { + enumValues: { + "visited": number; + "edited": number; + "deleted": number; + "restored": number; + }; + }; + WorkItemTypeFieldsExpandLevel: { + enumValues: { + "none": number; + "allowedValues": number; + "dependentFields": number; + "all": number; + }; + }; + WorkItemTypeTemplateUpdateModel: any; + WorkItemUpdate: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.js b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.js new file mode 100644 index 0000000..408968a --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingInterfaces.js @@ -0,0 +1,841 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Flag to control error policy in a batch classification nodes get request. + */ +var ClassificationNodesErrorPolicy; +(function (ClassificationNodesErrorPolicy) { + ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy["Fail"] = 1] = "Fail"; + ClassificationNodesErrorPolicy[ClassificationNodesErrorPolicy["Omit"] = 2] = "Omit"; +})(ClassificationNodesErrorPolicy = exports.ClassificationNodesErrorPolicy || (exports.ClassificationNodesErrorPolicy = {})); +/** + * Specifies the additional data retrieval options for work item comments. + */ +var CommentExpandOptions; +(function (CommentExpandOptions) { + CommentExpandOptions[CommentExpandOptions["None"] = 0] = "None"; + /** + * Include comment reactions. + */ + CommentExpandOptions[CommentExpandOptions["Reactions"] = 1] = "Reactions"; + /** + * Include the rendered text (html) in addition to MD text. + */ + CommentExpandOptions[CommentExpandOptions["RenderedText"] = 8] = "RenderedText"; + /** + * If specified, then ONLY rendered text (html) will be returned, w/o markdown. Supposed to be used internally from data provides for optimization purposes. + */ + CommentExpandOptions[CommentExpandOptions["RenderedTextOnly"] = 16] = "RenderedTextOnly"; + CommentExpandOptions[CommentExpandOptions["All"] = -17] = "All"; +})(CommentExpandOptions = exports.CommentExpandOptions || (exports.CommentExpandOptions = {})); +/** + * Represents different reaction types for a work item comment. + */ +var CommentReactionType; +(function (CommentReactionType) { + CommentReactionType[CommentReactionType["Like"] = 0] = "Like"; + CommentReactionType[CommentReactionType["Dislike"] = 1] = "Dislike"; + CommentReactionType[CommentReactionType["Heart"] = 2] = "Heart"; + CommentReactionType[CommentReactionType["Hooray"] = 3] = "Hooray"; + CommentReactionType[CommentReactionType["Smile"] = 4] = "Smile"; + CommentReactionType[CommentReactionType["Confused"] = 5] = "Confused"; +})(CommentReactionType = exports.CommentReactionType || (exports.CommentReactionType = {})); +var CommentSortOrder; +(function (CommentSortOrder) { + /** + * The results will be sorted in Ascending order. + */ + CommentSortOrder[CommentSortOrder["Asc"] = 1] = "Asc"; + /** + * The results will be sorted in Descending order. + */ + CommentSortOrder[CommentSortOrder["Desc"] = 2] = "Desc"; +})(CommentSortOrder = exports.CommentSortOrder || (exports.CommentSortOrder = {})); +/** + * Enum for field types. + */ +var FieldType; +(function (FieldType) { + /** + * String field type. + */ + FieldType[FieldType["String"] = 0] = "String"; + /** + * Integer field type. + */ + FieldType[FieldType["Integer"] = 1] = "Integer"; + /** + * Datetime field type. + */ + FieldType[FieldType["DateTime"] = 2] = "DateTime"; + /** + * Plain text field type. + */ + FieldType[FieldType["PlainText"] = 3] = "PlainText"; + /** + * HTML (Multiline) field type. + */ + FieldType[FieldType["Html"] = 4] = "Html"; + /** + * Treepath field type. + */ + FieldType[FieldType["TreePath"] = 5] = "TreePath"; + /** + * History field type. + */ + FieldType[FieldType["History"] = 6] = "History"; + /** + * Double field type. + */ + FieldType[FieldType["Double"] = 7] = "Double"; + /** + * Guid field type. + */ + FieldType[FieldType["Guid"] = 8] = "Guid"; + /** + * Boolean field type. + */ + FieldType[FieldType["Boolean"] = 9] = "Boolean"; + /** + * Identity field type. + */ + FieldType[FieldType["Identity"] = 10] = "Identity"; + /** + * String picklist field type. When creating a string picklist field from REST API, use "String" FieldType. + */ + FieldType[FieldType["PicklistString"] = 11] = "PicklistString"; + /** + * Integer picklist field type. When creating a integer picklist field from REST API, use "Integer" FieldType. + */ + FieldType[FieldType["PicklistInteger"] = 12] = "PicklistInteger"; + /** + * Double picklist field type. When creating a double picklist field from REST API, use "Double" FieldType. + */ + FieldType[FieldType["PicklistDouble"] = 13] = "PicklistDouble"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +/** + * Enum for field usages. + */ +var FieldUsage; +(function (FieldUsage) { + /** + * Empty usage. + */ + FieldUsage[FieldUsage["None"] = 0] = "None"; + /** + * Work item field usage. + */ + FieldUsage[FieldUsage["WorkItem"] = 1] = "WorkItem"; + /** + * Work item link field usage. + */ + FieldUsage[FieldUsage["WorkItemLink"] = 2] = "WorkItemLink"; + /** + * Treenode field usage. + */ + FieldUsage[FieldUsage["Tree"] = 3] = "Tree"; + /** + * Work Item Type Extension usage. + */ + FieldUsage[FieldUsage["WorkItemTypeExtension"] = 4] = "WorkItemTypeExtension"; +})(FieldUsage = exports.FieldUsage || (exports.FieldUsage = {})); +/** + * Flag to expand types of fields. + */ +var GetFieldsExpand; +(function (GetFieldsExpand) { + /** + * Default behavior. + */ + GetFieldsExpand[GetFieldsExpand["None"] = 0] = "None"; + /** + * Adds extension fields to the response. + */ + GetFieldsExpand[GetFieldsExpand["ExtensionFields"] = 1] = "ExtensionFields"; + /** + * Includes fields that have been deleted. + */ + GetFieldsExpand[GetFieldsExpand["IncludeDeleted"] = 2] = "IncludeDeleted"; +})(GetFieldsExpand = exports.GetFieldsExpand || (exports.GetFieldsExpand = {})); +/** + * The link query mode which determines the behavior of the query. + */ +var LinkQueryMode; +(function (LinkQueryMode) { + /** + * Returns flat list of work items. + */ + LinkQueryMode[LinkQueryMode["WorkItems"] = 0] = "WorkItems"; + /** + * Returns work items where the source, target, and link criteria are all satisfied. + */ + LinkQueryMode[LinkQueryMode["LinksOneHopMustContain"] = 1] = "LinksOneHopMustContain"; + /** + * Returns work items that satisfy the source and link criteria, even if no linked work item satisfies the target criteria. + */ + LinkQueryMode[LinkQueryMode["LinksOneHopMayContain"] = 2] = "LinksOneHopMayContain"; + /** + * Returns work items that satisfy the source, only if no linked work item satisfies the link and target criteria. + */ + LinkQueryMode[LinkQueryMode["LinksOneHopDoesNotContain"] = 3] = "LinksOneHopDoesNotContain"; + LinkQueryMode[LinkQueryMode["LinksRecursiveMustContain"] = 4] = "LinksRecursiveMustContain"; + /** + * Returns work items a hierarchy of work items that by default satisfy the source + */ + LinkQueryMode[LinkQueryMode["LinksRecursiveMayContain"] = 5] = "LinksRecursiveMayContain"; + LinkQueryMode[LinkQueryMode["LinksRecursiveDoesNotContain"] = 6] = "LinksRecursiveDoesNotContain"; +})(LinkQueryMode = exports.LinkQueryMode || (exports.LinkQueryMode = {})); +var LogicalOperation; +(function (LogicalOperation) { + LogicalOperation[LogicalOperation["NONE"] = 0] = "NONE"; + LogicalOperation[LogicalOperation["AND"] = 1] = "AND"; + LogicalOperation[LogicalOperation["OR"] = 2] = "OR"; +})(LogicalOperation = exports.LogicalOperation || (exports.LogicalOperation = {})); +/** + * Enumerates the possible provisioning actions that can be triggered on process template update. + */ +var ProvisioningActionType; +(function (ProvisioningActionType) { + ProvisioningActionType[ProvisioningActionType["Import"] = 0] = "Import"; + ProvisioningActionType[ProvisioningActionType["Validate"] = 1] = "Validate"; +})(ProvisioningActionType = exports.ProvisioningActionType || (exports.ProvisioningActionType = {})); +/** + * Enum to control error policy in a query batch request. + */ +var QueryErrorPolicy; +(function (QueryErrorPolicy) { + QueryErrorPolicy[QueryErrorPolicy["Fail"] = 1] = "Fail"; + QueryErrorPolicy[QueryErrorPolicy["Omit"] = 2] = "Omit"; +})(QueryErrorPolicy = exports.QueryErrorPolicy || (exports.QueryErrorPolicy = {})); +/** + * Determines which set of additional query properties to display + */ +var QueryExpand; +(function (QueryExpand) { + /** + * Expands Columns, Links and ChangeInfo + */ + QueryExpand[QueryExpand["None"] = 0] = "None"; + /** + * Expands Columns, Links, ChangeInfo and WIQL text + */ + QueryExpand[QueryExpand["Wiql"] = 1] = "Wiql"; + /** + * Expands Columns, Links, ChangeInfo, WIQL text and clauses + */ + QueryExpand[QueryExpand["Clauses"] = 2] = "Clauses"; + /** + * Expands all properties + */ + QueryExpand[QueryExpand["All"] = 3] = "All"; + /** + * Displays minimal properties and the WIQL text + */ + QueryExpand[QueryExpand["Minimal"] = 4] = "Minimal"; +})(QueryExpand = exports.QueryExpand || (exports.QueryExpand = {})); +var QueryOption; +(function (QueryOption) { + QueryOption[QueryOption["Doing"] = 1] = "Doing"; + QueryOption[QueryOption["Done"] = 2] = "Done"; + QueryOption[QueryOption["Followed"] = 3] = "Followed"; +})(QueryOption = exports.QueryOption || (exports.QueryOption = {})); +/** + * Determines whether a tree query matches parents or children first. + */ +var QueryRecursionOption; +(function (QueryRecursionOption) { + /** + * Returns work items that satisfy the source, even if no linked work item satisfies the target and link criteria. + */ + QueryRecursionOption[QueryRecursionOption["ParentFirst"] = 0] = "ParentFirst"; + /** + * Returns work items that satisfy the target criteria, even if no work item satisfies the source and link criteria. + */ + QueryRecursionOption[QueryRecursionOption["ChildFirst"] = 1] = "ChildFirst"; +})(QueryRecursionOption = exports.QueryRecursionOption || (exports.QueryRecursionOption = {})); +/** + * The query result type + */ +var QueryResultType; +(function (QueryResultType) { + /** + * A list of work items (for flat queries). + */ + QueryResultType[QueryResultType["WorkItem"] = 1] = "WorkItem"; + /** + * A list of work item links (for OneHop and Tree queries). + */ + QueryResultType[QueryResultType["WorkItemLink"] = 2] = "WorkItemLink"; +})(QueryResultType = exports.QueryResultType || (exports.QueryResultType = {})); +/** + * The type of query. + */ +var QueryType; +(function (QueryType) { + /** + * Gets a flat list of work items. + */ + QueryType[QueryType["Flat"] = 1] = "Flat"; + /** + * Gets a tree of work items showing their link hierarchy. + */ + QueryType[QueryType["Tree"] = 2] = "Tree"; + /** + * Gets a list of work items and their direct links. + */ + QueryType[QueryType["OneHop"] = 3] = "OneHop"; +})(QueryType = exports.QueryType || (exports.QueryType = {})); +/** + * The reporting revision expand level. + */ +var ReportingRevisionsExpand; +(function (ReportingRevisionsExpand) { + /** + * Default behavior. + */ + ReportingRevisionsExpand[ReportingRevisionsExpand["None"] = 0] = "None"; + /** + * Add fields to the response. + */ + ReportingRevisionsExpand[ReportingRevisionsExpand["Fields"] = 1] = "Fields"; +})(ReportingRevisionsExpand = exports.ReportingRevisionsExpand || (exports.ReportingRevisionsExpand = {})); +/** + * Enumerates types of supported xml templates used for customization. + */ +var TemplateType; +(function (TemplateType) { + TemplateType[TemplateType["WorkItemType"] = 0] = "WorkItemType"; + TemplateType[TemplateType["GlobalWorkflow"] = 1] = "GlobalWorkflow"; +})(TemplateType = exports.TemplateType || (exports.TemplateType = {})); +/** + * Types of tree node structures. + */ +var TreeNodeStructureType; +(function (TreeNodeStructureType) { + /** + * Area type. + */ + TreeNodeStructureType[TreeNodeStructureType["Area"] = 0] = "Area"; + /** + * Iteration type. + */ + TreeNodeStructureType[TreeNodeStructureType["Iteration"] = 1] = "Iteration"; +})(TreeNodeStructureType = exports.TreeNodeStructureType || (exports.TreeNodeStructureType = {})); +/** + * Types of tree structures groups. + */ +var TreeStructureGroup; +(function (TreeStructureGroup) { + TreeStructureGroup[TreeStructureGroup["Areas"] = 0] = "Areas"; + TreeStructureGroup[TreeStructureGroup["Iterations"] = 1] = "Iterations"; +})(TreeStructureGroup = exports.TreeStructureGroup || (exports.TreeStructureGroup = {})); +/** + * Enum to control error policy in a bulk get work items request. + */ +var WorkItemErrorPolicy; +(function (WorkItemErrorPolicy) { + /** + * Fail work error policy. + */ + WorkItemErrorPolicy[WorkItemErrorPolicy["Fail"] = 1] = "Fail"; + /** + * Omit work error policy. + */ + WorkItemErrorPolicy[WorkItemErrorPolicy["Omit"] = 2] = "Omit"; +})(WorkItemErrorPolicy = exports.WorkItemErrorPolicy || (exports.WorkItemErrorPolicy = {})); +/** + * Flag to control payload properties from get work item command. + */ +var WorkItemExpand; +(function (WorkItemExpand) { + /** + * Default behavior. + */ + WorkItemExpand[WorkItemExpand["None"] = 0] = "None"; + /** + * Relations work item expand. + */ + WorkItemExpand[WorkItemExpand["Relations"] = 1] = "Relations"; + /** + * Fields work item expand. + */ + WorkItemExpand[WorkItemExpand["Fields"] = 2] = "Fields"; + /** + * Links work item expand. + */ + WorkItemExpand[WorkItemExpand["Links"] = 3] = "Links"; + /** + * Expands all. + */ + WorkItemExpand[WorkItemExpand["All"] = 4] = "All"; +})(WorkItemExpand = exports.WorkItemExpand || (exports.WorkItemExpand = {})); +/** + * Type of the activity + */ +var WorkItemRecentActivityType; +(function (WorkItemRecentActivityType) { + WorkItemRecentActivityType[WorkItemRecentActivityType["Visited"] = 0] = "Visited"; + WorkItemRecentActivityType[WorkItemRecentActivityType["Edited"] = 1] = "Edited"; + WorkItemRecentActivityType[WorkItemRecentActivityType["Deleted"] = 2] = "Deleted"; + WorkItemRecentActivityType[WorkItemRecentActivityType["Restored"] = 3] = "Restored"; +})(WorkItemRecentActivityType = exports.WorkItemRecentActivityType || (exports.WorkItemRecentActivityType = {})); +/** + * Expand options for the work item field(s) request. + */ +var WorkItemTypeFieldsExpandLevel; +(function (WorkItemTypeFieldsExpandLevel) { + /** + * Includes only basic properties of the field. + */ + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["None"] = 0] = "None"; + /** + * Includes allowed values for the field. + */ + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues"; + /** + * Includes dependent fields of the field. + */ + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["DependentFields"] = 2] = "DependentFields"; + /** + * Includes allowed values and dependent fields of the field. + */ + WorkItemTypeFieldsExpandLevel[WorkItemTypeFieldsExpandLevel["All"] = 3] = "All"; +})(WorkItemTypeFieldsExpandLevel = exports.WorkItemTypeFieldsExpandLevel || (exports.WorkItemTypeFieldsExpandLevel = {})); +exports.TypeInfo = { + AccountMyWorkResult: {}, + AccountRecentActivityWorkItemModel: {}, + AccountRecentActivityWorkItemModel2: {}, + AccountRecentActivityWorkItemModelBase: {}, + AccountRecentMentionWorkItemModel: {}, + AccountWorkWorkItemModel: {}, + ClassificationNodesErrorPolicy: { + enumValues: { + "fail": 1, + "omit": 2 + } + }, + Comment: {}, + CommentExpandOptions: { + enumValues: { + "none": 0, + "reactions": 1, + "renderedText": 8, + "renderedTextOnly": 16, + "all": -17 + } + }, + CommentList: {}, + CommentReaction: {}, + CommentReactionType: { + enumValues: { + "like": 0, + "dislike": 1, + "heart": 2, + "hooray": 3, + "smile": 4, + "confused": 5 + } + }, + CommentSortOrder: { + enumValues: { + "asc": 1, + "desc": 2 + } + }, + CommentVersion: {}, + ExternalDeployment: {}, + FieldType: { + enumValues: { + "string": 0, + "integer": 1, + "dateTime": 2, + "plainText": 3, + "html": 4, + "treePath": 5, + "history": 6, + "double": 7, + "guid": 8, + "boolean": 9, + "identity": 10, + "picklistString": 11, + "picklistInteger": 12, + "picklistDouble": 13 + } + }, + FieldUsage: { + enumValues: { + "none": 0, + "workItem": 1, + "workItemLink": 2, + "tree": 3, + "workItemTypeExtension": 4 + } + }, + GetFieldsExpand: { + enumValues: { + "none": 0, + "extensionFields": 1, + "includeDeleted": 2 + } + }, + LinkQueryMode: { + enumValues: { + "workItems": 0, + "linksOneHopMustContain": 1, + "linksOneHopMayContain": 2, + "linksOneHopDoesNotContain": 3, + "linksRecursiveMustContain": 4, + "linksRecursiveMayContain": 5, + "linksRecursiveDoesNotContain": 6 + } + }, + LogicalOperation: { + enumValues: { + "none": 0, + "and": 1, + "or": 2 + } + }, + ProvisioningActionType: { + enumValues: { + "import": 0, + "validate": 1 + } + }, + QueryBatchGetRequest: {}, + QueryErrorPolicy: { + enumValues: { + "fail": 1, + "omit": 2 + } + }, + QueryExpand: { + enumValues: { + "none": 0, + "wiql": 1, + "clauses": 2, + "all": 3, + "minimal": 4 + } + }, + QueryHierarchyItem: {}, + QueryHierarchyItemsResult: {}, + QueryOption: { + enumValues: { + "doing": 1, + "done": 2, + "followed": 3 + } + }, + QueryRecursionOption: { + enumValues: { + "parentFirst": 0, + "childFirst": 1 + } + }, + QueryResultType: { + enumValues: { + "workItem": 1, + "workItemLink": 2 + } + }, + QueryType: { + enumValues: { + "flat": 1, + "tree": 2, + "oneHop": 3 + } + }, + ReportingRevisionsExpand: { + enumValues: { + "none": 0, + "fields": 1 + } + }, + TemplateType: { + enumValues: { + "workItemType": 0, + "globalWorkflow": 1 + } + }, + TreeNodeStructureType: { + enumValues: { + "area": 0, + "iteration": 1 + } + }, + TreeStructureGroup: { + enumValues: { + "areas": 0, + "iterations": 1 + } + }, + WorkItemBatchGetRequest: {}, + WorkItemClassificationNode: {}, + WorkItemComment: {}, + WorkItemComments: {}, + WorkItemErrorPolicy: { + enumValues: { + "fail": 1, + "omit": 2 + } + }, + WorkItemExpand: { + enumValues: { + "none": 0, + "relations": 1, + "fields": 2, + "links": 3, + "all": 4 + } + }, + WorkItemField: {}, + WorkItemHistory: {}, + WorkItemQueryClause: {}, + WorkItemQueryResult: {}, + WorkItemRecentActivityType: { + enumValues: { + "visited": 0, + "edited": 1, + "deleted": 2, + "restored": 3 + } + }, + WorkItemTypeFieldsExpandLevel: { + enumValues: { + "none": 0, + "allowedValues": 1, + "dependentFields": 2, + "all": 3 + } + }, + WorkItemTypeTemplateUpdateModel: {}, + WorkItemUpdate: {}, +}; +exports.TypeInfo.AccountMyWorkResult.fields = { + workItemDetails: { + isArray: true, + typeInfo: exports.TypeInfo.AccountWorkWorkItemModel + } +}; +exports.TypeInfo.AccountRecentActivityWorkItemModel.fields = { + activityDate: { + isDate: true, + }, + activityType: { + enumType: exports.TypeInfo.WorkItemRecentActivityType + }, + changedDate: { + isDate: true, + } +}; +exports.TypeInfo.AccountRecentActivityWorkItemModel2.fields = { + activityDate: { + isDate: true, + }, + activityType: { + enumType: exports.TypeInfo.WorkItemRecentActivityType + }, + changedDate: { + isDate: true, + } +}; +exports.TypeInfo.AccountRecentActivityWorkItemModelBase.fields = { + activityDate: { + isDate: true, + }, + activityType: { + enumType: exports.TypeInfo.WorkItemRecentActivityType + }, + changedDate: { + isDate: true, + } +}; +exports.TypeInfo.AccountRecentMentionWorkItemModel.fields = { + mentionedDateField: { + isDate: true, + } +}; +exports.TypeInfo.AccountWorkWorkItemModel.fields = { + changedDate: { + isDate: true, + } +}; +exports.TypeInfo.Comment.fields = { + createdDate: { + isDate: true, + }, + createdOnBehalfDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + }, + reactions: { + isArray: true, + typeInfo: exports.TypeInfo.CommentReaction + } +}; +exports.TypeInfo.CommentList.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.Comment + } +}; +exports.TypeInfo.CommentReaction.fields = { + type: { + enumType: exports.TypeInfo.CommentReactionType + } +}; +exports.TypeInfo.CommentVersion.fields = { + createdDate: { + isDate: true, + }, + createdOnBehalfDate: { + isDate: true, + }, + modifiedDate: { + isDate: true, + } +}; +exports.TypeInfo.ExternalDeployment.fields = { + statusDate: { + isDate: true, + } +}; +exports.TypeInfo.QueryBatchGetRequest.fields = { + $expand: { + enumType: exports.TypeInfo.QueryExpand + }, + errorPolicy: { + enumType: exports.TypeInfo.QueryErrorPolicy + } +}; +exports.TypeInfo.QueryHierarchyItem.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.QueryHierarchyItem + }, + clauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause + }, + createdDate: { + isDate: true, + }, + filterOptions: { + enumType: exports.TypeInfo.LinkQueryMode + }, + lastExecutedDate: { + isDate: true, + }, + lastModifiedDate: { + isDate: true, + }, + linkClauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause + }, + queryRecursionOption: { + enumType: exports.TypeInfo.QueryRecursionOption + }, + queryType: { + enumType: exports.TypeInfo.QueryType + }, + sourceClauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause + }, + targetClauses: { + typeInfo: exports.TypeInfo.WorkItemQueryClause + } +}; +exports.TypeInfo.QueryHierarchyItemsResult.fields = { + value: { + isArray: true, + typeInfo: exports.TypeInfo.QueryHierarchyItem + } +}; +exports.TypeInfo.WorkItemBatchGetRequest.fields = { + $expand: { + enumType: exports.TypeInfo.WorkItemExpand + }, + asOf: { + isDate: true, + }, + errorPolicy: { + enumType: exports.TypeInfo.WorkItemErrorPolicy + } +}; +exports.TypeInfo.WorkItemClassificationNode.fields = { + children: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemClassificationNode + }, + structureType: { + enumType: exports.TypeInfo.TreeNodeStructureType + } +}; +exports.TypeInfo.WorkItemComment.fields = { + revisedDate: { + isDate: true, + } +}; +exports.TypeInfo.WorkItemComments.fields = { + comments: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemComment + } +}; +exports.TypeInfo.WorkItemField.fields = { + type: { + enumType: exports.TypeInfo.FieldType + }, + usage: { + enumType: exports.TypeInfo.FieldUsage + } +}; +exports.TypeInfo.WorkItemHistory.fields = { + revisedDate: { + isDate: true, + } +}; +exports.TypeInfo.WorkItemQueryClause.fields = { + clauses: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemQueryClause + }, + logicalOperator: { + enumType: exports.TypeInfo.LogicalOperation + } +}; +exports.TypeInfo.WorkItemQueryResult.fields = { + asOf: { + isDate: true, + }, + queryResultType: { + enumType: exports.TypeInfo.QueryResultType + }, + queryType: { + enumType: exports.TypeInfo.QueryType + } +}; +exports.TypeInfo.WorkItemTypeTemplateUpdateModel.fields = { + actionType: { + enumType: exports.TypeInfo.ProvisioningActionType + }, + templateType: { + enumType: exports.TypeInfo.TemplateType + } +}; +exports.TypeInfo.WorkItemUpdate.fields = { + revisedDate: { + isDate: true, + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.d.ts new file mode 100644 index 0000000..21b3102 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.d.ts @@ -0,0 +1,621 @@ +export interface BehaviorCreateModel { + /** + * Color + */ + color?: string; + /** + * Optional - Id + */ + id?: string; + /** + * Parent behavior id + */ + inherits?: string; + /** + * Name of the behavior + */ + name?: string; +} +export interface BehaviorModel { + /** + * Is the behavior abstract (i.e. can not be associated with any work item type) + */ + abstract?: boolean; + /** + * Color + */ + color?: string; + /** + * Description + */ + description?: string; + /** + * Behavior Id + */ + id?: string; + /** + * Parent behavior reference + */ + inherits?: WorkItemBehaviorReference; + /** + * Behavior Name + */ + name?: string; + /** + * Is the behavior overrides a behavior from system process + */ + overridden?: boolean; + /** + * Rank + */ + rank?: number; + /** + * Url of the behavior + */ + url?: string; +} +export interface BehaviorReplaceModel { + /** + * Color + */ + color?: string; + /** + * Behavior Name + */ + name?: string; +} +/** + * Represent a control in the form. + */ +export interface Control { + /** + * Contribution for the control. + */ + contribution?: WitContribution; + /** + * Type of the control. + */ + controlType?: string; + /** + * Height of the control, for html controls. + */ + height?: number; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + */ + inherited?: boolean; + /** + * A value indicating if the layout node is contribution or not. + */ + isContribution?: boolean; + /** + * Label for the field + */ + label?: string; + /** + * Inner text of the control. + */ + metadata?: string; + order?: number; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; + /** + * A value indicating if the control is readonly. + */ + readOnly?: boolean; + /** + * A value indicating if the control should be hidden or not. + */ + visible?: boolean; + /** + * Watermark text for the textbox. + */ + watermark?: string; +} +/** + * Represents the extensions part of the layout + */ +export interface Extension { + id?: string; +} +export interface FieldModel { + /** + * Description about field + */ + description?: string; + /** + * ID of the field + */ + id?: string; + /** + * Name of the field + */ + name?: string; + /** + * Reference to picklist in this field + */ + pickList?: PickListMetadataModel; + /** + * Type of field + */ + type?: FieldType; + /** + * Url to the field + */ + url?: string; +} +/** + * Enum for the type of a field. + */ +export declare enum FieldType { + /** + * String field type. + */ + String = 1, + /** + * Integer field type. + */ + Integer = 2, + /** + * Datetime field type. + */ + DateTime = 3, + /** + * Plain Text field type. + */ + PlainText = 5, + /** + * HTML (Multiline) field type. + */ + Html = 7, + /** + * Treepath field type. + */ + TreePath = 8, + /** + * History field type. + */ + History = 9, + /** + * Double field type. + */ + Double = 10, + /** + * Guid field type. + */ + Guid = 11, + /** + * Boolean field type. + */ + Boolean = 12, + /** + * Identity field type. + */ + Identity = 13, + /** + * Integer picklist field type. + */ + PicklistInteger = 14, + /** + * String picklist field type. + */ + PicklistString = 15, + /** + * Double picklist field type. + */ + PicklistDouble = 16 +} +export interface FieldUpdate { + description?: string; + id?: string; +} +export interface FormLayout { + /** + * Gets and sets extensions list + */ + extensions?: Extension[]; + /** + * Top level tabs of the layout. + */ + pages?: Page[]; + /** + * Headers controls of the layout. + */ + systemControls?: Control[]; +} +export declare enum GetWorkItemTypeExpand { + None = 0, + States = 1, + Behaviors = 2, + Layout = 4 +} +/** + * Represent a group in the form that holds controls in it. + */ +export interface Group { + /** + * Contribution for the group. + */ + contribution?: WitContribution; + /** + * Controls to be put in the group. + */ + controls?: Control[]; + /** + * The height for the contribution. + */ + height?: number; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + */ + inherited?: boolean; + /** + * A value indicating if the layout node is contribution are not. + */ + isContribution?: boolean; + /** + * Label for the group. + */ + label?: string; + /** + * Order in which the group should appear in the section. + */ + order?: number; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; + /** + * A value indicating if the group should be hidden or not. + */ + visible?: boolean; +} +export interface HideStateModel { + hidden?: boolean; +} +export interface Page { + /** + * Contribution for the page. + */ + contribution?: WitContribution; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + */ + inherited?: boolean; + /** + * A value indicating if the layout node is contribution are not. + */ + isContribution?: boolean; + /** + * The label for the page. + */ + label?: string; + /** + * A value indicating whether any user operations are permitted on this page and the contents of this page + */ + locked?: boolean; + /** + * Order in which the page should appear in the layout. + */ + order?: number; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; + /** + * The icon for the page. + */ + pageType?: PageType; + /** + * The sections of the page. + */ + sections?: Section[]; + /** + * A value indicating if the page should be hidden or not. + */ + visible?: boolean; +} +/** + * Type of page + */ +export declare enum PageType { + Custom = 1, + History = 2, + Links = 3, + Attachments = 4 +} +export interface PickListItemModel { + id?: string; + value?: string; +} +export interface PickListMetadataModel { + /** + * ID of the picklist + */ + id?: string; + /** + * Is input values by user only limited to suggested values + */ + isSuggested?: boolean; + /** + * Name of the picklist + */ + name?: string; + /** + * Type of picklist + */ + type?: string; + /** + * Url of the picklist + */ + url?: string; +} +export interface PickListModel extends PickListMetadataModel { + /** + * A list of PicklistItemModel + */ + items?: PickListItemModel[]; +} +/** + * A layout node holding groups together in a page + */ +export interface Section { + groups?: Group[]; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; +} +export interface WitContribution { + /** + * The id for the contribution. + */ + contributionId?: string; + /** + * The height for the contribution. + */ + height?: number; + /** + * A dictionary holding key value pairs for contribution inputs. + */ + inputs?: { + [key: string]: any; + }; + /** + * A value indicating if the contribution should be show on deleted workItem. + */ + showOnDeletedWorkItem?: boolean; +} +export interface WorkItemBehaviorReference { + /** + * The ID of the reference behavior + */ + id?: string; + /** + * The url of the reference behavior + */ + url?: string; +} +export interface WorkItemStateInputModel { + /** + * Color of the state + */ + color?: string; + /** + * Name of the state + */ + name?: string; + /** + * Order in which state should appear + */ + order?: number; + /** + * Category of the state + */ + stateCategory?: string; +} +export interface WorkItemStateResultModel { + /** + * Color of the state + */ + color?: string; + /** + * Is the state hidden + */ + hidden?: boolean; + /** + * The ID of the State + */ + id?: string; + /** + * Name of the state + */ + name?: string; + /** + * Order in which state should appear + */ + order?: number; + /** + * Category of the state + */ + stateCategory?: string; + /** + * Url of the state + */ + url?: string; +} +export interface WorkItemTypeBehavior { + behavior?: WorkItemBehaviorReference; + isDefault?: boolean; + isLegacyDefault?: boolean; + url?: string; +} +/** + * Work item type classes' + */ +export declare enum WorkItemTypeClass { + System = 0, + Derived = 1, + Custom = 2 +} +export interface WorkItemTypeFieldModel { + allowGroups: boolean; + defaultValue?: string; + name?: string; + pickList?: PickListMetadataModel; + readOnly?: boolean; + referenceName?: string; + required?: boolean; + type?: FieldType; + url?: string; +} +/** + * New version of WorkItemTypeFieldModel supporting defaultValue as object (such as IdentityRef) and description + */ +export interface WorkItemTypeFieldModel2 { + allowGroups: boolean; + defaultValue?: any; + description?: string; + name?: string; + pickList?: PickListMetadataModel; + readOnly?: boolean; + referenceName?: string; + required?: boolean; + type?: FieldType; + url?: string; +} +export interface WorkItemTypeModel { + /** + * Behaviors of the work item type + */ + behaviors?: WorkItemTypeBehavior[]; + /** + * Class of the work item type + */ + class?: WorkItemTypeClass; + /** + * Color of the work item type + */ + color?: string; + /** + * Description of the work item type + */ + description?: string; + /** + * Icon of the work item type + */ + icon?: string; + /** + * The ID of the work item type + */ + id?: string; + /** + * Parent WIT Id/Internal ReferenceName that it inherits from + */ + inherits?: string; + /** + * Is work item type disabled + */ + isDisabled?: boolean; + /** + * Layout of the work item type + */ + layout?: FormLayout; + /** + * Name of the work item type + */ + name?: string; + /** + * States of the work item type + */ + states?: WorkItemStateResultModel[]; + /** + * Url of the work item type + */ + url?: string; +} +export interface WorkItemTypeUpdateModel { + /** + * Color of the work item type + */ + color?: string; + /** + * Description of the work item type + */ + description?: string; + /** + * Icon of the work item type + */ + icon?: string; + /** + * Is the workitem type to be disabled + */ + isDisabled?: boolean; +} +export declare var TypeInfo: { + FieldModel: any; + FieldType: { + enumValues: { + "string": number; + "integer": number; + "dateTime": number; + "plainText": number; + "html": number; + "treePath": number; + "history": number; + "double": number; + "guid": number; + "boolean": number; + "identity": number; + "picklistInteger": number; + "picklistString": number; + "picklistDouble": number; + }; + }; + FormLayout: any; + GetWorkItemTypeExpand: { + enumValues: { + "none": number; + "states": number; + "behaviors": number; + "layout": number; + }; + }; + Page: any; + PageType: { + enumValues: { + "custom": number; + "history": number; + "links": number; + "attachments": number; + }; + }; + WorkItemTypeClass: { + enumValues: { + "system": number; + "derived": number; + "custom": number; + }; + }; + WorkItemTypeFieldModel: any; + WorkItemTypeFieldModel2: any; + WorkItemTypeModel: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.js b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.js new file mode 100644 index 0000000..7f9827a --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessDefinitionsInterfaces.js @@ -0,0 +1,182 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Enum for the type of a field. + */ +var FieldType; +(function (FieldType) { + /** + * String field type. + */ + FieldType[FieldType["String"] = 1] = "String"; + /** + * Integer field type. + */ + FieldType[FieldType["Integer"] = 2] = "Integer"; + /** + * Datetime field type. + */ + FieldType[FieldType["DateTime"] = 3] = "DateTime"; + /** + * Plain Text field type. + */ + FieldType[FieldType["PlainText"] = 5] = "PlainText"; + /** + * HTML (Multiline) field type. + */ + FieldType[FieldType["Html"] = 7] = "Html"; + /** + * Treepath field type. + */ + FieldType[FieldType["TreePath"] = 8] = "TreePath"; + /** + * History field type. + */ + FieldType[FieldType["History"] = 9] = "History"; + /** + * Double field type. + */ + FieldType[FieldType["Double"] = 10] = "Double"; + /** + * Guid field type. + */ + FieldType[FieldType["Guid"] = 11] = "Guid"; + /** + * Boolean field type. + */ + FieldType[FieldType["Boolean"] = 12] = "Boolean"; + /** + * Identity field type. + */ + FieldType[FieldType["Identity"] = 13] = "Identity"; + /** + * Integer picklist field type. + */ + FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger"; + /** + * String picklist field type. + */ + FieldType[FieldType["PicklistString"] = 15] = "PicklistString"; + /** + * Double picklist field type. + */ + FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +var GetWorkItemTypeExpand; +(function (GetWorkItemTypeExpand) { + GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None"; + GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States"; + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors"; + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout"; +})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {})); +/** + * Type of page + */ +var PageType; +(function (PageType) { + PageType[PageType["Custom"] = 1] = "Custom"; + PageType[PageType["History"] = 2] = "History"; + PageType[PageType["Links"] = 3] = "Links"; + PageType[PageType["Attachments"] = 4] = "Attachments"; +})(PageType = exports.PageType || (exports.PageType = {})); +/** + * Work item type classes' + */ +var WorkItemTypeClass; +(function (WorkItemTypeClass) { + WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System"; + WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived"; + WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom"; +})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {})); +exports.TypeInfo = { + FieldModel: {}, + FieldType: { + enumValues: { + "string": 1, + "integer": 2, + "dateTime": 3, + "plainText": 5, + "html": 7, + "treePath": 8, + "history": 9, + "double": 10, + "guid": 11, + "boolean": 12, + "identity": 13, + "picklistInteger": 14, + "picklistString": 15, + "picklistDouble": 16 + } + }, + FormLayout: {}, + GetWorkItemTypeExpand: { + enumValues: { + "none": 0, + "states": 1, + "behaviors": 2, + "layout": 4 + } + }, + Page: {}, + PageType: { + enumValues: { + "custom": 1, + "history": 2, + "links": 3, + "attachments": 4 + } + }, + WorkItemTypeClass: { + enumValues: { + "system": 0, + "derived": 1, + "custom": 2 + } + }, + WorkItemTypeFieldModel: {}, + WorkItemTypeFieldModel2: {}, + WorkItemTypeModel: {}, +}; +exports.TypeInfo.FieldModel.fields = { + type: { + enumType: exports.TypeInfo.FieldType + } +}; +exports.TypeInfo.FormLayout.fields = { + pages: { + isArray: true, + typeInfo: exports.TypeInfo.Page + } +}; +exports.TypeInfo.Page.fields = { + pageType: { + enumType: exports.TypeInfo.PageType + } +}; +exports.TypeInfo.WorkItemTypeFieldModel.fields = { + type: { + enumType: exports.TypeInfo.FieldType + } +}; +exports.TypeInfo.WorkItemTypeFieldModel2.fields = { + type: { + enumType: exports.TypeInfo.FieldType + } +}; +exports.TypeInfo.WorkItemTypeModel.fields = { + class: { + enumType: exports.TypeInfo.WorkItemTypeClass + }, + layout: { + typeInfo: exports.TypeInfo.FormLayout + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.d.ts new file mode 100644 index 0000000..3e36a2e --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.d.ts @@ -0,0 +1,1352 @@ +/** + * Class that describes a request to add a field in a work item type. + */ +export interface AddProcessWorkItemTypeFieldRequest { + /** + * The list of field allowed values. + */ + allowedValues?: string[]; + /** + * Allow setting field value to a group identity. Only applies to identity fields. + */ + allowGroups?: boolean; + /** + * The default value of the field. + */ + defaultValue?: any; + /** + * If true the field cannot be edited. + */ + readOnly?: boolean; + /** + * Reference name of the field. + */ + referenceName?: string; + /** + * If true the field cannot be empty. + */ + required?: boolean; +} +/** + * Represent a control in the form. + */ +export interface Control { + /** + * Contribution for the control. + */ + contribution?: WitContribution; + /** + * Type of the control. + */ + controlType?: string; + /** + * Height of the control, for html controls. + */ + height?: number; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been inherited. from a parent layout. This is expected to only be only set by the combiner. + */ + inherited?: boolean; + /** + * A value indicating if the layout node is contribution or not. + */ + isContribution?: boolean; + /** + * Label for the field. + */ + label?: string; + /** + * Inner text of the control. + */ + metadata?: string; + /** + * Order in which the control should appear in its group. + */ + order?: number; + /** + * A value indicating whether this layout node has been overridden . by a child layout. + */ + overridden?: boolean; + /** + * A value indicating if the control is readonly. + */ + readOnly?: boolean; + /** + * A value indicating if the control should be hidden or not. + */ + visible?: boolean; + /** + * Watermark text for the textbox. + */ + watermark?: string; +} +/** + * Describes a process being created. + */ +export interface CreateProcessModel { + /** + * Description of the process + */ + description?: string; + /** + * Name of the process + */ + name?: string; + /** + * The ID of the parent process + */ + parentProcessTypeId?: string; + /** + * Reference name of process being created. If not specified, server will assign a unique reference name + */ + referenceName?: string; +} +/** + * Request object/class for creating a rule on a work item type. + */ +export interface CreateProcessRuleRequest { + /** + * List of actions to take when the rule is triggered. + */ + actions?: RuleAction[]; + /** + * List of conditions when the rule should be triggered. + */ + conditions?: RuleCondition[]; + /** + * Indicates if the rule is disabled. + */ + isDisabled?: boolean; + /** + * Name for the rule. + */ + name?: string; +} +/** + * Class for create work item type request + */ +export interface CreateProcessWorkItemTypeRequest { + /** + * Color hexadecimal code to represent the work item type + */ + color?: string; + /** + * Description of the work item type + */ + description?: string; + /** + * Icon to represent the work item type + */ + icon?: string; + /** + * Parent work item type for work item type + */ + inheritsFrom?: string; + /** + * True if the work item type need to be disabled + */ + isDisabled?: boolean; + /** + * Name of work item type + */ + name?: string; +} +/** + * Indicates the customization-type. Customization-type is System if is system generated or by default. Customization-type is Inherited if the existing workitemtype of inherited process is customized. Customization-type is Custom if the newly created workitemtype is customized. + */ +export declare enum CustomizationType { + /** + * Customization-type is System if is system generated workitemtype. + */ + System = 1, + /** + * Customization-type is Inherited if the existing workitemtype of inherited process is customized. + */ + Inherited = 2, + /** + * Customization-type is Custom if the newly created workitemtype is customized. + */ + Custom = 3 +} +/** + * Represents the extensions part of the layout + */ +export interface Extension { + /** + * Id of the extension + */ + id?: string; +} +export interface FieldModel { + description?: string; + id?: string; + isIdentity?: boolean; + name?: string; + type?: FieldType; + url?: string; +} +export interface FieldRuleModel { + actions?: RuleActionModel[]; + conditions?: RuleConditionModel[]; + friendlyName?: string; + id?: string; + isDisabled?: boolean; + isSystem?: boolean; +} +/** + * Enum for the type of a field. + */ +export declare enum FieldType { + /** + * String field type. + */ + String = 1, + /** + * Integer field type. + */ + Integer = 2, + /** + * DateTime field type. + */ + DateTime = 3, + /** + * Plain text field type. + */ + PlainText = 5, + /** + * HTML (Multiline) field type. + */ + Html = 7, + /** + * Treepath field type. + */ + TreePath = 8, + /** + * History field type. + */ + History = 9, + /** + * Double field type. + */ + Double = 10, + /** + * Guid field type. + */ + Guid = 11, + /** + * Boolean field type. + */ + Boolean = 12, + /** + * Identity field type. + */ + Identity = 13, + /** + * Integer picklist field type. + */ + PicklistInteger = 14, + /** + * String picklist field type. + */ + PicklistString = 15, + /** + * Double picklist field type. + */ + PicklistDouble = 16 +} +/** + * Describes the layout of a work item type + */ +export interface FormLayout { + /** + * Gets and sets extensions list. + */ + extensions?: Extension[]; + /** + * Top level tabs of the layout. + */ + pages?: Page[]; + /** + * Headers controls of the layout. + */ + systemControls?: Control[]; +} +/** + * Expand options to fetch fields for behaviors API. + */ +export declare enum GetBehaviorsExpand { + /** + * Default none option. + */ + None = 0, + /** + * This option returns fields associated with a behavior. + */ + Fields = 1, + /** + * This option returns fields associated with this behavior and all behaviors from which it inherits. + */ + CombinedFields = 2 +} +/** + * The expand level of returned processes. + */ +export declare enum GetProcessExpandLevel { + /** + * No expand level. + */ + None = 0, + /** + * Projects expand level. + */ + Projects = 1 +} +/** + * Flag to define what properties to return in get work item type response. + */ +export declare enum GetWorkItemTypeExpand { + /** + * Returns no properties in get work item type response. + */ + None = 0, + /** + * Returns states property in get work item type response. + */ + States = 1, + /** + * Returns behaviors property in get work item type response. + */ + Behaviors = 2, + /** + * Returns layout property in get work item type response. + */ + Layout = 4 +} +/** + * Represent a group in the form that holds controls in it. + */ +export interface Group { + /** + * Contribution for the group. + */ + contribution?: WitContribution; + /** + * Controls to be put in the group. + */ + controls?: Control[]; + /** + * The height for the contribution. + */ + height?: number; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + */ + inherited?: boolean; + /** + * A value indicating if the layout node is contribution are not. + */ + isContribution?: boolean; + /** + * Label for the group. + */ + label?: string; + /** + * Order in which the group should appear in the section. + */ + order?: number; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; + /** + * A value indicating if the group should be hidden or not. + */ + visible?: boolean; +} +/** + * Class that describes the work item state is hidden. + */ +export interface HideStateModel { + /** + * Returns 'true', if workitem state is hidden, 'false' otherwise. + */ + hidden?: boolean; +} +/** + * Describes a page in the work item form layout + */ +export interface Page { + /** + * Contribution for the page. + */ + contribution?: WitContribution; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been inherited from a parent layout. This is expected to only be only set by the combiner. + */ + inherited?: boolean; + /** + * A value indicating if the layout node is contribution are not. + */ + isContribution?: boolean; + /** + * The label for the page. + */ + label?: string; + /** + * A value indicating whether any user operations are permitted on this page and the contents of this page + */ + locked?: boolean; + /** + * Order in which the page should appear in the layout. + */ + order?: number; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; + /** + * The icon for the page. + */ + pageType?: PageType; + /** + * The sections of the page. + */ + sections?: Section[]; + /** + * A value indicating if the page should be hidden or not. + */ + visible?: boolean; +} +/** + * Enum for the types of pages in the work item form layout + */ +export declare enum PageType { + /** + * Custom page type. + */ + Custom = 1, + /** + * History page type. + */ + History = 2, + /** + * Link page type. + */ + Links = 3, + /** + * Attachment page type. + */ + Attachments = 4 +} +/** + * Picklist. + */ +export interface PickList extends PickListMetadata { + /** + * A list of PicklistItemModel. + */ + items?: string[]; +} +/** + * Metadata for picklist. + */ +export interface PickListMetadata { + /** + * ID of the picklist + */ + id?: string; + /** + * Indicates whether items outside of suggested list are allowed + */ + isSuggested?: boolean; + /** + * Name of the picklist + */ + name?: string; + /** + * DataType of picklist + */ + type?: string; + /** + * Url of the picklist + */ + url?: string; +} +/** + * Process Behavior Model. + */ +export interface ProcessBehavior { + /** + * Color. + */ + color?: string; + /** + * Indicates the type of customization on this work item. System behaviors are inherited from parent process but not modified. Inherited behaviors are modified modified behaviors that were inherited from parent process. Custom behaviors are behaviors created by user in current process. + */ + customization?: CustomizationType; + /** + * . Description + */ + description?: string; + /** + * Process Behavior Fields. + */ + fields?: ProcessBehaviorField[]; + /** + * Parent behavior reference. + */ + inherits?: ProcessBehaviorReference; + /** + * Behavior Name. + */ + name?: string; + /** + * Rank of the behavior + */ + rank?: number; + /** + * Behavior Id + */ + referenceName?: string; + /** + * Url of the behavior. + */ + url?: string; +} +/** + * Process Behavior Create Payload. + */ +export interface ProcessBehaviorCreateRequest { + /** + * Color. + */ + color?: string; + /** + * Parent behavior id. + */ + inherits?: string; + /** + * Name of the behavior. + */ + name?: string; + /** + * ReferenceName is optional, if not specified will be auto-generated. + */ + referenceName?: string; +} +/** + * Process Behavior Field. + */ +export interface ProcessBehaviorField { + /** + * Name of the field. + */ + name?: string; + /** + * Reference name of the field. + */ + referenceName?: string; + /** + * Url to field. + */ + url?: string; +} +/** + * Process behavior Reference. + */ +export interface ProcessBehaviorReference { + /** + * Id of a Behavior. + */ + behaviorRefName?: string; + /** + * Url to behavior. + */ + url?: string; +} +/** + * Process Behavior Replace Payload. + */ +export interface ProcessBehaviorUpdateRequest { + /** + * Color. + */ + color?: string; + /** + * Behavior Name. + */ + name?: string; +} +export declare enum ProcessClass { + System = 0, + Derived = 1, + Custom = 2 +} +/** + * Process. + */ +export interface ProcessInfo { + /** + * Indicates the type of customization on this process. System Process is default process. Inherited Process is modified process that was System process before. + */ + customizationType?: CustomizationType; + /** + * Description of the process. + */ + description?: string; + /** + * Is the process default. + */ + isDefault?: boolean; + /** + * Is the process enabled. + */ + isEnabled?: boolean; + /** + * Name of the process. + */ + name?: string; + /** + * ID of the parent process. + */ + parentProcessTypeId?: string; + /** + * Projects in this process to which the user is subscribed to. + */ + projects?: ProjectReference[]; + /** + * Reference name of the process. + */ + referenceName?: string; + /** + * The ID of the process. + */ + typeId?: string; +} +export interface ProcessModel { + /** + * Description of the process + */ + description?: string; + /** + * Name of the process + */ + name?: string; + /** + * Projects in this process + */ + projects?: ProjectReference[]; + /** + * Properties of the process + */ + properties?: ProcessProperties; + /** + * Reference name of the process + */ + referenceName?: string; + /** + * The ID of the process + */ + typeId?: string; +} +/** + * Properties of the process. + */ +export interface ProcessProperties { + /** + * Class of the process. + */ + class?: ProcessClass; + /** + * Is the process default process. + */ + isDefault?: boolean; + /** + * Is the process enabled. + */ + isEnabled?: boolean; + /** + * ID of the parent process. + */ + parentProcessTypeId?: string; + /** + * Version of the process. + */ + version?: string; +} +/** + * Process Rule Response. + */ +export interface ProcessRule extends CreateProcessRuleRequest { + /** + * Indicates if the rule is system generated or created by user. + */ + customizationType?: CustomizationType; + /** + * Id to uniquely identify the rule. + */ + id?: string; + /** + * Resource Url. + */ + url?: string; +} +/** + * Class that describes a work item type object + */ +export interface ProcessWorkItemType { + behaviors?: WorkItemTypeBehavior[]; + /** + * Color hexadecimal code to represent the work item type + */ + color?: string; + /** + * Indicates the type of customization on this work item System work item types are inherited from parent process but not modified Inherited work item types are modified work item that were inherited from parent process Custom work item types are work item types that were created in the current process + */ + customization?: CustomizationType; + /** + * Description of the work item type + */ + description?: string; + /** + * Icon to represent the work item typ + */ + icon?: string; + /** + * Reference name of the parent work item type + */ + inherits?: string; + /** + * Indicates if a work item type is disabled + */ + isDisabled?: boolean; + layout?: FormLayout; + /** + * Name of the work item type + */ + name?: string; + /** + * Reference name of work item type + */ + referenceName?: string; + states?: WorkItemStateResultModel[]; + /** + * Url of the work item type + */ + url?: string; +} +/** + * Class that describes a field in a work item type and its properties. + */ +export interface ProcessWorkItemTypeField { + /** + * The list of field allowed values. + */ + allowedValues?: any[]; + /** + * Allow setting field value to a group identity. Only applies to identity fields. + */ + allowGroups?: boolean; + /** + * Indicates the type of customization on this work item. + */ + customization?: CustomizationType; + /** + * The default value of the field. + */ + defaultValue?: any; + /** + * Description of the field. + */ + description?: string; + /** + * Name of the field. + */ + name?: string; + /** + * If true the field cannot be edited. + */ + readOnly?: boolean; + /** + * Reference name of the field. + */ + referenceName?: string; + /** + * If true the field cannot be empty. + */ + required?: boolean; + /** + * Type of the field. + */ + type?: FieldType; + /** + * Resource URL of the field. + */ + url?: string; +} +/** + * Expand options for the work item field(s) request. + */ +export declare enum ProcessWorkItemTypeFieldsExpandLevel { + /** + * Includes only basic properties of the field. + */ + None = 0, + /** + * Includes allowed values for the field. + */ + AllowedValues = 1, + /** + * Includes allowed values and dependent fields of the field. + */ + All = 2 +} +/** + * Defines the project reference class. + */ +export interface ProjectReference { + /** + * Description of the project + */ + description?: string; + /** + * The ID of the project + */ + id?: string; + /** + * Name of the project + */ + name?: string; + /** + * Url of the project + */ + url?: string; +} +/** + * Action to take when the rule is triggered. + */ +export interface RuleAction { + /** + * Type of action to take when the rule is triggered. + */ + actionType?: RuleActionType; + /** + * Field on which the action should be taken. + */ + targetField?: string; + /** + * Value to apply on target field, once the action is taken. + */ + value?: string; +} +/** + * Action to take when the rule is triggered. + */ +export interface RuleActionModel { + actionType?: string; + targetField?: string; + value?: string; +} +/** + * Type of action to take when the rule is triggered. + */ +export declare enum RuleActionType { + /** + * Make the target field required. Example : {"actionType":"$makeRequired","targetField":"Microsoft.VSTS.Common.Activity","value":""} + */ + MakeRequired = 1, + /** + * Make the target field read-only. Example : {"actionType":"$makeReadOnly","targetField":"Microsoft.VSTS.Common.Activity","value":""} + */ + MakeReadOnly = 2, + /** + * Set a default value on the target field. This is used if the user creates a integer/string field and sets a default value of this field. + */ + SetDefaultValue = 3, + /** + * Set the default value on the target field from server clock. This is used if user creates the field like Date/Time and uses default value. + */ + SetDefaultFromClock = 4, + /** + * Set the default current user value on the target field. This is used if the user creates the field of type identity and uses default value. + */ + SetDefaultFromCurrentUser = 5, + /** + * Set the default value on from existing field to the target field. This used wants to set a existing field value to the current field. + */ + SetDefaultFromField = 6, + /** + * Set the value of target field to given value. Example : {actionType: "$copyValue", targetField: "ScrumInherited.mypicklist", value: "samplevalue"} + */ + CopyValue = 7, + /** + * Set the value from clock. + */ + CopyFromClock = 8, + /** + * Set the current user to the target field. Example : {"actionType":"$copyFromCurrentUser","targetField":"System.AssignedTo","value":""}. + */ + CopyFromCurrentUser = 9, + /** + * Copy the value from a specified field and set to target field. Example : {actionType: "$copyFromField", targetField: "System.AssignedTo", value:"System.ChangedBy"}. Here, value is copied from "System.ChangedBy" and set to "System.AssingedTo" field. + */ + CopyFromField = 10, + /** + * Set the value of the target field to empty. + */ + SetValueToEmpty = 11, + /** + * Use the current time to set the value of the target field. Example : {actionType: "$copyFromServerClock", targetField: "System.CreatedDate", value: ""} + */ + CopyFromServerClock = 12, + /** + * Use the current user to set the value of the target field. + */ + CopyFromServerCurrentUser = 13, + /** + * Hides target field from the form. This is a server side only action. + */ + HideTargetField = 14, + /** + * Disallows a field from being set to a specific value. + */ + DisallowValue = 15 +} +/** + * Defines a condition on a field when the rule should be triggered. + */ +export interface RuleCondition { + /** + * Type of condition. $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field. + */ + conditionType?: RuleConditionType; + /** + * Field that defines condition. + */ + field?: string; + /** + * Value of field to define the condition for rule. + */ + value?: string; +} +export interface RuleConditionModel { + conditionType?: string; + field?: string; + value?: string; +} +/** + * Type of rule condition. + */ +export declare enum RuleConditionType { + /** + * $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. + */ + When = 1, + /** + * $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. + */ + WhenNot = 2, + /** + * $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. + */ + WhenChanged = 3, + /** + * $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field. + */ + WhenNotChanged = 4, + WhenWas = 5, + WhenStateChangedTo = 6, + WhenStateChangedFromAndTo = 7, + WhenWorkItemIsCreated = 8, + WhenValueIsDefined = 9, + WhenValueIsNotDefined = 10, + WhenCurrentUserIsMemberOfGroup = 11, + WhenCurrentUserIsNotMemberOfGroup = 12 +} +/** + * Defines a section of the work item form layout + */ +export interface Section { + /** + * List of child groups in this section + */ + groups?: Group[]; + /** + * The id for the layout node. + */ + id?: string; + /** + * A value indicating whether this layout node has been overridden by a child layout. + */ + overridden?: boolean; +} +/** + * Describes a request to update a process + */ +export interface UpdateProcessModel { + /** + * New description of the process + */ + description?: string; + /** + * If true new projects will use this process by default + */ + isDefault?: boolean; + /** + * If false the process will be disabled and cannot be used to create projects + */ + isEnabled?: boolean; + /** + * New name of the process + */ + name?: string; +} +/** + * Request class/object to update the rule. + */ +export interface UpdateProcessRuleRequest extends CreateProcessRuleRequest { + /** + * Id to uniquely identify the rule. + */ + id?: string; +} +/** + * Class to describe a request that updates a field's properties in a work item type. + */ +export interface UpdateProcessWorkItemTypeFieldRequest { + /** + * The list of field allowed values. + */ + allowedValues?: string[]; + /** + * Allow setting field value to a group identity. Only applies to identity fields. + */ + allowGroups?: boolean; + /** + * The default value of the field. + */ + defaultValue?: any; + /** + * If true the field cannot be edited. + */ + readOnly?: boolean; + /** + * The default value of the field. + */ + required?: boolean; +} +/** + * Class for update request on a work item type + */ +export interface UpdateProcessWorkItemTypeRequest { + /** + * Color of the work item type + */ + color?: string; + /** + * Description of the work item type + */ + description?: string; + /** + * Icon of the work item type + */ + icon?: string; + /** + * If set will disable the work item type + */ + isDisabled?: boolean; +} +/** + * Properties of a work item form contribution + */ +export interface WitContribution { + /** + * The id for the contribution. + */ + contributionId?: string; + /** + * The height for the contribution. + */ + height?: number; + /** + * A dictionary holding key value pairs for contribution inputs. + */ + inputs?: { + [key: string]: any; + }; + /** + * A value indicating if the contribution should be show on deleted workItem. + */ + showOnDeletedWorkItem?: boolean; +} +export interface WorkItemBehavior { + abstract?: boolean; + color?: string; + description?: string; + fields?: WorkItemBehaviorField[]; + id?: string; + inherits?: WorkItemBehaviorReference; + name?: string; + overriden?: boolean; + rank?: number; + url?: string; +} +export interface WorkItemBehaviorField { + behaviorFieldId?: string; + id?: string; + url?: string; +} +/** + * Reference to the behavior of a work item type. + */ +export interface WorkItemBehaviorReference { + /** + * The ID of the reference behavior. + */ + id?: string; + /** + * The url of the reference behavior. + */ + url?: string; +} +/** + * Class That represents a work item state input. + */ +export interface WorkItemStateInputModel { + /** + * Color of the state + */ + color?: string; + /** + * Name of the state + */ + name?: string; + /** + * Order in which state should appear + */ + order?: number; + /** + * Category of the state + */ + stateCategory?: string; +} +/** + * Class that represents a work item state result. + */ +export interface WorkItemStateResultModel { + /** + * Work item state color. + */ + color?: string; + /** + * Work item state customization type. + */ + customizationType?: CustomizationType; + /** + * If the Work item state is hidden. + */ + hidden?: boolean; + /** + * Id of the Workitemstate. + */ + id?: string; + /** + * Work item state name. + */ + name?: string; + /** + * Work item state order. + */ + order?: number; + /** + * Work item state statecategory. + */ + stateCategory?: string; + /** + * Work item state url. + */ + url?: string; +} +/** + * Association between a work item type and it's behavior + */ +export interface WorkItemTypeBehavior { + /** + * Reference to the behavior of a work item type + */ + behavior?: WorkItemBehaviorReference; + /** + * If true the work item type is the default work item type in the behavior + */ + isDefault?: boolean; + /** + * If true the work item type is the default work item type in the parent behavior + */ + isLegacyDefault?: boolean; + /** + * URL of the work item type behavior + */ + url?: string; +} +export declare enum WorkItemTypeClass { + System = 0, + Derived = 1, + Custom = 2 +} +export interface WorkItemTypeModel { + behaviors?: WorkItemTypeBehavior[]; + class?: WorkItemTypeClass; + color?: string; + description?: string; + icon?: string; + id?: string; + /** + * Parent WIT Id/Internal ReferenceName that it inherits from + */ + inherits?: string; + isDisabled?: boolean; + layout?: FormLayout; + name?: string; + states?: WorkItemStateResultModel[]; + url?: string; +} +export declare var TypeInfo: { + CreateProcessRuleRequest: any; + CustomizationType: { + enumValues: { + "system": number; + "inherited": number; + "custom": number; + }; + }; + FieldModel: any; + FieldType: { + enumValues: { + "string": number; + "integer": number; + "dateTime": number; + "plainText": number; + "html": number; + "treePath": number; + "history": number; + "double": number; + "guid": number; + "boolean": number; + "identity": number; + "picklistInteger": number; + "picklistString": number; + "picklistDouble": number; + }; + }; + FormLayout: any; + GetBehaviorsExpand: { + enumValues: { + "none": number; + "fields": number; + "combinedFields": number; + }; + }; + GetProcessExpandLevel: { + enumValues: { + "none": number; + "projects": number; + }; + }; + GetWorkItemTypeExpand: { + enumValues: { + "none": number; + "states": number; + "behaviors": number; + "layout": number; + }; + }; + Page: any; + PageType: { + enumValues: { + "custom": number; + "history": number; + "links": number; + "attachments": number; + }; + }; + ProcessBehavior: any; + ProcessClass: { + enumValues: { + "system": number; + "derived": number; + "custom": number; + }; + }; + ProcessInfo: any; + ProcessModel: any; + ProcessProperties: any; + ProcessRule: any; + ProcessWorkItemType: any; + ProcessWorkItemTypeField: any; + ProcessWorkItemTypeFieldsExpandLevel: { + enumValues: { + "none": number; + "allowedValues": number; + "all": number; + }; + }; + RuleAction: any; + RuleActionType: { + enumValues: { + "makeRequired": number; + "makeReadOnly": number; + "setDefaultValue": number; + "setDefaultFromClock": number; + "setDefaultFromCurrentUser": number; + "setDefaultFromField": number; + "copyValue": number; + "copyFromClock": number; + "copyFromCurrentUser": number; + "copyFromField": number; + "setValueToEmpty": number; + "copyFromServerClock": number; + "copyFromServerCurrentUser": number; + "hideTargetField": number; + "disallowValue": number; + }; + }; + RuleCondition: any; + RuleConditionType: { + enumValues: { + "when": number; + "whenNot": number; + "whenChanged": number; + "whenNotChanged": number; + "whenWas": number; + "whenStateChangedTo": number; + "whenStateChangedFromAndTo": number; + "whenWorkItemIsCreated": number; + "whenValueIsDefined": number; + "whenValueIsNotDefined": number; + "whenCurrentUserIsMemberOfGroup": number; + "whenCurrentUserIsNotMemberOfGroup": number; + }; + }; + UpdateProcessRuleRequest: any; + WorkItemStateResultModel: any; + WorkItemTypeClass: { + enumValues: { + "system": number; + "derived": number; + "custom": number; + }; + }; + WorkItemTypeModel: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.js b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.js new file mode 100644 index 0000000..d8ea9fa --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/WorkItemTrackingProcessInterfaces.js @@ -0,0 +1,537 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Indicates the customization-type. Customization-type is System if is system generated or by default. Customization-type is Inherited if the existing workitemtype of inherited process is customized. Customization-type is Custom if the newly created workitemtype is customized. + */ +var CustomizationType; +(function (CustomizationType) { + /** + * Customization-type is System if is system generated workitemtype. + */ + CustomizationType[CustomizationType["System"] = 1] = "System"; + /** + * Customization-type is Inherited if the existing workitemtype of inherited process is customized. + */ + CustomizationType[CustomizationType["Inherited"] = 2] = "Inherited"; + /** + * Customization-type is Custom if the newly created workitemtype is customized. + */ + CustomizationType[CustomizationType["Custom"] = 3] = "Custom"; +})(CustomizationType = exports.CustomizationType || (exports.CustomizationType = {})); +/** + * Enum for the type of a field. + */ +var FieldType; +(function (FieldType) { + /** + * String field type. + */ + FieldType[FieldType["String"] = 1] = "String"; + /** + * Integer field type. + */ + FieldType[FieldType["Integer"] = 2] = "Integer"; + /** + * DateTime field type. + */ + FieldType[FieldType["DateTime"] = 3] = "DateTime"; + /** + * Plain text field type. + */ + FieldType[FieldType["PlainText"] = 5] = "PlainText"; + /** + * HTML (Multiline) field type. + */ + FieldType[FieldType["Html"] = 7] = "Html"; + /** + * Treepath field type. + */ + FieldType[FieldType["TreePath"] = 8] = "TreePath"; + /** + * History field type. + */ + FieldType[FieldType["History"] = 9] = "History"; + /** + * Double field type. + */ + FieldType[FieldType["Double"] = 10] = "Double"; + /** + * Guid field type. + */ + FieldType[FieldType["Guid"] = 11] = "Guid"; + /** + * Boolean field type. + */ + FieldType[FieldType["Boolean"] = 12] = "Boolean"; + /** + * Identity field type. + */ + FieldType[FieldType["Identity"] = 13] = "Identity"; + /** + * Integer picklist field type. + */ + FieldType[FieldType["PicklistInteger"] = 14] = "PicklistInteger"; + /** + * String picklist field type. + */ + FieldType[FieldType["PicklistString"] = 15] = "PicklistString"; + /** + * Double picklist field type. + */ + FieldType[FieldType["PicklistDouble"] = 16] = "PicklistDouble"; +})(FieldType = exports.FieldType || (exports.FieldType = {})); +/** + * Expand options to fetch fields for behaviors API. + */ +var GetBehaviorsExpand; +(function (GetBehaviorsExpand) { + /** + * Default none option. + */ + GetBehaviorsExpand[GetBehaviorsExpand["None"] = 0] = "None"; + /** + * This option returns fields associated with a behavior. + */ + GetBehaviorsExpand[GetBehaviorsExpand["Fields"] = 1] = "Fields"; + /** + * This option returns fields associated with this behavior and all behaviors from which it inherits. + */ + GetBehaviorsExpand[GetBehaviorsExpand["CombinedFields"] = 2] = "CombinedFields"; +})(GetBehaviorsExpand = exports.GetBehaviorsExpand || (exports.GetBehaviorsExpand = {})); +/** + * The expand level of returned processes. + */ +var GetProcessExpandLevel; +(function (GetProcessExpandLevel) { + /** + * No expand level. + */ + GetProcessExpandLevel[GetProcessExpandLevel["None"] = 0] = "None"; + /** + * Projects expand level. + */ + GetProcessExpandLevel[GetProcessExpandLevel["Projects"] = 1] = "Projects"; +})(GetProcessExpandLevel = exports.GetProcessExpandLevel || (exports.GetProcessExpandLevel = {})); +/** + * Flag to define what properties to return in get work item type response. + */ +var GetWorkItemTypeExpand; +(function (GetWorkItemTypeExpand) { + /** + * Returns no properties in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["None"] = 0] = "None"; + /** + * Returns states property in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["States"] = 1] = "States"; + /** + * Returns behaviors property in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Behaviors"] = 2] = "Behaviors"; + /** + * Returns layout property in get work item type response. + */ + GetWorkItemTypeExpand[GetWorkItemTypeExpand["Layout"] = 4] = "Layout"; +})(GetWorkItemTypeExpand = exports.GetWorkItemTypeExpand || (exports.GetWorkItemTypeExpand = {})); +/** + * Enum for the types of pages in the work item form layout + */ +var PageType; +(function (PageType) { + /** + * Custom page type. + */ + PageType[PageType["Custom"] = 1] = "Custom"; + /** + * History page type. + */ + PageType[PageType["History"] = 2] = "History"; + /** + * Link page type. + */ + PageType[PageType["Links"] = 3] = "Links"; + /** + * Attachment page type. + */ + PageType[PageType["Attachments"] = 4] = "Attachments"; +})(PageType = exports.PageType || (exports.PageType = {})); +var ProcessClass; +(function (ProcessClass) { + ProcessClass[ProcessClass["System"] = 0] = "System"; + ProcessClass[ProcessClass["Derived"] = 1] = "Derived"; + ProcessClass[ProcessClass["Custom"] = 2] = "Custom"; +})(ProcessClass = exports.ProcessClass || (exports.ProcessClass = {})); +/** + * Expand options for the work item field(s) request. + */ +var ProcessWorkItemTypeFieldsExpandLevel; +(function (ProcessWorkItemTypeFieldsExpandLevel) { + /** + * Includes only basic properties of the field. + */ + ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["None"] = 0] = "None"; + /** + * Includes allowed values for the field. + */ + ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["AllowedValues"] = 1] = "AllowedValues"; + /** + * Includes allowed values and dependent fields of the field. + */ + ProcessWorkItemTypeFieldsExpandLevel[ProcessWorkItemTypeFieldsExpandLevel["All"] = 2] = "All"; +})(ProcessWorkItemTypeFieldsExpandLevel = exports.ProcessWorkItemTypeFieldsExpandLevel || (exports.ProcessWorkItemTypeFieldsExpandLevel = {})); +/** + * Type of action to take when the rule is triggered. + */ +var RuleActionType; +(function (RuleActionType) { + /** + * Make the target field required. Example : {"actionType":"$makeRequired","targetField":"Microsoft.VSTS.Common.Activity","value":""} + */ + RuleActionType[RuleActionType["MakeRequired"] = 1] = "MakeRequired"; + /** + * Make the target field read-only. Example : {"actionType":"$makeReadOnly","targetField":"Microsoft.VSTS.Common.Activity","value":""} + */ + RuleActionType[RuleActionType["MakeReadOnly"] = 2] = "MakeReadOnly"; + /** + * Set a default value on the target field. This is used if the user creates a integer/string field and sets a default value of this field. + */ + RuleActionType[RuleActionType["SetDefaultValue"] = 3] = "SetDefaultValue"; + /** + * Set the default value on the target field from server clock. This is used if user creates the field like Date/Time and uses default value. + */ + RuleActionType[RuleActionType["SetDefaultFromClock"] = 4] = "SetDefaultFromClock"; + /** + * Set the default current user value on the target field. This is used if the user creates the field of type identity and uses default value. + */ + RuleActionType[RuleActionType["SetDefaultFromCurrentUser"] = 5] = "SetDefaultFromCurrentUser"; + /** + * Set the default value on from existing field to the target field. This used wants to set a existing field value to the current field. + */ + RuleActionType[RuleActionType["SetDefaultFromField"] = 6] = "SetDefaultFromField"; + /** + * Set the value of target field to given value. Example : {actionType: "$copyValue", targetField: "ScrumInherited.mypicklist", value: "samplevalue"} + */ + RuleActionType[RuleActionType["CopyValue"] = 7] = "CopyValue"; + /** + * Set the value from clock. + */ + RuleActionType[RuleActionType["CopyFromClock"] = 8] = "CopyFromClock"; + /** + * Set the current user to the target field. Example : {"actionType":"$copyFromCurrentUser","targetField":"System.AssignedTo","value":""}. + */ + RuleActionType[RuleActionType["CopyFromCurrentUser"] = 9] = "CopyFromCurrentUser"; + /** + * Copy the value from a specified field and set to target field. Example : {actionType: "$copyFromField", targetField: "System.AssignedTo", value:"System.ChangedBy"}. Here, value is copied from "System.ChangedBy" and set to "System.AssingedTo" field. + */ + RuleActionType[RuleActionType["CopyFromField"] = 10] = "CopyFromField"; + /** + * Set the value of the target field to empty. + */ + RuleActionType[RuleActionType["SetValueToEmpty"] = 11] = "SetValueToEmpty"; + /** + * Use the current time to set the value of the target field. Example : {actionType: "$copyFromServerClock", targetField: "System.CreatedDate", value: ""} + */ + RuleActionType[RuleActionType["CopyFromServerClock"] = 12] = "CopyFromServerClock"; + /** + * Use the current user to set the value of the target field. + */ + RuleActionType[RuleActionType["CopyFromServerCurrentUser"] = 13] = "CopyFromServerCurrentUser"; + /** + * Hides target field from the form. This is a server side only action. + */ + RuleActionType[RuleActionType["HideTargetField"] = 14] = "HideTargetField"; + /** + * Disallows a field from being set to a specific value. + */ + RuleActionType[RuleActionType["DisallowValue"] = 15] = "DisallowValue"; +})(RuleActionType = exports.RuleActionType || (exports.RuleActionType = {})); +/** + * Type of rule condition. + */ +var RuleConditionType; +(function (RuleConditionType) { + /** + * $When. This condition limits the execution of its children to cases when another field has a particular value, i.e. when the Is value of the referenced field is equal to the given literal value. + */ + RuleConditionType[RuleConditionType["When"] = 1] = "When"; + /** + * $WhenNot.This condition limits the execution of its children to cases when another field does not have a particular value, i.e.when the Is value of the referenced field is not equal to the given literal value. + */ + RuleConditionType[RuleConditionType["WhenNot"] = 2] = "WhenNot"; + /** + * $WhenChanged.This condition limits the execution of its children to cases when another field has changed, i.e.when the Is value of the referenced field is not equal to the Was value of that field. + */ + RuleConditionType[RuleConditionType["WhenChanged"] = 3] = "WhenChanged"; + /** + * $WhenNotChanged.This condition limits the execution of its children to cases when another field has not changed, i.e.when the Is value of the referenced field is equal to the Was value of that field. + */ + RuleConditionType[RuleConditionType["WhenNotChanged"] = 4] = "WhenNotChanged"; + RuleConditionType[RuleConditionType["WhenWas"] = 5] = "WhenWas"; + RuleConditionType[RuleConditionType["WhenStateChangedTo"] = 6] = "WhenStateChangedTo"; + RuleConditionType[RuleConditionType["WhenStateChangedFromAndTo"] = 7] = "WhenStateChangedFromAndTo"; + RuleConditionType[RuleConditionType["WhenWorkItemIsCreated"] = 8] = "WhenWorkItemIsCreated"; + RuleConditionType[RuleConditionType["WhenValueIsDefined"] = 9] = "WhenValueIsDefined"; + RuleConditionType[RuleConditionType["WhenValueIsNotDefined"] = 10] = "WhenValueIsNotDefined"; + RuleConditionType[RuleConditionType["WhenCurrentUserIsMemberOfGroup"] = 11] = "WhenCurrentUserIsMemberOfGroup"; + RuleConditionType[RuleConditionType["WhenCurrentUserIsNotMemberOfGroup"] = 12] = "WhenCurrentUserIsNotMemberOfGroup"; +})(RuleConditionType = exports.RuleConditionType || (exports.RuleConditionType = {})); +var WorkItemTypeClass; +(function (WorkItemTypeClass) { + WorkItemTypeClass[WorkItemTypeClass["System"] = 0] = "System"; + WorkItemTypeClass[WorkItemTypeClass["Derived"] = 1] = "Derived"; + WorkItemTypeClass[WorkItemTypeClass["Custom"] = 2] = "Custom"; +})(WorkItemTypeClass = exports.WorkItemTypeClass || (exports.WorkItemTypeClass = {})); +exports.TypeInfo = { + CreateProcessRuleRequest: {}, + CustomizationType: { + enumValues: { + "system": 1, + "inherited": 2, + "custom": 3 + } + }, + FieldModel: {}, + FieldType: { + enumValues: { + "string": 1, + "integer": 2, + "dateTime": 3, + "plainText": 5, + "html": 7, + "treePath": 8, + "history": 9, + "double": 10, + "guid": 11, + "boolean": 12, + "identity": 13, + "picklistInteger": 14, + "picklistString": 15, + "picklistDouble": 16 + } + }, + FormLayout: {}, + GetBehaviorsExpand: { + enumValues: { + "none": 0, + "fields": 1, + "combinedFields": 2 + } + }, + GetProcessExpandLevel: { + enumValues: { + "none": 0, + "projects": 1 + } + }, + GetWorkItemTypeExpand: { + enumValues: { + "none": 0, + "states": 1, + "behaviors": 2, + "layout": 4 + } + }, + Page: {}, + PageType: { + enumValues: { + "custom": 1, + "history": 2, + "links": 3, + "attachments": 4 + } + }, + ProcessBehavior: {}, + ProcessClass: { + enumValues: { + "system": 0, + "derived": 1, + "custom": 2 + } + }, + ProcessInfo: {}, + ProcessModel: {}, + ProcessProperties: {}, + ProcessRule: {}, + ProcessWorkItemType: {}, + ProcessWorkItemTypeField: {}, + ProcessWorkItemTypeFieldsExpandLevel: { + enumValues: { + "none": 0, + "allowedValues": 1, + "all": 2 + } + }, + RuleAction: {}, + RuleActionType: { + enumValues: { + "makeRequired": 1, + "makeReadOnly": 2, + "setDefaultValue": 3, + "setDefaultFromClock": 4, + "setDefaultFromCurrentUser": 5, + "setDefaultFromField": 6, + "copyValue": 7, + "copyFromClock": 8, + "copyFromCurrentUser": 9, + "copyFromField": 10, + "setValueToEmpty": 11, + "copyFromServerClock": 12, + "copyFromServerCurrentUser": 13, + "hideTargetField": 14, + "disallowValue": 15 + } + }, + RuleCondition: {}, + RuleConditionType: { + enumValues: { + "when": 1, + "whenNot": 2, + "whenChanged": 3, + "whenNotChanged": 4, + "whenWas": 5, + "whenStateChangedTo": 6, + "whenStateChangedFromAndTo": 7, + "whenWorkItemIsCreated": 8, + "whenValueIsDefined": 9, + "whenValueIsNotDefined": 10, + "whenCurrentUserIsMemberOfGroup": 11, + "whenCurrentUserIsNotMemberOfGroup": 12 + } + }, + UpdateProcessRuleRequest: {}, + WorkItemStateResultModel: {}, + WorkItemTypeClass: { + enumValues: { + "system": 0, + "derived": 1, + "custom": 2 + } + }, + WorkItemTypeModel: {}, +}; +exports.TypeInfo.CreateProcessRuleRequest.fields = { + actions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleAction + }, + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleCondition + } +}; +exports.TypeInfo.FieldModel.fields = { + type: { + enumType: exports.TypeInfo.FieldType + } +}; +exports.TypeInfo.FormLayout.fields = { + pages: { + isArray: true, + typeInfo: exports.TypeInfo.Page + } +}; +exports.TypeInfo.Page.fields = { + pageType: { + enumType: exports.TypeInfo.PageType + } +}; +exports.TypeInfo.ProcessBehavior.fields = { + customization: { + enumType: exports.TypeInfo.CustomizationType + } +}; +exports.TypeInfo.ProcessInfo.fields = { + customizationType: { + enumType: exports.TypeInfo.CustomizationType + } +}; +exports.TypeInfo.ProcessModel.fields = { + properties: { + typeInfo: exports.TypeInfo.ProcessProperties + } +}; +exports.TypeInfo.ProcessProperties.fields = { + class: { + enumType: exports.TypeInfo.ProcessClass + } +}; +exports.TypeInfo.ProcessRule.fields = { + actions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleAction + }, + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleCondition + }, + customizationType: { + enumType: exports.TypeInfo.CustomizationType + } +}; +exports.TypeInfo.ProcessWorkItemType.fields = { + customization: { + enumType: exports.TypeInfo.CustomizationType + }, + layout: { + typeInfo: exports.TypeInfo.FormLayout + }, + states: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemStateResultModel + } +}; +exports.TypeInfo.ProcessWorkItemTypeField.fields = { + customization: { + enumType: exports.TypeInfo.CustomizationType + }, + type: { + enumType: exports.TypeInfo.FieldType + } +}; +exports.TypeInfo.RuleAction.fields = { + actionType: { + enumType: exports.TypeInfo.RuleActionType + } +}; +exports.TypeInfo.RuleCondition.fields = { + conditionType: { + enumType: exports.TypeInfo.RuleConditionType + } +}; +exports.TypeInfo.UpdateProcessRuleRequest.fields = { + actions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleAction + }, + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.RuleCondition + } +}; +exports.TypeInfo.WorkItemStateResultModel.fields = { + customizationType: { + enumType: exports.TypeInfo.CustomizationType + } +}; +exports.TypeInfo.WorkItemTypeModel.fields = { + class: { + enumType: exports.TypeInfo.WorkItemTypeClass + }, + layout: { + typeInfo: exports.TypeInfo.FormLayout + }, + states: { + isArray: true, + typeInfo: exports.TypeInfo.WorkItemStateResultModel + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.d.ts new file mode 100644 index 0000000..ccc3793 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.d.ts @@ -0,0 +1,283 @@ +export declare enum InputDataType { + /** + * No data type is specified. + */ + None = 0, + /** + * Represents a textual value. + */ + String = 10, + /** + * Represents a numberic value. + */ + Number = 20, + /** + * Represents a value of true or false. + */ + Boolean = 30, + /** + * Represents a Guid. + */ + Guid = 40, + /** + * Represents a URI. + */ + Uri = 50 +} +/** + * Describes an input for subscriptions. + */ +export interface InputDescriptor { + /** + * The ids of all inputs that the value of this input is dependent on. + */ + dependencyInputIds: string[]; + /** + * Description of what this input is used for + */ + description: string; + /** + * The group localized name to which this input belongs and can be shown as a header for the container that will include all the inputs in the group. + */ + groupName: string; + /** + * If true, the value information for this input is dynamic and should be fetched when the value of dependency inputs change. + */ + hasDynamicValueInformation: boolean; + /** + * Identifier for the subscription input + */ + id: string; + /** + * Mode in which the value of this input should be entered + */ + inputMode: InputMode; + /** + * Gets whether this input is confidential, such as for a password or application key + */ + isConfidential: boolean; + /** + * Localized name which can be shown as a label for the subscription input + */ + name: string; + /** + * Gets whether this input is included in the default generated action description. + */ + useInDefaultDescription: boolean; + /** + * Information to use to validate this input's value + */ + validation: InputValidation; + /** + * A hint for input value. It can be used in the UI as the input placeholder. + */ + valueHint: string; + /** + * Information about possible values for this input + */ + values: InputValues; +} +/** + * Defines a filter for subscription inputs. The filter matches a set of inputs if any (one or more) of the groups evaluates to true. + */ +export interface InputFilter { + /** + * Groups of input filter expressions. This filter matches a set of inputs if any (one or more) of the groups evaluates to true. + */ + conditions: InputFilterCondition[]; +} +/** + * An expression which can be applied to filter a list of subscription inputs + */ +export interface InputFilterCondition { + /** + * Whether or not to do a case sensitive match + */ + caseSensitive: boolean; + /** + * The Id of the input to filter on + */ + inputId: string; + /** + * The "expected" input value to compare with the actual input value + */ + inputValue: string; + /** + * The operator applied between the expected and actual input value + */ + operator: InputFilterOperator; +} +export declare enum InputFilterOperator { + Equals = 0, + NotEquals = 1 +} +export declare enum InputMode { + /** + * This input should not be shown in the UI + */ + None = 0, + /** + * An input text box should be shown + */ + TextBox = 10, + /** + * An password input box should be shown + */ + PasswordBox = 20, + /** + * A select/combo control should be shown + */ + Combo = 30, + /** + * Radio buttons should be shown + */ + RadioButtons = 40, + /** + * Checkbox should be shown(for true/false values) + */ + CheckBox = 50, + /** + * A multi-line text area should be shown + */ + TextArea = 60 +} +/** + * Describes what values are valid for a subscription input + */ +export interface InputValidation { + dataType: InputDataType; + isRequired: boolean; + maxLength: number; + maxValue: number; + minLength: number; + minValue: number; + pattern: string; + patternMismatchErrorMessage: string; +} +/** + * Information about a single value for an input + */ +export interface InputValue { + /** + * Any other data about this input + */ + data: { + [key: string]: any; + }; + /** + * The text to show for the display of this value + */ + displayValue: string; + /** + * The value to store for this input + */ + value: string; +} +/** + * Information about the possible/allowed values for a given subscription input + */ +export interface InputValues { + /** + * The default value to use for this input + */ + defaultValue: string; + /** + * Errors encountered while computing dynamic values. + */ + error: InputValuesError; + /** + * The id of the input + */ + inputId: string; + /** + * Should this input be disabled + */ + isDisabled: boolean; + /** + * Should the value be restricted to one of the values in the PossibleValues (True) or are the values in PossibleValues just a suggestion (False) + */ + isLimitedToPossibleValues: boolean; + /** + * Should this input be made read-only + */ + isReadOnly: boolean; + /** + * Possible values that this input can take + */ + possibleValues: InputValue[]; +} +/** + * Error information related to a subscription input value. + */ +export interface InputValuesError { + /** + * The error message. + */ + message: string; +} +export interface InputValuesQuery { + currentValues: { + [key: string]: string; + }; + /** + * The input values to return on input, and the result from the consumer on output. + */ + inputValues?: InputValues[]; + /** + * Subscription containing information about the publisher/consumer and the current input values + */ + resource: any; +} +export declare var TypeInfo: { + InputDataType: { + enumValues: { + "none": number; + "string": number; + "number": number; + "boolean": number; + "guid": number; + "uri": number; + }; + }; + InputDescriptor: { + fields: any; + }; + InputFilter: { + fields: any; + }; + InputFilterCondition: { + fields: any; + }; + InputFilterOperator: { + enumValues: { + "equals": number; + "notEquals": number; + }; + }; + InputMode: { + enumValues: { + "none": number; + "textBox": number; + "passwordBox": number; + "combo": number; + "radioButtons": number; + "checkBox": number; + "textArea": number; + }; + }; + InputValidation: { + fields: any; + }; + InputValue: { + fields: any; + }; + InputValues: { + fields: any; + }; + InputValuesError: { + fields: any; + }; + InputValuesQuery: { + fields: any; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.js b/node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.js new file mode 100644 index 0000000..2d6ceca --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/FormInputInterfaces.js @@ -0,0 +1,174 @@ +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +* +* See following wiki page for instructions on how to regenerate: +* https://vsowiki.com/index.php?title=Rest_Client_Generation +*/ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var InputDataType; +(function (InputDataType) { + /** + * No data type is specified. + */ + InputDataType[InputDataType["None"] = 0] = "None"; + /** + * Represents a textual value. + */ + InputDataType[InputDataType["String"] = 10] = "String"; + /** + * Represents a numberic value. + */ + InputDataType[InputDataType["Number"] = 20] = "Number"; + /** + * Represents a value of true or false. + */ + InputDataType[InputDataType["Boolean"] = 30] = "Boolean"; + /** + * Represents a Guid. + */ + InputDataType[InputDataType["Guid"] = 40] = "Guid"; + /** + * Represents a URI. + */ + InputDataType[InputDataType["Uri"] = 50] = "Uri"; +})(InputDataType = exports.InputDataType || (exports.InputDataType = {})); +var InputFilterOperator; +(function (InputFilterOperator) { + InputFilterOperator[InputFilterOperator["Equals"] = 0] = "Equals"; + InputFilterOperator[InputFilterOperator["NotEquals"] = 1] = "NotEquals"; +})(InputFilterOperator = exports.InputFilterOperator || (exports.InputFilterOperator = {})); +var InputMode; +(function (InputMode) { + /** + * This input should not be shown in the UI + */ + InputMode[InputMode["None"] = 0] = "None"; + /** + * An input text box should be shown + */ + InputMode[InputMode["TextBox"] = 10] = "TextBox"; + /** + * An password input box should be shown + */ + InputMode[InputMode["PasswordBox"] = 20] = "PasswordBox"; + /** + * A select/combo control should be shown + */ + InputMode[InputMode["Combo"] = 30] = "Combo"; + /** + * Radio buttons should be shown + */ + InputMode[InputMode["RadioButtons"] = 40] = "RadioButtons"; + /** + * Checkbox should be shown(for true/false values) + */ + InputMode[InputMode["CheckBox"] = 50] = "CheckBox"; + /** + * A multi-line text area should be shown + */ + InputMode[InputMode["TextArea"] = 60] = "TextArea"; +})(InputMode = exports.InputMode || (exports.InputMode = {})); +exports.TypeInfo = { + InputDataType: { + enumValues: { + "none": 0, + "string": 10, + "number": 20, + "boolean": 30, + "guid": 40, + "uri": 50, + } + }, + InputDescriptor: { + fields: null + }, + InputFilter: { + fields: null + }, + InputFilterCondition: { + fields: null + }, + InputFilterOperator: { + enumValues: { + "equals": 0, + "notEquals": 1, + } + }, + InputMode: { + enumValues: { + "none": 0, + "textBox": 10, + "passwordBox": 20, + "combo": 30, + "radioButtons": 40, + "checkBox": 50, + "textArea": 60, + } + }, + InputValidation: { + fields: null + }, + InputValue: { + fields: null + }, + InputValues: { + fields: null + }, + InputValuesError: { + fields: null + }, + InputValuesQuery: { + fields: null + }, +}; +exports.TypeInfo.InputDescriptor.fields = { + inputMode: { + enumType: exports.TypeInfo.InputMode + }, + validation: { + typeInfo: exports.TypeInfo.InputValidation + }, + values: { + typeInfo: exports.TypeInfo.InputValues + }, +}; +exports.TypeInfo.InputFilter.fields = { + conditions: { + isArray: true, + typeInfo: exports.TypeInfo.InputFilterCondition + }, +}; +exports.TypeInfo.InputFilterCondition.fields = { + operator: { + enumType: exports.TypeInfo.InputFilterOperator + }, +}; +exports.TypeInfo.InputValidation.fields = { + dataType: { + enumType: exports.TypeInfo.InputDataType + }, +}; +exports.TypeInfo.InputValue.fields = {}; +exports.TypeInfo.InputValues.fields = { + error: { + typeInfo: exports.TypeInfo.InputValuesError + }, + possibleValues: { + isArray: true, + typeInfo: exports.TypeInfo.InputValue + }, +}; +exports.TypeInfo.InputValuesError.fields = {}; +exports.TypeInfo.InputValuesQuery.fields = { + inputValues: { + isArray: true, + typeInfo: exports.TypeInfo.InputValues + }, +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.d.ts new file mode 100644 index 0000000..97019ac --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.d.ts @@ -0,0 +1,58 @@ +/** + * Reference for an async operation. + */ +export interface OperationReference { + /** + * The identifier for this operation. + */ + id: string; + /** + * The current status of the operation. + */ + status: OperationStatus; + /** + * Url to get the full object. + */ + url: string; +} +export declare enum OperationStatus { + /** + * The operation object does not have the status set. + */ + NotSet = 0, + /** + * The operation has been queued. + */ + Queued = 1, + /** + * The operation is in progress. + */ + InProgress = 2, + /** + * The operation was cancelled by the user. + */ + Cancelled = 3, + /** + * The operation completed successfully. + */ + Succeeded = 4, + /** + * The operation completed with a failure. + */ + Failed = 5 +} +export declare var TypeInfo: { + OperationReference: { + fields: any; + }; + OperationStatus: { + enumValues: { + "notSet": number; + "queued": number; + "inProgress": number; + "cancelled": number; + "succeeded": number; + "failed": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.js b/node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.js new file mode 100644 index 0000000..372f41f --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/OperationsInterfaces.js @@ -0,0 +1,58 @@ +/* +* --------------------------------------------------------- +* Copyright(C) Microsoft Corporation. All rights reserved. +* --------------------------------------------------------- +* +* --------------------------------------------------------- +* Generated file, DO NOT EDIT +* --------------------------------------------------------- +*/ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var OperationStatus; +(function (OperationStatus) { + /** + * The operation object does not have the status set. + */ + OperationStatus[OperationStatus["NotSet"] = 0] = "NotSet"; + /** + * The operation has been queued. + */ + OperationStatus[OperationStatus["Queued"] = 1] = "Queued"; + /** + * The operation is in progress. + */ + OperationStatus[OperationStatus["InProgress"] = 2] = "InProgress"; + /** + * The operation was cancelled by the user. + */ + OperationStatus[OperationStatus["Cancelled"] = 3] = "Cancelled"; + /** + * The operation completed successfully. + */ + OperationStatus[OperationStatus["Succeeded"] = 4] = "Succeeded"; + /** + * The operation completed with a failure. + */ + OperationStatus[OperationStatus["Failed"] = 5] = "Failed"; +})(OperationStatus = exports.OperationStatus || (exports.OperationStatus = {})); +exports.TypeInfo = { + OperationReference: { + fields: null + }, + OperationStatus: { + enumValues: { + "notSet": 0, + "queued": 1, + "inProgress": 2, + "cancelled": 3, + "succeeded": 4, + "failed": 5, + } + }, +}; +exports.TypeInfo.OperationReference.fields = { + status: { + enumType: exports.TypeInfo.OperationStatus + }, +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/System.d.ts b/node_modules/azure-devops-node-api/interfaces/common/System.d.ts new file mode 100644 index 0000000..92a708e --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/System.d.ts @@ -0,0 +1,43 @@ +export declare enum DayOfWeek { + /** + * Indicates Sunday. + */ + Sunday = 0, + /** + * Indicates Monday. + */ + Monday = 1, + /** + * Indicates Tuesday. + */ + Tuesday = 2, + /** + * Indicates Wednesday. + */ + Wednesday = 3, + /** + * Indicates Thursday. + */ + Thursday = 4, + /** + * Indicates Friday. + */ + Friday = 5, + /** + * Indicates Saturday. + */ + Saturday = 6 +} +export declare var TypeInfo: { + DayOfWeek: { + enumValues: { + "sunday": number; + "monday": number; + "tuesday": number; + "wednesday": number; + "thursday": number; + "friday": number; + "saturday": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/System.js b/node_modules/azure-devops-node-api/interfaces/common/System.js new file mode 100644 index 0000000..bf60a0e --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/System.js @@ -0,0 +1,46 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var DayOfWeek; +(function (DayOfWeek) { + /** + * Indicates Sunday. + */ + DayOfWeek[DayOfWeek["Sunday"] = 0] = "Sunday"; + /** + * Indicates Monday. + */ + DayOfWeek[DayOfWeek["Monday"] = 1] = "Monday"; + /** + * Indicates Tuesday. + */ + DayOfWeek[DayOfWeek["Tuesday"] = 2] = "Tuesday"; + /** + * Indicates Wednesday. + */ + DayOfWeek[DayOfWeek["Wednesday"] = 3] = "Wednesday"; + /** + * Indicates Thursday. + */ + DayOfWeek[DayOfWeek["Thursday"] = 4] = "Thursday"; + /** + * Indicates Friday. + */ + DayOfWeek[DayOfWeek["Friday"] = 5] = "Friday"; + /** + * Indicates Saturday. + */ + DayOfWeek[DayOfWeek["Saturday"] = 6] = "Saturday"; +})(DayOfWeek = exports.DayOfWeek || (exports.DayOfWeek = {})); +exports.TypeInfo = { + DayOfWeek: { + enumValues: { + "sunday": 0, + "monday": 1, + "tuesday": 2, + "wednesday": 3, + "thursday": 4, + "friday": 5, + "saturday": 6 + } + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.d.ts new file mode 100644 index 0000000..a1ec073 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.d.ts @@ -0,0 +1,166 @@ +/** + * Specifies SQL Server-specific data type of a field, property, for use in a System.Data.SqlClient.SqlParameter. + */ +export declare enum SqlDbType { + /** + * A 64-bit signed integer. + */ + BigInt = 0, + /** + * Array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. + */ + Binary = 1, + /** + * Boolean. An unsigned numeric value that can be 0, 1, or null. + */ + Bit = 2, + /** + * String. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters. + */ + Char = 3, + /** + * DateTime. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds. + */ + DateTime = 4, + /** + * Decimal. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. + */ + Decimal = 5, + /** + * Double. A floating point number within the range of -1.79E +308 through 1.79E +308. + */ + Float = 6, + /** + * Array of type Byte. A variable-length stream of binary data ranging from 0 to 2 31 -1 (or 2,147,483,647) bytes. + */ + Image = 7, + /** + * Int32. A 32-bit signed integer. + */ + Int = 8, + /** + * Decimal. A currency value ranging from -2 63 (or -9,223,372,036,854,775,808) to 2 63 -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit. + */ + Money = 9, + /** + * String. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters. + */ + NChar = 10, + /** + * String. A variable-length stream of Unicode data with a maximum length of 2 30 - 1 (or 1,073,741,823) characters. + */ + NText = 11, + /** + * String. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings longer than 4,000 characters. Use System.Data.SqlDbType.NVarChar when the database column is nvarchar(max). + */ + NVarChar = 12, + /** + * Single. A floating point number within the range of -3.40E +38 through 3.40E +38. + */ + Real = 13, + /** + * Guid. A globally unique identifier (or GUID). + */ + UniqueIdentifier = 14, + /** + * DateTime. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute. + */ + SmallDateTime = 15, + /** + * Int16. A 16-bit signed integer. + */ + SmallInt = 16, + /** + * Decimal. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit. + */ + SmallMoney = 17, + /** + * String. A variable-length stream of non-Unicode data with a maximum length of 2 31 -1 (or 2,147,483,647) characters. + */ + Text = 18, + /** + * Array of type System.Byte. Automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes. + */ + Timestamp = 19, + /** + * Byte. An 8-bit unsigned integer. + */ + TinyInt = 20, + /** + * Array of type Byte. A variable-length stream of binary data ranging between 1 and 8,000 bytes. Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays larger than 8,000 bytes. + */ + VarBinary = 21, + /** + * String. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. Use System.Data.SqlDbType.VarChar when the database column is varchar(max). + */ + VarChar = 22, + /** + * Object. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, which is assumed if no other type is declared. + */ + Variant = 23, + /** + * An XML value. Obtain the XML as a string using the System.Data.SqlClient.SqlDataReader.GetValue(System.Int32) method or System.Data.SqlTypes.SqlXml.Value property, or as an System.Xml.XmlReader by calling the System.Data.SqlTypes.SqlXml.CreateReader method. + */ + Xml = 25, + /** + * A SQL Server user-defined type (UDT). + */ + Udt = 29, + /** + * A special data type for specifying structured data contained in table-valued parameters. + */ + Structured = 30, + /** + * Date data ranging in value from January 1,1 AD through December 31, 9999 AD. + */ + Date = 31, + /** + * Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Corresponds to a SQL Server time value. + */ + Time = 32, + /** + * Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. + */ + DateTime2 = 33, + /** + * Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00. + */ + DateTimeOffset = 34 +} +export declare var TypeInfo: { + SqlDbType: { + enumValues: { + "BigInt": number; + "Binary": number; + "Bit": number; + "Char": number; + "DateTime": number; + "Decimal": number; + "Float": number; + "Image": number; + "Int": number; + "Money": number; + "NChar": number; + "NText": number; + "NVarChar": number; + "Real": number; + "UniqueIdentifier": number; + "SmallDateTime": number; + "SmallInt": number; + "SmallMoney": number; + "Text": number; + "Timestamp": number; + "TinyInt": number; + "VarBinary": number; + "VarChar": number; + "Variant": number; + "Xml": number; + "Udt": number; + "Structured": number; + "Date": number; + "Time": number; + "DateTime2": number; + "DateTimeOffset": number; + }; + }; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.js b/node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.js new file mode 100644 index 0000000..fb1625a --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/SystemDataInterfaces.js @@ -0,0 +1,172 @@ +"use strict"; +//---------------------------------------------------------- +// Copyright (C) Microsoft Corporation. All rights reserved. +//---------------------------------------------------------- +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Specifies SQL Server-specific data type of a field, property, for use in a System.Data.SqlClient.SqlParameter. + */ +var SqlDbType; +(function (SqlDbType) { + /** + * A 64-bit signed integer. + */ + SqlDbType[SqlDbType["BigInt"] = 0] = "BigInt"; + /** + * Array of type Byte. A fixed-length stream of binary data ranging between 1 and 8,000 bytes. + */ + SqlDbType[SqlDbType["Binary"] = 1] = "Binary"; + /** + * Boolean. An unsigned numeric value that can be 0, 1, or null. + */ + SqlDbType[SqlDbType["Bit"] = 2] = "Bit"; + /** + * String. A fixed-length stream of non-Unicode characters ranging between 1 and 8,000 characters. + */ + SqlDbType[SqlDbType["Char"] = 3] = "Char"; + /** + * DateTime. Date and time data ranging in value from January 1, 1753 to December 31, 9999 to an accuracy of 3.33 milliseconds. + */ + SqlDbType[SqlDbType["DateTime"] = 4] = "DateTime"; + /** + * Decimal. A fixed precision and scale numeric value between -10 38 -1 and 10 38 -1. + */ + SqlDbType[SqlDbType["Decimal"] = 5] = "Decimal"; + /** + * Double. A floating point number within the range of -1.79E +308 through 1.79E +308. + */ + SqlDbType[SqlDbType["Float"] = 6] = "Float"; + /** + * Array of type Byte. A variable-length stream of binary data ranging from 0 to 2 31 -1 (or 2,147,483,647) bytes. + */ + SqlDbType[SqlDbType["Image"] = 7] = "Image"; + /** + * Int32. A 32-bit signed integer. + */ + SqlDbType[SqlDbType["Int"] = 8] = "Int"; + /** + * Decimal. A currency value ranging from -2 63 (or -9,223,372,036,854,775,808) to 2 63 -1 (or +9,223,372,036,854,775,807) with an accuracy to a ten-thousandth of a currency unit. + */ + SqlDbType[SqlDbType["Money"] = 9] = "Money"; + /** + * String. A fixed-length stream of Unicode characters ranging between 1 and 4,000 characters. + */ + SqlDbType[SqlDbType["NChar"] = 10] = "NChar"; + /** + * String. A variable-length stream of Unicode data with a maximum length of 2 30 - 1 (or 1,073,741,823) characters. + */ + SqlDbType[SqlDbType["NText"] = 11] = "NText"; + /** + * String. A variable-length stream of Unicode characters ranging between 1 and 4,000 characters. Implicit conversion fails if the string is greater than 4,000 characters. Explicitly set the object when working with strings longer than 4,000 characters. Use System.Data.SqlDbType.NVarChar when the database column is nvarchar(max). + */ + SqlDbType[SqlDbType["NVarChar"] = 12] = "NVarChar"; + /** + * Single. A floating point number within the range of -3.40E +38 through 3.40E +38. + */ + SqlDbType[SqlDbType["Real"] = 13] = "Real"; + /** + * Guid. A globally unique identifier (or GUID). + */ + SqlDbType[SqlDbType["UniqueIdentifier"] = 14] = "UniqueIdentifier"; + /** + * DateTime. Date and time data ranging in value from January 1, 1900 to June 6, 2079 to an accuracy of one minute. + */ + SqlDbType[SqlDbType["SmallDateTime"] = 15] = "SmallDateTime"; + /** + * Int16. A 16-bit signed integer. + */ + SqlDbType[SqlDbType["SmallInt"] = 16] = "SmallInt"; + /** + * Decimal. A currency value ranging from -214,748.3648 to +214,748.3647 with an accuracy to a ten-thousandth of a currency unit. + */ + SqlDbType[SqlDbType["SmallMoney"] = 17] = "SmallMoney"; + /** + * String. A variable-length stream of non-Unicode data with a maximum length of 2 31 -1 (or 2,147,483,647) characters. + */ + SqlDbType[SqlDbType["Text"] = 18] = "Text"; + /** + * Array of type System.Byte. Automatically generated binary numbers, which are guaranteed to be unique within a database. timestamp is used typically as a mechanism for version-stamping table rows. The storage size is 8 bytes. + */ + SqlDbType[SqlDbType["Timestamp"] = 19] = "Timestamp"; + /** + * Byte. An 8-bit unsigned integer. + */ + SqlDbType[SqlDbType["TinyInt"] = 20] = "TinyInt"; + /** + * Array of type Byte. A variable-length stream of binary data ranging between 1 and 8,000 bytes. Implicit conversion fails if the byte array is greater than 8,000 bytes. Explicitly set the object when working with byte arrays larger than 8,000 bytes. + */ + SqlDbType[SqlDbType["VarBinary"] = 21] = "VarBinary"; + /** + * String. A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters. Use System.Data.SqlDbType.VarChar when the database column is varchar(max). + */ + SqlDbType[SqlDbType["VarChar"] = 22] = "VarChar"; + /** + * Object. A special data type that can contain numeric, string, binary, or date data as well as the SQL Server values Empty and Null, which is assumed if no other type is declared. + */ + SqlDbType[SqlDbType["Variant"] = 23] = "Variant"; + /** + * An XML value. Obtain the XML as a string using the System.Data.SqlClient.SqlDataReader.GetValue(System.Int32) method or System.Data.SqlTypes.SqlXml.Value property, or as an System.Xml.XmlReader by calling the System.Data.SqlTypes.SqlXml.CreateReader method. + */ + SqlDbType[SqlDbType["Xml"] = 25] = "Xml"; + /** + * A SQL Server user-defined type (UDT). + */ + SqlDbType[SqlDbType["Udt"] = 29] = "Udt"; + /** + * A special data type for specifying structured data contained in table-valued parameters. + */ + SqlDbType[SqlDbType["Structured"] = 30] = "Structured"; + /** + * Date data ranging in value from January 1,1 AD through December 31, 9999 AD. + */ + SqlDbType[SqlDbType["Date"] = 31] = "Date"; + /** + * Time data based on a 24-hour clock. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Corresponds to a SQL Server time value. + */ + SqlDbType[SqlDbType["Time"] = 32] = "Time"; + /** + * Date and time data. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. + */ + SqlDbType[SqlDbType["DateTime2"] = 33] = "DateTime2"; + /** + * Date and time data with time zone awareness. Date value range is from January 1,1 AD through December 31, 9999 AD. Time value range is 00:00:00 through 23:59:59.9999999 with an accuracy of 100 nanoseconds. Time zone value range is -14:00 through +14:00. + */ + SqlDbType[SqlDbType["DateTimeOffset"] = 34] = "DateTimeOffset"; +})(SqlDbType = exports.SqlDbType || (exports.SqlDbType = {})); +exports.TypeInfo = { + SqlDbType: { + enumValues: { + "BigInt": 0, + "Binary": 1, + "Bit": 2, + "Char": 3, + "DateTime": 4, + "Decimal": 5, + "Float": 6, + "Image": 7, + "Int": 8, + "Money": 9, + "NChar": 10, + "NText": 11, + "NVarChar": 12, + "Real": 13, + "UniqueIdentifier": 14, + "SmallDateTime": 15, + "SmallInt": 16, + "SmallMoney": 17, + "Text": 18, + "Timestamp": 19, + "TinyInt": 20, + "VarBinary": 21, + "VarChar": 22, + "Variant": 23, + "Xml": 25, + "Udt": 29, + "Structured": 30, + "Date": 31, + "Time": 32, + "DateTime2": 33, + "DateTimeOffset": 34 + } + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.d.ts new file mode 100644 index 0000000..669e68d --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.d.ts @@ -0,0 +1,441 @@ +import GraphInterfaces = require("../../interfaces/GraphInterfaces"); +/** + * Information about the location of a REST API resource + */ +export interface ApiResourceLocation { + /** + * Area name for this resource + */ + area?: string; + /** + * Unique Identifier for this location + */ + id?: string; + /** + * Maximum api version that this resource supports (current server version for this resource) + */ + maxVersion?: string; + /** + * Minimum api version that this resource supports + */ + minVersion?: string; + /** + * The latest version of this resource location that is in "Release" (non-preview) mode + */ + releasedVersion?: string; + /** + * Resource name + */ + resourceName?: string; + /** + * The current resource version supported by this resource location + */ + resourceVersion?: number; + /** + * This location's route template (templated relative path) + */ + routeTemplate?: string; +} +/** + * Represents version information for a REST Api resource + */ +export interface ApiResourceVersion { + /** + * String representation of the Public API version. This is the version that the public sees and is used for a large group of services (e.g. the TFS 1.0 API) + */ + apiVersion?: string; + /** + * Is the public API version in preview + */ + isPreview?: boolean; + /** + * Internal resource version. This is defined per-resource and is used to support build-to-build compatibility of API changes within a given (in-preview) public api version. For example, within the TFS 1.0 API release cycle, while it is still in preview, a resource's data structure may be changed. This resource can be versioned such that older clients will still work (requests will be sent to the older version) and new/upgraded clients will talk to the new version of the resource. + */ + resourceVersion?: number; +} +/** + * Enumeration of the options that can be passed in on Connect. + */ +export declare enum ConnectOptions { + /** + * Retrieve no optional data. + */ + None = 0, + /** + * Includes information about AccessMappings and ServiceDefinitions. + */ + IncludeServices = 1, + /** + * Includes the last user access for this host. + */ + IncludeLastUserAccess = 2, + /** + * This is only valid on the deployment host and when true. Will only return inherited definitions. + */ + IncludeInheritedDefinitionsOnly = 4, + /** + * When true will only return non inherited definitions. Only valid at non-deployment host. + */ + IncludeNonInheritedDefinitionsOnly = 8 +} +export declare enum DeploymentFlags { + None = 0, + Hosted = 1, + OnPremises = 2 +} +/** + * Defines an "actor" for an event. + */ +export interface EventActor { + /** + * Required: This is the identity of the user for the specified role. + */ + id?: string; + /** + * Required: The event specific name of a role. + */ + role?: string; +} +/** + * Defines a scope for an event. + */ +export interface EventScope { + /** + * Required: This is the identity of the scope for the type. + */ + id?: string; + /** + * Optional: The display name of the scope + */ + name?: string; + /** + * Required: The event specific type of a scope. + */ + type?: string; +} +export interface IdentityRef extends GraphInterfaces.GraphSubjectBase { + /** + * Deprecated - Can be retrieved by querying the Graph user referenced in the "self" entry of the IdentityRef "_links" dictionary + */ + directoryAlias?: string; + id?: string; + /** + * Deprecated - Available in the "avatar" entry of the IdentityRef "_links" dictionary + */ + imageUrl?: string; + /** + * Deprecated - Can be retrieved by querying the Graph membership state referenced in the "membershipState" entry of the GraphUser "_links" dictionary + */ + inactive?: boolean; + /** + * Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsAadUserType/Descriptor.IsAadGroupType) + */ + isAadIdentity?: boolean; + /** + * Deprecated - Can be inferred from the subject type of the descriptor (Descriptor.IsGroupType) + */ + isContainer?: boolean; + isDeletedInOrigin?: boolean; + /** + * Deprecated - not in use in most preexisting implementations of ToIdentityRef + */ + profileUrl?: string; + /** + * Deprecated - use Domain+PrincipalName instead + */ + uniqueName?: string; +} +export interface IdentityRefWithEmail extends IdentityRef { + preferredEmailAddress?: string; +} +/** + * The JSON model for JSON Patch Operations + */ +export interface JsonPatchDocument { +} +/** + * The JSON model for a JSON Patch operation + */ +export interface JsonPatchOperation { + /** + * The path to copy from for the Move/Copy operation. + */ + from?: string; + /** + * The patch operation + */ + op: Operation; + /** + * The path for the operation. In the case of an array, a zero based index can be used to specify the position in the array (e.g. /biscuits/0/name). The "-" character can be used instead of an index to insert at the end of the array (e.g. /biscuits/-). + */ + path: string; + /** + * The value for the operation. This is either a primitive or a JToken. + */ + value?: any; +} +export interface JsonWebToken { +} +export declare enum JWTAlgorithm { + None = 0, + HS256 = 1, + RS256 = 2 +} +export declare enum Operation { + Add = 0, + Remove = 1, + Replace = 2, + Move = 3, + Copy = 4, + Test = 5 +} +/** + * A list that contains a single page of results from a query. + */ +export interface PagedList { + /** + * A string that can be passed to the same endpoint that returned this PagedList in order to retrieve the next page of results. + */ + continuationToken?: string; +} +/** + * Represents the public key portion of an RSA asymmetric key. + */ +export interface PublicKey { + /** + * Gets or sets the exponent for the public key. + */ + exponent?: number[]; + /** + * Gets or sets the modulus for the public key. + */ + modulus?: number[]; +} +export interface Publisher { + /** + * Name of the publishing service. + */ + name?: string; + /** + * Service Owner Guid Eg. Tfs : 00025394-6065-48CA-87D9-7F5672854EF7 + */ + serviceOwnerId?: string; +} +/** + * The class to represent a REST reference link. RFC: http://tools.ietf.org/html/draft-kelly-json-hal-06 The RFC is not fully implemented, additional properties are allowed on the reference link but as of yet we don't have a need for them. + */ +export interface ReferenceLink { + href?: string; +} +export interface ResourceRef { + id?: string; + url?: string; +} +export interface ServiceEvent { + /** + * This is the id of the type. Constants that will be used by subscribers to identify/filter events being published on a topic. + */ + eventType?: string; + /** + * This is the service that published this event. + */ + publisher?: Publisher; + /** + * The resource object that carries specific information about the event. The object must have the ServiceEventObject applied for serialization/deserialization to work. + */ + resource?: any; + /** + * This dictionary carries the context descriptors along with their ids. + */ + resourceContainers?: { + [key: string]: any; + }; + /** + * This is the version of the resource. + */ + resourceVersion?: string; +} +/** + * A signed url allowing limited-time anonymous access to private resources. + */ +export interface SignedUrl { + /** + * Timestamp when access expires. + */ + signatureExpires?: Date; + /** + * The URL to allow access to. + */ + url?: string; +} +export interface TeamMember { + identity?: IdentityRef; + isTeamAdmin?: boolean; +} +/** + * A single secured timing consisting of a duration and start time + */ +export interface TimingEntry { + /** + * Duration of the entry in ticks + */ + elapsedTicks?: number; + /** + * Properties to distinguish timings within the same group or to provide data to send with telemetry + */ + properties?: { + [key: string]: any; + }; + /** + * Offset from Server Request Context start time in microseconds + */ + startOffset?: number; +} +/** + * A set of secured performance timings all keyed off of the same string + */ +export interface TimingGroup { + /** + * The total number of timing entries associated with this group + */ + count?: number; + /** + * Overall duration of all entries in this group in ticks + */ + elapsedTicks?: number; + /** + * A list of timing entries in this group. Only the first few entries in each group are collected. + */ + timings?: TimingEntry[]; +} +/** + * This class describes a trace filter, i.e. a set of criteria on whether or not a trace event should be emitted + */ +export interface TraceFilter { + area?: string; + exceptionType?: string; + isEnabled?: boolean; + layer?: string; + level?: number; + method?: string; + /** + * Used to serialize additional identity information (display name, etc) to clients. Not set by default. Server-side callers should use OwnerId. + */ + owner?: IdentityRef; + ownerId?: string; + path?: string; + processName?: string; + service?: string; + serviceHost?: string; + timeCreated?: Date; + traceId?: string; + tracepoint?: number; + uri?: string; + userAgent?: string; + userLogin?: string; +} +export interface VssJsonCollectionWrapper extends VssJsonCollectionWrapperBase { + value?: any[]; +} +/** + * This class is used to serialized collections as a single JSON object on the wire, to avoid serializing JSON arrays directly to the client, which can be a security hole + */ +export interface VssJsonCollectionWrapperV extends VssJsonCollectionWrapperBase { + value?: T; +} +export interface VssJsonCollectionWrapperBase { + count?: number; +} +/** + * This is the type used for firing notifications intended for the subsystem in the Notifications SDK. For components that can't take a dependency on the Notifications SDK directly, they can use ITeamFoundationEventService.PublishNotification and the Notifications SDK ISubscriber implementation will get it. + */ +export interface VssNotificationEvent { + /** + * Optional: A list of actors which are additional identities with corresponding roles that are relevant to the event. + */ + actors?: EventActor[]; + /** + * Optional: A list of artifacts referenced or impacted by this event. + */ + artifactUris?: string[]; + /** + * Required: The event payload. If Data is a string, it must be in Json or XML format. Otherwise it must have a serialization format attribute. + */ + data?: any; + /** + * Required: The name of the event. This event must be registered in the context it is being fired. + */ + eventType?: string; + /** + * How long before the event expires and will be cleaned up. The default is to use the system default. + */ + expiresIn?: any; + /** + * The id of the item, artifact, extension, project, etc. + */ + itemId?: string; + /** + * How long to wait before processing this event. The default is to process immediately. + */ + processDelay?: any; + /** + * Optional: A list of scopes which are are relevant to the event. + */ + scopes?: EventScope[]; + /** + * This is the time the original source event for this VssNotificationEvent was created. For example, for something like a build completion notification SourceEventCreatedTime should be the time the build finished not the time this event was raised. + */ + sourceEventCreatedTime?: Date; +} +export interface WrappedException { + customProperties?: { + [key: string]: any; + }; + errorCode?: number; + eventId?: number; + helpLink?: string; + innerException?: WrappedException; + message?: string; + stackTrace?: string; + typeKey?: string; + typeName?: string; +} +export declare var TypeInfo: { + ConnectOptions: { + enumValues: { + "none": number; + "includeServices": number; + "includeLastUserAccess": number; + "includeInheritedDefinitionsOnly": number; + "includeNonInheritedDefinitionsOnly": number; + }; + }; + DeploymentFlags: { + enumValues: { + "none": number; + "hosted": number; + "onPremises": number; + }; + }; + JsonPatchOperation: any; + JWTAlgorithm: { + enumValues: { + "none": number; + "hS256": number; + "rS256": number; + }; + }; + Operation: { + enumValues: { + "add": number; + "remove": number; + "replace": number; + "move": number; + "copy": number; + "test": number; + }; + }; + SignedUrl: any; + TraceFilter: any; + VssNotificationEvent: any; +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.js b/node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.js new file mode 100644 index 0000000..7f3fa16 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/VSSInterfaces.js @@ -0,0 +1,117 @@ +/* + * --------------------------------------------------------- + * Copyright(C) Microsoft Corporation. All rights reserved. + * --------------------------------------------------------- + * + * --------------------------------------------------------- + * Generated file, DO NOT EDIT + * --------------------------------------------------------- + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +/** + * Enumeration of the options that can be passed in on Connect. + */ +var ConnectOptions; +(function (ConnectOptions) { + /** + * Retrieve no optional data. + */ + ConnectOptions[ConnectOptions["None"] = 0] = "None"; + /** + * Includes information about AccessMappings and ServiceDefinitions. + */ + ConnectOptions[ConnectOptions["IncludeServices"] = 1] = "IncludeServices"; + /** + * Includes the last user access for this host. + */ + ConnectOptions[ConnectOptions["IncludeLastUserAccess"] = 2] = "IncludeLastUserAccess"; + /** + * This is only valid on the deployment host and when true. Will only return inherited definitions. + */ + ConnectOptions[ConnectOptions["IncludeInheritedDefinitionsOnly"] = 4] = "IncludeInheritedDefinitionsOnly"; + /** + * When true will only return non inherited definitions. Only valid at non-deployment host. + */ + ConnectOptions[ConnectOptions["IncludeNonInheritedDefinitionsOnly"] = 8] = "IncludeNonInheritedDefinitionsOnly"; +})(ConnectOptions = exports.ConnectOptions || (exports.ConnectOptions = {})); +var DeploymentFlags; +(function (DeploymentFlags) { + DeploymentFlags[DeploymentFlags["None"] = 0] = "None"; + DeploymentFlags[DeploymentFlags["Hosted"] = 1] = "Hosted"; + DeploymentFlags[DeploymentFlags["OnPremises"] = 2] = "OnPremises"; +})(DeploymentFlags = exports.DeploymentFlags || (exports.DeploymentFlags = {})); +var JWTAlgorithm; +(function (JWTAlgorithm) { + JWTAlgorithm[JWTAlgorithm["None"] = 0] = "None"; + JWTAlgorithm[JWTAlgorithm["HS256"] = 1] = "HS256"; + JWTAlgorithm[JWTAlgorithm["RS256"] = 2] = "RS256"; +})(JWTAlgorithm = exports.JWTAlgorithm || (exports.JWTAlgorithm = {})); +var Operation; +(function (Operation) { + Operation[Operation["Add"] = 0] = "Add"; + Operation[Operation["Remove"] = 1] = "Remove"; + Operation[Operation["Replace"] = 2] = "Replace"; + Operation[Operation["Move"] = 3] = "Move"; + Operation[Operation["Copy"] = 4] = "Copy"; + Operation[Operation["Test"] = 5] = "Test"; +})(Operation = exports.Operation || (exports.Operation = {})); +exports.TypeInfo = { + ConnectOptions: { + enumValues: { + "none": 0, + "includeServices": 1, + "includeLastUserAccess": 2, + "includeInheritedDefinitionsOnly": 4, + "includeNonInheritedDefinitionsOnly": 8 + } + }, + DeploymentFlags: { + enumValues: { + "none": 0, + "hosted": 1, + "onPremises": 2 + } + }, + JsonPatchOperation: {}, + JWTAlgorithm: { + enumValues: { + "none": 0, + "hS256": 1, + "rS256": 2 + } + }, + Operation: { + enumValues: { + "add": 0, + "remove": 1, + "replace": 2, + "move": 3, + "copy": 4, + "test": 5 + } + }, + SignedUrl: {}, + TraceFilter: {}, + VssNotificationEvent: {}, +}; +exports.TypeInfo.JsonPatchOperation.fields = { + op: { + enumType: exports.TypeInfo.Operation + } +}; +exports.TypeInfo.SignedUrl.fields = { + signatureExpires: { + isDate: true, + } +}; +exports.TypeInfo.TraceFilter.fields = { + timeCreated: { + isDate: true, + } +}; +exports.TypeInfo.VssNotificationEvent.fields = { + sourceEventCreatedTime: { + isDate: true, + } +}; diff --git a/node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.d.ts new file mode 100644 index 0000000..4004dbe --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.d.ts @@ -0,0 +1,96 @@ +/// +import http = require("http"); +import url = require("url"); +/** + * Information about the location of a REST API resource + */ +export interface ApiResourceLocation { + /** + * Area name for this resource + */ + area: string; + /** + * Unique Identifier for this location + */ + id: string; + /** + * Maximum api version that this resource supports (current server version for this resource) + */ + maxVersion: string; + /** + * Minimum api version that this resource supports + */ + minVersion: string; + /** + * The latest version of this resource location that is in "Release" (non-preview) mode + */ + releasedVersion: string; + /** + * Resource name + */ + resourceName: string; + /** + * The current resource version supported by this resource location + */ + resourceVersion: number; + /** + * This location's route template (templated relative path) + */ + routeTemplate: string; +} +export interface IHeaders { + [key: string]: any; +} +export interface IBasicCredentials { + username: string; + password: string; +} +export interface IHttpClient { + options(requestUrl: string, additionalHeaders?: IHeaders): Promise; + get(requestUrl: string, additionalHeaders?: IHeaders): Promise; + del(requestUrl: string, additionalHeaders?: IHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise; + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise; + requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise; + requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void; +} +export interface IRequestInfo { + options: http.RequestOptions; + parsedUrl: url.Url; + httpModule: any; +} +export interface IRequestHandler { + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(response: IHttpClientResponse): boolean; + handleAuthentication(httpClient: IHttpClient, requestInfo: IRequestInfo, objs: any): Promise; +} +export interface IHttpClientResponse { + message: http.IncomingMessage; + readBody(): Promise; +} +export interface IRequestOptions { + socketTimeout?: number; + ignoreSslError?: boolean; + proxy?: IProxyConfiguration; + cert?: ICertConfiguration; + allowRetries?: boolean; + maxRetries?: number; + allowRedirects?: boolean; + maxRedirects?: number; + presignedUrlPatterns?: RegExp[]; +} +export interface IProxyConfiguration { + proxyUrl: string; + proxyUsername?: string; + proxyPassword?: string; + proxyBypassHosts?: string[]; +} +export interface ICertConfiguration { + caFile?: string; + certFile?: string; + keyFile?: string; + passphrase?: string; +} diff --git a/node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js b/node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js new file mode 100644 index 0000000..6b2bf36 --- /dev/null +++ b/node_modules/azure-devops-node-api/interfaces/common/VsoBaseInterfaces.js @@ -0,0 +1,5 @@ +"use strict"; +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +Object.defineProperty(exports, "__esModule", { value: true }); +; diff --git a/node_modules/azure-devops-node-api/opensource/node-http-ntlm/ntlm.js b/node_modules/azure-devops-node-api/opensource/node-http-ntlm/ntlm.js new file mode 100644 index 0000000..c1885bb --- /dev/null +++ b/node_modules/azure-devops-node-api/opensource/node-http-ntlm/ntlm.js @@ -0,0 +1,390 @@ +var crypto = require('crypto'); + +var flags = { + NTLM_NegotiateUnicode : 0x00000001, + NTLM_NegotiateOEM : 0x00000002, + NTLM_RequestTarget : 0x00000004, + NTLM_Unknown9 : 0x00000008, + NTLM_NegotiateSign : 0x00000010, + NTLM_NegotiateSeal : 0x00000020, + NTLM_NegotiateDatagram : 0x00000040, + NTLM_NegotiateLanManagerKey : 0x00000080, + NTLM_Unknown8 : 0x00000100, + NTLM_NegotiateNTLM : 0x00000200, + NTLM_NegotiateNTOnly : 0x00000400, + NTLM_Anonymous : 0x00000800, + NTLM_NegotiateOemDomainSupplied : 0x00001000, + NTLM_NegotiateOemWorkstationSupplied : 0x00002000, + NTLM_Unknown6 : 0x00004000, + NTLM_NegotiateAlwaysSign : 0x00008000, + NTLM_TargetTypeDomain : 0x00010000, + NTLM_TargetTypeServer : 0x00020000, + NTLM_TargetTypeShare : 0x00040000, + NTLM_NegotiateExtendedSecurity : 0x00080000, + NTLM_NegotiateIdentify : 0x00100000, + NTLM_Unknown5 : 0x00200000, + NTLM_RequestNonNTSessionKey : 0x00400000, + NTLM_NegotiateTargetInfo : 0x00800000, + NTLM_Unknown4 : 0x01000000, + NTLM_NegotiateVersion : 0x02000000, + NTLM_Unknown3 : 0x04000000, + NTLM_Unknown2 : 0x08000000, + NTLM_Unknown1 : 0x10000000, + NTLM_Negotiate128 : 0x20000000, + NTLM_NegotiateKeyExchange : 0x40000000, + NTLM_Negotiate56 : 0x80000000 +}; +var typeflags = { + NTLM_TYPE1_FLAGS : flags.NTLM_NegotiateUnicode + + flags.NTLM_NegotiateOEM + + flags.NTLM_RequestTarget + + flags.NTLM_NegotiateNTLM + + flags.NTLM_NegotiateOemDomainSupplied + + flags.NTLM_NegotiateOemWorkstationSupplied + + flags.NTLM_NegotiateAlwaysSign + + flags.NTLM_NegotiateExtendedSecurity + + flags.NTLM_NegotiateVersion + + flags.NTLM_Negotiate128 + + flags.NTLM_Negotiate56, + + NTLM_TYPE2_FLAGS : flags.NTLM_NegotiateUnicode + + flags.NTLM_RequestTarget + + flags.NTLM_NegotiateNTLM + + flags.NTLM_NegotiateAlwaysSign + + flags.NTLM_NegotiateExtendedSecurity + + flags.NTLM_NegotiateTargetInfo + + flags.NTLM_NegotiateVersion + + flags.NTLM_Negotiate128 + + flags.NTLM_Negotiate56 +}; + +function createType1Message(options){ + var domain = escape(options.domain.toUpperCase()); + var workstation = escape(options.workstation.toUpperCase()); + var protocol = 'NTLMSSP\0'; + + var BODY_LENGTH = 40; + + var type1flags = typeflags.NTLM_TYPE1_FLAGS; + if(!domain || domain === '') + type1flags = type1flags - flags.NTLM_NegotiateOemDomainSupplied; + + var pos = 0; + var buf = new Buffer(BODY_LENGTH + domain.length + workstation.length); + + + buf.write(protocol, pos, protocol.length); pos += protocol.length; // protocol + buf.writeUInt32LE(1, pos); pos += 4; // type 1 + buf.writeUInt32LE(type1flags, pos); pos += 4; // TYPE1 flag + + buf.writeUInt16LE(domain.length, pos); pos += 2; // domain length + buf.writeUInt16LE(domain.length, pos); pos += 2; // domain max length + buf.writeUInt32LE(BODY_LENGTH + workstation.length, pos); pos += 4; // domain buffer offset + + buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation length + buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation max length + buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // workstation buffer offset + + buf.writeUInt8(5, pos); pos += 1; //ProductMajorVersion + buf.writeUInt8(1, pos); pos += 1; //ProductMinorVersion + buf.writeUInt16LE(2600, pos); pos += 2; //ProductBuild + + buf.writeUInt8(0 , pos); pos += 1; //VersionReserved1 + buf.writeUInt8(0 , pos); pos += 1; //VersionReserved2 + buf.writeUInt8(0 , pos); pos += 1; //VersionReserved3 + buf.writeUInt8(15, pos); pos += 1; //NTLMRevisionCurrent + + buf.write(workstation, pos, workstation.length, 'ascii'); pos += workstation.length; // workstation string + buf.write(domain , pos, domain.length , 'ascii'); pos += domain.length; + + return 'NTLM ' + buf.toString('base64'); +} + +function parseType2Message(rawmsg, callback){ + var match = rawmsg.match(/NTLM (.+)?/); + if(!match || !match[1]) + return callback(new Error("Couldn't find NTLM in the message type2 comming from the server")); + + var buf = new Buffer(match[1], 'base64'); + + var msg = {}; + + msg.signature = buf.slice(0, 8); + msg.type = buf.readInt16LE(8); + + if(msg.type != 2) + return callback(new Error("Server didn't return a type 2 message")); + + msg.targetNameLen = buf.readInt16LE(12); + msg.targetNameMaxLen = buf.readInt16LE(14); + msg.targetNameOffset = buf.readInt32LE(16); + msg.targetName = buf.slice(msg.targetNameOffset, msg.targetNameOffset + msg.targetNameMaxLen); + + msg.negotiateFlags = buf.readInt32LE(20); + msg.serverChallenge = buf.slice(24, 32); + msg.reserved = buf.slice(32, 40); + + if(msg.negotiateFlags & flags.NTLM_NegotiateTargetInfo){ + msg.targetInfoLen = buf.readInt16LE(40); + msg.targetInfoMaxLen = buf.readInt16LE(42); + msg.targetInfoOffset = buf.readInt32LE(44); + msg.targetInfo = buf.slice(msg.targetInfoOffset, msg.targetInfoOffset + msg.targetInfoLen); + } + return msg; +} + +function createType3Message(msg2, options){ + var nonce = msg2.serverChallenge; + var username = options.username; + var password = options.password; + var negotiateFlags = msg2.negotiateFlags; + + var isUnicode = negotiateFlags & flags.NTLM_NegotiateUnicode; + var isNegotiateExtendedSecurity = negotiateFlags & flags.NTLM_NegotiateExtendedSecurity; + + var BODY_LENGTH = 72; + + var domainName = escape(options.domain.toUpperCase()); + var workstation = escape(options.workstation.toUpperCase()); + + var workstationBytes, domainNameBytes, usernameBytes, encryptedRandomSessionKeyBytes; + + var encryptedRandomSessionKey = ""; + if(isUnicode){ + workstationBytes = new Buffer(workstation, 'utf16le'); + domainNameBytes = new Buffer(domainName, 'utf16le'); + usernameBytes = new Buffer(username, 'utf16le'); + encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'utf16le'); + }else{ + workstationBytes = new Buffer(workstation, 'ascii'); + domainNameBytes = new Buffer(domainName, 'ascii'); + usernameBytes = new Buffer(username, 'ascii'); + encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'ascii'); + } + + var lmChallengeResponse = calc_resp(create_LM_hashed_password_v1(password), nonce); + var ntChallengeResponse = calc_resp(create_NT_hashed_password_v1(password), nonce); + + if(isNegotiateExtendedSecurity){ + var pwhash = create_NT_hashed_password_v1(password); + var clientChallenge = ""; + for(var i=0; i < 8; i++){ + clientChallenge += String.fromCharCode( Math.floor(Math.random()*256) ); + } + var clientChallengeBytes = new Buffer(clientChallenge, 'ascii'); + var challenges = ntlm2sr_calc_resp(pwhash, nonce, clientChallengeBytes); + lmChallengeResponse = challenges.lmChallengeResponse; + ntChallengeResponse = challenges.ntChallengeResponse; + } + + var signature = 'NTLMSSP\0'; + + var pos = 0; + var buf = new Buffer(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length + encryptedRandomSessionKeyBytes.length); + + buf.write(signature, pos, signature.length); pos += signature.length; + buf.writeUInt32LE(3, pos); pos += 4; // type 1 + + buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseLen + buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseMaxLen + buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length, pos); pos += 4; // LmChallengeResponseOffset + + buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseLen + buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseMaxLen + buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length, pos); pos += 4; // NtChallengeResponseOffset + + buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameLen + buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameMaxLen + buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // DomainNameOffset + + buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameLen + buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameMaxLen + buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length, pos); pos += 4; // UserNameOffset + + buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationLen + buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationMaxLen + buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length, pos); pos += 4; // WorkstationOffset + + buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyLen + buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyMaxLen + buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length, pos); pos += 4; // EncryptedRandomSessionKeyOffset + + buf.writeUInt32LE(typeflags.NTLM_TYPE2_FLAGS, pos); pos += 4; // NegotiateFlags + + buf.writeUInt8(5, pos); pos++; // ProductMajorVersion + buf.writeUInt8(1, pos); pos++; // ProductMinorVersion + buf.writeUInt16LE(2600, pos); pos += 2; // ProductBuild + buf.writeUInt8(0, pos); pos++; // VersionReserved1 + buf.writeUInt8(0, pos); pos++; // VersionReserved2 + buf.writeUInt8(0, pos); pos++; // VersionReserved3 + buf.writeUInt8(15, pos); pos++; // NTLMRevisionCurrent + + domainNameBytes.copy(buf, pos); pos += domainNameBytes.length; + usernameBytes.copy(buf, pos); pos += usernameBytes.length; + workstationBytes.copy(buf, pos); pos += workstationBytes.length; + lmChallengeResponse.copy(buf, pos); pos += lmChallengeResponse.length; + ntChallengeResponse.copy(buf, pos); pos += ntChallengeResponse.length; + encryptedRandomSessionKeyBytes.copy(buf, pos); pos += encryptedRandomSessionKeyBytes.length; + + return 'NTLM ' + buf.toString('base64'); +} + +function create_LM_hashed_password_v1(password){ + // fix the password length to 14 bytes + password = password.toUpperCase(); + var passwordBytes = new Buffer(password, 'ascii'); + + var passwordBytesPadded = new Buffer(14); + passwordBytesPadded.fill("\0"); + var sourceEnd = 14; + if(passwordBytes.length < 14) sourceEnd = passwordBytes.length; + passwordBytes.copy(passwordBytesPadded, 0, 0, sourceEnd); + + // split into 2 parts of 7 bytes: + var firstPart = passwordBytesPadded.slice(0,7); + var secondPart = passwordBytesPadded.slice(7); + + function encrypt(buf){ + var key = insertZerosEvery7Bits(buf); + var des = crypto.createCipheriv('DES-ECB', key, ''); + return des.update("KGS!@#$%"); // page 57 in [MS-NLMP]); + } + + var firstPartEncrypted = encrypt(firstPart); + var secondPartEncrypted = encrypt(secondPart); + + return Buffer.concat([firstPartEncrypted, secondPartEncrypted]); +} + +function insertZerosEvery7Bits(buf){ + var binaryArray = bytes2binaryArray(buf); + var newBinaryArray = []; + for(var i=0; i array.length) + break; + + var binString1 = '' + array[i] + '' + array[i+1] + '' + array[i+2] + '' + array[i+3]; + var binString2 = '' + array[i+4] + '' + array[i+5] + '' + array[i+6] + '' + array[i+7]; + var hexchar1 = binary2hex[binString1]; + var hexchar2 = binary2hex[binString2]; + + var buf = new Buffer(hexchar1 + '' + hexchar2, 'hex'); + bufArray.push(buf); + } + + return Buffer.concat(bufArray); +} + +function create_NT_hashed_password_v1(password){ + var buf = new Buffer(password, 'utf16le'); + var md4 = crypto.createHash('md4'); + md4.update(buf); + return new Buffer(md4.digest()); +} + +function calc_resp(password_hash, server_challenge){ + // padding with zeros to make the hash 21 bytes long + var passHashPadded = new Buffer(21); + passHashPadded.fill("\0"); + password_hash.copy(passHashPadded, 0, 0, password_hash.length); + + var resArray = []; + + var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(0,7)), ''); + resArray.push( des.update(server_challenge.slice(0,8)) ); + + des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), ''); + resArray.push( des.update(server_challenge.slice(0,8)) ); + + des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), ''); + resArray.push( des.update(server_challenge.slice(0,8)) ); + + return Buffer.concat(resArray); +} + +function ntlm2sr_calc_resp(responseKeyNT, serverChallenge, clientChallenge){ + // padding with zeros to make the hash 16 bytes longer + var lmChallengeResponse = new Buffer(clientChallenge.length + 16); + lmChallengeResponse.fill("\0"); + clientChallenge.copy(lmChallengeResponse, 0, 0, clientChallenge.length); + + var buf = Buffer.concat([serverChallenge, clientChallenge]); + var md5 = crypto.createHash('md5'); + md5.update(buf); + var sess = md5.digest(); + var ntChallengeResponse = calc_resp(responseKeyNT, sess.slice(0,8)); + + return { + lmChallengeResponse: lmChallengeResponse, + ntChallengeResponse: ntChallengeResponse + }; +} + +exports.createType1Message = createType1Message; +exports.parseType2Message = parseType2Message; +exports.createType3Message = createType3Message; + + + + diff --git a/node_modules/azure-devops-node-api/opensource/node-http-ntlm/readme.txt b/node_modules/azure-devops-node-api/opensource/node-http-ntlm/readme.txt new file mode 100644 index 0000000..d41fceb --- /dev/null +++ b/node_modules/azure-devops-node-api/opensource/node-http-ntlm/readme.txt @@ -0,0 +1,6 @@ +// This software (ntlm.js) was copied from a file of the same name at https://github.com/SamDecrock/node-http-ntlm/blob/master/ntlm.js. +// +// As of this writing, it is a part of the node-http-ntlm module produced by SamDecrock. +// +// It is used as a part of the NTLM support provided by the azure-devops-node-api library. +// diff --git a/node_modules/azure-devops-node-api/package.json b/node_modules/azure-devops-node-api/package.json new file mode 100644 index 0000000..cd60a76 --- /dev/null +++ b/node_modules/azure-devops-node-api/package.json @@ -0,0 +1,39 @@ +{ + "name": "azure-devops-node-api", + "description": "Node client for Azure DevOps and TFS REST APIs", + "version": "11.2.0", + "main": "./WebApi.js", + "types": "./WebApi.d.ts", + "scripts": { + "build": "node make.js build", + "samples": "node make.js samples", + "test": "node make.js test", + "units": "node make.js units" + }, + "repository": { + "type": "git", + "url": "https://github.com/Microsoft/azure-devops-node-api" + }, + "author": "Microsoft Corporation", + "contributors": [ + "Bryan MacFarlane ", + "Daniel McCormick", + "Scott Dallamura ", + "Stephen Franceschelli", + "Teddy Ward " + ], + "license": "MIT", + "dependencies": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + }, + "devDependencies": { + "@types/mocha": "^2.2.44", + "@types/shelljs": "0.7.8", + "mocha": "^3.5.3", + "nock": "9.6.1", + "shelljs": "0.7.8", + "typescript": "3.1.5", + "@types/node": "8.9.2" + } +} diff --git a/node_modules/before-after-hook/LICENSE b/node_modules/before-after-hook/LICENSE new file mode 100644 index 0000000..225063c --- /dev/null +++ b/node_modules/before-after-hook/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018 Gregor Martynus and other contributors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/node_modules/before-after-hook/README.md b/node_modules/before-after-hook/README.md new file mode 100644 index 0000000..1439db3 --- /dev/null +++ b/node_modules/before-after-hook/README.md @@ -0,0 +1,655 @@ +# before-after-hook + +> asynchronous hooks for internal functionality + +[![npm downloads](https://img.shields.io/npm/dw/before-after-hook.svg)](https://www.npmjs.com/package/before-after-hook) +[![Build Status](https://travis-ci.org/gr2m/before-after-hook.svg?branch=master)](https://travis-ci.org/gr2m/before-after-hook) +[![Coverage Status](https://coveralls.io/repos/gr2m/before-after-hook/badge.svg?branch=master)](https://coveralls.io/r/gr2m/before-after-hook?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/gr2m/before-after-hook.svg)](https://greenkeeper.io/) + +## Usage + +### Singular hook + +```js +// instantiate singular hook API +const hook = new Hook.Singular(); + +// Create a hook +function getData(options) { + return hook(fetchFromDatabase, options) + .then(handleData) + .catch(handleGetError); +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hook.before(beforeHook); +hook.error(errorHook); +hook.after(afterHook); + +getData({ id: 123 }); +``` + +### Hook collection + +```js +// instantiate hook collection API +const hookCollection = new Hook.Collection(); + +// Create a hook +function getData(options) { + return hookCollection("get", fetchFromDatabase, options) + .then(handleData) + .catch(handleGetError); +} + +// register before/error/after hooks. +// The methods can be async or return a promise +hookCollection.before("get", beforeHook); +hookCollection.error("get", errorHook); +hookCollection.after("get", afterHook); + +getData({ id: 123 }); +``` + +### Hook.Singular vs Hook.Collection + +There's no fundamental difference between the `Hook.Singular` and `Hook.Collection` hooks except for the fact that a hook from a collection requires you to pass along the name. Therefore the following explanation applies to both code snippets as described above. + +The methods are executed in the following order + +1. `beforeHook` +2. `fetchFromDatabase` +3. `afterHook` +4. `handleData` + +`beforeHook` can mutate `options` before it’s passed to `fetchFromDatabase`. + +If an error is thrown in `beforeHook` or `fetchFromDatabase` then `errorHook` is +called next. + +If `afterHook` throws an error then `handleGetError` is called instead +of `handleData`. + +If `errorHook` throws an error then `handleGetError` is called next, otherwise +`afterHook` and `handleData`. + +You can also use `hook.wrap` to achieve the same thing as shown above (collection example): + +```js +hookCollection.wrap("get", async (getData, options) => { + await beforeHook(options); + + try { + const result = getData(options); + } catch (error) { + await errorHook(error, options); + } + + await afterHook(result, options); +}); +``` + +## Install + +``` +npm install before-after-hook +``` + +Or download [the latest `before-after-hook.min.js`](https://github.com/gr2m/before-after-hook/releases/latest). + +## API + +- [Singular Hook Constructor](#singular-hook-api) +- [Hook Collection Constructor](#hook-collection-api) + +## Singular hook API + +- [Singular constructor](#singular-constructor) +- [hook.api](#singular-api) +- [hook()](#singular-api) +- [hook.before()](#singular-api) +- [hook.error()](#singular-api) +- [hook.after()](#singular-api) +- [hook.wrap()](#singular-api) +- [hook.remove()](#singular-api) + +### Singular constructor + +The `Hook.Singular` constructor has no options and returns a `hook` instance with the +methods below: + +```js +const hook = new Hook.Singular(); +``` + +Using the singular hook is recommended for [TypeScript](#typescript) + +### Singular API + +The singular hook is a reference to a single hook. This means that there's no need to pass along any identifier (such as a `name` as can be seen in the [Hook.Collection API](#hookcollectionapi)). + +The API of a singular hook is exactly the same as a collection hook and we therefore suggest you read the [Hook.Collection API](#hookcollectionapi) and leave out any use of the `name` argument. Just skip it like described in this example: + +```js +const hook = new Hook.Singular(); + +// good +hook.before(beforeHook); +hook.after(afterHook); +hook(fetchFromDatabase, options); + +// bad +hook.before("get", beforeHook); +hook.after("get", afterHook); +hook("get", fetchFromDatabase, options); +``` + +## Hook collection API + +- [Collection constructor](#collection-constructor) +- [hookCollection.api](#hookcollectionapi) +- [hookCollection()](#hookcollection) +- [hookCollection.before()](#hookcollectionbefore) +- [hookCollection.error()](#hookcollectionerror) +- [hookCollection.after()](#hookcollectionafter) +- [hookCollection.wrap()](#hookcollectionwrap) +- [hookCollection.remove()](#hookcollectionremove) + +### Collection constructor + +The `Hook.Collection` constructor has no options and returns a `hookCollection` instance with the +methods below + +```js +const hookCollection = new Hook.Collection(); +``` + +### hookCollection.api + +Use the `api` property to return the public API: + +- [hookCollection.before()](#hookcollectionbefore) +- [hookCollection.after()](#hookcollectionafter) +- [hookCollection.error()](#hookcollectionerror) +- [hookCollection.wrap()](#hookcollectionwrap) +- [hookCollection.remove()](#hookcollectionremove) + +That way you don’t need to expose the [hookCollection()](#hookcollection) method to consumers of your library + +### hookCollection() + +Invoke before and after hooks. Returns a promise. + +```js +hookCollection(nameOrNames, method /*, options */); +``` + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameString or Array of StringsHook name, for example 'save'. Or an array of names, see example below.Yes
methodFunctionCallback to be executed after all before hooks finished execution successfully. options is passed as first argumentYes
optionsObjectWill be passed to all before hooks as reference, so they can mutate itNo, defaults to empty object ({})
+ +Resolves with whatever `method` returns or resolves with. +Rejects with error that is thrown or rejected with by + +1. Any of the before hooks, whichever rejects / throws first +2. `method` +3. Any of the after hooks, whichever rejects / throws first + +Simple Example + +```js +hookCollection( + "save", + function (record) { + return store.save(record); + }, + record +); +// shorter: hookCollection('save', store.save, record) + +hookCollection.before("save", function addTimestamps(record) { + const now = new Date().toISOString(); + if (record.createdAt) { + record.updatedAt = now; + } else { + record.createdAt = now; + } +}); +``` + +Example defining multiple hooks at once. + +```js +hookCollection( + ["add", "save"], + function (record) { + return store.save(record); + }, + record +); + +hookCollection.before("add", function addTimestamps(record) { + if (!record.type) { + throw new Error("type property is required"); + } +}); + +hookCollection.before("save", function addTimestamps(record) { + if (!record.type) { + throw new Error("type property is required"); + } +}); +``` + +Defining multiple hooks is helpful if you have similar methods for which you want to define separate hooks, but also an additional hook that gets called for all at once. The example above is equal to this: + +```js +hookCollection( + "add", + function (record) { + return hookCollection( + "save", + function (record) { + return store.save(record); + }, + record + ); + }, + record +); +``` + +### hookCollection.before() + +Add before hook for given name. + +```js +hookCollection.before(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed before the wrapped method. Called with the hook’s + options argument. Before hooks can mutate the passed options + before they are passed to the wrapped method. + Yes
+ +Example + +```js +hookCollection.before("save", function validate(record) { + if (!record.name) { + throw new Error("name property is required"); + } +}); +``` + +### hookCollection.error() + +Add error hook for given name. + +```js +hookCollection.error(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed when an error occurred in either the wrapped method or a + before hook. Called with the thrown error + and the hook’s options argument. The first method + which does not throw an error will set the result that the after hook + methods will receive. + Yes
+ +Example + +```js +hookCollection.error("save", function (error, options) { + if (error.ignore) return; + throw error; +}); +``` + +### hookCollection.after() + +Add after hook for given name. + +```js +hookCollection.after(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Executed after wrapped method. Called with what the wrapped method + resolves with the hook’s options argument. + Yes
+ +Example + +```js +hookCollection.after("save", function (result, options) { + if (result.updatedAt) { + app.emit("update", result); + } else { + app.emit("create", result); + } +}); +``` + +### hookCollection.wrap() + +Add wrap hook for given name. + +```js +hookCollection.wrap(name, method); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
methodFunction + Receives both the wrapped method and the passed options as arguments so it can add logic before and after the wrapped method, it can handle errors and even replace the wrapped method altogether + Yes
+ +Example + +```js +hookCollection.wrap("save", async function (saveInDatabase, options) { + if (!record.name) { + throw new Error("name property is required"); + } + + try { + const result = await saveInDatabase(options); + + if (result.updatedAt) { + app.emit("update", result); + } else { + app.emit("create", result); + } + + return result; + } catch (error) { + if (error.ignore) return; + throw error; + } +}); +``` + +See also: [Test mock example](examples/test-mock-example.md) + +### hookCollection.remove() + +Removes hook for given name. + +```js +hookCollection.remove(name, hookMethod); +``` + + + + + + + + + + + + + + + + + + + + + + +
ArgumentTypeDescriptionRequired
nameStringHook name, for example 'save'Yes
beforeHookMethodFunction + Same function that was previously passed to hookCollection.before(), hookCollection.error(), hookCollection.after() or hookCollection.wrap() + Yes
+ +Example + +```js +hookCollection.remove("save", validateRecord); +``` + +## TypeScript + +This library contains type definitions for TypeScript. + +### Type support for `Singular`: + +```ts +import { Hook } from "before-after-hook"; + +type TOptions = { foo: string }; // type for options +type TResult = { bar: number }; // type for result +type TError = Error; // type for error + +const hook = new Hook.Singular(); + +hook.before((options) => { + // `options.foo` has `string` type + + // not allowed + options.foo = 42; + + // allowed + options.foo = "Forty-Two"; +}); + +const hookedMethod = hook( + (options) => { + // `options.foo` has `string` type + + // not allowed, because it does not satisfy the `R` type + return { foo: 42 }; + + // allowed + return { bar: 42 }; + }, + { foo: "Forty-Two" } +); +``` + +You can choose not to pass the types for options, result or error. So, these are completely valid: + +```ts +const hook = new Hook.Singular(); +const hook = new Hook.Singular(); +const hook = new Hook.Singular(); +``` + +In these cases, the omitted types will implicitly be `any`. + +### Type support for `Collection`: + +`Collection` also has strict type support. You can use it like this: + +```ts +import { Hook } from "before-after-hook"; + +type HooksType = { + add: { + Options: { type: string }; + Result: { id: number }; + Error: Error; + }; + save: { + Options: { type: string }; + Result: { id: number }; + }; + read: { + Options: { id: number; foo: number }; + }; + destroy: { + Options: { id: number; foo: string }; + }; +}; + +const hooks = new Hook.Collection(); + +hooks.before("destroy", (options) => { + // `options.id` has `number` type +}); + +hooks.error("add", (err, options) => { + // `options.type` has `string` type + // `err` is `instanceof Error` +}); + +hooks.error("save", (err, options) => { + // `options.type` has `string` type + // `err` has type `any` +}); + +hooks.after("save", (result, options) => { + // `options.type` has `string` type + // `result.id` has `number` type +}); +``` + +You can choose not to pass the types altogether. In that case, everything will implicitly be `any`: + +```ts +const hook = new Hook.Collection(); +``` + +Alternative imports: + +```ts +import { Singular, Collection } from "before-after-hook"; + +const hook = new Singular(); +const hooks = new Collection(); +``` + +## Upgrading to 1.4 + +Since version 1.4 the `Hook` constructor has been deprecated in favor of returning `Hook.Singular` in an upcoming breaking release. + +Version 1.4 is still 100% backwards-compatible, but if you want to continue using hook collections, we recommend using the `Hook.Collection` constructor instead before the next release. + +For even more details, check out [the PR](https://github.com/gr2m/before-after-hook/pull/52). + +## See also + +If `before-after-hook` is not for you, have a look at one of these alternatives: + +- https://github.com/keystonejs/grappling-hook +- https://github.com/sebelga/promised-hooks +- https://github.com/bnoguchi/hooks-js +- https://github.com/cb1kenobi/hook-emitter + +## License + +[Apache 2.0](LICENSE) diff --git a/node_modules/before-after-hook/index.d.ts b/node_modules/before-after-hook/index.d.ts new file mode 100644 index 0000000..9c95de3 --- /dev/null +++ b/node_modules/before-after-hook/index.d.ts @@ -0,0 +1,186 @@ +type HookMethod = ( + options: Options +) => Result | Promise + +type BeforeHook = (options: Options) => void | Promise +type ErrorHook = ( + error: Error, + options: Options +) => void | Promise +type AfterHook = ( + result: Result, + options: Options +) => void | Promise +type WrapHook = ( + hookMethod: HookMethod, + options: Options +) => Result | Promise + +type AnyHook = + | BeforeHook + | ErrorHook + | AfterHook + | WrapHook + +type TypeStoreKeyLong = 'Options' | 'Result' | 'Error' +type TypeStoreKeyShort = 'O' | 'R' | 'E' +type TypeStore = + | ({ [key in TypeStoreKeyLong]?: any } & + { [key in TypeStoreKeyShort]?: never }) + | ({ [key in TypeStoreKeyLong]?: never } & + { [key in TypeStoreKeyShort]?: any }) +type GetType< + Store extends TypeStore, + LongKey extends TypeStoreKeyLong, + ShortKey extends TypeStoreKeyShort +> = LongKey extends keyof Store + ? Store[LongKey] + : ShortKey extends keyof Store + ? Store[ShortKey] + : any + +export interface HookCollection< + HooksType extends Record = Record< + string, + { Options: any; Result: any; Error: any } + >, + HookName extends keyof HooksType = keyof HooksType +> { + /** + * Invoke before and after hooks + */ + ( + name: Name | Name[], + hookMethod: HookMethod< + GetType, + GetType + >, + options?: GetType + ): Promise> + /** + * Add `before` hook for given `name` + */ + before( + name: Name, + beforeHook: BeforeHook> + ): void + /** + * Add `error` hook for given `name` + */ + error( + name: Name, + errorHook: ErrorHook< + GetType, + GetType + > + ): void + /** + * Add `after` hook for given `name` + */ + after( + name: Name, + afterHook: AfterHook< + GetType, + GetType + > + ): void + /** + * Add `wrap` hook for given `name` + */ + wrap( + name: Name, + wrapHook: WrapHook< + GetType, + GetType + > + ): void + /** + * Remove added hook for given `name` + */ + remove( + name: Name, + hook: AnyHook< + GetType, + GetType, + GetType + > + ): void + /** + * Public API + */ + api: Pick< + HookCollection, + 'before' | 'error' | 'after' | 'wrap' | 'remove' + > +} + +export interface HookSingular { + /** + * Invoke before and after hooks + */ + (hookMethod: HookMethod, options?: Options): Promise + /** + * Add `before` hook + */ + before(beforeHook: BeforeHook): void + /** + * Add `error` hook + */ + error(errorHook: ErrorHook): void + /** + * Add `after` hook + */ + after(afterHook: AfterHook): void + /** + * Add `wrap` hook + */ + wrap(wrapHook: WrapHook): void + /** + * Remove added hook + */ + remove(hook: AnyHook): void + /** + * Public API + */ + api: Pick< + HookSingular, + 'before' | 'error' | 'after' | 'wrap' | 'remove' + > +} + +type Collection = new < + HooksType extends Record = Record< + string, + { Options: any; Result: any; Error: any } + > +>() => HookCollection +type Singular = new < + Options = any, + Result = any, + Error = any +>() => HookSingular + +interface Hook { + new < + HooksType extends Record = Record< + string, + { Options: any; Result: any; Error: any } + > + >(): HookCollection + + /** + * Creates a collection of hooks + */ + Collection: Collection + + /** + * Creates a nameless hook that supports strict typings + */ + Singular: Singular +} + +export const Hook: Hook +export const Collection: Collection +export const Singular: Singular + +export default Hook diff --git a/node_modules/before-after-hook/index.js b/node_modules/before-after-hook/index.js new file mode 100644 index 0000000..a97d89b --- /dev/null +++ b/node_modules/before-after-hook/index.js @@ -0,0 +1,57 @@ +var register = require('./lib/register') +var addHook = require('./lib/add') +var removeHook = require('./lib/remove') + +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind +var bindable = bind.bind(bind) + +function bindApi (hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state]) + hook.api = { remove: removeHookRef } + hook.remove = removeHookRef + + ;['before', 'error', 'after', 'wrap'].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind] + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args) + }) +} + +function HookSingular () { + var singularHookName = 'h' + var singularHookState = { + registry: {} + } + var singularHook = register.bind(null, singularHookState, singularHookName) + bindApi(singularHook, singularHookState, singularHookName) + return singularHook +} + +function HookCollection () { + var state = { + registry: {} + } + + var hook = register.bind(null, state) + bindApi(hook, state) + + return hook +} + +var collectionHookDeprecationMessageDisplayed = false +function Hook () { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4') + collectionHookDeprecationMessageDisplayed = true + } + return HookCollection() +} + +Hook.Singular = HookSingular.bind() +Hook.Collection = HookCollection.bind() + +module.exports = Hook +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook +module.exports.Singular = Hook.Singular +module.exports.Collection = Hook.Collection diff --git a/node_modules/before-after-hook/lib/add.js b/node_modules/before-after-hook/lib/add.js new file mode 100644 index 0000000..f379eab --- /dev/null +++ b/node_modules/before-after-hook/lib/add.js @@ -0,0 +1,46 @@ +module.exports = addHook; + +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; + } + + if (kind === "before") { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); + }; + } + + if (kind === "after") { + hook = function (method, options) { + var result; + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_; + return orig(result, options); + }) + .then(function () { + return result; + }); + }; + } + + if (kind === "error") { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options); + }); + }; + } + + state.registry[name].push({ + hook: hook, + orig: orig, + }); +} diff --git a/node_modules/before-after-hook/lib/register.js b/node_modules/before-after-hook/lib/register.js new file mode 100644 index 0000000..f0d3d4e --- /dev/null +++ b/node_modules/before-after-hook/lib/register.js @@ -0,0 +1,27 @@ +module.exports = register; + +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } + + if (!options) { + options = {}; + } + + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); + } + + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } + + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} diff --git a/node_modules/before-after-hook/lib/remove.js b/node_modules/before-after-hook/lib/remove.js new file mode 100644 index 0000000..590b963 --- /dev/null +++ b/node_modules/before-after-hook/lib/remove.js @@ -0,0 +1,19 @@ +module.exports = removeHook; + +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } + + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); + + if (index === -1) { + return; + } + + state.registry[name].splice(index, 1); +} diff --git a/node_modules/before-after-hook/package.json b/node_modules/before-after-hook/package.json new file mode 100644 index 0000000..25f4756 --- /dev/null +++ b/node_modules/before-after-hook/package.json @@ -0,0 +1,66 @@ +{ + "name": "before-after-hook", + "version": "2.2.2", + "description": "asynchronous before/error/after hooks for internal functionality", + "main": "index.js", + "files": [ + "index.js", + "index.d.ts", + "lib" + ], + "types": "./index.d.ts", + "scripts": { + "prebuild": "rimraf dist && mkdirp dist", + "build": "browserify index.js --standalone=Hook > dist/before-after-hook.js", + "postbuild": "uglifyjs dist/before-after-hook.js -mc > dist/before-after-hook.min.js", + "lint": "prettier --check '{lib,test,examples}/**/*' README.md package.json", + "lint:fix": "prettier --write '{lib,test,examples}/**/*' README.md package.json", + "pretest": "npm run -s lint", + "test": "npm run -s test:node | tap-spec", + "posttest": "npm run validate:ts", + "test:node": "node test", + "test:watch": "gaze 'clear && node test | tap-min' 'test/**/*.js' 'index.js' 'lib/**/*.js'", + "test:coverage": "istanbul cover test", + "test:coverage:upload": "istanbul-coveralls", + "validate:ts": "tsc --strict --target es6 index.d.ts", + "postvalidate:ts": "tsc --noEmit --strict --target es6 test/typescript-validate.ts", + "presemantic-release": "npm run build", + "semantic-release": "semantic-release" + }, + "repository": "github:gr2m/before-after-hook", + "keywords": [ + "hook", + "hooks", + "api" + ], + "author": "Gregor Martynus", + "license": "Apache-2.0", + "dependencies": {}, + "devDependencies": { + "browserify": "^16.0.0", + "gaze-cli": "^0.2.0", + "istanbul": "^0.4.0", + "istanbul-coveralls": "^1.0.3", + "mkdirp": "^1.0.3", + "prettier": "^2.0.0", + "rimraf": "^3.0.0", + "semantic-release": "^17.0.0", + "simple-mock": "^0.8.0", + "tap-min": "^2.0.0", + "tap-spec": "^5.0.0", + "tape": "^5.0.0", + "typescript": "^3.5.3", + "uglify-js": "^3.9.0" + }, + "release": { + "publish": [ + "@semantic-release/npm", + { + "path": "@semantic-release/github", + "assets": [ + "dist/*.js" + ] + } + ] + } +} diff --git a/node_modules/call-bind/.eslintignore b/node_modules/call-bind/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/call-bind/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/call-bind/.eslintrc b/node_modules/call-bind/.eslintrc new file mode 100644 index 0000000..e5d3c9a --- /dev/null +++ b/node_modules/call-bind/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + "no-magic-numbers": 0, + "operator-linebreak": [2, "before"], + }, +} diff --git a/node_modules/call-bind/.github/FUNDING.yml b/node_modules/call-bind/.github/FUNDING.yml new file mode 100644 index 0000000..c70c2ec --- /dev/null +++ b/node_modules/call-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/call-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/call-bind/.nycrc b/node_modules/call-bind/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/call-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/call-bind/CHANGELOG.md b/node_modules/call-bind/CHANGELOG.md new file mode 100644 index 0000000..62a3727 --- /dev/null +++ b/node_modules/call-bind/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11 + +### Commits + +- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d) + +## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08 + +### Commits + +- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1) +- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e) +- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb) +- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71) +- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee) +- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2) +- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8) +- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6) + +## v1.0.0 - 2020-10-30 + +### Commits + +- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50) +- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df) +- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65) +- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13) +- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4) +- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717) +- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af) +- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650) +- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f) diff --git a/node_modules/call-bind/LICENSE b/node_modules/call-bind/LICENSE new file mode 100644 index 0000000..48f05d0 --- /dev/null +++ b/node_modules/call-bind/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/call-bind/README.md b/node_modules/call-bind/README.md new file mode 100644 index 0000000..53649eb --- /dev/null +++ b/node_modules/call-bind/README.md @@ -0,0 +1,2 @@ +# call-bind +Robustly `.call.bind()` a function. diff --git a/node_modules/call-bind/callBound.js b/node_modules/call-bind/callBound.js new file mode 100644 index 0000000..8374adf --- /dev/null +++ b/node_modules/call-bind/callBound.js @@ -0,0 +1,15 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBind = require('./'); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; diff --git a/node_modules/call-bind/index.js b/node_modules/call-bind/index.js new file mode 100644 index 0000000..6fa3e4a --- /dev/null +++ b/node_modules/call-bind/index.js @@ -0,0 +1,47 @@ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} diff --git a/node_modules/call-bind/package.json b/node_modules/call-bind/package.json new file mode 100644 index 0000000..4360556 --- /dev/null +++ b/node_modules/call-bind/package.json @@ -0,0 +1,80 @@ +{ + "name": "call-bind", + "version": "1.0.2", + "description": "Robustly `.call.bind()` a function", + "main": "index.js", + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./callBound": [ + { + "default": "./callBound.js" + }, + "./callBound.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "prepublish": "safe-publish-latest", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/*'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/call-bind.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "callbind", + "callbound", + "call", + "bind", + "bound", + "call-bind", + "call-bound", + "function", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/call-bind/issues" + }, + "homepage": "https://github.com/ljharb/call-bind#readme", + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.17.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.1.1" + }, + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/call-bind/test/callBound.js b/node_modules/call-bind/test/callBound.js new file mode 100644 index 0000000..209ce3c --- /dev/null +++ b/node_modules/call-bind/test/callBound.js @@ -0,0 +1,55 @@ +'use strict'; + +var test = require('tape'); + +var callBound = require('../callBound'); + +test('callBound', function (t) { + // static primitive + t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself'); + t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself'); + + // static non-function object + t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself'); + t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself'); + t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself'); + t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself'); + + // static function + t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself'); + t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself'); + + // prototype primitive + t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself'); + t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself'); + + // prototype function + t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself'); + t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself'); + t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original'); + t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original'); + + t['throws']( + function () { callBound('does not exist'); }, + SyntaxError, + 'nonexistent intrinsic throws' + ); + t['throws']( + function () { callBound('does not exist', true); }, + SyntaxError, + 'allowMissing arg still throws for unknown intrinsic' + ); + + /* globals WeakRef: false */ + t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) { + st['throws']( + function () { callBound('WeakRef'); }, + TypeError, + 'real but absent intrinsic throws' + ); + st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception'); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/call-bind/test/index.js b/node_modules/call-bind/test/index.js new file mode 100644 index 0000000..bf6769c --- /dev/null +++ b/node_modules/call-bind/test/index.js @@ -0,0 +1,66 @@ +'use strict'; + +var callBind = require('../'); +var bind = require('function-bind'); + +var test = require('tape'); + +/* + * older engines have length nonconfigurable + * in io.js v3, it is configurable except on bound functions, hence the .bind() + */ +var functionsHaveConfigurableLengths = !!( + Object.getOwnPropertyDescriptor + && Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable +); + +test('callBind', function (t) { + var sentinel = { sentinel: true }; + var func = function (a, b) { + // eslint-disable-next-line no-invalid-this + return [this, a, b]; + }; + t.equal(func.length, 2, 'original function length is 2'); + t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); + t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); + t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); + + var bound = callBind(func); + t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args'); + t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args'); + t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args'); + + var boundR = callBind(func, sentinel); + t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); + t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); + t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); + + var boundArg = callBind(func, sentinel, 1); + t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths }); + t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); + t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); + t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); + + t.test('callBind.apply', function (st) { + var aBound = callBind.apply(func); + st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args'); + st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); + st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); + + var aBoundArg = callBind.apply(func); + st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args'); + st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args'); + st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args'); + + var aBoundR = callBind.apply(func, sentinel); + st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args'); + st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args'); + st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/deprecation/LICENSE b/node_modules/deprecation/LICENSE new file mode 100644 index 0000000..1683b58 --- /dev/null +++ b/node_modules/deprecation/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Gregor Martynus and contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/deprecation/README.md b/node_modules/deprecation/README.md new file mode 100644 index 0000000..648809d --- /dev/null +++ b/node_modules/deprecation/README.md @@ -0,0 +1,77 @@ +# deprecation + +> Log a deprecation message with stack + +![build](https://action-badges.now.sh/gr2m/deprecation) + +## Usage + + + + + + +
+Browsers + + +Load `deprecation` directly from [cdn.pika.dev](https://cdn.pika.dev) + +```html + +``` + +
+Node + + +Install with `npm install deprecation` + +```js +const { Deprecation } = require("deprecation"); +// or: import { Deprecation } from "deprecation"; +``` + +
+ +```js +function foo() { + bar(); +} + +function bar() { + baz(); +} + +function baz() { + console.warn(new Deprecation("[my-lib] foo() is deprecated, use bar()")); +} + +foo(); +// { Deprecation: [my-lib] foo() is deprecated, use bar() +// at baz (/path/to/file.js:12:15) +// at bar (/path/to/file.js:8:3) +// at foo (/path/to/file.js:4:3) +``` + +To log a deprecation message only once, you can use the [once](https://www.npmjs.com/package/once) module. + +```js +const Deprecation = require("deprecation"); +const once = require("once"); + +const deprecateFoo = once(console.warn); + +function foo() { + deprecateFoo(new Deprecation("[my-lib] foo() is deprecated, use bar()")); +} + +foo(); +foo(); // logs nothing +``` + +## License + +[ISC](LICENSE) diff --git a/node_modules/deprecation/dist-node/index.js b/node_modules/deprecation/dist-node/index.js new file mode 100644 index 0000000..9da1775 --- /dev/null +++ b/node_modules/deprecation/dist-node/index.js @@ -0,0 +1,20 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} + +exports.Deprecation = Deprecation; diff --git a/node_modules/deprecation/dist-src/index.js b/node_modules/deprecation/dist-src/index.js new file mode 100644 index 0000000..7950fdc --- /dev/null +++ b/node_modules/deprecation/dist-src/index.js @@ -0,0 +1,14 @@ +export class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} \ No newline at end of file diff --git a/node_modules/deprecation/dist-types/index.d.ts b/node_modules/deprecation/dist-types/index.d.ts new file mode 100644 index 0000000..e3ae7ad --- /dev/null +++ b/node_modules/deprecation/dist-types/index.d.ts @@ -0,0 +1,3 @@ +export class Deprecation extends Error { + name: "Deprecation"; +} diff --git a/node_modules/deprecation/dist-web/index.js b/node_modules/deprecation/dist-web/index.js new file mode 100644 index 0000000..c6bbda7 --- /dev/null +++ b/node_modules/deprecation/dist-web/index.js @@ -0,0 +1,16 @@ +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + + this.name = 'Deprecation'; + } + +} + +export { Deprecation }; diff --git a/node_modules/deprecation/package.json b/node_modules/deprecation/package.json new file mode 100644 index 0000000..a45fd51 --- /dev/null +++ b/node_modules/deprecation/package.json @@ -0,0 +1,34 @@ +{ + "name": "deprecation", + "description": "Log a deprecation message with stack", + "version": "2.3.1", + "license": "ISC", + "files": [ + "dist-*/", + "bin/" + ], + "esnext": "dist-src/index.js", + "main": "dist-node/index.js", + "module": "dist-web/index.js", + "types": "dist-types/index.d.ts", + "pika": true, + "sideEffects": false, + "keywords": [ + "deprecate", + "deprecated", + "deprecation" + ], + "repository": { + "type": "git", + "url": "https://github.com/gr2m/deprecation.git" + }, + "dependencies": {}, + "devDependencies": { + "@pika/pack": "^0.3.7", + "@pika/plugin-build-node": "^0.4.0", + "@pika/plugin-build-types": "^0.4.0", + "@pika/plugin-build-web": "^0.4.0", + "@pika/plugin-standard-pkg": "^0.4.0", + "semantic-release": "^15.13.3" + } +} diff --git a/node_modules/function-bind/.editorconfig b/node_modules/function-bind/.editorconfig new file mode 100644 index 0000000..ac29ade --- /dev/null +++ b/node_modules/function-bind/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..9b33d8e --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,15 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/node_modules/function-bind/.jscs.json b/node_modules/function-bind/.jscs.json new file mode 100644 index 0000000..8c44794 --- /dev/null +++ b/node_modules/function-bind/.jscs.json @@ -0,0 +1,176 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": { "allExcept": ["reserved"] }, + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + }, + + "requireImportAlphabetized": false, + + "requireSpaceBeforeObjectValues": true, + "requireSpaceBeforeDestructuredValues": true, + + "disallowSpacesInsideTemplateStringPlaceholders": true, + + "disallowArrayDestructuringReturn": false, + + "requireNewlineBeforeSingleStatementsInIf": false, + + "disallowUnusedVariables": true, + + "requireSpacesInsideImportedObjectBraces": true, + + "requireUseStrict": true +} + diff --git a/node_modules/function-bind/.npmignore b/node_modules/function-bind/.npmignore new file mode 100644 index 0000000..dbb555f --- /dev/null +++ b/node_modules/function-bind/.npmignore @@ -0,0 +1,22 @@ +# gitignore +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules + +# Only apps should have lockfiles +npm-shrinkwrap.json +package-lock.json +yarn.lock diff --git a/node_modules/function-bind/.travis.yml b/node_modules/function-bind/.travis.yml new file mode 100644 index 0000000..85f70d2 --- /dev/null +++ b/node_modules/function-bind/.travis.yml @@ -0,0 +1,168 @@ +language: node_js +os: + - linux +node_js: + - "8.4" + - "7.10" + - "6.11" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then if [ "${TRAVIS_NODE_VERSION%${TRAVIS_NODE_VERSION#[0-9]}}" = "0" ] || [ "${TRAVIS_NODE_VERSION:0:4}" = "iojs" ]; then npm install -g npm@4.5 ; else npm install -g npm; fi; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "4" + env: COVERAGE=true + - node_js: "8.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "8.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..81862a0 --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..cc4daec --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,52 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..20a1727 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,63 @@ +{ + "name": "function-bind", + "version": "1.1.1", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": "git://github.com/Raynos/function-bind.git", + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "covert": "^1.1.0", + "eslint": "^4.5.0", + "jscs": "^3.0.7", + "tape": "^4.8.0" + }, + "license": "MIT", + "scripts": { + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "npm run coverage -- --quiet", + "tests-only": "node test", + "coverage": "covert test/*.js", + "lint": "npm run jscs && npm run eslint", + "jscs": "jscs *.js */*.js", + "eslint": "eslint *.js */*.js" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc new file mode 100644 index 0000000..0ab0876 --- /dev/null +++ b/node_modules/get-intrinsic/.eslintrc @@ -0,0 +1,37 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + "es2017": true, + "es2020": true, + "es2021": true, + "es2022": true, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": 0, + "max-lines-per-function": [2, 90], + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "new-cap": 0, + }, + }, + ], +} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml new file mode 100644 index 0000000..8e8da0d --- /dev/null +++ b/node_modules/get-intrinsic/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/get-intrinsic +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/get-intrinsic/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md new file mode 100644 index 0000000..ff39172 --- /dev/null +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -0,0 +1,91 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + +## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 + +### Fixed + +- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) + +### Commits + +- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) +- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) +- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) + +## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 + +### Fixed + +- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) + +### Commits + +- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) +- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) +- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) +- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) + +## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 + +### Commits + +- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) +- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) +- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) + +## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 + +### Commits + +- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) +- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) +- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) + +## v1.0.0 - 2020-10-29 + +### Commits + +- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) +- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) +- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) +- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) +- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) +- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) +- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) +- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE new file mode 100644 index 0000000..48f05d0 --- /dev/null +++ b/node_modules/get-intrinsic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md new file mode 100644 index 0000000..3aa0bba --- /dev/null +++ b/node_modules/get-intrinsic/README.md @@ -0,0 +1,71 @@ +# get-intrinsic [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get and robustly cache all JS language-level intrinsics at first require time. + +See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. + +## Example + +```js +var GetIntrinsic = require('get-intrinsic'); +var assert = require('assert'); + +// static methods +assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); +assert.equal(Math.pow(2, 3), 8); +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); +delete Math.pow; +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); + +// instance methods +var arr = [1]; +assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); +assert.deepEqual(arr, [1]); + +arr.push(2); +assert.deepEqual(arr, [1, 2]); + +GetIntrinsic('%Array.prototype.push%').call(arr, 3); +assert.deepEqual(arr, [1, 2, 3]); + +delete Array.prototype.push; +GetIntrinsic('%Array.prototype.push%').call(arr, 4); +assert.deepEqual(arr, [1, 2, 3, 4]); + +// missing features +delete JSON.parse; // to simulate a real intrinsic that is missing in the environment +assert.throws(() => GetIntrinsic('%JSON.parse%')); +assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/get-intrinsic +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg +[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg +[deps-url]: https://david-dm.org/ljharb/get-intrinsic +[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js new file mode 100644 index 0000000..81ad8fc --- /dev/null +++ b/node_modules/get-intrinsic/index.js @@ -0,0 +1,334 @@ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('has'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/g, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json new file mode 100644 index 0000000..e8dc037 --- /dev/null +++ b/node_modules/get-intrinsic/package.json @@ -0,0 +1,88 @@ +{ + "name": "get-intrinsic", + "version": "1.1.2", + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "main": "index.js", + "exports": { + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-intrinsic.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "call-bind": "^1.0.2", + "es-abstract": "^1.20.1", + "es-value-fixtures": "^1.4.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.3" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js new file mode 100644 index 0000000..7e0ea30 --- /dev/null +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -0,0 +1,274 @@ +'use strict'; + +var GetIntrinsic = require('../'); + +var test = require('tape'); +var forEach = require('for-each'); +var debug = require('object-inspect'); +var generatorFns = require('make-generator-function')(); +var asyncFns = require('make-async-function').list(); +var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); + +var callBound = require('call-bind/callBound'); +var v = require('es-value-fixtures'); +var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor'); +var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow'); + +var $isProto = callBound('%Object.prototype.isPrototypeOf%'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic(''); }, + TypeError, + 'empty string intrinsic throws a type error' + ); + + t['throws']( + function () { GetIntrinsic('.'); }, + SyntaxError, + '"just a dot" intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('%String'); }, + SyntaxError, + 'Leading % without trailing % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('String%'); }, + SyntaxError, + 'Trailing % without leading % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic("String['prototype]"); }, + SyntaxError, + 'Dynamic property access is disallowed for intrinsics (unterminated string)' + ); + + t['throws']( + function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, + TypeError, + "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { GetIntrinsic(nonString); }, + TypeError, + debug(nonString) + ' is not a String' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + forEach([ + 'toString', + 'propertyIsEnumerable', + 'hasOwnProperty' + ], function (objectProtoMember) { + t['throws']( + function () { GetIntrinsic(objectProtoMember); }, + SyntaxError, + debug(objectProtoMember) + ' is not an intrinsic' + ); + }); + + t.end(); +}); + +test('base intrinsics', function (t) { + t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); + t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); + t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); + t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); + + t.end(); +}); + +test('dotted paths', function (t) { + t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); + t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); + t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); + t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); + + test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%ObjProto_toString%'); + + forEach([ + '%Object.prototype.toString%', + 'Object.prototype.toString', + '%ObjectPrototype.toString%', + 'ObjectPrototype.toString', + '%ObjProto_toString%', + 'ObjProto_toString' + ], function (name) { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); + }); + + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); + st.end(); + }); + + test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); + + forEach([ + '%Object.prototype.propertyIsEnumerable%', + 'Object.prototype.propertyIsEnumerable', + '%ObjectPrototype.propertyIsEnumerable%', + 'ObjectPrototype.propertyIsEnumerable' + ], function (name) { + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); + }); + + st.end(); + }); + + test('dotted path reports correct error', function (st) { + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); + }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); + + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); + }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); + + st.end(); + }); + + t.end(); +}); + +test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { + var actual = $gOPD(Map.prototype, 'size'); + t.ok(actual, 'Map.prototype.size has a descriptor'); + t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); + t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); + t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); + + t.end(); +}); + +test('generator functions', { skip: !generatorFns.length }, function (t) { + var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); + var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); + var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); + + forEach(generatorFns, function (genFn) { + var fnName = genFn.name; + fnName = fnName ? "'" + fnName + "'" : 'genFn'; + + t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); + t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); + t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('async functions', { skip: !asyncFns.length }, function (t) { + var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); + var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); + + forEach(asyncFns, function (asyncFn) { + var fnName = asyncFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; + + t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); + t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); + }); + + t.end(); +}); + +test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { + var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); + var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); + var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); + + forEach(asyncGenFns, function (asyncGenFn) { + var fnName = asyncGenFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; + + t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); + t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); + t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('%ThrowTypeError%', function (t) { + var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); + + t.equal(typeof $ThrowTypeError, 'function', 'is a function'); + t['throws']( + $ThrowTypeError, + TypeError, + '%ThrowTypeError% throws a TypeError' + ); + + t.end(); +}); + +test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { + t['throws']( + function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, + TypeError, + 'throws when missing' + ); + + t.equal( + GetIntrinsic('%AsyncGeneratorPrototype%', true), + undefined, + 'does not throw when allowMissing' + ); + + t.end(); +}); diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc new file mode 100644 index 0000000..2d9a66a --- /dev/null +++ b/node_modules/has-symbols/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000..04cf87e --- /dev/null +++ b/node_modules/has-symbols/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-symbols +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000..cd532a2 --- /dev/null +++ b/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,75 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000..df31cbf --- /dev/null +++ b/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md new file mode 100644 index 0000000..33905f0 --- /dev/null +++ b/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js new file mode 100644 index 0000000..17044fa --- /dev/null +++ b/node_modules/has-symbols/index.js @@ -0,0 +1,13 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json new file mode 100644 index 0000000..fe7004a --- /dev/null +++ b/node_modules/has-symbols/package.json @@ -0,0 +1,101 @@ +{ + "name": "has-symbols", + "version": "1.0.3", + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "main": "index.js", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "devDependencies": { + "@ljharb/eslint-config": "^20.2.3", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.5.2" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "greenkeeper": { + "ignore": [ + "core-js" + ] + } +} diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js new file mode 100644 index 0000000..1285210 --- /dev/null +++ b/node_modules/has-symbols/shams.js @@ -0,0 +1,42 @@ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000..352129c --- /dev/null +++ b/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000..df5365c --- /dev/null +++ b/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000..9191b24 --- /dev/null +++ b/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,28 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000..89edd12 --- /dev/null +++ b/node_modules/has-symbols/test/tests.js @@ -0,0 +1,56 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax + for (sym in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/has/LICENSE-MIT b/node_modules/has/LICENSE-MIT new file mode 100644 index 0000000..ae7014d --- /dev/null +++ b/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/has/README.md b/node_modules/has/README.md new file mode 100644 index 0000000..635e3a4 --- /dev/null +++ b/node_modules/has/README.md @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/node_modules/has/package.json b/node_modules/has/package.json new file mode 100644 index 0000000..7c4592f --- /dev/null +++ b/node_modules/has/package.json @@ -0,0 +1,48 @@ +{ + "name": "has", + "description": "Object.prototype.hasOwnProperty.call shortcut", + "version": "1.0.3", + "homepage": "https://github.com/tarruda/has", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "license": "MIT", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src", + "dependencies": { + "function-bind": "^1.1.1" + }, + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "eslint": "^4.19.1", + "tape": "^4.9.0" + }, + "engines": { + "node": ">= 0.4.0" + }, + "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", + "test": "tape test" + } +} diff --git a/node_modules/has/src/index.js b/node_modules/has/src/index.js new file mode 100644 index 0000000..dd92dd9 --- /dev/null +++ b/node_modules/has/src/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/node_modules/has/test/index.js b/node_modules/has/test/index.js new file mode 100644 index 0000000..43d480b --- /dev/null +++ b/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var test = require('tape'); +var has = require('../'); + +test('has', function (t) { + t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); + t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); + t.end(); +}); diff --git a/node_modules/is-plain-object/LICENSE b/node_modules/is-plain-object/LICENSE new file mode 100644 index 0000000..3f2eca1 --- /dev/null +++ b/node_modules/is-plain-object/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/is-plain-object/README.md b/node_modules/is-plain-object/README.md new file mode 100644 index 0000000..5c074ab --- /dev/null +++ b/node_modules/is-plain-object/README.md @@ -0,0 +1,125 @@ +# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object) + +> Returns true if an object was created by the `Object` constructor, or Object.create(null). + +Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. + +## Install + +Install with [npm](https://www.npmjs.com/): + +```sh +$ npm install --save is-plain-object +``` + +Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null. + +## Usage + +with es modules +```js +import { isPlainObject } from 'is-plain-object'; +``` + +or with commonjs +```js +const { isPlainObject } = require('is-plain-object'); +``` + +**true** when created by the `Object` constructor, or Object.create(null). + +```js +isPlainObject(Object.create({})); +//=> true +isPlainObject(Object.create(Object.prototype)); +//=> true +isPlainObject({foo: 'bar'}); +//=> true +isPlainObject({}); +//=> true +isPlainObject(null); +//=> true +``` + +**false** when not created by the `Object` constructor. + +```js +isPlainObject(1); +//=> false +isPlainObject(['foo', 'bar']); +//=> false +isPlainObject([]); +//=> false +isPlainObject(new Foo); +//=> false +isPlainObject(Object.create(null)); +//=> false +``` + +## About + +
+Contributing + +Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). + +
+ +
+Running Tests + +Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: + +```sh +$ npm install && npm test +``` + +
+ +
+Building docs + +_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ + +To generate the readme, run the following command: + +```sh +$ npm install -g verbose/verb#dev verb-generate-readme && verb +``` + +
+ +### Related projects + +You might also be interested in these projects: + +* [is-number](https://www.npmjs.com/package/is-number): Returns true if a number or string value is a finite number. Useful for regex… [more](https://github.com/jonschlinkert/is-number) | [homepage](https://github.com/jonschlinkert/is-number "Returns true if a number or string value is a finite number. Useful for regex matches, parsing, user input, etc.") +* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.") +* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.") + +### Contributors + +| **Commits** | **Contributor** | +| --- | --- | +| 19 | [jonschlinkert](https://github.com/jonschlinkert) | +| 6 | [TrySound](https://github.com/TrySound) | +| 6 | [stevenvachon](https://github.com/stevenvachon) | +| 3 | [onokumus](https://github.com/onokumus) | +| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) | + +### Author + +**Jon Schlinkert** + +* [GitHub Profile](https://github.com/jonschlinkert) +* [Twitter Profile](https://twitter.com/jonschlinkert) +* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) + +### License + +Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert). +Released under the [MIT License](LICENSE). + +*** + +_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 28, 2019._ diff --git a/node_modules/is-plain-object/dist/is-plain-object.js b/node_modules/is-plain-object/dist/is-plain-object.js new file mode 100644 index 0000000..d134e4f --- /dev/null +++ b/node_modules/is-plain-object/dist/is-plain-object.js @@ -0,0 +1,38 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; + + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +exports.isPlainObject = isPlainObject; diff --git a/node_modules/is-plain-object/dist/is-plain-object.mjs b/node_modules/is-plain-object/dist/is-plain-object.mjs new file mode 100644 index 0000000..c2d9f35 --- /dev/null +++ b/node_modules/is-plain-object/dist/is-plain-object.mjs @@ -0,0 +1,34 @@ +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; + + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +export { isPlainObject }; diff --git a/node_modules/is-plain-object/is-plain-object.d.ts b/node_modules/is-plain-object/is-plain-object.d.ts new file mode 100644 index 0000000..a359940 --- /dev/null +++ b/node_modules/is-plain-object/is-plain-object.d.ts @@ -0,0 +1 @@ +export function isPlainObject(o: any): boolean; diff --git a/node_modules/is-plain-object/package.json b/node_modules/is-plain-object/package.json new file mode 100644 index 0000000..3ea169a --- /dev/null +++ b/node_modules/is-plain-object/package.json @@ -0,0 +1,85 @@ +{ + "name": "is-plain-object", + "description": "Returns true if an object was created by the `Object` constructor, or Object.create(null).", + "version": "5.0.0", + "homepage": "https://github.com/jonschlinkert/is-plain-object", + "author": "Jon Schlinkert (https://github.com/jonschlinkert)", + "contributors": [ + "Jon Schlinkert (http://twitter.com/jonschlinkert)", + "Osman Nuri Okumuş (http://onokumus.com)", + "Steven Vachon (https://svachon.com)", + "(https://github.com/wtgtybhertgeghgtwtg)", + "Bogdan Chadkin (https://github.com/TrySound)" + ], + "repository": "jonschlinkert/is-plain-object", + "bugs": { + "url": "https://github.com/jonschlinkert/is-plain-object/issues" + }, + "license": "MIT", + "main": "dist/is-plain-object.js", + "module": "dist/is-plain-object.mjs", + "types": "is-plain-object.d.ts", + "files": [ + "is-plain-object.d.ts", + "dist" + ], + "exports": { + ".": { + "import": "./dist/is-plain-object.mjs", + "require": "./dist/is-plain-object.js" + }, + "./package.json": "./package.json" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "build": "rollup -c", + "test_browser": "mocha-headless-chrome --args=disable-web-security -f test/browser.html", + "test_node": "mocha -r esm", + "test": "npm run test_node && npm run build && npm run test_browser", + "prepare": "rollup -c" + }, + "devDependencies": { + "chai": "^4.2.0", + "esm": "^3.2.22", + "gulp-format-md": "^1.0.0", + "mocha": "^6.1.4", + "mocha-headless-chrome": "^3.1.0", + "rollup": "^2.22.1" + }, + "keywords": [ + "check", + "is", + "is-object", + "isobject", + "javascript", + "kind", + "kind-of", + "object", + "plain", + "type", + "typeof", + "value" + ], + "verb": { + "toc": false, + "layout": "default", + "tasks": [ + "readme" + ], + "plugins": [ + "gulp-format-md" + ], + "related": { + "list": [ + "is-number", + "isobject", + "kind-of" + ] + }, + "lint": { + "reflinks": true + } + } +} diff --git a/node_modules/node-fetch/LICENSE.md b/node_modules/node-fetch/LICENSE.md new file mode 100644 index 0000000..660ffec --- /dev/null +++ b/node_modules/node-fetch/LICENSE.md @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 David Frank + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/node_modules/node-fetch/README.md b/node_modules/node-fetch/README.md new file mode 100644 index 0000000..2dde742 --- /dev/null +++ b/node_modules/node-fetch/README.md @@ -0,0 +1,590 @@ +node-fetch +========== + +[![npm version][npm-image]][npm-url] +[![build status][travis-image]][travis-url] +[![coverage status][codecov-image]][codecov-url] +[![install size][install-size-image]][install-size-url] +[![Discord][discord-image]][discord-url] + +A light-weight module that brings `window.fetch` to Node.js + +(We are looking for [v2 maintainers and collaborators](https://github.com/bitinn/node-fetch/issues/567)) + +[![Backers][opencollective-image]][opencollective-url] + + + +- [Motivation](#motivation) +- [Features](#features) +- [Difference from client-side fetch](#difference-from-client-side-fetch) +- [Installation](#installation) +- [Loading and configuring the module](#loading-and-configuring-the-module) +- [Common Usage](#common-usage) + - [Plain text or HTML](#plain-text-or-html) + - [JSON](#json) + - [Simple Post](#simple-post) + - [Post with JSON](#post-with-json) + - [Post with form parameters](#post-with-form-parameters) + - [Handling exceptions](#handling-exceptions) + - [Handling client and server errors](#handling-client-and-server-errors) +- [Advanced Usage](#advanced-usage) + - [Streams](#streams) + - [Buffer](#buffer) + - [Accessing Headers and other Meta data](#accessing-headers-and-other-meta-data) + - [Extract Set-Cookie Header](#extract-set-cookie-header) + - [Post data using a file stream](#post-data-using-a-file-stream) + - [Post with form-data (detect multipart)](#post-with-form-data-detect-multipart) + - [Request cancellation with AbortSignal](#request-cancellation-with-abortsignal) +- [API](#api) + - [fetch(url[, options])](#fetchurl-options) + - [Options](#options) + - [Class: Request](#class-request) + - [Class: Response](#class-response) + - [Class: Headers](#class-headers) + - [Interface: Body](#interface-body) + - [Class: FetchError](#class-fetcherror) +- [License](#license) +- [Acknowledgement](#acknowledgement) + + + +## Motivation + +Instead of implementing `XMLHttpRequest` in Node.js to run browser-specific [Fetch polyfill](https://github.com/github/fetch), why not go from native `http` to `fetch` API directly? Hence, `node-fetch`, minimal code for a `window.fetch` compatible API on Node.js runtime. + +See Matt Andrews' [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) or Leonardo Quixada's [cross-fetch](https://github.com/lquixada/cross-fetch) for isomorphic usage (exports `node-fetch` for server-side, `whatwg-fetch` for client-side). + +## Features + +- Stay consistent with `window.fetch` API. +- Make conscious trade-off when following [WHATWG fetch spec][whatwg-fetch] and [stream spec](https://streams.spec.whatwg.org/) implementation details, document known differences. +- Use native promise but allow substituting it with [insert your favorite promise library]. +- Use native Node streams for body on both request and response. +- Decode content encoding (gzip/deflate) properly and convert string output (such as `res.text()` and `res.json()`) to UTF-8 automatically. +- Useful extensions such as timeout, redirect limit, response size limit, [explicit errors](ERROR-HANDLING.md) for troubleshooting. + +## Difference from client-side fetch + +- See [Known Differences](LIMITS.md) for details. +- If you happen to use a missing feature that `window.fetch` offers, feel free to open an issue. +- Pull requests are welcomed too! + +## Installation + +Current stable release (`2.x`) + +```sh +$ npm install node-fetch +``` + +## Loading and configuring the module +We suggest you load the module via `require` until the stabilization of ES modules in node: +```js +const fetch = require('node-fetch'); +``` + +If you are using a Promise library other than native, set it through `fetch.Promise`: +```js +const Bluebird = require('bluebird'); + +fetch.Promise = Bluebird; +``` + +## Common Usage + +NOTE: The documentation below is up-to-date with `2.x` releases; see the [`1.x` readme](https://github.com/bitinn/node-fetch/blob/1.x/README.md), [changelog](https://github.com/bitinn/node-fetch/blob/1.x/CHANGELOG.md) and [2.x upgrade guide](UPGRADE-GUIDE.md) for the differences. + +#### Plain text or HTML +```js +fetch('https://github.com/') + .then(res => res.text()) + .then(body => console.log(body)); +``` + +#### JSON + +```js + +fetch('https://api.github.com/users/github') + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Simple Post +```js +fetch('https://httpbin.org/post', { method: 'POST', body: 'a=1' }) + .then(res => res.json()) // expecting a json response + .then(json => console.log(json)); +``` + +#### Post with JSON + +```js +const body = { a: 1 }; + +fetch('https://httpbin.org/post', { + method: 'post', + body: JSON.stringify(body), + headers: { 'Content-Type': 'application/json' }, + }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Post with form parameters +`URLSearchParams` is available in Node.js as of v7.5.0. See [official documentation](https://nodejs.org/api/url.html#url_class_urlsearchparams) for more usage methods. + +NOTE: The `Content-Type` header is only set automatically to `x-www-form-urlencoded` when an instance of `URLSearchParams` is given as such: + +```js +const { URLSearchParams } = require('url'); + +const params = new URLSearchParams(); +params.append('a', 1); + +fetch('https://httpbin.org/post', { method: 'POST', body: params }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Handling exceptions +NOTE: 3xx-5xx responses are *NOT* exceptions and should be handled in `then()`; see the next section for more information. + +Adding a catch to the fetch promise chain will catch *all* exceptions, such as errors originating from node core libraries, network errors and operational errors, which are instances of FetchError. See the [error handling document](ERROR-HANDLING.md) for more details. + +```js +fetch('https://domain.invalid/') + .catch(err => console.error(err)); +``` + +#### Handling client and server errors +It is common to create a helper function to check that the response contains no client (4xx) or server (5xx) error responses: + +```js +function checkStatus(res) { + if (res.ok) { // res.status >= 200 && res.status < 300 + return res; + } else { + throw MyCustomError(res.statusText); + } +} + +fetch('https://httpbin.org/status/400') + .then(checkStatus) + .then(res => console.log('will not get here...')) +``` + +## Advanced Usage + +#### Streams +The "Node.js way" is to use streams when possible: + +```js +fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') + .then(res => { + const dest = fs.createWriteStream('./octocat.png'); + res.body.pipe(dest); + }); +``` + +#### Buffer +If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API) + +```js +const fileType = require('file-type'); + +fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') + .then(res => res.buffer()) + .then(buffer => fileType(buffer)) + .then(type => { /* ... */ }); +``` + +#### Accessing Headers and other Meta data +```js +fetch('https://github.com/') + .then(res => { + console.log(res.ok); + console.log(res.status); + console.log(res.statusText); + console.log(res.headers.raw()); + console.log(res.headers.get('content-type')); + }); +``` + +#### Extract Set-Cookie Header + +Unlike browsers, you can access raw `Set-Cookie` headers manually using `Headers.raw()`. This is a `node-fetch` only API. + +```js +fetch(url).then(res => { + // returns an array of values, instead of a string of comma-separated values + console.log(res.headers.raw()['set-cookie']); +}); +``` + +#### Post data using a file stream + +```js +const { createReadStream } = require('fs'); + +const stream = createReadStream('input.txt'); + +fetch('https://httpbin.org/post', { method: 'POST', body: stream }) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Post with form-data (detect multipart) + +```js +const FormData = require('form-data'); + +const form = new FormData(); +form.append('a', 1); + +fetch('https://httpbin.org/post', { method: 'POST', body: form }) + .then(res => res.json()) + .then(json => console.log(json)); + +// OR, using custom headers +// NOTE: getHeaders() is non-standard API + +const form = new FormData(); +form.append('a', 1); + +const options = { + method: 'POST', + body: form, + headers: form.getHeaders() +} + +fetch('https://httpbin.org/post', options) + .then(res => res.json()) + .then(json => console.log(json)); +``` + +#### Request cancellation with AbortSignal + +> NOTE: You may cancel streamed requests only on Node >= v8.0.0 + +You may cancel requests with `AbortController`. A suggested implementation is [`abort-controller`](https://www.npmjs.com/package/abort-controller). + +An example of timing out a request after 150ms could be achieved as the following: + +```js +import AbortController from 'abort-controller'; + +const controller = new AbortController(); +const timeout = setTimeout( + () => { controller.abort(); }, + 150, +); + +fetch(url, { signal: controller.signal }) + .then(res => res.json()) + .then( + data => { + useData(data) + }, + err => { + if (err.name === 'AbortError') { + // request was aborted + } + }, + ) + .finally(() => { + clearTimeout(timeout); + }); +``` + +See [test cases](https://github.com/bitinn/node-fetch/blob/master/test/test.js) for more examples. + + +## API + +### fetch(url[, options]) + +- `url` A string representing the URL for fetching +- `options` [Options](#fetch-options) for the HTTP(S) request +- Returns: Promise<[Response](#class-response)> + +Perform an HTTP(S) fetch. + +`url` should be an absolute url, such as `https://example.com/`. A path-relative URL (`/file/under/root`) or protocol-relative URL (`//can-be-http-or-https.com/`) will result in a rejected `Promise`. + + +### Options + +The default values are shown after each option key. + +```js +{ + // These properties are part of the Fetch Standard + method: 'GET', + headers: {}, // request headers. format is the identical to that accepted by the Headers constructor (see below) + body: null, // request body. can be null, a string, a Buffer, a Blob, or a Node.js Readable stream + redirect: 'follow', // set to `manual` to extract redirect headers, `error` to reject redirect + signal: null, // pass an instance of AbortSignal to optionally abort requests + + // The following properties are node-fetch extensions + follow: 20, // maximum redirect count. 0 to not follow redirect + timeout: 0, // req/res timeout in ms, it resets on redirect. 0 to disable (OS limit applies). Signal is recommended instead. + compress: true, // support gzip/deflate content encoding. false to disable + size: 0, // maximum response body size in bytes. 0 to disable + agent: null // http(s).Agent instance or function that returns an instance (see below) +} +``` + +##### Default Headers + +If no values are set, the following request headers will be sent automatically: + +Header | Value +------------------- | -------------------------------------------------------- +`Accept-Encoding` | `gzip,deflate` _(when `options.compress === true`)_ +`Accept` | `*/*` +`Connection` | `close` _(when no `options.agent` is present)_ +`Content-Length` | _(automatically calculated, if possible)_ +`Transfer-Encoding` | `chunked` _(when `req.body` is a stream)_ +`User-Agent` | `node-fetch/1.0 (+https://github.com/bitinn/node-fetch)` + +Note: when `body` is a `Stream`, `Content-Length` is not set automatically. + +##### Custom Agent + +The `agent` option allows you to specify networking related options which are out of the scope of Fetch, including and not limited to the following: + +- Support self-signed certificate +- Use only IPv4 or IPv6 +- Custom DNS Lookup + +See [`http.Agent`](https://nodejs.org/api/http.html#http_new_agent_options) for more information. + +In addition, the `agent` option accepts a function that returns `http`(s)`.Agent` instance given current [URL](https://nodejs.org/api/url.html), this is useful during a redirection chain across HTTP and HTTPS protocol. + +```js +const httpAgent = new http.Agent({ + keepAlive: true +}); +const httpsAgent = new https.Agent({ + keepAlive: true +}); + +const options = { + agent: function (_parsedURL) { + if (_parsedURL.protocol == 'http:') { + return httpAgent; + } else { + return httpsAgent; + } + } +} +``` + + +### Class: Request + +An HTTP(S) request containing information about URL, method, headers, and the body. This class implements the [Body](#iface-body) interface. + +Due to the nature of Node.js, the following properties are not implemented at this moment: + +- `type` +- `destination` +- `referrer` +- `referrerPolicy` +- `mode` +- `credentials` +- `cache` +- `integrity` +- `keepalive` + +The following node-fetch extension properties are provided: + +- `follow` +- `compress` +- `counter` +- `agent` + +See [options](#fetch-options) for exact meaning of these extensions. + +#### new Request(input[, options]) + +*(spec-compliant)* + +- `input` A string representing a URL, or another `Request` (which will be cloned) +- `options` [Options][#fetch-options] for the HTTP(S) request + +Constructs a new `Request` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + +In most cases, directly `fetch(url, options)` is simpler than creating a `Request` object. + + +### Class: Response + +An HTTP(S) response. This class implements the [Body](#iface-body) interface. + +The following properties are not implemented in node-fetch at this moment: + +- `Response.error()` +- `Response.redirect()` +- `type` +- `trailer` + +#### new Response([body[, options]]) + +*(spec-compliant)* + +- `body` A `String` or [`Readable` stream][node-readable] +- `options` A [`ResponseInit`][response-init] options dictionary + +Constructs a new `Response` object. The constructor is identical to that in the [browser](https://developer.mozilla.org/en-US/docs/Web/API/Response/Response). + +Because Node.js does not implement service workers (for which this class was designed), one rarely has to construct a `Response` directly. + +#### response.ok + +*(spec-compliant)* + +Convenience property representing if the request ended normally. Will evaluate to true if the response status was greater than or equal to 200 but smaller than 300. + +#### response.redirected + +*(spec-compliant)* + +Convenience property representing if the request has been redirected at least once. Will evaluate to true if the internal redirect counter is greater than 0. + + +### Class: Headers + +This class allows manipulating and iterating over a set of HTTP headers. All methods specified in the [Fetch Standard][whatwg-fetch] are implemented. + +#### new Headers([init]) + +*(spec-compliant)* + +- `init` Optional argument to pre-fill the `Headers` object + +Construct a new `Headers` object. `init` can be either `null`, a `Headers` object, an key-value map object or any iterable object. + +```js +// Example adapted from https://fetch.spec.whatwg.org/#example-headers-class + +const meta = { + 'Content-Type': 'text/xml', + 'Breaking-Bad': '<3' +}; +const headers = new Headers(meta); + +// The above is equivalent to +const meta = [ + [ 'Content-Type', 'text/xml' ], + [ 'Breaking-Bad', '<3' ] +]; +const headers = new Headers(meta); + +// You can in fact use any iterable objects, like a Map or even another Headers +const meta = new Map(); +meta.set('Content-Type', 'text/xml'); +meta.set('Breaking-Bad', '<3'); +const headers = new Headers(meta); +const copyOfHeaders = new Headers(headers); +``` + + +### Interface: Body + +`Body` is an abstract interface with methods that are applicable to both `Request` and `Response` classes. + +The following methods are not yet implemented in node-fetch at this moment: + +- `formData()` + +#### body.body + +*(deviation from spec)* + +* Node.js [`Readable` stream][node-readable] + +Data are encapsulated in the `Body` object. Note that while the [Fetch Standard][whatwg-fetch] requires the property to always be a WHATWG `ReadableStream`, in node-fetch it is a Node.js [`Readable` stream][node-readable]. + +#### body.bodyUsed + +*(spec-compliant)* + +* `Boolean` + +A boolean property for if this body has been consumed. Per the specs, a consumed body cannot be used again. + +#### body.arrayBuffer() +#### body.blob() +#### body.json() +#### body.text() + +*(spec-compliant)* + +* Returns: Promise + +Consume the body and return a promise that will resolve to one of these formats. + +#### body.buffer() + +*(node-fetch extension)* + +* Returns: Promise<Buffer> + +Consume the body and return a promise that will resolve to a Buffer. + +#### body.textConverted() + +*(node-fetch extension)* + +* Returns: Promise<String> + +Identical to `body.text()`, except instead of always converting to UTF-8, encoding sniffing will be performed and text converted to UTF-8 if possible. + +(This API requires an optional dependency of the npm package [encoding](https://www.npmjs.com/package/encoding), which you need to install manually. `webpack` users may see [a warning message](https://github.com/bitinn/node-fetch/issues/412#issuecomment-379007792) due to this optional dependency.) + + +### Class: FetchError + +*(node-fetch extension)* + +An operational error in the fetching process. See [ERROR-HANDLING.md][] for more info. + + +### Class: AbortError + +*(node-fetch extension)* + +An Error thrown when the request is aborted in response to an `AbortSignal`'s `abort` event. It has a `name` property of `AbortError`. See [ERROR-HANDLING.MD][] for more info. + +## Acknowledgement + +Thanks to [github/fetch](https://github.com/github/fetch) for providing a solid implementation reference. + +`node-fetch` v1 was maintained by [@bitinn](https://github.com/bitinn); v2 was maintained by [@TimothyGu](https://github.com/timothygu), [@bitinn](https://github.com/bitinn) and [@jimmywarting](https://github.com/jimmywarting); v2 readme is written by [@jkantr](https://github.com/jkantr). + +## License + +MIT + +[npm-image]: https://flat.badgen.net/npm/v/node-fetch +[npm-url]: https://www.npmjs.com/package/node-fetch +[travis-image]: https://flat.badgen.net/travis/bitinn/node-fetch +[travis-url]: https://travis-ci.org/bitinn/node-fetch +[codecov-image]: https://flat.badgen.net/codecov/c/github/bitinn/node-fetch/master +[codecov-url]: https://codecov.io/gh/bitinn/node-fetch +[install-size-image]: https://flat.badgen.net/packagephobia/install/node-fetch +[install-size-url]: https://packagephobia.now.sh/result?p=node-fetch +[discord-image]: https://img.shields.io/discord/619915844268326952?color=%237289DA&label=Discord&style=flat-square +[discord-url]: https://discord.gg/Zxbndcm +[opencollective-image]: https://opencollective.com/node-fetch/backers.svg +[opencollective-url]: https://opencollective.com/node-fetch +[whatwg-fetch]: https://fetch.spec.whatwg.org/ +[response-init]: https://fetch.spec.whatwg.org/#responseinit +[node-readable]: https://nodejs.org/api/stream.html#stream_readable_streams +[mdn-headers]: https://developer.mozilla.org/en-US/docs/Web/API/Headers +[LIMITS.md]: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md +[ERROR-HANDLING.md]: https://github.com/bitinn/node-fetch/blob/master/ERROR-HANDLING.md +[UPGRADE-GUIDE.md]: https://github.com/bitinn/node-fetch/blob/master/UPGRADE-GUIDE.md diff --git a/node_modules/node-fetch/browser.js b/node_modules/node-fetch/browser.js new file mode 100644 index 0000000..83c54c5 --- /dev/null +++ b/node_modules/node-fetch/browser.js @@ -0,0 +1,25 @@ +"use strict"; + +// ref: https://github.com/tc39/proposal-global +var getGlobal = function () { + // the only reliable means to get the global object is + // `Function('return this')()` + // However, this causes CSP violations in Chrome apps. + if (typeof self !== 'undefined') { return self; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + throw new Error('unable to locate global object'); +} + +var global = getGlobal(); + +module.exports = exports = global.fetch; + +// Needed for TypeScript and Webpack. +if (global.fetch) { + exports.default = global.fetch.bind(global); +} + +exports.Headers = global.Headers; +exports.Request = global.Request; +exports.Response = global.Response; \ No newline at end of file diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js new file mode 100644 index 0000000..4852f7c --- /dev/null +++ b/node_modules/node-fetch/lib/index.es.js @@ -0,0 +1,1688 @@ +process.emitWarning("The .es.js file is deprecated. Use .mjs instead."); + +import Stream from 'stream'; +import http from 'http'; +import Url from 'url'; +import whatwgUrl from 'whatwg-url'; +import https from 'https'; +import zlib from 'zlib'; + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +const URL$1 = Url.URL || whatwgUrl.URL; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +export default fetch; +export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js new file mode 100644 index 0000000..e5b04f1 --- /dev/null +++ b/node_modules/node-fetch/lib/index.js @@ -0,0 +1,1697 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(require('stream')); +var http = _interopDefault(require('http')); +var Url = _interopDefault(require('url')); +var whatwgUrl = _interopDefault(require('whatwg-url')); +var https = _interopDefault(require('https')); +var zlib = _interopDefault(require('zlib')); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +const URL$1 = Url.URL || whatwgUrl.URL; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.default = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs new file mode 100644 index 0000000..49ee05e --- /dev/null +++ b/node_modules/node-fetch/lib/index.mjs @@ -0,0 +1,1686 @@ +import Stream from 'stream'; +import http from 'http'; +import Url from 'url'; +import whatwgUrl from 'whatwg-url'; +import https from 'https'; +import zlib from 'zlib'; + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = require('encoding').convert; +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +const URL$1 = Url.URL || whatwgUrl.URL; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +export default fetch; +export { Headers, Request, Response, FetchError }; diff --git a/node_modules/node-fetch/package.json b/node_modules/node-fetch/package.json new file mode 100644 index 0000000..3c1bd8d --- /dev/null +++ b/node_modules/node-fetch/package.json @@ -0,0 +1,76 @@ +{ + "name": "node-fetch", + "version": "2.6.7", + "description": "A light-weight module that brings window.fetch to node.js", + "main": "lib/index.js", + "browser": "./browser.js", + "module": "lib/index.mjs", + "files": [ + "lib/index.js", + "lib/index.mjs", + "lib/index.es.js", + "browser.js" + ], + "engines": { + "node": "4.x || >=6.0.0" + }, + "scripts": { + "build": "cross-env BABEL_ENV=rollup rollup -c", + "prepare": "npm run build", + "test": "cross-env BABEL_ENV=test mocha --require babel-register --throw-deprecation test/test.js", + "report": "cross-env BABEL_ENV=coverage nyc --reporter lcov --reporter text mocha -R spec test/test.js", + "coverage": "cross-env BABEL_ENV=coverage nyc --reporter json --reporter text mocha -R spec test/test.js && codecov -f coverage/coverage-final.json" + }, + "repository": { + "type": "git", + "url": "https://github.com/bitinn/node-fetch.git" + }, + "keywords": [ + "fetch", + "http", + "promise" + ], + "author": "David Frank", + "license": "MIT", + "bugs": { + "url": "https://github.com/bitinn/node-fetch/issues" + }, + "homepage": "https://github.com/bitinn/node-fetch", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + }, + "devDependencies": { + "@ungap/url-search-params": "^0.1.2", + "abort-controller": "^1.1.0", + "abortcontroller-polyfill": "^1.3.0", + "babel-core": "^6.26.3", + "babel-plugin-istanbul": "^4.1.6", + "babel-preset-env": "^1.6.1", + "babel-register": "^6.16.3", + "chai": "^3.5.0", + "chai-as-promised": "^7.1.1", + "chai-iterator": "^1.1.1", + "chai-string": "~1.3.0", + "codecov": "3.3.0", + "cross-env": "^5.2.0", + "form-data": "^2.3.3", + "is-builtin-module": "^1.0.0", + "mocha": "^5.0.0", + "nyc": "11.9.0", + "parted": "^0.1.1", + "promise": "^8.0.3", + "resumer": "0.0.0", + "rollup": "^0.63.4", + "rollup-plugin-babel": "^3.0.7", + "string-to-arraybuffer": "^1.0.2", + "teeny-request": "3.7.0" + } +} diff --git a/node_modules/object-inspect/.eslintrc b/node_modules/object-inspect/.eslintrc new file mode 100644 index 0000000..21f9039 --- /dev/null +++ b/node_modules/object-inspect/.eslintrc @@ -0,0 +1,53 @@ +{ + "root": true, + "extends": "@ljharb", + "rules": { + "complexity": 0, + "func-style": [2, "declaration"], + "indent": [2, 4], + "max-lines": 1, + "max-lines-per-function": 1, + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "no-param-reassign": 1, + "strict": 0, // TODO + }, + "overrides": [ + { + "files": ["test/**", "test-*", "example/**"], + "extends": "@ljharb/eslint-config/tests", + "rules": { + "id-length": 0, + }, + }, + { + "files": ["example/**"], + "rules": { + "no-console": 0, + }, + }, + { + "files": ["test/browser/**"], + "env": { + "browser": true, + }, + }, + { + "files": ["test/bigint*"], + "rules": { + "new-cap": [2, { "capIsNewExceptions": ["BigInt"] }], + }, + }, + { + "files": "index.js", + "globals": { + "HTMLElement": false, + }, + "rules": { + "no-use-before-define": 1, + }, + }, + ], +} diff --git a/node_modules/object-inspect/.github/FUNDING.yml b/node_modules/object-inspect/.github/FUNDING.yml new file mode 100644 index 0000000..730276b --- /dev/null +++ b/node_modules/object-inspect/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/object-inspect +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/object-inspect/.nycrc b/node_modules/object-inspect/.nycrc new file mode 100644 index 0000000..58a5db7 --- /dev/null +++ b/node_modules/object-inspect/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "instrumentation": false, + "sourceMap": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "example", + "test", + "test-core-js.js" + ] +} diff --git a/node_modules/object-inspect/CHANGELOG.md b/node_modules/object-inspect/CHANGELOG.md new file mode 100644 index 0000000..36d1958 --- /dev/null +++ b/node_modules/object-inspect/CHANGELOG.md @@ -0,0 +1,360 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26 + +### Commits + +- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1) +- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c) +- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b) + +## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21 + +### Commits + +- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352) +- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91) +- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1) +- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37) + +## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18 + +### Commits + +- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11) +- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8) +- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36) +- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12) +- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d) + +## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05 + +### Commits + +- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf) +- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6) +- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6) +- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874) +- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7) +- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f) + +## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12 + +### Commits + +- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120) +- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793) + +## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07 + +### Commits + +- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6) +- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611) + +## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5) + +## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17 + +### Commits + +- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91) + +## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17 + +### Commits + +- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7) +- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175) +- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab) +- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09) +- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd) +- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be) +- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223) +- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c) + +## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30 + +### Commits + +- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d) +- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284) +- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9) +- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff) +- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113) +- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210) +- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778) +- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc) +- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456) +- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd) +- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f) +- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab) +- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca) +- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7) + +## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18 + +### Fixed + +- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27) + +### Commits + +- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e) +- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502) +- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d) +- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b) +- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6) +- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3) +- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711) +- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7) +- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a) +- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5) +- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d) +- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088) +- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0) + +## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10 + +### Commits + +- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b) +- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8) +- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6) +- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8) +- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306) +- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d) +- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace) +- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2) +- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81) +- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b) +- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b) +- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead) +- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd) +- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6) +- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2) +- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7) + +## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02 + +### Commits + +- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9) +- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3) +- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f) +- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04) +- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf) +- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f) + +## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25 + +### Commits + +- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4) +- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759) +- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980) + +## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19 + +### Commits + +- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906) +- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3) + +## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24 + +### Commits + +- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70) +- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73) +- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df) +- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529) +- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3) +- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a) + +## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31 + +### Fixed + +- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9) + +### Commits + +- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9) +- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb) +- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185) +- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586) + +## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24 + +### Commits + +- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0) +- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7) +- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3) +- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6) +- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa) +- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264) +- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a) +- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301) +- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69) +- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9) +- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3) +- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261) +- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3) +- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27) +- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a) +- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0) + +## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09 + +### Fixed + +- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7) + +## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09 + +### Fixed + +- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6) + +### Commits + +- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432) + +## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14 + +### Merged + +- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4) + +### Fixed + +- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3) + +### Commits + +- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2) +- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c) + +## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07 + +### Commits + +- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3) +- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457) +- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82) + +## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19 + +### Commits + +- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4) +- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2) +- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a) + +## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05 + +### Commits + +- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299) +- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417) +- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f) +- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca) +- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a) +- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2) +- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b) +- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6) +- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9) +- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48) +- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9) +- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4) +- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75) +- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15) + +## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21 + +### Commits + +- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985) +- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c) + +## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04 + +### Commits + +- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05) + +## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04 + +### Commits + +- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b) + +## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04 + +### Commits + +- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a) +- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6) +- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943) +- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709) +- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79) +- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8) +- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5) +- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990) +- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058) +- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4) + +## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26 + +### Commits + +- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128) +- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5) + +## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26 + +### Commits + +- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998) +- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613) +- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50) +- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3) + +## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26 + +### Commits + +- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b) + +## 0.0.0 - 2013-07-26 + +### Commits + +- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d) +- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f) +- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446) +- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59) +- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8) diff --git a/node_modules/object-inspect/LICENSE b/node_modules/object-inspect/LICENSE new file mode 100644 index 0000000..ca64cc1 --- /dev/null +++ b/node_modules/object-inspect/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2013 James Halliday + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/object-inspect/example/all.js b/node_modules/object-inspect/example/all.js new file mode 100644 index 0000000..2f3355c --- /dev/null +++ b/node_modules/object-inspect/example/all.js @@ -0,0 +1,23 @@ +'use strict'; + +var inspect = require('../'); +var Buffer = require('safer-buffer').Buffer; + +var holes = ['a', 'b']; +holes[4] = 'e'; +holes[6] = 'g'; + +var obj = { + a: 1, + b: [3, 4, undefined, null], + c: undefined, + d: null, + e: { + regex: /^x/i, + buf: Buffer.from('abc'), + holes: holes + }, + now: new Date() +}; +obj.self = obj; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/circular.js b/node_modules/object-inspect/example/circular.js new file mode 100644 index 0000000..487a7c1 --- /dev/null +++ b/node_modules/object-inspect/example/circular.js @@ -0,0 +1,6 @@ +'use strict'; + +var inspect = require('../'); +var obj = { a: 1, b: [3, 4] }; +obj.c = obj; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/fn.js b/node_modules/object-inspect/example/fn.js new file mode 100644 index 0000000..9b5db8d --- /dev/null +++ b/node_modules/object-inspect/example/fn.js @@ -0,0 +1,5 @@ +'use strict'; + +var inspect = require('../'); +var obj = [1, 2, function f(n) { return n + 5; }, 4]; +console.log(inspect(obj)); diff --git a/node_modules/object-inspect/example/inspect.js b/node_modules/object-inspect/example/inspect.js new file mode 100644 index 0000000..e2df7c9 --- /dev/null +++ b/node_modules/object-inspect/example/inspect.js @@ -0,0 +1,10 @@ +'use strict'; + +/* eslint-env browser */ +var inspect = require('../'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }])); diff --git a/node_modules/object-inspect/index.js b/node_modules/object-inspect/index.js new file mode 100644 index 0000000..7ab98a6 --- /dev/null +++ b/node_modules/object-inspect/index.js @@ -0,0 +1,512 @@ +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = require('./util.inspect'); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} diff --git a/node_modules/object-inspect/package-support.json b/node_modules/object-inspect/package-support.json new file mode 100644 index 0000000..5cc12d0 --- /dev/null +++ b/node_modules/object-inspect/package-support.json @@ -0,0 +1,20 @@ +{ + "versions": [ + { + "version": "*", + "target": { + "node": "all" + }, + "response": { + "type": "time-permitting" + }, + "backing": { + "npm-funding": true, + "donations": [ + "https://github.com/ljharb", + "https://tidelift.com/funding/github/npm/object-inspect" + ] + } + } + ] +} diff --git a/node_modules/object-inspect/package.json b/node_modules/object-inspect/package.json new file mode 100644 index 0000000..7e0b87c --- /dev/null +++ b/node_modules/object-inspect/package.json @@ -0,0 +1,94 @@ +{ + "name": "object-inspect", + "version": "1.12.2", + "description": "string representations of objects in node and the browser", + "main": "index.js", + "sideEffects": false, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "error-cause": "^1.0.4", + "es-value-fixtures": "^1.4.1", + "eslint": "=8.8.0", + "for-each": "^0.3.3", + "functions-have-names": "^1.2.3", + "has-tostringtag": "^1.0.0", + "make-arrow-function": "^1.2.0", + "mock-property": "^1.0.0", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "string.prototype.repeat": "^1.0.0", + "tape": "^5.5.3" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run lint", + "lint": "eslint .", + "test": "npm run tests-only && npm run test:corejs", + "tests-only": "nyc tape 'test/*.js'", + "test:corejs": "nyc tape test-core-js.js 'test/*.js'", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": [ + "test/*.js", + "test/browser/*.js" + ], + "browsers": [ + "ie/6..latest", + "chrome/latest", + "firefox/latest", + "safari/latest", + "opera/latest", + "iphone/latest", + "ipad/latest", + "android/latest" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/object-inspect.git" + }, + "homepage": "https://github.com/inspect-js/object-inspect", + "keywords": [ + "inspect", + "util.inspect", + "object", + "stringify", + "pretty" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "browser": { + "./util.inspect.js": false + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "./test-core-js.js" + ] + }, + "support": true +} diff --git a/node_modules/object-inspect/readme.markdown b/node_modules/object-inspect/readme.markdown new file mode 100644 index 0000000..9ff6bec --- /dev/null +++ b/node_modules/object-inspect/readme.markdown @@ -0,0 +1,86 @@ +# object-inspect [![Version Badge][2]][1] + +string representations of objects in node and the browser + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +# example + +## circular + +``` js +var inspect = require('object-inspect'); +var obj = { a: 1, b: [3,4] }; +obj.c = obj; +console.log(inspect(obj)); +``` + +## dom element + +``` js +var inspect = require('object-inspect'); + +var d = document.createElement('div'); +d.setAttribute('id', 'beep'); +d.innerHTML = 'woooiiiii'; + +console.log(inspect([ d, { a: 3, b : 4, c: [5,6,[7,[8,[9]]]] } ])); +``` + +output: + +``` +[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [ ... ] ] ] ] } ] +``` + +# methods + +``` js +var inspect = require('object-inspect') +``` + +## var s = inspect(obj, opts={}) + +Return a string `s` with the string representation of `obj` up to a depth of `opts.depth`. + +Additional options: + - `quoteStyle`: must be "single" or "double", if present. Default `'single'` for strings, `'double'` for HTML elements. + - `maxStringLength`: must be `0`, a positive integer, `Infinity`, or `null`, if present. Default `Infinity`. + - `customInspect`: When `true`, a custom inspect method function will be invoked (either undere the `util.inspect.custom` symbol, or the `inspect` property). When the string `'symbol'`, only the symbol method will be invoked. Default `true`. + - `indent`: must be "\t", `null`, or a positive integer. Default `null`. + - `numericSeparator`: must be a boolean, if present. Default `false`. If `true`, all numbers will be printed with numeric separators (eg, `1234.5678` will be printed as `'1_234.567_8'`) + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install object-inspect +``` + +# license + +MIT + +[1]: https://npmjs.org/package/object-inspect +[2]: https://versionbadg.es/inspect-js/object-inspect.svg +[5]: https://david-dm.org/inspect-js/object-inspect.svg +[6]: https://david-dm.org/inspect-js/object-inspect +[7]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg +[8]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies +[11]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/object-inspect.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg +[downloads-url]: https://npm-stat.com/charts.html?package=object-inspect +[codecov-image]: https://codecov.io/gh/inspect-js/object-inspect/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/object-inspect/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/object-inspect +[actions-url]: https://github.com/inspect-js/object-inspect/actions diff --git a/node_modules/object-inspect/test-core-js.js b/node_modules/object-inspect/test-core-js.js new file mode 100644 index 0000000..e53c400 --- /dev/null +++ b/node_modules/object-inspect/test-core-js.js @@ -0,0 +1,26 @@ +'use strict'; + +require('core-js'); + +var inspect = require('./'); +var test = require('tape'); + +test('Maps', function (t) { + t.equal(inspect(new Map([[1, 2]])), 'Map (1) {1 => 2}'); + t.end(); +}); + +test('WeakMaps', function (t) { + t.equal(inspect(new WeakMap([[{}, 2]])), 'WeakMap { ? }'); + t.end(); +}); + +test('Sets', function (t) { + t.equal(inspect(new Set([[1, 2]])), 'Set (1) {[ 1, 2 ]}'); + t.end(); +}); + +test('WeakSets', function (t) { + t.equal(inspect(new WeakSet([[1, 2]])), 'WeakSet { ? }'); + t.end(); +}); diff --git a/node_modules/object-inspect/test/bigint.js b/node_modules/object-inspect/test/bigint.js new file mode 100644 index 0000000..4ecc31d --- /dev/null +++ b/node_modules/object-inspect/test/bigint.js @@ -0,0 +1,58 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('bigint', { skip: typeof BigInt === 'undefined' }, function (t) { + t.test('primitives', function (st) { + st.plan(3); + + st.equal(inspect(BigInt(-256)), '-256n'); + st.equal(inspect(BigInt(0)), '0n'); + st.equal(inspect(BigInt(256)), '256n'); + }); + + t.test('objects', function (st) { + st.plan(3); + + st.equal(inspect(Object(BigInt(-256))), 'Object(-256n)'); + st.equal(inspect(Object(BigInt(0))), 'Object(0n)'); + st.equal(inspect(Object(BigInt(256))), 'Object(256n)'); + }); + + t.test('syntactic primitives', function (st) { + st.plan(3); + + /* eslint-disable no-new-func */ + st.equal(inspect(Function('return -256n')()), '-256n'); + st.equal(inspect(Function('return 0n')()), '0n'); + st.equal(inspect(Function('return 256n')()), '256n'); + }); + + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { + st.plan(1); + + var faker = {}; + faker[Symbol.toStringTag] = 'BigInt'; + st.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'BigInt\' }', + 'object lying about being a BigInt inspects as an object' + ); + }); + + t.test('numericSeparator', function (st) { + st.equal(inspect(BigInt(0), { numericSeparator: false }), '0n', '0n, numericSeparator false'); + st.equal(inspect(BigInt(0), { numericSeparator: true }), '0n', '0n, numericSeparator true'); + + st.equal(inspect(BigInt(1234), { numericSeparator: false }), '1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(1234), { numericSeparator: true }), '1_234n', '1234n, numericSeparator true'); + st.equal(inspect(BigInt(-1234), { numericSeparator: false }), '-1234n', '1234n, numericSeparator false'); + st.equal(inspect(BigInt(-1234), { numericSeparator: true }), '-1_234n', '1234n, numericSeparator true'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/browser/dom.js b/node_modules/object-inspect/test/browser/dom.js new file mode 100644 index 0000000..210c0b2 --- /dev/null +++ b/node_modules/object-inspect/test/browser/dom.js @@ -0,0 +1,15 @@ +var inspect = require('../../'); +var test = require('tape'); + +test('dom element', function (t) { + t.plan(1); + + var d = document.createElement('div'); + d.setAttribute('id', 'beep'); + d.innerHTML = 'woooiiiii'; + + t.equal( + inspect([d, { a: 3, b: 4, c: [5, 6, [7, [8, [9]]]] }]), + '[
...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]' + ); +}); diff --git a/node_modules/object-inspect/test/circular.js b/node_modules/object-inspect/test/circular.js new file mode 100644 index 0000000..5df4233 --- /dev/null +++ b/node_modules/object-inspect/test/circular.js @@ -0,0 +1,16 @@ +var inspect = require('../'); +var test = require('tape'); + +test('circular', function (t) { + t.plan(2); + var obj = { a: 1, b: [3, 4] }; + obj.c = obj; + t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }'); + + var double = {}; + double.a = [double]; + double.b = {}; + double.b.inner = double.b; + double.b.obj = double; + t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }'); +}); diff --git a/node_modules/object-inspect/test/deep.js b/node_modules/object-inspect/test/deep.js new file mode 100644 index 0000000..99ce32a --- /dev/null +++ b/node_modules/object-inspect/test/deep.js @@ -0,0 +1,12 @@ +var inspect = require('../'); +var test = require('tape'); + +test('deep', function (t) { + t.plan(4); + var obj = [[[[[[500]]]]]]; + t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]'); + t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]'); + t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]'); + + t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]'); +}); diff --git a/node_modules/object-inspect/test/element.js b/node_modules/object-inspect/test/element.js new file mode 100644 index 0000000..47fa9e2 --- /dev/null +++ b/node_modules/object-inspect/test/element.js @@ -0,0 +1,53 @@ +var inspect = require('../'); +var test = require('tape'); + +test('element', function (t) { + t.plan(3); + var elem = { + nodeName: 'div', + attributes: [{ name: 'class', value: 'row' }], + getAttribute: function (key) { return key; }, + childNodes: [] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); + t.deepEqual(inspect(obj, { quoteStyle: 'single' }), "[ 1,
, 3 ]"); + t.deepEqual(inspect(obj, { quoteStyle: 'double' }), '[ 1,
, 3 ]'); +}); + +test('element no attr', function (t) { + t.plan(1); + var elem = { + nodeName: 'div', + getAttribute: function (key) { return key; }, + childNodes: [] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); +}); + +test('element with contents', function (t) { + t.plan(1); + var elem = { + nodeName: 'div', + getAttribute: function (key) { return key; }, + childNodes: [{ nodeName: 'b' }] + }; + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
...
, 3 ]'); +}); + +test('element instance', function (t) { + t.plan(1); + var h = global.HTMLElement; + global.HTMLElement = function (name, attr) { + this.nodeName = name; + this.attributes = attr; + }; + global.HTMLElement.prototype.getAttribute = function () {}; + + var elem = new global.HTMLElement('div', []); + var obj = [1, elem, 3]; + t.deepEqual(inspect(obj), '[ 1,
, 3 ]'); + global.HTMLElement = h; +}); diff --git a/node_modules/object-inspect/test/err.js b/node_modules/object-inspect/test/err.js new file mode 100644 index 0000000..cc1d884 --- /dev/null +++ b/node_modules/object-inspect/test/err.js @@ -0,0 +1,48 @@ +var test = require('tape'); +var ErrorWithCause = require('error-cause/Error'); + +var inspect = require('../'); + +test('type error', function (t) { + t.plan(1); + var aerr = new TypeError(); + aerr.foo = 555; + aerr.bar = [1, 2, 3]; + + var berr = new TypeError('tuv'); + berr.baz = 555; + + var cerr = new SyntaxError(); + cerr.message = 'whoa'; + cerr['a-b'] = 5; + + var withCause = new ErrorWithCause('foo', { cause: 'bar' }); + var withCausePlus = new ErrorWithCause('foo', { cause: 'bar' }); + withCausePlus.foo = 'bar'; + var withUndefinedCause = new ErrorWithCause('foo', { cause: undefined }); + var withEnumerableCause = new Error('foo'); + withEnumerableCause.cause = 'bar'; + + var obj = [ + new TypeError(), + new TypeError('xxx'), + aerr, + berr, + cerr, + withCause, + withCausePlus, + withUndefinedCause, + withEnumerableCause + ]; + t.equal(inspect(obj), '[ ' + [ + '[TypeError]', + '[TypeError: xxx]', + '{ [TypeError] foo: 555, bar: [ 1, 2, 3 ] }', + '{ [TypeError: tuv] baz: 555 }', + '{ [SyntaxError: whoa] message: \'whoa\', \'a-b\': 5 }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: \'bar\' }', + '{ [Error: foo] ' + ('cause' in Error.prototype ? '' : '[cause]: \'bar\', ') + 'foo: \'bar\' }', + 'cause' in Error.prototype ? '[Error: foo]' : '{ [Error: foo] [cause]: undefined }', + '{ [Error: foo] cause: \'bar\' }' + ].join(', ') + ' ]'); +}); diff --git a/node_modules/object-inspect/test/fakes.js b/node_modules/object-inspect/test/fakes.js new file mode 100644 index 0000000..a65c08c --- /dev/null +++ b/node_modules/object-inspect/test/fakes.js @@ -0,0 +1,29 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); +var forEach = require('for-each'); + +test('fakes', { skip: !hasToStringTag }, function (t) { + forEach([ + 'Array', + 'Boolean', + 'Date', + 'Error', + 'Number', + 'RegExp', + 'String' + ], function (expected) { + var faker = {}; + faker[Symbol.toStringTag] = expected; + + t.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'' + expected + '\' }', + 'faker masquerading as ' + expected + ' is not shown as one' + ); + }); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/fn.js b/node_modules/object-inspect/test/fn.js new file mode 100644 index 0000000..de3ca62 --- /dev/null +++ b/node_modules/object-inspect/test/fn.js @@ -0,0 +1,76 @@ +var inspect = require('../'); +var test = require('tape'); +var arrow = require('make-arrow-function')(); +var functionsHaveConfigurableNames = require('functions-have-names').functionsHaveConfigurableNames(); + +test('function', function (t) { + t.plan(1); + var obj = [1, 2, function f(n) { return n; }, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function: f], 4 ]'); +}); + +test('function name', function (t) { + t.plan(1); + var f = (function () { + return function () {}; + }()); + f.toString = function toStr() { return 'function xxx () {}'; }; + var obj = [1, 2, f, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)] { toString: [Function: toStr] }, 4 ]'); +}); + +test('anon function', function (t) { + var f = (function () { + return function () {}; + }()); + var obj = [1, 2, f, 4]; + t.equal(inspect(obj), '[ 1, 2, [Function (anonymous)], 4 ]'); + + t.end(); +}); + +test('arrow function', { skip: !arrow }, function (t) { + t.equal(inspect(arrow), '[Function (anonymous)]'); + + t.end(); +}); + +test('truly nameless function', { skip: !arrow || !functionsHaveConfigurableNames }, function (t) { + function f() {} + Object.defineProperty(f, 'name', { value: false }); + t.equal(f.name, false); + t.equal( + inspect(f), + '[Function: f]', + 'named function with falsy `.name` does not hide its original name' + ); + + function g() {} + Object.defineProperty(g, 'name', { value: true }); + t.equal(g.name, true); + t.equal( + inspect(g), + '[Function: true]', + 'named function with truthy `.name` hides its original name' + ); + + var anon = function () {}; // eslint-disable-line func-style + Object.defineProperty(anon, 'name', { value: null }); + t.equal(anon.name, null); + t.equal( + inspect(anon), + '[Function (anonymous)]', + 'anon function with falsy `.name` does not hide its anonymity' + ); + + var anon2 = function () {}; // eslint-disable-line func-style + Object.defineProperty(anon2, 'name', { value: 1 }); + t.equal(anon2.name, 1); + t.equal( + inspect(anon2), + '[Function: 1]', + 'anon function with truthy `.name` hides its anonymity' + ); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/has.js b/node_modules/object-inspect/test/has.js new file mode 100644 index 0000000..01800de --- /dev/null +++ b/node_modules/object-inspect/test/has.js @@ -0,0 +1,15 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var mockProperty = require('mock-property'); + +test('when Object#hasOwnProperty is deleted', function (t) { + t.plan(1); + var arr = [1, , 3]; // eslint-disable-line no-sparse-arrays + + t.teardown(mockProperty(Array.prototype, 1, { value: 2 })); // this is needed to account for "in" vs "hasOwnProperty" + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + + t.equal(inspect(arr), '[ 1, , 3 ]'); +}); diff --git a/node_modules/object-inspect/test/holes.js b/node_modules/object-inspect/test/holes.js new file mode 100644 index 0000000..87fc8c8 --- /dev/null +++ b/node_modules/object-inspect/test/holes.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var inspect = require('../'); + +var xs = ['a', 'b']; +xs[5] = 'f'; +xs[7] = 'j'; +xs[8] = 'k'; + +test('holes', function (t) { + t.plan(1); + t.equal( + inspect(xs), + "[ 'a', 'b', , , , 'f', , 'j', 'k' ]" + ); +}); diff --git a/node_modules/object-inspect/test/indent-option.js b/node_modules/object-inspect/test/indent-option.js new file mode 100644 index 0000000..89d8fce --- /dev/null +++ b/node_modules/object-inspect/test/indent-option.js @@ -0,0 +1,271 @@ +var test = require('tape'); +var forEach = require('for-each'); + +var inspect = require('../'); + +test('bad indent options', function (t) { + forEach([ + undefined, + true, + false, + -1, + 1.2, + Infinity, + -Infinity, + NaN + ], function (indent) { + t['throws']( + function () { inspect('', { indent: indent }); }, + TypeError, + inspect(indent) + ' is invalid' + ); + }); + + t.end(); +}); + +test('simple object with indent', function (t) { + t.plan(2); + + var obj = { a: 1, b: 2 }; + + var expectedSpaces = [ + '{', + ' a: 1,', + ' b: 2', + '}' + ].join('\n'); + var expectedTabs = [ + '{', + ' a: 1,', + ' b: 2', + '}' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('two deep object with indent', function (t) { + t.plan(2); + + var obj = { a: 1, b: { c: 3, d: 4 } }; + + var expectedSpaces = [ + '{', + ' a: 1,', + ' b: {', + ' c: 3,', + ' d: 4', + ' }', + '}' + ].join('\n'); + var expectedTabs = [ + '{', + ' a: 1,', + ' b: {', + ' c: 3,', + ' d: 4', + ' }', + '}' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('simple array with all single line elements', function (t) { + t.plan(2); + + var obj = [1, 2, 3, 'asdf\nsdf']; + + var expected = '[ 1, 2, 3, \'asdf\\nsdf\' ]'; + + t.equal(inspect(obj, { indent: 2 }), expected, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expected, 'tabs'); +}); + +test('array with complex elements', function (t) { + t.plan(2); + + var obj = [1, { a: 1, b: { c: 1 } }, 'asdf\nsdf']; + + var expectedSpaces = [ + '[', + ' 1,', + ' {', + ' a: 1,', + ' b: {', + ' c: 1', + ' }', + ' },', + ' \'asdf\\nsdf\'', + ']' + ].join('\n'); + var expectedTabs = [ + '[', + ' 1,', + ' {', + ' a: 1,', + ' b: {', + ' c: 1', + ' }', + ' },', + ' \'asdf\\nsdf\'', + ']' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('values', function (t) { + t.plan(2); + var obj = [{}, [], { 'a-b': 5 }]; + + var expectedSpaces = [ + '[', + ' {},', + ' [],', + ' {', + ' \'a-b\': 5', + ' }', + ']' + ].join('\n'); + var expectedTabs = [ + '[', + ' {},', + ' [],', + ' {', + ' \'a-b\': 5', + ' }', + ']' + ].join('\n'); + + t.equal(inspect(obj, { indent: 2 }), expectedSpaces, 'two'); + t.equal(inspect(obj, { indent: '\t' }), expectedTabs, 'tabs'); +}); + +test('Map', { skip: typeof Map !== 'function' }, function (t) { + var map = new Map(); + map.set({ a: 1 }, ['b']); + map.set(3, NaN); + + var expectedStringSpaces = [ + 'Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + '}' + ].join('\n'); + var expectedStringTabs = [ + 'Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + '}' + ].join('\n'); + var expectedStringTabsDoubleQuotes = [ + 'Map (2) {', + ' { a: 1 } => [ "b" ],', + ' 3 => NaN', + '}' + ].join('\n'); + + t.equal( + inspect(map, { indent: 2 }), + expectedStringSpaces, + 'Map keys are not indented (two)' + ); + t.equal( + inspect(map, { indent: '\t' }), + expectedStringTabs, + 'Map keys are not indented (tabs)' + ); + t.equal( + inspect(map, { indent: '\t', quoteStyle: 'double' }), + expectedStringTabsDoubleQuotes, + 'Map keys are not indented (tabs + double quotes)' + ); + + t.equal(inspect(new Map(), { indent: 2 }), 'Map (0) {}', 'empty Map should show as empty (two)'); + t.equal(inspect(new Map(), { indent: '\t' }), 'Map (0) {}', 'empty Map should show as empty (tabs)'); + + var nestedMap = new Map(); + nestedMap.set(nestedMap, map); + var expectedNestedSpaces = [ + 'Map (1) {', + ' [Circular] => Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + ' }', + '}' + ].join('\n'); + var expectedNestedTabs = [ + 'Map (1) {', + ' [Circular] => Map (2) {', + ' { a: 1 } => [ \'b\' ],', + ' 3 => NaN', + ' }', + '}' + ].join('\n'); + t.equal(inspect(nestedMap, { indent: 2 }), expectedNestedSpaces, 'Map containing a Map should work (two)'); + t.equal(inspect(nestedMap, { indent: '\t' }), expectedNestedTabs, 'Map containing a Map should work (tabs)'); + + t.end(); +}); + +test('Set', { skip: typeof Set !== 'function' }, function (t) { + var set = new Set(); + set.add({ a: 1 }); + set.add(['b']); + var expectedStringSpaces = [ + 'Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + '}' + ].join('\n'); + var expectedStringTabs = [ + 'Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + '}' + ].join('\n'); + t.equal(inspect(set, { indent: 2 }), expectedStringSpaces, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (two)'); + t.equal(inspect(set, { indent: '\t' }), expectedStringTabs, 'new Set([{ a: 1 }, ["b"]]) should show size and contents (tabs)'); + + t.equal(inspect(new Set(), { indent: 2 }), 'Set (0) {}', 'empty Set should show as empty (two)'); + t.equal(inspect(new Set(), { indent: '\t' }), 'Set (0) {}', 'empty Set should show as empty (tabs)'); + + var nestedSet = new Set(); + nestedSet.add(set); + nestedSet.add(nestedSet); + var expectedNestedSpaces = [ + 'Set (2) {', + ' Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + ' },', + ' [Circular]', + '}' + ].join('\n'); + var expectedNestedTabs = [ + 'Set (2) {', + ' Set (2) {', + ' {', + ' a: 1', + ' },', + ' [ \'b\' ]', + ' },', + ' [Circular]', + '}' + ].join('\n'); + t.equal(inspect(nestedSet, { indent: 2 }), expectedNestedSpaces, 'Set containing a Set should work (two)'); + t.equal(inspect(nestedSet, { indent: '\t' }), expectedNestedTabs, 'Set containing a Set should work (tabs)'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/inspect.js b/node_modules/object-inspect/test/inspect.js new file mode 100644 index 0000000..1abf81b --- /dev/null +++ b/node_modules/object-inspect/test/inspect.js @@ -0,0 +1,139 @@ +var test = require('tape'); +var hasSymbols = require('has-symbols/shams')(); +var utilInspect = require('../util.inspect'); +var repeat = require('string.prototype.repeat'); + +var inspect = require('..'); + +test('inspect', function (t) { + t.plan(5); + + var obj = [{ inspect: function xyzInspect() { return '!XYZ¡'; } }, []]; + var stringResult = '[ !XYZ¡, [] ]'; + var falseResult = '[ { inspect: [Function: xyzInspect] }, [] ]'; + + t.equal(inspect(obj), stringResult); + t.equal(inspect(obj, { customInspect: true }), stringResult); + t.equal(inspect(obj, { customInspect: 'symbol' }), falseResult); + t.equal(inspect(obj, { customInspect: false }), falseResult); + t['throws']( + function () { inspect(obj, { customInspect: 'not a boolean or "symbol"' }); }, + TypeError, + '`customInspect` must be a boolean or the string "symbol"' + ); +}); + +test('inspect custom symbol', { skip: !hasSymbols || !utilInspect || !utilInspect.custom }, function (t) { + t.plan(4); + + var obj = { inspect: function stringInspect() { return 'string'; } }; + obj[utilInspect.custom] = function custom() { return 'symbol'; }; + + var symbolResult = '[ symbol, [] ]'; + var stringResult = '[ string, [] ]'; + var falseResult = '[ { inspect: [Function: stringInspect]' + (utilInspect.custom ? ', [' + inspect(utilInspect.custom) + ']: [Function: custom]' : '') + ' }, [] ]'; + + var symbolStringFallback = utilInspect.custom ? symbolResult : stringResult; + var symbolFalseFallback = utilInspect.custom ? symbolResult : falseResult; + + t.equal(inspect([obj, []]), symbolStringFallback); + t.equal(inspect([obj, []], { customInspect: true }), symbolStringFallback); + t.equal(inspect([obj, []], { customInspect: 'symbol' }), symbolFalseFallback); + t.equal(inspect([obj, []], { customInspect: false }), falseResult); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + t.plan(2); + + var obj = { a: 1 }; + obj[Symbol('test')] = 2; + obj[Symbol.iterator] = 3; + Object.defineProperty(obj, Symbol('non-enum'), { + enumerable: false, + value: 4 + }); + + if (typeof Symbol.iterator === 'symbol') { + t.equal(inspect(obj), '{ a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }', 'object with symbols'); + t.equal(inspect([obj, []]), '[ { a: 1, [Symbol(test)]: 2, [Symbol(Symbol.iterator)]: 3 }, [] ]', 'object with symbols in array'); + } else { + // symbol sham key ordering is unreliable + t.match( + inspect(obj), + /^(?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 })$/, + 'object with symbols (nondeterministic symbol sham key ordering)' + ); + t.match( + inspect([obj, []]), + /^\[ (?:{ a: 1, \[Symbol\(test\)\]: 2, \[Symbol\(Symbol.iterator\)\]: 3 }|{ a: 1, \[Symbol\(Symbol.iterator\)\]: 3, \[Symbol\(test\)\]: 2 }), \[\] \]$/, + 'object with symbols in array (nondeterministic symbol sham key ordering)' + ); + } +}); + +test('maxStringLength', function (t) { + t['throws']( + function () { inspect('', { maxStringLength: -1 }); }, + TypeError, + 'maxStringLength must be >= 0, or Infinity, not negative' + ); + + var str = repeat('a', 1e8); + + t.equal( + inspect([str], { maxStringLength: 10 }), + '[ \'aaaaaaaaaa\'... 99999990 more characters ]', + 'maxStringLength option limits output' + ); + + t.equal( + inspect(['f'], { maxStringLength: null }), + '[ \'\'... 1 more character ]', + 'maxStringLength option accepts `null`' + ); + + t.equal( + inspect([str], { maxStringLength: Infinity }), + '[ \'' + str + '\' ]', + 'maxStringLength option accepts ∞' + ); + + t.end(); +}); + +test('inspect options', { skip: !utilInspect.custom }, function (t) { + var obj = {}; + obj[utilInspect.custom] = function () { + return JSON.stringify(arguments); + }; + t.equal( + inspect(obj), + utilInspect(obj, { depth: 5 }), + 'custom symbols will use node\'s inspect' + ); + t.equal( + inspect(obj, { depth: 2 }), + utilInspect(obj, { depth: 2 }), + 'a reduced depth will be passed to node\'s inspect' + ); + t.equal( + inspect({ d1: obj }, { depth: 3 }), + '{ d1: ' + utilInspect(obj, { depth: 2 }) + ' }', + 'deep objects will receive a reduced depth' + ); + t.equal( + inspect({ d1: obj }, { depth: 1 }), + '{ d1: [Object] }', + 'unlike nodejs inspect, customInspect will not be used once the depth is exceeded.' + ); + t.end(); +}); + +test('inspect URL', { skip: typeof URL === 'undefined' }, function (t) { + t.match( + inspect(new URL('https://nodejs.org')), + /nodejs\.org/, // Different environments stringify it differently + 'url can be inspected' + ); + t.end(); +}); diff --git a/node_modules/object-inspect/test/lowbyte.js b/node_modules/object-inspect/test/lowbyte.js new file mode 100644 index 0000000..68a345d --- /dev/null +++ b/node_modules/object-inspect/test/lowbyte.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { x: 'a\r\nb', y: '\x05! \x1f \x12' }; + +test('interpolate low bytes', function (t) { + t.plan(1); + t.equal( + inspect(obj), + "{ x: 'a\\r\\nb', y: '\\x05! \\x1F \\x12' }" + ); +}); diff --git a/node_modules/object-inspect/test/number.js b/node_modules/object-inspect/test/number.js new file mode 100644 index 0000000..8f287e8 --- /dev/null +++ b/node_modules/object-inspect/test/number.js @@ -0,0 +1,58 @@ +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); + +var inspect = require('../'); + +test('negative zero', function (t) { + t.equal(inspect(0), '0', 'inspect(0) === "0"'); + t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"'); + + t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"'); + t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"'); + + t.end(); +}); + +test('numericSeparator', function (t) { + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { inspect(true, { numericSeparator: nonBoolean }); }, + TypeError, + inspect(nonBoolean) + ' is not a boolean' + ); + }); + + t.test('3 digit numbers', function (st) { + var failed = false; + for (var i = -999; i < 1000; i += 1) { + var actual = inspect(i); + var actualSepNo = inspect(i, { numericSeparator: false }); + var actualSepYes = inspect(i, { numericSeparator: true }); + var expected = String(i); + if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) { + failed = true; + t.equal(actual, expected); + t.equal(actualSepNo, expected); + t.equal(actualSepYes, expected); + } + } + + st.notOk(failed, 'all 3 digit numbers passed'); + + st.end(); + }); + + t.equal(inspect(1e3), '1000', '1000'); + t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false'); + t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true'); + t.equal(inspect(-1e3), '-1000', '-1000'); + t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false'); + t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true'); + + t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators'); + t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators'); + t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/quoteStyle.js b/node_modules/object-inspect/test/quoteStyle.js new file mode 100644 index 0000000..ae4d734 --- /dev/null +++ b/node_modules/object-inspect/test/quoteStyle.js @@ -0,0 +1,17 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); + +test('quoteStyle option', function (t) { + t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value'); + t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value'); + + t.end(); +}); diff --git a/node_modules/object-inspect/test/toStringTag.js b/node_modules/object-inspect/test/toStringTag.js new file mode 100644 index 0000000..95f8270 --- /dev/null +++ b/node_modules/object-inspect/test/toStringTag.js @@ -0,0 +1,40 @@ +'use strict'; + +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); + +var inspect = require('../'); + +test('Symbol.toStringTag', { skip: !hasToStringTag }, function (t) { + t.plan(4); + + var obj = { a: 1 }; + t.equal(inspect(obj), '{ a: 1 }', 'object, no Symbol.toStringTag'); + + obj[Symbol.toStringTag] = 'foo'; + t.equal(inspect(obj), '{ a: 1, [Symbol(Symbol.toStringTag)]: \'foo\' }', 'object with Symbol.toStringTag'); + + t.test('null objects', { skip: 'toString' in { __proto__: null } }, function (st) { + st.plan(2); + + var dict = { __proto__: null, a: 1 }; + st.equal(inspect(dict), '[Object: null prototype] { a: 1 }', 'null object with Symbol.toStringTag'); + + dict[Symbol.toStringTag] = 'Dict'; + st.equal(inspect(dict), '[Dict: null prototype] { a: 1, [Symbol(Symbol.toStringTag)]: \'Dict\' }', 'null object with Symbol.toStringTag'); + }); + + t.test('instances', function (st) { + st.plan(4); + + function C() { + this.a = 1; + } + st.equal(Object.prototype.toString.call(new C()), '[object Object]', 'instance, no toStringTag, Object.prototype.toString'); + st.equal(inspect(new C()), 'C { a: 1 }', 'instance, no toStringTag'); + + C.prototype[Symbol.toStringTag] = 'Class!'; + st.equal(Object.prototype.toString.call(new C()), '[object Class!]', 'instance, with toStringTag, Object.prototype.toString'); + st.equal(inspect(new C()), 'C [Class!] { a: 1 }', 'instance, with toStringTag'); + }); +}); diff --git a/node_modules/object-inspect/test/undef.js b/node_modules/object-inspect/test/undef.js new file mode 100644 index 0000000..e3f4961 --- /dev/null +++ b/node_modules/object-inspect/test/undef.js @@ -0,0 +1,12 @@ +var test = require('tape'); +var inspect = require('../'); + +var obj = { a: 1, b: [3, 4, undefined, null], c: undefined, d: null }; + +test('undef and null', function (t) { + t.plan(1); + t.equal( + inspect(obj), + '{ a: 1, b: [ 3, 4, undefined, null ], c: undefined, d: null }' + ); +}); diff --git a/node_modules/object-inspect/test/values.js b/node_modules/object-inspect/test/values.js new file mode 100644 index 0000000..4832b9f --- /dev/null +++ b/node_modules/object-inspect/test/values.js @@ -0,0 +1,211 @@ +'use strict'; + +var inspect = require('../'); +var test = require('tape'); +var mockProperty = require('mock-property'); +var hasSymbols = require('has-symbols/shams')(); +var hasToStringTag = require('has-tostringtag/shams')(); + +test('values', function (t) { + t.plan(1); + var obj = [{}, [], { 'a-b': 5 }]; + t.equal(inspect(obj), '[ {}, [], { \'a-b\': 5 } ]'); +}); + +test('arrays with properties', function (t) { + t.plan(1); + var arr = [3]; + arr.foo = 'bar'; + var obj = [1, 2, arr]; + obj.baz = 'quux'; + obj.index = -1; + t.equal(inspect(obj), '[ 1, 2, [ 3, foo: \'bar\' ], baz: \'quux\', index: -1 ]'); +}); + +test('has', function (t) { + t.plan(1); + t.teardown(mockProperty(Object.prototype, 'hasOwnProperty', { 'delete': true })); + + t.equal(inspect({ a: 1, b: 2 }), '{ a: 1, b: 2 }'); +}); + +test('indexOf seen', function (t) { + t.plan(1); + var xs = [1, 2, 3, {}]; + xs.push(xs); + + var seen = []; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[ 1, 2, 3, {}, [Circular] ]' + ); +}); + +test('seen seen', function (t) { + t.plan(1); + var xs = [1, 2, 3]; + + var seen = [xs]; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[Circular]' + ); +}); + +test('seen seen seen', function (t) { + t.plan(1); + var xs = [1, 2, 3]; + + var seen = [5, xs]; + seen.indexOf = undefined; + + t.equal( + inspect(xs, {}, 0, seen), + '[Circular]' + ); +}); + +test('symbols', { skip: !hasSymbols }, function (t) { + var sym = Symbol('foo'); + t.equal(inspect(sym), 'Symbol(foo)', 'Symbol("foo") should be "Symbol(foo)"'); + if (typeof sym === 'symbol') { + // Symbol shams are incapable of differentiating boxed from unboxed symbols + t.equal(inspect(Object(sym)), 'Object(Symbol(foo))', 'Object(Symbol("foo")) should be "Object(Symbol(foo))"'); + } + + t.test('toStringTag', { skip: !hasToStringTag }, function (st) { + st.plan(1); + + var faker = {}; + faker[Symbol.toStringTag] = 'Symbol'; + st.equal( + inspect(faker), + '{ [Symbol(Symbol.toStringTag)]: \'Symbol\' }', + 'object lying about being a Symbol inspects as an object' + ); + }); + + t.end(); +}); + +test('Map', { skip: typeof Map !== 'function' }, function (t) { + var map = new Map(); + map.set({ a: 1 }, ['b']); + map.set(3, NaN); + var expectedString = 'Map (2) {' + inspect({ a: 1 }) + ' => ' + inspect(['b']) + ', 3 => NaN}'; + t.equal(inspect(map), expectedString, 'new Map([[{ a: 1 }, ["b"]], [3, NaN]]) should show size and contents'); + t.equal(inspect(new Map()), 'Map (0) {}', 'empty Map should show as empty'); + + var nestedMap = new Map(); + nestedMap.set(nestedMap, map); + t.equal(inspect(nestedMap), 'Map (1) {[Circular] => ' + expectedString + '}', 'Map containing a Map should work'); + + t.end(); +}); + +test('WeakMap', { skip: typeof WeakMap !== 'function' }, function (t) { + var map = new WeakMap(); + map.set({ a: 1 }, ['b']); + var expectedString = 'WeakMap { ? }'; + t.equal(inspect(map), expectedString, 'new WeakMap([[{ a: 1 }, ["b"]]]) should not show size or contents'); + t.equal(inspect(new WeakMap()), 'WeakMap { ? }', 'empty WeakMap should not show as empty'); + + t.end(); +}); + +test('Set', { skip: typeof Set !== 'function' }, function (t) { + var set = new Set(); + set.add({ a: 1 }); + set.add(['b']); + var expectedString = 'Set (2) {' + inspect({ a: 1 }) + ', ' + inspect(['b']) + '}'; + t.equal(inspect(set), expectedString, 'new Set([{ a: 1 }, ["b"]]) should show size and contents'); + t.equal(inspect(new Set()), 'Set (0) {}', 'empty Set should show as empty'); + + var nestedSet = new Set(); + nestedSet.add(set); + nestedSet.add(nestedSet); + t.equal(inspect(nestedSet), 'Set (2) {' + expectedString + ', [Circular]}', 'Set containing a Set should work'); + + t.end(); +}); + +test('WeakSet', { skip: typeof WeakSet !== 'function' }, function (t) { + var map = new WeakSet(); + map.add({ a: 1 }); + var expectedString = 'WeakSet { ? }'; + t.equal(inspect(map), expectedString, 'new WeakSet([{ a: 1 }]) should not show size or contents'); + t.equal(inspect(new WeakSet()), 'WeakSet { ? }', 'empty WeakSet should not show as empty'); + + t.end(); +}); + +test('WeakRef', { skip: typeof WeakRef !== 'function' }, function (t) { + var ref = new WeakRef({ a: 1 }); + var expectedString = 'WeakRef { ? }'; + t.equal(inspect(ref), expectedString, 'new WeakRef({ a: 1 }) should not show contents'); + + t.end(); +}); + +test('FinalizationRegistry', { skip: typeof FinalizationRegistry !== 'function' }, function (t) { + var registry = new FinalizationRegistry(function () {}); + var expectedString = 'FinalizationRegistry [FinalizationRegistry] {}'; + t.equal(inspect(registry), expectedString, 'new FinalizationRegistry(function () {}) should work normallys'); + + t.end(); +}); + +test('Strings', function (t) { + var str = 'abc'; + + t.equal(inspect(str), "'" + str + "'", 'primitive string shows as such'); + t.equal(inspect(str, { quoteStyle: 'single' }), "'" + str + "'", 'primitive string shows as such, single quoted'); + t.equal(inspect(str, { quoteStyle: 'double' }), '"' + str + '"', 'primitive string shows as such, double quoted'); + t.equal(inspect(Object(str)), 'Object(' + inspect(str) + ')', 'String object shows as such'); + t.equal(inspect(Object(str), { quoteStyle: 'single' }), 'Object(' + inspect(str, { quoteStyle: 'single' }) + ')', 'String object shows as such, single quoted'); + t.equal(inspect(Object(str), { quoteStyle: 'double' }), 'Object(' + inspect(str, { quoteStyle: 'double' }) + ')', 'String object shows as such, double quoted'); + + t.end(); +}); + +test('Numbers', function (t) { + var num = 42; + + t.equal(inspect(num), String(num), 'primitive number shows as such'); + t.equal(inspect(Object(num)), 'Object(' + inspect(num) + ')', 'Number object shows as such'); + + t.end(); +}); + +test('Booleans', function (t) { + t.equal(inspect(true), String(true), 'primitive true shows as such'); + t.equal(inspect(Object(true)), 'Object(' + inspect(true) + ')', 'Boolean object true shows as such'); + + t.equal(inspect(false), String(false), 'primitive false shows as such'); + t.equal(inspect(Object(false)), 'Object(' + inspect(false) + ')', 'Boolean false object shows as such'); + + t.end(); +}); + +test('Date', function (t) { + var now = new Date(); + t.equal(inspect(now), String(now), 'Date shows properly'); + t.equal(inspect(new Date(NaN)), 'Invalid Date', 'Invalid Date shows properly'); + + t.end(); +}); + +test('RegExps', function (t) { + t.equal(inspect(/a/g), '/a/g', 'regex shows properly'); + t.equal(inspect(new RegExp('abc', 'i')), '/abc/i', 'new RegExp shows properly'); + + var match = 'abc abc'.match(/[ab]+/); + delete match.groups; // for node < 10 + t.equal(inspect(match), '[ \'ab\', index: 0, input: \'abc abc\' ]', 'RegExp match object shows properly'); + + t.end(); +}); diff --git a/node_modules/object-inspect/util.inspect.js b/node_modules/object-inspect/util.inspect.js new file mode 100644 index 0000000..7784fab --- /dev/null +++ b/node_modules/object-inspect/util.inspect.js @@ -0,0 +1 @@ +module.exports = require('util').inspect; diff --git a/node_modules/once/LICENSE b/node_modules/once/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/once/README.md b/node_modules/once/README.md new file mode 100644 index 0000000..1f1ffca --- /dev/null +++ b/node_modules/once/README.md @@ -0,0 +1,79 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` + +## `once.strict(func)` + +Throw an error if the function is called twice. + +Some functions are expected to be called only once. Using `once` for them would +potentially hide logical errors. + +In the example below, the `greet` function has to call the callback only once: + +```javascript +function greet (name, cb) { + // return is missing from the if statement + // when no name is passed, the callback is called twice + if (!name) cb('Hello anonymous') + cb('Hello ' + name) +} + +function log (msg) { + console.log(msg) +} + +// this will print 'Hello anonymous' but the logical error will be missed +greet(null, once(msg)) + +// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time +greet(null, once.strict(msg)) +``` diff --git a/node_modules/once/once.js b/node_modules/once/once.js new file mode 100644 index 0000000..2354067 --- /dev/null +++ b/node_modules/once/once.js @@ -0,0 +1,42 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} diff --git a/node_modules/once/package.json b/node_modules/once/package.json new file mode 100644 index 0000000..16815b2 --- /dev/null +++ b/node_modules/once/package.json @@ -0,0 +1,33 @@ +{ + "name": "once", + "version": "1.4.0", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "^7.0.1" + }, + "scripts": { + "test": "tap test/*.js" + }, + "files": [ + "once.js" + ], + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": "Isaac Z. Schlueter (http://blog.izs.me/)", + "license": "ISC" +} diff --git a/node_modules/qs/.editorconfig b/node_modules/qs/.editorconfig new file mode 100644 index 0000000..2f08444 --- /dev/null +++ b/node_modules/qs/.editorconfig @@ -0,0 +1,43 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 160 +quote_type = single + +[test/*] +max_line_length = off + +[LICENSE.md] +indent_size = off + +[*.md] +max_line_length = off + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[LICENSE] +indent_size = 2 +max_line_length = off + +[coverage/**/*] +indent_size = off +indent_style = off +indent = off +max_line_length = off + +[.nycrc] +indent_style = tab diff --git a/node_modules/qs/.eslintrc b/node_modules/qs/.eslintrc new file mode 100644 index 0000000..35220cd --- /dev/null +++ b/node_modules/qs/.eslintrc @@ -0,0 +1,38 @@ +{ + "root": true, + + "extends": "@ljharb", + + "ignorePatterns": [ + "dist/", + ], + + "rules": { + "complexity": 0, + "consistent-return": 1, + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "indent": [2, 4], + "max-lines-per-function": [2, { "max": 150 }], + "max-params": [2, 16], + "max-statements": [2, 53], + "multiline-comment-style": 0, + "no-continue": 1, + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "function-paren-newline": 0, + "max-lines-per-function": 0, + "max-statements": 0, + "no-buffer-constructor": 0, + "no-extend-native": 0, + "no-throw-literal": 0, + }, + }, + ], +} diff --git a/node_modules/qs/.github/FUNDING.yml b/node_modules/qs/.github/FUNDING.yml new file mode 100644 index 0000000..0355f4f --- /dev/null +++ b/node_modules/qs/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/qs +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/qs/.nycrc b/node_modules/qs/.nycrc new file mode 100644 index 0000000..1d57cab --- /dev/null +++ b/node_modules/qs/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "dist" + ] +} diff --git a/node_modules/qs/CHANGELOG.md b/node_modules/qs/CHANGELOG.md new file mode 100644 index 0000000..37b1d3f --- /dev/null +++ b/node_modules/qs/CHANGELOG.md @@ -0,0 +1,546 @@ +## **6.11.0 +- [New] [Fix] `stringify`: revert 0e903c0; add `commaRoundTrip` option (#442) +- [readme] fix version badge + +## **6.10.5** +- [Fix] `stringify`: with `arrayFormat: comma`, properly include an explicit `[]` on a single-item array (#434) + +## **6.10.4** +- [Fix] `stringify`: with `arrayFormat: comma`, include an explicit `[]` on a single-item array (#441) +- [meta] use `npmignore` to autogenerate an npmignore file +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbol`, `object-inspect`, `tape` + +## **6.10.3** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [actions] reuse common workflows +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape` + +## **6.10.2** +- [Fix] `stringify`: actually fix cyclic references (#426) +- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] add note and links for coercing primitive values (#408) +- [actions] update codecov uploader +- [actions] update workflows +- [Tests] clean up stringify tests slightly +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `safe-publish-latest`, `tape` + +## **6.10.1** +- [Fix] `stringify`: avoid exception on repeated object values (#402) + +## **6.10.0** +- [New] `stringify`: throw on cycles, instead of an infinite loop (#395, #394, #393) +- [New] `parse`: add `allowSparse` option for collapsing arrays with missing indices (#312) +- [meta] fix README.md (#399) +- [meta] only run `npm run dist` in publish, not install +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape` +- [Tests] fix tests on node v0.6 +- [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run` +- [Tests] Revert "[meta] ignore eclint transitive audit warning" + +## **6.9.7** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] add note and links for coercing primitive values (#408) +- [Tests] clean up stringify tests slightly +- [meta] fix README.md (#399) +- Revert "[meta] ignore eclint transitive audit warning" +- [actions] backport actions from main +- [Dev Deps] backport updates from main + +## **6.9.6** +- [Fix] restore `dist` dir; mistakenly removed in d4f6c32 + +## **6.9.5** +- [Fix] `stringify`: do not encode parens for RFC1738 +- [Fix] `stringify`: fix arrayFormat comma with empty array/objects (#350) +- [Refactor] `format`: remove `util.assign` call +- [meta] add "Allow Edits" workflow; update rebase workflow +- [actions] switch Automatic Rebase workflow to `pull_request_target` event +- [Tests] `stringify`: add tests for #378 +- [Tests] migrate tests to Github Actions +- [Tests] run `nyc` on all tests; use `tape` runner +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `mkdirp`, `object-inspect`, `tape`; add `aud` + +## **6.9.4** +- [Fix] `stringify`: when `arrayFormat` is `comma`, respect `serializeDate` (#364) +- [Refactor] `stringify`: reduce branching (part of #350) +- [Refactor] move `maybeMap` to `utils` +- [Dev Deps] update `browserify`, `tape` + +## **6.9.3** +- [Fix] proper comma parsing of URL-encoded commas (#361) +- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) + +## **6.9.2** +- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) +- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) +- [meta] ignore eclint transitive audit warning +- [meta] fix indentation in package.json +- [meta] add tidelift marketing copy +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `has-symbols`, `tape`, `mkdirp`, `iconv-lite` +- [actions] add automatic rebasing / merge commit blocking + +## **6.9.1** +- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) +- [Fix] `parse`: with comma true, do not split non-string values (#334) +- [meta] add `funding` field +- [Dev Deps] update `eslint`, `@ljharb/eslint-config` +- [Tests] use shared travis-ci config + +## **6.9.0** +- [New] `parse`/`stringify`: Pass extra key/value argument to `decoder` (#333) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd` +- [Tests] `parse`: add passing `arrayFormat` tests +- [Tests] add `posttest` using `npx aud` to run `npm audit` without a lockfile +- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16` +- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray + +## **6.8.3** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Tests] clean up stringify tests slightly +- [Docs] add note and links for coercing primitive values (#408) +- [meta] fix README.md (#399) +- [actions] backport actions from main +- [Dev Deps] backport updates from main +- [Refactor] `stringify`: reduce branching +- [meta] do not publish workflow files + +## **6.8.2** +- [Fix] proper comma parsing of URL-encoded commas (#361) +- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) + +## **6.8.1** +- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) +- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) +- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) +- [fix] `parse`: with comma true, do not split non-string values (#334) +- [meta] add tidelift marketing copy +- [meta] add `funding` field +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `has-symbols`, `iconv-lite`, `mkdirp`, `object-inspect` +- [Tests] `parse`: add passing `arrayFormat` tests +- [Tests] use shared travis-ci configs +- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray +- [actions] add automatic rebasing / merge commit blocking + +## **6.8.0** +- [New] add `depth=false` to preserve the original key; [Fix] `depth=0` should preserve the original key (#326) +- [New] [Fix] stringify symbols and bigints +- [Fix] ensure node 0.12 can stringify Symbols +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Refactor] `formats`: tiny bit of cleanup. +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `safe-publish-latest`, `iconv-lite`, `tape` +- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended (#326) +- [Tests] use `eclint` instead of `editorconfig-tools` +- [docs] readme: add security note +- [meta] add github sponsorship +- [meta] add FUNDING.yml +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause + +## **6.7.3** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424) +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] add note and links for coercing primitive values (#408) +- [meta] fix README.md (#399) +- [meta] do not publish workflow files +- [actions] backport actions from main +- [Dev Deps] backport updates from main +- [Tests] use `nyc` for coverage +- [Tests] clean up stringify tests slightly + +## **6.7.2** +- [Fix] proper comma parsing of URL-encoded commas (#361) +- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336) + +## **6.7.1** +- [Fix] `parse`: Fix parsing array from object with `comma` true (#359) +- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335) +- [fix] `parse`: with comma true, do not split non-string values (#334) +- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349) +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Refactor] `formats`: tiny bit of cleanup. +- readme: add security note +- [meta] add tidelift marketing copy +- [meta] add `funding` field +- [meta] add FUNDING.yml +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `iconv-lite`, `mkdirp`, `object-inspect`, `browserify` +- [Tests] `parse`: add passing `arrayFormat` tests +- [Tests] use shared travis-ci configs +- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray +- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended +- [Tests] use `eclint` instead of `editorconfig-tools` +- [actions] add automatic rebasing / merge commit blocking + +## **6.7.0** +- [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219) +- [Fix] correctly parse nested arrays (#212) +- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source, also with an array source +- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` +- [Refactor] `utils`: `isBuffer`: small tweak; add tests +- [Refactor] use cached `Array.isArray` +- [Refactor] `parse`/`stringify`: make a function to normalize the options +- [Refactor] `utils`: reduce observable [[Get]]s +- [Refactor] `stringify`/`utils`: cache `Array.isArray` +- [Tests] always use `String(x)` over `x.toString()` +- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 +- [Tests] temporarily allow coverage to fail + +## **6.6.1** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Fix] `utils.merge`: avoid a crash with a null target and an array source +- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source +- [Fix] correctly parse nested arrays +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty` +- [Refactor] `formats`: tiny bit of cleanup. +- [Refactor] `utils`: `isBuffer`: small tweak; add tests +- [Refactor]: `stringify`/`utils`: cache `Array.isArray` +- [Refactor] `utils`: reduce observable [[Get]]s +- [Refactor] use cached `Array.isArray` +- [Refactor] `parse`/`stringify`: make a function to normalize the options +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] Clarify the need for "arrayLimit" option +- [meta] fix README.md (#399) +- [meta] do not publish workflow files +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause +- [meta] add FUNDING.yml +- [meta] Fixes typo in CHANGELOG.md +- [actions] backport actions from main +- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10 +- [Tests] always use `String(x)` over `x.toString()` +- [Dev Deps] backport from main + +## **6.6.0** +- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268) +- [New] move two-value combine to a `utils` function (#189) +- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) +- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` (#260) +- [Fix] `stringify`: do not crash in an obscure combo of `interpretNumericEntities`, a bad custom `decoder`, & `iso-8859-1` +- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided +- [refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) +- [Refactor] `parse`: only need to reassign the var once +- [Refactor] `parse`/`stringify`: clean up `charset` options checking; fix defaults +- [Refactor] add missing defaults +- [Refactor] `parse`: one less `concat` call +- [Refactor] `utils`: `compactQueue`: make it explicitly side-effecting +- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape` +- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS + +## **6.5.3** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source +- [Fix] correctly parse nested arrays +- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) +- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided +- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Fix] `utils.merge`: avoid a crash with a null target and an array source +- [Refactor] `utils`: reduce observable [[Get]]s +- [Refactor] use cached `Array.isArray` +- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) +- [Refactor] `parse`: only need to reassign the var once +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] Clean up license text so it’s properly detected as BSD-3-Clause +- [Docs] Clarify the need for "arrayLimit" option +- [meta] fix README.md (#399) +- [meta] add FUNDING.yml +- [actions] backport actions from main +- [Tests] always use `String(x)` over `x.toString()` +- [Tests] remove nonexistent tape option +- [Dev Deps] backport from main + +## **6.5.2** +- [Fix] use `safer-buffer` instead of `Buffer` constructor +- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230) +- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify` + +## **6.5.1** +- [Fix] Fix parsing & compacting very deep objects (#224) +- [Refactor] name utils functions +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` +- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node +- [Tests] Use precise dist for Node.js 0.6 runtime (#225) +- [Tests] make 0.6 required, now that it’s passing +- [Tests] on `node` `v8.2`; fix npm on node 0.6 + +## **6.5.0** +- [New] add `utils.assign` +- [New] pass default encoder/decoder to custom encoder/decoder functions (#206) +- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213) +- [Fix] Handle stringifying empty objects with addQueryPrefix (#217) +- [Fix] do not mutate `options` argument (#207) +- [Refactor] `parse`: cache index to reuse in else statement (#182) +- [Docs] add various badges to readme (#208) +- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape` +- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4 +- [Tests] add `editorconfig-tools` + +## **6.4.1** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Fix] use `safer-buffer` instead of `Buffer` constructor +- [Fix] `utils.merge`: avoid a crash with a null target and an array source +- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source +- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) +- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided +- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [Refactor] use cached `Array.isArray` +- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) +- [readme] remove travis badge; add github actions/codecov badges; update URLs +- [Docs] Clarify the need for "arrayLimit" option +- [meta] fix README.md (#399) +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause +- [meta] add FUNDING.yml +- [actions] backport actions from main +- [Tests] remove nonexistent tape option +- [Dev Deps] backport from main + +## **6.4.0** +- [New] `qs.stringify`: add `encodeValuesOnly` option +- [Fix] follow `allowPrototypes` option during merge (#201, #201) +- [Fix] support keys starting with brackets (#202, #200) +- [Fix] chmod a-x +- [Dev Deps] update `eslint` +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds +- [eslint] reduce warnings + +## **6.3.3** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix] fix for an impossible situation: when the formatter is called with a non-string value +- [Fix] `utils.merge`: avoid a crash with a null target and an array source +- [Fix]` `utils.merge`: avoid a crash with a null target and a truthy non-array source +- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279) +- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided +- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [Refactor] use cached `Array.isArray` +- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269) +- [Docs] Clarify the need for "arrayLimit" option +- [meta] fix README.md (#399) +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause +- [meta] add FUNDING.yml +- [actions] backport actions from main +- [Tests] use `safer-buffer` instead of `Buffer` constructor +- [Tests] remove nonexistent tape option +- [Dev Deps] backport from main + +## **6.3.2** +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Dev Deps] update `eslint` +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.3.1** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape` +- [Tests] on all node minors; improve test matrix +- [Docs] document stringify option `allowDots` (#195) +- [Docs] add empty object and array values example (#195) +- [Docs] Fix minor inconsistency/typo (#192) +- [Docs] document stringify option `sort` (#191) +- [Refactor] `stringify`: throw faster with an invalid encoder +- [Refactor] remove unnecessary escapes (#184) +- Remove contributing.md, since `qs` is no longer part of `hapi` (#183) + +## **6.3.0** +- [New] Add support for RFC 1738 (#174, #173) +- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159) +- [Fix] ensure `utils.merge` handles merging two arrays +- [Refactor] only constructors should be capitalized +- [Refactor] capitalized var names are for constructors only +- [Refactor] avoid using a sparse array +- [Robustness] `formats`: cache `String#replace` +- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` +- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix +- [Tests] flesh out arrayLimit/arrayFormat tests (#107) +- [Tests] skip Object.create tests when null objects are not available +- [Tests] Turn on eslint for test files (#175) + +## **6.2.4** +- [Fix] `parse`: ignore `__proto__` keys (#428) +- [Fix] `utils.merge`: avoid a crash with a null target and an array source +- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source +- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided +- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` +- [Robustness] `stringify`: avoid relying on a global `undefined` (#427) +- [Refactor] use cached `Array.isArray` +- [Docs] Clarify the need for "arrayLimit" option +- [meta] fix README.md (#399) +- [meta] Clean up license text so it’s properly detected as BSD-3-Clause +- [meta] add FUNDING.yml +- [actions] backport actions from main +- [Tests] use `safer-buffer` instead of `Buffer` constructor +- [Tests] remove nonexistent tape option +- [Dev Deps] backport from main + +## **6.2.3** +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.2.2** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties + +## **6.2.1** +- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values +- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` +- [Tests] remove `parallelshell` since it does not reliably report failures +- [Tests] up to `node` `v6.3`, `v5.12` +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` + +## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) +- [New] pass Buffers to the encoder/decoder directly (#161) +- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) +- [Fix] fix compacting of nested sparse arrays (#150) + +## **6.1.2 +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.1.1** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties + +## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) +- [New] allowDots option for `stringify` (#151) +- [Fix] "sort" option should work at a depth of 3 or more (#151) +- [Fix] Restore `dist` directory; will be removed in v7 (#148) + +## **6.0.4** +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.0.3** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties +- [Fix] Restore `dist` directory; will be removed in v7 (#148) + +## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) +- Revert ES6 requirement and restore support for node down to v0.8. + +## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) +- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json + +## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) +- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 + +## **5.2.1** +- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values + +## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) +- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string + +## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) +- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional +- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify + +## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) +- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false +- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm + +## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) +- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional + +## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) +- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" + +## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) +- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties +- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost +- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing +- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object +- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option +- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. +- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 +- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 +- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign +- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute + +## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) +- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function + +## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) +- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option + +## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) +- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 +- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader + +## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) +- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object + +## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) +- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". + +## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) +- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 + +## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) +- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? +- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 +- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 + +## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) +- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number + +## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) +- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array +- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x + +## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) +- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value +- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty +- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? + +## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) +- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 +- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects + +## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) +- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present +- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays +- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge +- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? + +## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) +- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter + +## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) +- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? +- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit +- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 + +## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) +- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values + +## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) +- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters +- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block + +## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) +- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument +- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed + +## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) +- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted +- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null +- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README + +## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) +- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/node_modules/qs/LICENSE.md b/node_modules/qs/LICENSE.md new file mode 100644 index 0000000..fecf6b6 --- /dev/null +++ b/node_modules/qs/LICENSE.md @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/qs/README.md b/node_modules/qs/README.md new file mode 100644 index 0000000..11be853 --- /dev/null +++ b/node_modules/qs/README.md @@ -0,0 +1,625 @@ +# qs [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A querystring parsing and stringifying library with some added security. + +Lead Maintainer: [Jordan Harband](https://github.com/ljharb) + +The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). + +## Usage + +```javascript +var qs = require('qs'); +var assert = require('assert'); + +var obj = qs.parse('a=c'); +assert.deepEqual(obj, { a: 'c' }); + +var str = qs.stringify(obj); +assert.equal(str, 'a=c'); +``` + +### Parsing Objects + +[](#preventEval) +```javascript +qs.parse(string, [options]); +``` + +**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. +For example, the string `'foo[bar]=baz'` converts to: + +```javascript +assert.deepEqual(qs.parse('foo[bar]=baz'), { + foo: { + bar: 'baz' + } +}); +``` + +When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: + +```javascript +var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); +assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } }); +``` + +By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option. + +```javascript +var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); +assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); +``` + +URI encoded strings work too: + +```javascript +assert.deepEqual(qs.parse('a%5Bb%5D=c'), { + a: { b: 'c' } +}); +``` + +You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: + +```javascript +assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { + foo: { + bar: { + baz: 'foobarbaz' + } + } +}); +``` + +By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like +`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: + +```javascript +var expected = { + a: { + b: { + c: { + d: { + e: { + f: { + '[g][h][i]': 'j' + } + } + } + } + } + } +}; +var string = 'a[b][c][d][e][f][g][h][i]=j'; +assert.deepEqual(qs.parse(string), expected); +``` + +This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: + +```javascript +var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); +assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); +``` + +The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. + +For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: + +```javascript +var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); +assert.deepEqual(limited, { a: 'b' }); +``` + +To bypass the leading question mark, use `ignoreQueryPrefix`: + +```javascript +var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true }); +assert.deepEqual(prefixed, { a: 'b', c: 'd' }); +``` + +An optional delimiter can also be passed: + +```javascript +var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); +assert.deepEqual(delimited, { a: 'b', c: 'd' }); +``` + +Delimiters can be a regular expression too: + +```javascript +var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); +assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); +``` + +Option `allowDots` can be used to enable dot notation: + +```javascript +var withDots = qs.parse('a.b=c', { allowDots: true }); +assert.deepEqual(withDots, { a: { b: 'c' } }); +``` + +If you have to deal with legacy browsers or services, there's +also support for decoding percent-encoded octets as iso-8859-1: + +```javascript +var oldCharset = qs.parse('a=%A7', { charset: 'iso-8859-1' }); +assert.deepEqual(oldCharset, { a: '§' }); +``` + +Some services add an initial `utf8=✓` value to forms so that old +Internet Explorer versions are more likely to submit the form as +utf-8. Additionally, the server can check the value against wrong +encodings of the checkmark character and detect that a query string +or `application/x-www-form-urlencoded` body was *not* sent as +utf-8, eg. if the form had an `accept-charset` parameter or the +containing page had a different character set. + +**qs** supports this mechanism via the `charsetSentinel` option. +If specified, the `utf8` parameter will be omitted from the +returned object. It will be used to switch to `iso-8859-1`/`utf-8` +mode depending on how the checkmark is encoded. + +**Important**: When you specify both the `charset` option and the +`charsetSentinel` option, the `charset` will be overridden when +the request contains a `utf8` parameter from which the actual +charset can be deduced. In that sense the `charset` will behave +as the default charset rather than the authoritative charset. + +```javascript +var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', { + charset: 'iso-8859-1', + charsetSentinel: true +}); +assert.deepEqual(detectedAsUtf8, { a: 'ø' }); + +// Browsers encode the checkmark as ✓ when submitting as iso-8859-1: +var detectedAsIso8859_1 = qs.parse('utf8=%26%2310003%3B&a=%F8', { + charset: 'utf-8', + charsetSentinel: true +}); +assert.deepEqual(detectedAsIso8859_1, { a: 'ø' }); +``` + +If you want to decode the `&#...;` syntax to the actual character, +you can specify the `interpretNumericEntities` option as well: + +```javascript +var detectedAsIso8859_1 = qs.parse('a=%26%239786%3B', { + charset: 'iso-8859-1', + interpretNumericEntities: true +}); +assert.deepEqual(detectedAsIso8859_1, { a: '☺' }); +``` + +It also works when the charset has been detected in `charsetSentinel` +mode. + +### Parsing Arrays + +**qs** can also parse arrays using a similar `[]` notation: + +```javascript +var withArray = qs.parse('a[]=b&a[]=c'); +assert.deepEqual(withArray, { a: ['b', 'c'] }); +``` + +You may specify an index as well: + +```javascript +var withIndexes = qs.parse('a[1]=c&a[0]=b'); +assert.deepEqual(withIndexes, { a: ['b', 'c'] }); +``` + +Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number +to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving +their order: + +```javascript +var noSparse = qs.parse('a[1]=b&a[15]=c'); +assert.deepEqual(noSparse, { a: ['b', 'c'] }); +``` + +You may also use `allowSparse` option to parse sparse arrays: + +```javascript +var sparseArray = qs.parse('a[1]=2&a[3]=5', { allowSparse: true }); +assert.deepEqual(sparseArray, { a: [, '2', , '5'] }); +``` + +Note that an empty string is also a value, and will be preserved: + +```javascript +var withEmptyString = qs.parse('a[]=&a[]=b'); +assert.deepEqual(withEmptyString, { a: ['', 'b'] }); + +var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); +assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); +``` + +**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will +instead be converted to an object with the index as the key. This is needed to handle cases when someone sent, for example, `a[999999999]` and it will take significant time to iterate over this huge array. + +```javascript +var withMaxIndex = qs.parse('a[100]=b'); +assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); +``` + +This limit can be overridden by passing an `arrayLimit` option: + +```javascript +var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); +assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); +``` + +To disable array parsing entirely, set `parseArrays` to `false`. + +```javascript +var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); +assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); +``` + +If you mix notations, **qs** will merge the two items into an object: + +```javascript +var mixedNotation = qs.parse('a[0]=b&a[b]=c'); +assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); +``` + +You can also create arrays of objects: + +```javascript +var arraysOfObjects = qs.parse('a[][b]=c'); +assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); +``` + +Some people use comma to join array, **qs** can parse it: +```javascript +var arraysOfObjects = qs.parse('a=b,c', { comma: true }) +assert.deepEqual(arraysOfObjects, { a: ['b', 'c'] }) +``` +(_this cannot convert nested objects, such as `a={b:1},{c:d}`_) + +### Parsing primitive/scalar values (numbers, booleans, null, etc) + +By default, all values are parsed as strings. This behavior will not change and is explained in [issue #91](https://github.com/ljharb/qs/issues/91). + +```javascript +var primitiveValues = qs.parse('a=15&b=true&c=null'); +assert.deepEqual(primitiveValues, { a: '15', b: 'true', c: 'null' }); +``` + +If you wish to auto-convert values which look like numbers, booleans, and other values into their primitive counterparts, you can use the [query-types Express JS middleware](https://github.com/xpepermint/query-types) which will auto-convert all request query parameters. + +### Stringifying + +[](#preventEval) +```javascript +qs.stringify(object, [options]); +``` + +When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: + +```javascript +assert.equal(qs.stringify({ a: 'b' }), 'a=b'); +assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); +``` + +This encoding can be disabled by setting the `encode` option to `false`: + +```javascript +var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); +assert.equal(unencoded, 'a[b]=c'); +``` + +Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`: +```javascript +var encodedValues = qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true } +); +assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'); +``` + +This encoding can also be replaced by a custom encoding method set as `encoder` option: + +```javascript +var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { + // Passed in values `a`, `b`, `c` + return // Return encoded string +}}) +``` + +_(Note: the `encoder` option does not apply if `encode` is `false`)_ + +Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: + +```javascript +var decoded = qs.parse('x=z', { decoder: function (str) { + // Passed in values `x`, `z` + return // Return decoded string +}}) +``` + +You can encode keys and values using different logic by using the type argument provided to the encoder: + +```javascript +var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str, defaultEncoder, charset, type) { + if (type === 'key') { + return // Encoded key + } else if (type === 'value') { + return // Encoded value + } +}}) +``` + +The type argument is also provided to the decoder: + +```javascript +var decoded = qs.parse('x=z', { decoder: function (str, defaultDecoder, charset, type) { + if (type === 'key') { + return // Decoded key + } else if (type === 'value') { + return // Decoded value + } +}}) +``` + +Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. + +When arrays are stringified, by default they are given explicit indices: + +```javascript +qs.stringify({ a: ['b', 'c', 'd'] }); +// 'a[0]=b&a[1]=c&a[2]=d' +``` + +You may override this by setting the `indices` option to `false`: + +```javascript +qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); +// 'a=b&a=c&a=d' +``` + +You may use the `arrayFormat` option to specify the format of the output array: + +```javascript +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) +// 'a[0]=b&a[1]=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) +// 'a[]=b&a[]=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) +// 'a=b&a=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' }) +// 'a=b,c' +``` + +Note: when using `arrayFormat` set to `'comma'`, you can also pass the `commaRoundTrip` option set to `true` or `false`, to append `[]` on single-item arrays, so that they can round trip through a parse. + +When objects are stringified, by default they use bracket notation: + +```javascript +qs.stringify({ a: { b: { c: 'd', e: 'f' } } }); +// 'a[b][c]=d&a[b][e]=f' +``` + +You may override this to use dot notation by setting the `allowDots` option to `true`: + +```javascript +qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }); +// 'a.b.c=d&a.b.e=f' +``` + +Empty strings and null values will omit the value, but the equals sign (=) remains in place: + +```javascript +assert.equal(qs.stringify({ a: '' }), 'a='); +``` + +Key with no values (such as an empty object or array) will return nothing: + +```javascript +assert.equal(qs.stringify({ a: [] }), ''); +assert.equal(qs.stringify({ a: {} }), ''); +assert.equal(qs.stringify({ a: [{}] }), ''); +assert.equal(qs.stringify({ a: { b: []} }), ''); +assert.equal(qs.stringify({ a: { b: {}} }), ''); +``` + +Properties that are set to `undefined` will be omitted entirely: + +```javascript +assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); +``` + +The query string may optionally be prepended with a question mark: + +```javascript +assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d'); +``` + +The delimiter may be overridden with stringify as well: + +```javascript +assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); +``` + +If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option: + +```javascript +var date = new Date(7); +assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A')); +assert.equal( + qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }), + 'a=7' +); +``` + +You may use the `sort` option to affect the order of parameter keys: + +```javascript +function alphabeticalSort(a, b) { + return a.localeCompare(b); +} +assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y'); +``` + +Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. +If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you +pass an array, it will be used to select properties and array indices for stringification: + +```javascript +function filterFunc(prefix, value) { + if (prefix == 'b') { + // Return an `undefined` value to omit a property. + return; + } + if (prefix == 'e[f]') { + return value.getTime(); + } + if (prefix == 'e[g][0]') { + return value * 2; + } + return value; +} +qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); +// 'a=b&c=d&e[f]=123&e[g][0]=4' +qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); +// 'a=b&e=f' +qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); +// 'a[0]=b&a[2]=d' +``` + +### Handling of `null` values + +By default, `null` values are treated like empty strings: + +```javascript +var withNull = qs.stringify({ a: null, b: '' }); +assert.equal(withNull, 'a=&b='); +``` + +Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings. + +```javascript +var equalsInsensitive = qs.parse('a&b='); +assert.deepEqual(equalsInsensitive, { a: '', b: '' }); +``` + +To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` +values have no `=` sign: + +```javascript +var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); +assert.equal(strictNull, 'a&b='); +``` + +To parse values without `=` back to `null` use the `strictNullHandling` flag: + +```javascript +var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); +assert.deepEqual(parsedStrictNull, { a: null, b: '' }); +``` + +To completely skip rendering keys with `null` values, use the `skipNulls` flag: + +```javascript +var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); +assert.equal(nullsSkipped, 'a=b'); +``` + +If you're communicating with legacy systems, you can switch to `iso-8859-1` +using the `charset` option: + +```javascript +var iso = qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }); +assert.equal(iso, '%E6=%E6'); +``` + +Characters that don't exist in `iso-8859-1` will be converted to numeric +entities, similar to what browsers do: + +```javascript +var numeric = qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }); +assert.equal(numeric, 'a=%26%239786%3B'); +``` + +You can use the `charsetSentinel` option to announce the character by +including an `utf8=✓` parameter with the proper encoding if the checkmark, +similar to what Ruby on Rails and others do when submitting forms. + +```javascript +var sentinel = qs.stringify({ a: '☺' }, { charsetSentinel: true }); +assert.equal(sentinel, 'utf8=%E2%9C%93&a=%E2%98%BA'); + +var isoSentinel = qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }); +assert.equal(isoSentinel, 'utf8=%26%2310003%3B&a=%E6'); +``` + +### Dealing with special character sets + +By default the encoding and decoding of characters is done in `utf-8`, +and `iso-8859-1` support is also built in via the `charset` parameter. + +If you wish to encode querystrings to a different character set (i.e. +[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the +[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: + +```javascript +var encoder = require('qs-iconv/encoder')('shift_jis'); +var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); +assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); +``` + +This also works for decoding of query strings: + +```javascript +var decoder = require('qs-iconv/decoder')('shift_jis'); +var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); +assert.deepEqual(obj, { a: 'こんにちは!' }); +``` + +### RFC 3986 and RFC 1738 space encoding + +RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible. +In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'. + +``` +assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); +assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); +assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); +``` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +## qs for enterprise + +Available as part of the Tidelift Subscription + +The maintainers of qs and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-qs?utm_source=npm-qs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +[package-url]: https://npmjs.org/package/qs +[npm-version-svg]: https://versionbadg.es/ljharb/qs.svg +[deps-svg]: https://david-dm.org/ljharb/qs.svg +[deps-url]: https://david-dm.org/ljharb/qs +[dev-deps-svg]: https://david-dm.org/ljharb/qs/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/qs#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/qs.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/qs.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/qs.svg +[downloads-url]: https://npm-stat.com/charts.html?package=qs +[codecov-image]: https://codecov.io/gh/ljharb/qs/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/qs/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/qs +[actions-url]: https://github.com/ljharb/qs/actions diff --git a/node_modules/qs/dist/qs.js b/node_modules/qs/dist/qs.js new file mode 100644 index 0000000..1c620a4 --- /dev/null +++ b/node_modules/qs/dist/qs.js @@ -0,0 +1,2054 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i -1) { + return val.split(','); + } + + return val; +}; + +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') + +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') + +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; + + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } + } + + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); + } + + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(val); + } + + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } + + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options); + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else if (cleanRoot !== '__proto__') { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options, valuesParsed); +}; + +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; + + return { + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); + } + + if (options.allowSparse === true) { + return obj; + } + + return utils.compact(obj); +}; + +},{"./utils":5}],4:[function(require,module,exports){ +'use strict'; + +var getSideChannel = require('side-channel'); +var utils = require('./utils'); +var formats = require('./formats'); +var has = Object.prototype.hasOwnProperty; + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var isArray = Array.isArray; +var split = String.prototype.split; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + +var toISO = Date.prototype.toISOString; + +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; + +var sentinel = {}; + +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel +) { + var obj = object; + + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + // Where object last appeared in the ref tree + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value'); + } else { + findFlag = true; // Break while + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0; + } + } + + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); + } + + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } + + obj = ''; + } + + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + if (generateArrayPrefix === 'comma' && encodeValuesOnly) { + var valuesArray = split.call(String(obj), ','); + var valuesJoined = ''; + for (var i = 0; i < valuesArray.length; ++i) { + valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format)); + } + return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined]; + } + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; + + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; + + if (skipNulls && value === null) { + continue; + } + + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); + + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + + return values; +}; + +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); + } + format = opts.format; + } + var formatter = formats.formatters[format]; + + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; + } + + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); + + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); + } + var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (options.sort) { + objKeys.sort(options.sort); + } + + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (options.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); + } + + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; + } + } + + return joined.length > 0 ? prefix + joined : ''; +}; + +},{"./formats":1,"./utils":5,"side-channel":16}],5:[function(require,module,exports){ +'use strict'; + +var formats = require('./formats'); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; + +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + compactQueue(queue); + + return value; +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; + +},{"./formats":1}],6:[function(require,module,exports){ + +},{}],7:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBind = require('./'); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + +},{"./":8,"get-intrinsic":11}],8:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + +},{"function-bind":10,"get-intrinsic":11}],9:[function(require,module,exports){ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + +},{}],10:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; + +},{"./implementation":9}],11:[function(require,module,exports){ +'use strict'; + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('has'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + +},{"function-bind":10,"has":14,"has-symbols":12}],12:[function(require,module,exports){ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + +},{"./shams":13}],13:[function(require,module,exports){ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + +},{}],14:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + +},{"function-bind":10}],15:[function(require,module,exports){ +var hasMap = typeof Map === 'function' && Map.prototype; +var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null; +var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null; +var mapForEach = hasMap && Map.prototype.forEach; +var hasSet = typeof Set === 'function' && Set.prototype; +var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null; +var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null; +var setForEach = hasSet && Set.prototype.forEach; +var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype; +var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; +var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype; +var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; +var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype; +var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; +var booleanValueOf = Boolean.prototype.valueOf; +var objectToString = Object.prototype.toString; +var functionToString = Function.prototype.toString; +var $match = String.prototype.match; +var $slice = String.prototype.slice; +var $replace = String.prototype.replace; +var $toUpperCase = String.prototype.toUpperCase; +var $toLowerCase = String.prototype.toLowerCase; +var $test = RegExp.prototype.test; +var $concat = Array.prototype.concat; +var $join = Array.prototype.join; +var $arrSlice = Array.prototype.slice; +var $floor = Math.floor; +var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null; +var gOPS = Object.getOwnPropertySymbols; +var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null; +var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object'; +// ie, `has-tostringtag/shams +var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol') + ? Symbol.toStringTag + : null; +var isEnumerable = Object.prototype.propertyIsEnumerable; + +var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ( + [].__proto__ === Array.prototype // eslint-disable-line no-proto + ? function (O) { + return O.__proto__; // eslint-disable-line no-proto + } + : null +); + +function addNumericSeparator(num, str) { + if ( + num === Infinity + || num === -Infinity + || num !== num + || (num && num > -1000 && num < 1000) + || $test.call(/e/, str) + ) { + return str; + } + var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; + if (typeof num === 'number') { + var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num) + if (int !== num) { + var intStr = String(int); + var dec = $slice.call(str, intStr.length + 1); + return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, ''); + } + } + return $replace.call(str, sepRegex, '$&_'); +} + +var utilInspect = require('./util.inspect'); +var inspectCustom = utilInspect.custom; +var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null; + +module.exports = function inspect_(obj, options, depth, seen) { + var opts = options || {}; + + if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) { + throw new TypeError('option "quoteStyle" must be "single" or "double"'); + } + if ( + has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' + ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity + : opts.maxStringLength !== null + ) + ) { + throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`'); + } + var customInspect = has(opts, 'customInspect') ? opts.customInspect : true; + if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') { + throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`'); + } + + if ( + has(opts, 'indent') + && opts.indent !== null + && opts.indent !== '\t' + && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0) + ) { + throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`'); + } + if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') { + throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); + } + var numericSeparator = opts.numericSeparator; + + if (typeof obj === 'undefined') { + return 'undefined'; + } + if (obj === null) { + return 'null'; + } + if (typeof obj === 'boolean') { + return obj ? 'true' : 'false'; + } + + if (typeof obj === 'string') { + return inspectString(obj, opts); + } + if (typeof obj === 'number') { + if (obj === 0) { + return Infinity / obj > 0 ? '0' : '-0'; + } + var str = String(obj); + return numericSeparator ? addNumericSeparator(obj, str) : str; + } + if (typeof obj === 'bigint') { + var bigIntStr = String(obj) + 'n'; + return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + } + + var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth; + if (typeof depth === 'undefined') { depth = 0; } + if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') { + return isArray(obj) ? '[Array]' : '[Object]'; + } + + var indent = getIndent(opts, depth); + + if (typeof seen === 'undefined') { + seen = []; + } else if (indexOf(seen, obj) >= 0) { + return '[Circular]'; + } + + function inspect(value, from, noIndent) { + if (from) { + seen = $arrSlice.call(seen); + seen.push(from); + } + if (noIndent) { + var newOpts = { + depth: opts.depth + }; + if (has(opts, 'quoteStyle')) { + newOpts.quoteStyle = opts.quoteStyle; + } + return inspect_(value, newOpts, depth + 1, seen); + } + return inspect_(value, opts, depth + 1, seen); + } + + if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + $toLowerCase.call(String(obj.nodeName)); + var attrs = obj.attributes || []; + for (var i = 0; i < attrs.length; i++) { + s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts); + } + s += '>'; + if (obj.childNodes && obj.childNodes.length) { s += '...'; } + s += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + $join.call(xs, ', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) { + return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }'; + } + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) { + return utilInspect(obj, { depth: maxDepth - depth }); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + mapForEach.call(obj, function (value, key) { + mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj)); + }); + return collectionOf('Map', mapSize.call(obj), mapParts, indent); + } + if (isSet(obj)) { + var setParts = []; + setForEach.call(obj, function (value) { + setParts.push(inspect(value, obj)); + }); + return collectionOf('Set', setSize.call(obj), setParts, indent); + } + if (isWeakMap(obj)) { + return weakCollectionOf('WeakMap'); + } + if (isWeakSet(obj)) { + return weakCollectionOf('WeakSet'); + } + if (isWeakRef(obj)) { + return weakCollectionOf('WeakRef'); + } + if (isNumber(obj)) { + return markBoxed(inspect(Number(obj))); + } + if (isBigInt(obj)) { + return markBoxed(inspect(bigIntValueOf.call(obj))); + } + if (isBoolean(obj)) { + return markBoxed(booleanValueOf.call(obj)); + } + if (isString(obj)) { + return markBoxed(inspect(String(obj))); + } + if (!isDate(obj) && !isRegExp(obj)) { + var ys = arrObjKeys(obj, inspect); + var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; + var protoTag = obj instanceof Object ? '' : 'null prototype'; + var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + $join.call(ys, ', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return $replace.call(String(s), /"/g, '"'); +} + +function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } +function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); } + +// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives +function isSymbol(obj) { + if (hasShammedSymbols) { + return obj && typeof obj === 'object' && obj instanceof Symbol; + } + if (typeof obj === 'symbol') { + return true; + } + if (!obj || typeof obj !== 'object' || !symToString) { + return false; + } + try { + symToString.call(obj); + return true; + } catch (e) {} + return false; +} + +function isBigInt(obj) { + if (!obj || typeof obj !== 'object' || !bigIntValueOf) { + return false; + } + try { + bigIntValueOf.call(obj); + return true; + } catch (e) {} + return false; +} + +var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; }; +function has(obj, key) { + return hasOwn.call(obj, key); +} + +function toStr(obj) { + return objectToString.call(obj); +} + +function nameOf(f) { + if (f.name) { return f.name; } + var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); + if (m) { return m[1]; } + return null; +} + +function indexOf(xs, x) { + if (xs.indexOf) { return xs.indexOf(x); } + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) { return i; } + } + return -1; +} + +function isMap(x) { + if (!mapSize || !x || typeof x !== 'object') { + return false; + } + try { + mapSize.call(x); + try { + setSize.call(x); + } catch (s) { + return true; + } + return x instanceof Map; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakMap(x) { + if (!weakMapHas || !x || typeof x !== 'object') { + return false; + } + try { + weakMapHas.call(x, weakMapHas); + try { + weakSetHas.call(x, weakSetHas); + } catch (s) { + return true; + } + return x instanceof WeakMap; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakRef(x) { + if (!weakRefDeref || !x || typeof x !== 'object') { + return false; + } + try { + weakRefDeref.call(x); + return true; + } catch (e) {} + return false; +} + +function isSet(x) { + if (!setSize || !x || typeof x !== 'object') { + return false; + } + try { + setSize.call(x); + try { + mapSize.call(x); + } catch (m) { + return true; + } + return x instanceof Set; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isWeakSet(x) { + if (!weakSetHas || !x || typeof x !== 'object') { + return false; + } + try { + weakSetHas.call(x, weakSetHas); + try { + weakMapHas.call(x, weakMapHas); + } catch (s) { + return true; + } + return x instanceof WeakSet; // core-js workaround, pre-v2.5.0 + } catch (e) {} + return false; +} + +function isElement(x) { + if (!x || typeof x !== 'object') { return false; } + if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) { + return true; + } + return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function'; +} + +function inspectString(str, opts) { + if (str.length > opts.maxStringLength) { + var remaining = str.length - opts.maxStringLength; + var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : ''); + return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte); + return wrapQuotes(s, 'single', opts); +} + +function lowbyte(c) { + var n = c.charCodeAt(0); + var x = { + 8: 'b', + 9: 't', + 10: 'n', + 12: 'f', + 13: 'r' + }[n]; + if (x) { return '\\' + x; } + return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16)); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', '); + return type + ' (' + size + ') {' + joinedEntries + '}'; +} + +function singleLineValues(xs) { + for (var i = 0; i < xs.length; i++) { + if (indexOf(xs[i], '\n') >= 0) { + return false; + } + } + return true; +} + +function getIndent(opts, depth) { + var baseIndent; + if (opts.indent === '\t') { + baseIndent = '\t'; + } else if (typeof opts.indent === 'number' && opts.indent > 0) { + baseIndent = $join.call(Array(opts.indent + 1), ' '); + } else { + return null; + } + return { + base: baseIndent, + prev: $join.call(Array(depth + 1), baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev; +} + +function arrObjKeys(obj, inspect) { + var isArr = isArray(obj); + var xs = []; + if (isArr) { + xs.length = obj.length; + for (var i = 0; i < obj.length; i++) { + xs[i] = has(obj, i) ? inspect(obj[i], obj) : ''; + } + } + var syms = typeof gOPS === 'function' ? gOPS(obj) : []; + var symMap; + if (hasShammedSymbols) { + symMap = {}; + for (var k = 0; k < syms.length; k++) { + symMap['$' + syms[k]] = syms[k]; + } + } + + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue + if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) { + // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section + continue; // eslint-disable-line no-restricted-syntax, no-continue + } else if ($test.call(/[^\w$]/, key)) { + xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj)); + } else { + xs.push(key + ': ' + inspect(obj[key], obj)); + } + } + if (typeof gOPS === 'function') { + for (var j = 0; j < syms.length; j++) { + if (isEnumerable.call(obj, syms[j])) { + xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj)); + } + } + } + return xs; +} + +},{"./util.inspect":6}],16:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var inspect = require('object-inspect'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* + * This function traverses the list returning the node corresponding to the + * given key. + * + * That node is also moved to the head of the list, so that if it's accessed + * again we don't need to traverse the whole list. By doing so, all the recently + * used nodes can be accessed relatively quickly. + */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +module.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + /* + * Initialize the linked list as an empty node, so that we don't have + * to special-case handling of the first node: we can always refer to + * it as (previous node).next, instead of something like (list).head + */ + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; + +},{"call-bind/callBound":7,"get-intrinsic":11,"object-inspect":15}]},{},[2])(2) +}); diff --git a/node_modules/qs/lib/formats.js b/node_modules/qs/lib/formats.js new file mode 100644 index 0000000..f36cf20 --- /dev/null +++ b/node_modules/qs/lib/formats.js @@ -0,0 +1,23 @@ +'use strict'; + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +var Format = { + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; + +module.exports = { + 'default': Format.RFC3986, + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return String(value); + } + }, + RFC1738: Format.RFC1738, + RFC3986: Format.RFC3986 +}; diff --git a/node_modules/qs/lib/index.js b/node_modules/qs/lib/index.js new file mode 100644 index 0000000..0d6a97d --- /dev/null +++ b/node_modules/qs/lib/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var stringify = require('./stringify'); +var parse = require('./parse'); +var formats = require('./formats'); + +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; diff --git a/node_modules/qs/lib/parse.js b/node_modules/qs/lib/parse.js new file mode 100644 index 0000000..a4ac4fa --- /dev/null +++ b/node_modules/qs/lib/parse.js @@ -0,0 +1,263 @@ +'use strict'; + +var utils = require('./utils'); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var defaults = { + allowDots: false, + allowPrototypes: false, + allowSparse: false, + arrayLimit: 20, + charset: 'utf-8', + charsetSentinel: false, + comma: false, + decoder: utils.decode, + delimiter: '&', + depth: 5, + ignoreQueryPrefix: false, + interpretNumericEntities: false, + parameterLimit: 1000, + parseArrays: true, + plainObjects: false, + strictNullHandling: false +}; + +var interpretNumericEntities = function (str) { + return str.replace(/&#(\d+);/g, function ($0, numberStr) { + return String.fromCharCode(parseInt(numberStr, 10)); + }); +}; + +var parseArrayValue = function (val, options) { + if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) { + return val.split(','); + } + + return val; +}; + +// This is what browsers will submit when the ✓ character occurs in an +// application/x-www-form-urlencoded body and the encoding of the page containing +// the form is iso-8859-1, or when the submitted form has an accept-charset +// attribute of iso-8859-1. Presumably also with other charsets that do not contain +// the ✓ character, such as us-ascii. +var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓') + +// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded. +var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓') + +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + var skipIndex = -1; // Keep track of where the utf8 sentinel was found + var i; + + var charset = options.charset; + if (options.charsetSentinel) { + for (i = 0; i < parts.length; ++i) { + if (parts[i].indexOf('utf8=') === 0) { + if (parts[i] === charsetSentinel) { + charset = 'utf-8'; + } else if (parts[i] === isoSentinel) { + charset = 'iso-8859-1'; + } + skipIndex = i; + i = parts.length; // The eslint settings do not allow break; + } + } + } + + for (i = 0; i < parts.length; ++i) { + if (i === skipIndex) { + continue; + } + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder, charset, 'key'); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key'); + val = utils.maybeMap( + parseArrayValue(part.slice(pos + 1), options), + function (encodedVal) { + return options.decoder(encodedVal, defaults.decoder, charset, 'value'); + } + ); + } + + if (val && options.interpretNumericEntities && charset === 'iso-8859-1') { + val = interpretNumericEntities(val); + } + + if (part.indexOf('[]=') > -1) { + val = isArray(val) ? [val] : val; + } + + if (has.call(obj, key)) { + obj[key] = utils.combine(obj[key], val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options, valuesParsed) { + var leaf = valuesParsed ? val : parseArrayValue(val, options); + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]' && options.parseArrays) { + obj = [].concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if (!options.parseArrays && cleanRoot === '') { + obj = { 0: leaf }; + } else if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else if (cleanRoot !== '__proto__') { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = options.depth > 0 && brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options, valuesParsed); +}; + +var normalizeParseOptions = function normalizeParseOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset; + + return { + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes, + allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse, + arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma, + decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder, + delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter, + // eslint-disable-next-line no-implicit-coercion, no-extra-parens + depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth, + ignoreQueryPrefix: opts.ignoreQueryPrefix === true, + interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities, + parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit, + parseArrays: opts.parseArrays !== false, + plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (str, opts) { + var options = normalizeParseOptions(opts); + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string'); + obj = utils.merge(obj, newObj, options); + } + + if (options.allowSparse === true) { + return obj; + } + + return utils.compact(obj); +}; diff --git a/node_modules/qs/lib/stringify.js b/node_modules/qs/lib/stringify.js new file mode 100644 index 0000000..48ec030 --- /dev/null +++ b/node_modules/qs/lib/stringify.js @@ -0,0 +1,326 @@ +'use strict'; + +var getSideChannel = require('side-channel'); +var utils = require('./utils'); +var formats = require('./formats'); +var has = Object.prototype.hasOwnProperty; + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { + return prefix + '[]'; + }, + comma: 'comma', + indices: function indices(prefix, key) { + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { + return prefix; + } +}; + +var isArray = Array.isArray; +var split = String.prototype.split; +var push = Array.prototype.push; +var pushToArray = function (arr, valueOrArray) { + push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]); +}; + +var toISO = Date.prototype.toISOString; + +var defaultFormat = formats['default']; +var defaults = { + addQueryPrefix: false, + allowDots: false, + charset: 'utf-8', + charsetSentinel: false, + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + format: defaultFormat, + formatter: formats.formatters[defaultFormat], + // deprecated + indices: false, + serializeDate: function serializeDate(date) { + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var isNonNullishPrimitive = function isNonNullishPrimitive(v) { + return typeof v === 'string' + || typeof v === 'number' + || typeof v === 'boolean' + || typeof v === 'symbol' + || typeof v === 'bigint'; +}; + +var sentinel = {}; + +var stringify = function stringify( + object, + prefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + sideChannel +) { + var obj = object; + + var tmpSc = sideChannel; + var step = 0; + var findFlag = false; + while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + // Where object last appeared in the ref tree + var pos = tmpSc.get(object); + step += 1; + if (typeof pos !== 'undefined') { + if (pos === step) { + throw new RangeError('Cyclic object value'); + } else { + findFlag = true; // Break while + } + } + if (typeof tmpSc.get(sentinel) === 'undefined') { + step = 0; + } + } + + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (generateArrayPrefix === 'comma' && isArray(obj)) { + obj = utils.maybeMap(obj, function (value) { + if (value instanceof Date) { + return serializeDate(value); + } + return value; + }); + } + + if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix; + } + + obj = ''; + } + + if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format); + if (generateArrayPrefix === 'comma' && encodeValuesOnly) { + var valuesArray = split.call(String(obj), ','); + var valuesJoined = ''; + for (var i = 0; i < valuesArray.length; ++i) { + valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format)); + } + return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined]; + } + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (generateArrayPrefix === 'comma' && isArray(obj)) { + // we need to join elements in + objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }]; + } else if (isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix; + + for (var j = 0; j < objKeys.length; ++j) { + var key = objKeys[j]; + var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key]; + + if (skipNulls && value === null) { + continue; + } + + var keyPrefix = isArray(obj) + ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix + : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']'); + + sideChannel.set(object, step); + var valueSideChannel = getSideChannel(); + valueSideChannel.set(sentinel, sideChannel); + pushToArray(values, stringify( + value, + keyPrefix, + generateArrayPrefix, + commaRoundTrip, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + format, + formatter, + encodeValuesOnly, + charset, + valueSideChannel + )); + } + + return values; +}; + +var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { + if (!opts) { + return defaults; + } + + if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var charset = opts.charset || defaults.charset; + if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') { + throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined'); + } + + var format = formats['default']; + if (typeof opts.format !== 'undefined') { + if (!has.call(formats.formatters, opts.format)) { + throw new TypeError('Unknown format option provided.'); + } + format = opts.format; + } + var formatter = formats.formatters[format]; + + var filter = defaults.filter; + if (typeof opts.filter === 'function' || isArray(opts.filter)) { + filter = opts.filter; + } + + return { + addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix, + allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots, + charset: charset, + charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel, + delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter, + encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode, + encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder, + encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly, + filter: filter, + format: format, + formatter: formatter, + serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate, + skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls, + sort: typeof opts.sort === 'function' ? opts.sort : null, + strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling + }; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = normalizeStringifyOptions(opts); + + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (opts && opts.arrayFormat in arrayPrefixGenerators) { + arrayFormat = opts.arrayFormat; + } else if (opts && 'indices' in opts) { + arrayFormat = opts.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') { + throw new TypeError('`commaRoundTrip` must be a boolean, or absent'); + } + var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (options.sort) { + objKeys.sort(options.sort); + } + + var sideChannel = getSideChannel(); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (options.skipNulls && obj[key] === null) { + continue; + } + pushToArray(keys, stringify( + obj[key], + key, + generateArrayPrefix, + commaRoundTrip, + options.strictNullHandling, + options.skipNulls, + options.encode ? options.encoder : null, + options.filter, + options.sort, + options.allowDots, + options.serializeDate, + options.format, + options.formatter, + options.encodeValuesOnly, + options.charset, + sideChannel + )); + } + + var joined = keys.join(options.delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + if (options.charsetSentinel) { + if (options.charset === 'iso-8859-1') { + // encodeURIComponent('✓'), the "numeric entity" representation of a checkmark + prefix += 'utf8=%26%2310003%3B&'; + } else { + // encodeURIComponent('✓') + prefix += 'utf8=%E2%9C%93&'; + } + } + + return joined.length > 0 ? prefix + joined : ''; +}; diff --git a/node_modules/qs/lib/utils.js b/node_modules/qs/lib/utils.js new file mode 100644 index 0000000..1e54538 --- /dev/null +++ b/node_modules/qs/lib/utils.js @@ -0,0 +1,252 @@ +'use strict'; + +var formats = require('./formats'); + +var has = Object.prototype.hasOwnProperty; +var isArray = Array.isArray; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + while (queue.length > 1) { + var item = queue.pop(); + var obj = item.obj[item.prop]; + + if (isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } +}; + +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +var merge = function merge(target, source, options) { + /* eslint no-param-reassign: 0 */ + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (isArray(target)) { + target.push(source); + } else if (target && typeof target === 'object') { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (!target || typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (isArray(target) && !isArray(source)) { + mergeTarget = arrayToObject(target, options); + } + + if (isArray(target) && isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + var targetItem = target[i]; + if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') { + target[i] = merge(targetItem, item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +var decode = function (str, decoder, charset) { + var strWithoutPlus = str.replace(/\+/g, ' '); + if (charset === 'iso-8859-1') { + // unescape never throws, no try...catch needed: + return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); + } + // utf-8 + try { + return decodeURIComponent(strWithoutPlus); + } catch (e) { + return strWithoutPlus; + } +}; + +var encode = function encode(str, defaultEncoder, charset, kind, format) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = str; + if (typeof str === 'symbol') { + string = Symbol.prototype.toString.call(str); + } else if (typeof str !== 'string') { + string = String(str); + } + + if (charset === 'iso-8859-1') { + return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) { + return '%26%23' + parseInt($0.slice(2), 16) + '%3B'; + }); + } + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( ) + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + compactQueue(queue); + + return value; +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (!obj || typeof obj !== 'object') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +var combine = function combine(a, b) { + return [].concat(a, b); +}; + +var maybeMap = function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) { + mapped.push(fn(val[i])); + } + return mapped; + } + return fn(val); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + combine: combine, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + maybeMap: maybeMap, + merge: merge +}; diff --git a/node_modules/qs/package.json b/node_modules/qs/package.json new file mode 100644 index 0000000..2ff42f3 --- /dev/null +++ b/node_modules/qs/package.json @@ -0,0 +1,77 @@ +{ + "name": "qs", + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "homepage": "https://github.com/ljharb/qs", + "version": "6.11.0", + "repository": { + "type": "git", + "url": "https://github.com/ljharb/qs.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "lib/index.js", + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "keywords": [ + "querystring", + "qs", + "query", + "url", + "parse", + "stringify" + ], + "engines": { + "node": ">=0.6" + }, + "dependencies": { + "side-channel": "^1.0.4" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.0", + "browserify": "^16.5.2", + "eclint": "^2.8.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "has-symbols": "^1.0.3", + "iconv-lite": "^0.5.1", + "in-publish": "^2.0.1", + "mkdirp": "^0.5.5", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "object-inspect": "^1.12.2", + "qs-iconv": "^1.0.4", + "safe-publish-latest": "^2.0.0", + "safer-buffer": "^2.1.2", + "tape": "^5.5.3" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest && npm run dist", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent readme && npm run --silent lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "readme": "evalmd README.md", + "postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "lint": "eslint --ext=js,mjs .", + "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js" + }, + "license": "BSD-3-Clause", + "publishConfig": { + "ignore": [ + "!dist/*", + "bower.json", + "component.json", + ".github/workflows" + ] + } +} diff --git a/node_modules/qs/test/parse.js b/node_modules/qs/test/parse.js new file mode 100644 index 0000000..7d7b4dd --- /dev/null +++ b/node_modules/qs/test/parse.js @@ -0,0 +1,855 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var utils = require('../lib/utils'); +var iconv = require('iconv-lite'); +var SaferBuffer = require('safer-buffer').Buffer; + +test('parse()', function (t) { + t.test('parses a simple string', function (st) { + st.deepEqual(qs.parse('0=foo'), { 0: 'foo' }); + st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); + st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); + st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); + st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); + st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); + st.deepEqual(qs.parse('foo'), { foo: '' }); + st.deepEqual(qs.parse('foo='), { foo: '' }); + st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); + st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); + st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); + st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); + st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); + st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); + st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); + st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { + cht: 'p3', + chd: 't:60,40', + chs: '250x100', + chl: 'Hello|World' + }); + st.end(); + }); + + t.test('arrayFormat: brackets allows only explicit arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'brackets' }), { a: 'b,c' }); + st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'brackets' }), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('arrayFormat: indices allows only indexed arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'indices' }), { a: 'b,c' }); + st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'indices' }), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('arrayFormat: comma allows only comma-separated arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'comma' }), { a: 'b,c' }); + st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'comma' }), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('arrayFormat: repeat allows only repeated values', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b,c', { arrayFormat: 'repeat' }), { a: 'b,c' }); + st.deepEqual(qs.parse('a=b&a=c', { arrayFormat: 'repeat' }), { a: ['b', 'c'] }); + st.end(); + }); + + t.test('allows enabling dot notation', function (st) { + st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); + st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); + t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); + t.deepEqual( + qs.parse('a[b][c][d][e][f][g][h]=i'), + { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, + 'defaults to a depth of 5' + ); + + t.test('only parses one level when depth = 1', function (st) { + st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); + st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); + st.end(); + }); + + t.test('uses original key when depth = 0', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: 0 }), { 'a[0]': 'b', 'a[1]': 'c' }); + st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: 0 }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); + st.end(); + }); + + t.test('uses original key when depth = false', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { depth: false }), { 'a[0]': 'b', 'a[1]': 'c' }); + st.deepEqual(qs.parse('a[0][0]=b&a[0][1]=c&a[1]=d&e=2', { depth: false }), { 'a[0][0]': 'b', 'a[0][1]': 'c', 'a[1]': 'd', e: '2' }); + st.end(); + }); + + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); + + t.test('parses an explicit array', function (st) { + st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); + st.end(); + }); + + t.test('parses a mix of simple and explicit arrays', function (st) { + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); + + st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + + st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + + st.end(); + }); + + t.test('parses a nested array', function (st) { + st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); + st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); + st.end(); + }); + + t.test('allows to specify array indices', function (st) { + st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); + st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] }); + st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } }); + st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); + st.end(); + }); + + t.test('limits specific array indices to arrayLimit', function (st) { + st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } }); + + st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a'), { a: { 21: 'a' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); + + t.test('supports encoded = signs', function (st) { + st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); + st.end(); + }); + + t.test('is ok with url encoded strings', function (st) { + st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); + st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); + st.end(); + }); + + t.test('allows brackets in the value', function (st) { + st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); + st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); + st.end(); + }); + + t.test('allows empty values', function (st) { + st.deepEqual(qs.parse(''), {}); + st.deepEqual(qs.parse(null), {}); + st.deepEqual(qs.parse(undefined), {}); + st.end(); + }); + + t.test('transforms arrays to objects', function (st) { + st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); + st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } }); + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } }); + st.end(); + }); + + t.test('transforms arrays to objects (dot notation)', function (st) { + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); + st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); + st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); + st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.end(); + }); + + t.test('correctly prunes undefined values when converting an array to an object', function (st) { + st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } }); + st.end(); + }); + + t.test('supports malformed uri characters', function (st) { + st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); + st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); + st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); + st.end(); + }); + + t.test('doesn\'t produce empty keys', function (st) { + st.deepEqual(qs.parse('_r=1&'), { _r: '1' }); + st.end(); + }); + + t.test('cannot access Object prototype', function (st) { + qs.parse('constructor[prototype][bad]=bad'); + qs.parse('bad[constructor][prototype][bad]=bad'); + st.equal(typeof Object.prototype.bad, 'undefined'); + st.end(); + }); + + t.test('parses arrays of objects', function (st) { + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); + st.end(); + }); + + t.test('allows for empty strings in arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); + + st.deepEqual( + qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 20 + array indices: null then empty string works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 0 + array brackets: null then empty string works' + ); + + st.deepEqual( + qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 20 + array indices: empty string then null works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 0 + array brackets: empty string then null works' + ); + + st.deepEqual( + qs.parse('a[]=&a[]=b&a[]=c'), + { a: ['', 'b', 'c'] }, + 'array brackets: empty strings work' + ); + st.end(); + }); + + t.test('compacts sparse arrays', function (st) { + st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] }); + st.end(); + }); + + t.test('parses sparse arrays', function (st) { + /* eslint no-sparse-arrays: 0 */ + st.deepEqual(qs.parse('a[4]=1&a[1]=2', { allowSparse: true }), { a: [, '2', , , '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1', { allowSparse: true }), { a: [, { b: [, , { c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1', { allowSparse: true }), { a: [, [, , [, , , { c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { allowSparse: true }), { a: [, [, , [, , , { c: [, '1'] }]]] }); + st.end(); + }); + + t.test('parses semi-parsed strings', function (st) { + st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); + st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); + st.end(); + }); + + t.test('parses buffers correctly', function (st) { + var b = SaferBuffer.from('test'); + st.deepEqual(qs.parse({ a: b }), { a: b }); + st.end(); + }); + + t.test('parses jquery-param strings', function (st) { + // readable = 'filter[0][]=int1&filter[0][]==&filter[0][]=77&filter[]=and&filter[2][]=int2&filter[2][]==&filter[2][]=8' + var encoded = 'filter%5B0%5D%5B%5D=int1&filter%5B0%5D%5B%5D=%3D&filter%5B0%5D%5B%5D=77&filter%5B%5D=and&filter%5B2%5D%5B%5D=int2&filter%5B2%5D%5B%5D=%3D&filter%5B2%5D%5B%5D=8'; + var expected = { filter: [['int1', '=', '77'], 'and', ['int2', '=', '8']] }; + st.deepEqual(qs.parse(encoded), expected); + st.end(); + }); + + t.test('continues parsing when no parent is found', function (st) { + st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); + st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); + st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); + st.end(); + }); + + t.test('does not error when parsing a very long array', function (st) { + var str = 'a[]=a'; + while (Buffer.byteLength(str) < 128 * 1024) { + str = str + '&' + str; + } + + st.doesNotThrow(function () { + qs.parse(str); + }); + + st.end(); + }); + + t.test('should not throw when a native prototype has an enumerable property', function (st) { + Object.prototype.crash = ''; + Array.prototype.crash = ''; + st.doesNotThrow(qs.parse.bind(null, 'a=b')); + st.deepEqual(qs.parse('a=b'), { a: 'b' }); + st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + delete Object.prototype.crash; + delete Array.prototype.crash; + st.end(); + }); + + t.test('parses a string with an alternative string delimiter', function (st) { + st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('parses a string with an alternative RegExp delimiter', function (st) { + st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not use non-splittable objects as delimiters', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding parameter limit', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); + st.end(); + }); + + t.test('allows setting the parameter limit to Infinity', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding array limit', function (st) { + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } }); + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); + st.end(); + }); + + t.test('allows disabling array parsing', function (st) { + var indices = qs.parse('a[0]=b&a[1]=c', { parseArrays: false }); + st.deepEqual(indices, { a: { 0: 'b', 1: 'c' } }); + st.equal(Array.isArray(indices.a), false, 'parseArrays:false, indices case is not an array'); + + var emptyBrackets = qs.parse('a[]=b', { parseArrays: false }); + st.deepEqual(emptyBrackets, { a: { 0: 'b' } }); + st.equal(Array.isArray(emptyBrackets.a), false, 'parseArrays:false, empty brackets case is not an array'); + + st.end(); + }); + + t.test('allows for query string prefix', function (st) { + st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); + st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); + st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' }); + + st.end(); + }); + + t.test('parses an object', function (st) { + var input = { + 'user[name]': { 'pop[bob]': 3 }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses string with comma as array divider', function (st) { + st.deepEqual(qs.parse('foo=bar,tee', { comma: true }), { foo: ['bar', 'tee'] }); + st.deepEqual(qs.parse('foo[bar]=coffee,tee', { comma: true }), { foo: { bar: ['coffee', 'tee'] } }); + st.deepEqual(qs.parse('foo=', { comma: true }), { foo: '' }); + st.deepEqual(qs.parse('foo', { comma: true }), { foo: '' }); + st.deepEqual(qs.parse('foo', { comma: true, strictNullHandling: true }), { foo: null }); + + // test cases inversed from from stringify tests + st.deepEqual(qs.parse('a[0]=c'), { a: ['c'] }); + st.deepEqual(qs.parse('a[]=c'), { a: ['c'] }); + st.deepEqual(qs.parse('a[]=c', { comma: true }), { a: ['c'] }); + + st.deepEqual(qs.parse('a[0]=c&a[1]=d'), { a: ['c', 'd'] }); + st.deepEqual(qs.parse('a[]=c&a[]=d'), { a: ['c', 'd'] }); + st.deepEqual(qs.parse('a=c,d', { comma: true }), { a: ['c', 'd'] }); + + st.end(); + }); + + t.test('parses values with comma as array divider', function (st) { + st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: false }), { foo: 'bar,tee' }); + st.deepEqual(qs.parse({ foo: 'bar,tee' }, { comma: true }), { foo: ['bar', 'tee'] }); + st.end(); + }); + + t.test('use number decoder, parses string that has one number with comma option enabled', function (st) { + var decoder = function (str, defaultDecoder, charset, type) { + if (!isNaN(Number(str))) { + return parseFloat(str); + } + return defaultDecoder(str, defaultDecoder, charset, type); + }; + + st.deepEqual(qs.parse('foo=1', { comma: true, decoder: decoder }), { foo: 1 }); + st.deepEqual(qs.parse('foo=0', { comma: true, decoder: decoder }), { foo: 0 }); + + st.end(); + }); + + t.test('parses brackets holds array of arrays when having two parts of strings with comma as array divider', function (st) { + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=4,5,6', { comma: true }), { foo: [['1', '2', '3'], ['4', '5', '6']] }); + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=', { comma: true }), { foo: [['1', '2', '3'], ''] }); + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=,', { comma: true }), { foo: [['1', '2', '3'], ['', '']] }); + st.deepEqual(qs.parse('foo[]=1,2,3&foo[]=a', { comma: true }), { foo: [['1', '2', '3'], 'a'] }); + + st.end(); + }); + + t.test('parses comma delimited array while having percent-encoded comma treated as normal text', function (st) { + st.deepEqual(qs.parse('foo=a%2Cb', { comma: true }), { foo: 'a,b' }); + st.deepEqual(qs.parse('foo=a%2C%20b,d', { comma: true }), { foo: ['a, b', 'd'] }); + st.deepEqual(qs.parse('foo=a%2C%20b,c%2C%20d', { comma: true }), { foo: ['a, b', 'c, d'] }); + + st.end(); + }); + + t.test('parses an object in dot notation', function (st) { + var input = { + 'user.name': { 'pop[bob]': 3 }, + 'user.email.': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input, { allowDots: true }); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object and not child values', function (st) { + var input = { + 'user[name]': { 'pop[bob]': { test: 3 } }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': { test: 3 } }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.parse('a=b&c=d'); + global.Buffer = tempBuffer; + st.deepEqual(result, { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + var parsed; + + st.doesNotThrow(function () { + parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + st.equal('bar' in parsed.foo, true); + st.equal('baz' in parsed.foo, true); + st.equal(parsed.foo.bar, 'baz'); + st.deepEqual(parsed.foo.baz, a); + st.end(); + }); + + t.test('does not crash when parsing deep objects', function (st) { + var parsed; + var str = 'foo'; + + for (var i = 0; i < 5000; i++) { + str += '[p]'; + } + + str += '=bar'; + + st.doesNotThrow(function () { + parsed = qs.parse(str, { depth: 5000 }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + + var depth = 0; + var ref = parsed.foo; + while ((ref = ref.p)) { + depth += 1; + } + + st.equal(depth, 5000, 'parsed is 5000 properties deep'); + + st.end(); + }); + + t.test('parses null objects correctly', { skip: !Object.create }, function (st) { + var a = Object.create(null); + a.b = 'c'; + + st.deepEqual(qs.parse(a), { b: 'c' }); + var result = qs.parse({ a: a }); + st.equal('a' in result, true, 'result has "a" property'); + st.deepEqual(result.a, a); + st.end(); + }); + + t.test('parses dates correctly', function (st) { + var now = new Date(); + st.deepEqual(qs.parse({ a: now }), { a: now }); + st.end(); + }); + + t.test('parses regular expressions correctly', function (st) { + var re = /^test$/; + st.deepEqual(qs.parse({ a: re }), { a: re }); + st.end(); + }); + + t.test('does not allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {}); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {}); + + st.deepEqual( + qs.parse('toString', { allowPrototypes: false }), + {}, + 'bare "toString" results in {}' + ); + + st.end(); + }); + + t.test('can allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }); + + st.deepEqual( + qs.parse('toString', { allowPrototypes: true }), + { toString: '' }, + 'bare "toString" results in { toString: "" }' + ); + + st.end(); + }); + + t.test('params starting with a closing bracket', function (st) { + st.deepEqual(qs.parse(']=toString'), { ']': 'toString' }); + st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' }); + st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' }); + st.end(); + }); + + t.test('params starting with a starting bracket', function (st) { + st.deepEqual(qs.parse('[=toString'), { '[': 'toString' }); + st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' }); + st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' }); + st.end(); + }); + + t.test('add keys to objects', function (st) { + st.deepEqual( + qs.parse('a[b]=c&a=d'), + { a: { b: 'c', d: true } }, + 'can add keys to objects' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString'), + { a: { b: 'c' } }, + 'can not overwrite prototype' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString', { allowPrototypes: true }), + { a: { b: 'c', toString: true } }, + 'can overwrite prototype with allowPrototypes true' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString', { plainObjects: true }), + { __proto__: null, a: { __proto__: null, b: 'c', toString: true } }, + 'can overwrite prototype with plainObjects true' + ); + + st.end(); + }); + + t.test('dunder proto is ignored', function (st) { + var payload = 'categories[__proto__]=login&categories[__proto__]&categories[length]=42'; + var result = qs.parse(payload, { allowPrototypes: true }); + + st.deepEqual( + result, + { + categories: { + length: '42' + } + }, + 'silent [[Prototype]] payload' + ); + + var plainResult = qs.parse(payload, { allowPrototypes: true, plainObjects: true }); + + st.deepEqual( + plainResult, + { + __proto__: null, + categories: { + __proto__: null, + length: '42' + } + }, + 'silent [[Prototype]] payload: plain objects' + ); + + var query = qs.parse('categories[__proto__]=cats&categories[__proto__]=dogs&categories[some][json]=toInject', { allowPrototypes: true }); + + st.notOk(Array.isArray(query.categories), 'is not an array'); + st.notOk(query.categories instanceof Array, 'is not instanceof an array'); + st.deepEqual(query.categories, { some: { json: 'toInject' } }); + st.equal(JSON.stringify(query.categories), '{"some":{"json":"toInject"}}', 'stringifies as a non-array'); + + st.deepEqual( + qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true }), + { + foo: { + bar: 'stuffs' + } + }, + 'hidden values' + ); + + st.deepEqual( + qs.parse('foo[__proto__][hidden]=value&foo[bar]=stuffs', { allowPrototypes: true, plainObjects: true }), + { + __proto__: null, + foo: { + __proto__: null, + bar: 'stuffs' + } + }, + 'hidden values: plain objects' + ); + + st.end(); + }); + + t.test('can return null objects', { skip: !Object.create }, function (st) { + var expected = Object.create(null); + expected.a = Object.create(null); + expected.a.b = 'c'; + expected.a.hasOwnProperty = 'd'; + st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); + st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); + var expectedArray = Object.create(null); + expectedArray.a = Object.create(null); + expectedArray.a[0] = 'b'; + expectedArray.a.c = 'd'; + st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); + st.end(); + }); + + t.test('can parse with custom encoding', function (st) { + st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { + decoder: function (str) { + var reg = /%([0-9A-F]{2})/ig; + var result = []; + var parts = reg.exec(str); + while (parts) { + result.push(parseInt(parts[1], 16)); + parts = reg.exec(str); + } + return String(iconv.decode(SaferBuffer.from(result), 'shift_jis')); + } + }), { 県: '大阪府' }); + st.end(); + }); + + t.test('receives the default decoder as a second argument', function (st) { + st.plan(1); + qs.parse('a', { + decoder: function (str, defaultDecoder) { + st.equal(defaultDecoder, utils.decode); + } + }); + st.end(); + }); + + t.test('throws error with wrong decoder', function (st) { + st['throws'](function () { + qs.parse({}, { decoder: 'string' }); + }, new TypeError('Decoder has to be a function.')); + st.end(); + }); + + t.test('does not mutate the options argument', function (st) { + var options = {}; + qs.parse('a[b]=true', options); + st.deepEqual(options, {}); + st.end(); + }); + + t.test('throws if an invalid charset is specified', function (st) { + st['throws'](function () { + qs.parse('a=b', { charset: 'foobar' }); + }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); + st.end(); + }); + + t.test('parses an iso-8859-1 string if asked to', function (st) { + st.deepEqual(qs.parse('%A2=%BD', { charset: 'iso-8859-1' }), { '¢': '½' }); + st.end(); + }); + + var urlEncodedCheckmarkInUtf8 = '%E2%9C%93'; + var urlEncodedOSlashInUtf8 = '%C3%B8'; + var urlEncodedNumCheckmark = '%26%2310003%3B'; + var urlEncodedNumSmiley = '%26%239786%3B'; + + t.test('prefers an utf-8 charset specified by the utf8 sentinel to a default charset of iso-8859-1', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'iso-8859-1' }), { ø: 'ø' }); + st.end(); + }); + + t.test('prefers an iso-8859-1 charset specified by the utf8 sentinel to a default charset of utf-8', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { 'ø': 'ø' }); + st.end(); + }); + + t.test('does not require the utf8 sentinel to be defined before the parameters whose decoding it affects', function (st) { + st.deepEqual(qs.parse('a=' + urlEncodedOSlashInUtf8 + '&utf8=' + urlEncodedNumCheckmark, { charsetSentinel: true, charset: 'utf-8' }), { a: 'ø' }); + st.end(); + }); + + t.test('should ignore an utf8 sentinel with an unknown value', function (st) { + st.deepEqual(qs.parse('utf8=foo&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true, charset: 'utf-8' }), { ø: 'ø' }); + st.end(); + }); + + t.test('uses the utf8 sentinel to switch to utf-8 when no default charset is given', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedCheckmarkInUtf8 + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { ø: 'ø' }); + st.end(); + }); + + t.test('uses the utf8 sentinel to switch to iso-8859-1 when no default charset is given', function (st) { + st.deepEqual(qs.parse('utf8=' + urlEncodedNumCheckmark + '&' + urlEncodedOSlashInUtf8 + '=' + urlEncodedOSlashInUtf8, { charsetSentinel: true }), { 'ø': 'ø' }); + st.end(); + }); + + t.test('interprets numeric entities in iso-8859-1 when `interpretNumericEntities`', function (st) { + st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1', interpretNumericEntities: true }), { foo: '☺' }); + st.end(); + }); + + t.test('handles a custom decoder returning `null`, in the `iso-8859-1` charset, when `interpretNumericEntities`', function (st) { + st.deepEqual(qs.parse('foo=&bar=' + urlEncodedNumSmiley, { + charset: 'iso-8859-1', + decoder: function (str, defaultDecoder, charset) { + return str ? defaultDecoder(str, defaultDecoder, charset) : null; + }, + interpretNumericEntities: true + }), { foo: null, bar: '☺' }); + st.end(); + }); + + t.test('does not interpret numeric entities in iso-8859-1 when `interpretNumericEntities` is absent', function (st) { + st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'iso-8859-1' }), { foo: '☺' }); + st.end(); + }); + + t.test('does not interpret numeric entities when the charset is utf-8, even when `interpretNumericEntities`', function (st) { + st.deepEqual(qs.parse('foo=' + urlEncodedNumSmiley, { charset: 'utf-8', interpretNumericEntities: true }), { foo: '☺' }); + st.end(); + }); + + t.test('does not interpret %uXXXX syntax in iso-8859-1 mode', function (st) { + st.deepEqual(qs.parse('%u263A=%u263A', { charset: 'iso-8859-1' }), { '%u263A': '%u263A' }); + st.end(); + }); + + t.test('allows for decoding keys and values differently', function (st) { + var decoder = function (str, defaultDecoder, charset, type) { + if (type === 'key') { + return defaultDecoder(str, defaultDecoder, charset, type).toLowerCase(); + } + if (type === 'value') { + return defaultDecoder(str, defaultDecoder, charset, type).toUpperCase(); + } + throw 'this should never happen! type: ' + type; + }; + + st.deepEqual(qs.parse('KeY=vAlUe', { decoder: decoder }), { key: 'VALUE' }); + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/qs/test/stringify.js b/node_modules/qs/test/stringify.js new file mode 100644 index 0000000..f0cdfef --- /dev/null +++ b/node_modules/qs/test/stringify.js @@ -0,0 +1,909 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var utils = require('../lib/utils'); +var iconv = require('iconv-lite'); +var SaferBuffer = require('safer-buffer').Buffer; +var hasSymbols = require('has-symbols'); +var hasBigInt = typeof BigInt === 'function'; + +test('stringify()', function (t) { + t.test('stringifies a querystring object', function (st) { + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: 1 }), 'a=1'); + st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); + st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); + st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); + st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); + st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); + st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); + st.end(); + }); + + t.test('stringifies falsy values', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(null, { strictNullHandling: true }), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(0), ''); + st.end(); + }); + + t.test('stringifies symbols', { skip: !hasSymbols() }, function (st) { + st.equal(qs.stringify(Symbol.iterator), ''); + st.equal(qs.stringify([Symbol.iterator]), '0=Symbol%28Symbol.iterator%29'); + st.equal(qs.stringify({ a: Symbol.iterator }), 'a=Symbol%28Symbol.iterator%29'); + st.equal( + qs.stringify({ a: [Symbol.iterator] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[]=Symbol%28Symbol.iterator%29' + ); + st.end(); + }); + + t.test('stringifies bigints', { skip: !hasBigInt }, function (st) { + var three = BigInt(3); + var encodeWithN = function (value, defaultEncoder, charset) { + var result = defaultEncoder(value, defaultEncoder, charset); + return typeof value === 'bigint' ? result + 'n' : result; + }; + st.equal(qs.stringify(three), ''); + st.equal(qs.stringify([three]), '0=3'); + st.equal(qs.stringify([three], { encoder: encodeWithN }), '0=3n'); + st.equal(qs.stringify({ a: three }), 'a=3'); + st.equal(qs.stringify({ a: three }, { encoder: encodeWithN }), 'a=3n'); + st.equal( + qs.stringify({ a: [three] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[]=3' + ); + st.equal( + qs.stringify({ a: [three] }, { encodeValuesOnly: true, encoder: encodeWithN, arrayFormat: 'brackets' }), + 'a[]=3n' + ); + st.end(); + }); + + t.test('adds query prefix', function (st) { + st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); + st.end(); + }); + + t.test('with query prefix, outputs blank string given an empty object', function (st) { + st.equal(qs.stringify({}, { addQueryPrefix: true }), ''); + st.end(); + }); + + t.test('stringifies nested falsy values', function (st) { + st.equal(qs.stringify({ a: { b: { c: null } } }), 'a%5Bb%5D%5Bc%5D='); + st.equal(qs.stringify({ a: { b: { c: null } } }, { strictNullHandling: true }), 'a%5Bb%5D%5Bc%5D'); + st.equal(qs.stringify({ a: { b: { c: false } } }), 'a%5Bb%5D%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies a nested object', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies a nested object with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); + st.end(); + }); + + t.test('stringifies an array value', function (st) { + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }), + 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }), + 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma' }), + 'a=b%2Cc%2Cd', + 'comma => comma' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }), + 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', + 'default => indices' + ); + st.end(); + }); + + t.test('omits nulls when asked', function (st) { + st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); + st.end(); + }); + + t.test('omits nested nulls when asked', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('omits array indices when asked', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); + st.end(); + }); + + t.test('stringifies an array value with one item vs multiple items', function (st) { + st.test('non-array item', function (s2t) { + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c'); + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=c'); + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); + s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true }), 'a=c'); + + s2t.end(); + }); + + st.test('array with a single item', function (s2t) { + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c'); + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c'); + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c'); + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a[]=c'); // so it parses back as an array + s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true }), 'a[0]=c'); + + s2t.end(); + }); + + st.test('array with multiple items', function (s2t) { + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c&a[1]=d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c&a[]=d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c,d'); + s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true }), 'a[0]=c&a[1]=d'); + + s2t.end(); + }); + + st.end(); + }); + + t.test('stringifies a nested array value', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[b][0]=c&a[b][1]=d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[b][]=c&a[b][]=d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a[b]=c,d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true }), 'a[b][0]=c&a[b][1]=d'); + st.end(); + }); + + t.test('stringifies a nested array value with dots notation', function (st) { + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true, arrayFormat: 'indices' } + ), + 'a.b[0]=c&a.b[1]=d', + 'indices: stringifies with dots + indices' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true, arrayFormat: 'brackets' } + ), + 'a.b[]=c&a.b[]=d', + 'brackets: stringifies with dots + brackets' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true, arrayFormat: 'comma' } + ), + 'a.b=c,d', + 'comma: stringifies with dots + comma' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encodeValuesOnly: true } + ), + 'a.b[0]=c&a.b[1]=d', + 'default: stringifies with dots + indices' + ); + st.end(); + }); + + t.test('stringifies an object inside an array', function (st) { + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices' }), + 'a%5B0%5D%5Bb%5D=c', // a[0][b]=c + 'indices => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets' }), + 'a%5B%5D%5Bb%5D=c', // a[][b]=c + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }), + 'a%5B0%5D%5Bb%5D=c', + 'default => indices' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices' }), + 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1', + 'indices => indices' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets' }), + 'a%5B%5D%5Bb%5D%5Bc%5D%5B%5D=1', + 'brackets => brackets' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }), + 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1', + 'default => indices' + ); + + st.end(); + }); + + t.test('stringifies an array with mixed objects and primitives', function (st) { + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), + 'a[0][b]=1&a[1]=2&a[2]=3', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), + 'a[][b]=1&a[]=2&a[]=3', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), + '???', + 'brackets => brackets', + { skip: 'TODO: figure out what this should do' } + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encodeValuesOnly: true }), + 'a[0][b]=1&a[1]=2&a[2]=3', + 'default => indices' + ); + + st.end(); + }); + + t.test('stringifies an object inside an array with dots notation', function (st) { + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a[0].b=c', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a[].b=c', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false } + ), + 'a[0].b=c', + 'default => indices' + ); + + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a[0].b.c[0]=1', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a[].b.c[]=1', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false } + ), + 'a[0].b.c[0]=1', + 'default => indices' + ); + + st.end(); + }); + + t.test('does not omit object keys when indices = false', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when indices=true', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); + st.end(); + }); + + t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); + st.end(); + }); + + t.test('stringifies a complicated object', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies an empty value', function (st) { + st.equal(qs.stringify({ a: '' }), 'a='); + st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); + + st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); + st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); + + st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); + + st.end(); + }); + + t.test('stringifies an empty array in different arrayFormat', function (st) { + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false }), 'b[0]=&c=c'); + // arrayFormat default + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices' }), 'b[0]=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets' }), 'b[]=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat' }), 'b=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma' }), 'b=&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', commaRoundTrip: true }), 'b[]=&c=c'); + // with strictNullHandling + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', strictNullHandling: true }), 'b[0]&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', strictNullHandling: true }), 'b[]&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', strictNullHandling: true }), 'b&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true }), 'b&c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true, commaRoundTrip: true }), 'b[]&c=c'); + // with skipNulls + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', skipNulls: true }), 'c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', skipNulls: true }), 'c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', skipNulls: true }), 'c=c'); + st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', skipNulls: true }), 'c=c'); + + st.end(); + }); + + t.test('stringifies a null object', { skip: !Object.create }, function (st) { + var obj = Object.create(null); + obj.a = 'b'; + st.equal(qs.stringify(obj), 'a=b'); + st.end(); + }); + + t.test('returns an empty string for invalid input', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(''), ''); + st.end(); + }); + + t.test('stringifies an object with a null object as a child', { skip: !Object.create }, function (st) { + var obj = { a: Object.create(null) }; + + obj.a.b = 'c'; + st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('drops keys with a value of undefined', function (st) { + st.equal(qs.stringify({ a: undefined }), ''); + + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); + st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); + st.end(); + }); + + t.test('url encodes values', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); + }); + + t.test('stringifies a date', function (st) { + var now = new Date(); + var str = 'a=' + encodeURIComponent(now.toISOString()); + st.equal(qs.stringify({ a: now }), str); + st.end(); + }); + + t.test('stringifies the weird object from qs', function (st) { + st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); + st.end(); + }); + + t.test('skips properties that are part of the object prototype', function (st) { + Object.prototype.crash = 'test'; + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + delete Object.prototype.crash; + st.end(); + }); + + t.test('stringifies boolean values', function (st) { + st.equal(qs.stringify({ a: true }), 'a=true'); + st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); + st.equal(qs.stringify({ b: false }), 'b=false'); + st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies buffer values', function (st) { + st.equal(qs.stringify({ a: SaferBuffer.from('test') }), 'a=test'); + st.equal(qs.stringify({ a: { b: SaferBuffer.from('test') } }), 'a%5Bb%5D=test'); + st.end(); + }); + + t.test('stringifies an object using an alternative delimiter', function (st) { + st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.stringify({ a: 'b', c: 'd' }); + global.Buffer = tempBuffer; + st.equal(result, 'a=b&c=d'); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + st['throws']( + function () { qs.stringify({ 'foo[bar]': 'baz', 'foo[baz]': a }); }, + /RangeError: Cyclic object value/, + 'cyclic values throw' + ); + + var circular = { + a: 'value' + }; + circular.a = circular; + st['throws']( + function () { qs.stringify(circular); }, + /RangeError: Cyclic object value/, + 'cyclic values throw' + ); + + var arr = ['a']; + st.doesNotThrow( + function () { qs.stringify({ x: arr, y: arr }); }, + 'non-cyclic values do not throw' + ); + + st.end(); + }); + + t.test('non-circular duplicated references can still work', function (st) { + var hourOfDay = { + 'function': 'hour_of_day' + }; + + var p1 = { + 'function': 'gte', + arguments: [hourOfDay, 0] + }; + var p2 = { + 'function': 'lte', + arguments: [hourOfDay, 23] + }; + + st.equal( + qs.stringify({ filters: { $and: [p1, p2] } }, { encodeValuesOnly: true }), + 'filters[$and][0][function]=gte&filters[$and][0][arguments][0][function]=hour_of_day&filters[$and][0][arguments][1]=0&filters[$and][1][function]=lte&filters[$and][1][arguments][0][function]=hour_of_day&filters[$and][1][arguments][1]=23' + ); + + st.end(); + }); + + t.test('selects properties when filter=array', function (st) { + st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); + st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); + + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' } + ), + 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' } + ), + 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2] } + ), + 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', + 'default => indices' + ); + + st.end(); + }); + + t.test('supports custom representations when filter=function', function (st) { + var calls = 0; + var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; + var filterFunc = function (prefix, value) { + calls += 1; + if (calls === 1) { + st.equal(prefix, '', 'prefix is empty'); + st.equal(value, obj); + } else if (prefix === 'c') { + return void 0; + } else if (value instanceof Date) { + st.equal(prefix, 'e[f]'); + return value.getTime(); + } + return value; + }; + + st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); + st.equal(calls, 5); + st.end(); + }); + + t.test('can disable uri encoding', function (st) { + st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); + st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); + st.end(); + }); + + t.test('can sort the keys', function (st) { + var sort = function (a, b) { + return a.localeCompare(b); + }; + st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); + st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); + st.end(); + }); + + t.test('can sort the keys at depth 3 or more too', function (st) { + var sort = function (a, b) { + return a.localeCompare(b); + }; + st.equal( + qs.stringify( + { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, + { sort: sort, encode: false } + ), + 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb' + ); + st.equal( + qs.stringify( + { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, + { sort: null, encode: false } + ), + 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b' + ); + st.end(); + }); + + t.test('can stringify with custom encoding', function (st) { + st.equal(qs.stringify({ 県: '大阪府', '': '' }, { + encoder: function (str) { + if (str.length === 0) { + return ''; + } + var buf = iconv.encode(str, 'shiftjis'); + var result = []; + for (var i = 0; i < buf.length; ++i) { + result.push(buf.readUInt8(i).toString(16)); + } + return '%' + result.join('%'); + } + }), '%8c%a7=%91%e5%8d%e3%95%7b&='); + st.end(); + }); + + t.test('receives the default encoder as a second argument', function (st) { + st.plan(2); + qs.stringify({ a: 1 }, { + encoder: function (str, defaultEncoder) { + st.equal(defaultEncoder, utils.encode); + } + }); + st.end(); + }); + + t.test('throws error with wrong encoder', function (st) { + st['throws'](function () { + qs.stringify({}, { encoder: 'string' }); + }, new TypeError('Encoder has to be a function.')); + st.end(); + }); + + t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) { + st.equal(qs.stringify({ a: SaferBuffer.from([1]) }, { + encoder: function (buffer) { + if (typeof buffer === 'string') { + return buffer; + } + return String.fromCharCode(buffer.readUInt8(0) + 97); + } + }), 'a=b'); + + st.equal(qs.stringify({ a: SaferBuffer.from('a b') }, { + encoder: function (buffer) { + return buffer; + } + }), 'a=a b'); + st.end(); + }); + + t.test('serializeDate option', function (st) { + var date = new Date(); + st.equal( + qs.stringify({ a: date }), + 'a=' + date.toISOString().replace(/:/g, '%3A'), + 'default is toISOString' + ); + + var mutatedDate = new Date(); + mutatedDate.toISOString = function () { + throw new SyntaxError(); + }; + st['throws'](function () { + mutatedDate.toISOString(); + }, SyntaxError); + st.equal( + qs.stringify({ a: mutatedDate }), + 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'), + 'toISOString works even when method is not locally present' + ); + + var specificDate = new Date(6); + st.equal( + qs.stringify( + { a: specificDate }, + { serializeDate: function (d) { return d.getTime() * 7; } } + ), + 'a=42', + 'custom serializeDate function called' + ); + + st.equal( + qs.stringify( + { a: [date] }, + { + serializeDate: function (d) { return d.getTime(); }, + arrayFormat: 'comma' + } + ), + 'a=' + date.getTime(), + 'works with arrayFormat comma' + ); + st.equal( + qs.stringify( + { a: [date] }, + { + serializeDate: function (d) { return d.getTime(); }, + arrayFormat: 'comma', + commaRoundTrip: true + } + ), + 'a%5B%5D=' + date.getTime(), + 'works with arrayFormat comma' + ); + + st.end(); + }); + + t.test('RFC 1738 serialization', function (st) { + st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); + st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC1738 }), 'a+b=a+b'); + + st.equal(qs.stringify({ 'foo(ref)': 'bar' }, { format: qs.formats.RFC1738 }), 'foo(ref)=bar'); + + st.end(); + }); + + t.test('RFC 3986 spaces serialization', function (st) { + st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }, { format: qs.formats.RFC3986 }), 'a%20b=a%20b'); + + st.end(); + }); + + t.test('Backward compatibility to RFC 3986', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': SaferBuffer.from('a b') }), 'a%20b=a%20b'); + + st.end(); + }); + + t.test('Edge cases and unknown formats', function (st) { + ['UFO1234', false, 1234, null, {}, []].forEach(function (format) { + st['throws']( + function () { + qs.stringify({ a: 'b c' }, { format: format }); + }, + new TypeError('Unknown format option provided.') + ); + }); + st.end(); + }); + + t.test('encodeValuesOnly', function (st) { + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true } + ), + 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h' + ); + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] } + ), + 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h' + ); + st.end(); + }); + + t.test('encodeValuesOnly - strictNullHandling', function (st) { + st.equal( + qs.stringify( + { a: { b: null } }, + { encodeValuesOnly: true, strictNullHandling: true } + ), + 'a[b]' + ); + st.end(); + }); + + t.test('throws if an invalid charset is specified', function (st) { + st['throws'](function () { + qs.stringify({ a: 'b' }, { charset: 'foobar' }); + }, new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined')); + st.end(); + }); + + t.test('respects a charset of iso-8859-1', function (st) { + st.equal(qs.stringify({ æ: 'æ' }, { charset: 'iso-8859-1' }), '%E6=%E6'); + st.end(); + }); + + t.test('encodes unrepresentable chars as numeric entities in iso-8859-1 mode', function (st) { + st.equal(qs.stringify({ a: '☺' }, { charset: 'iso-8859-1' }), 'a=%26%239786%3B'); + st.end(); + }); + + t.test('respects an explicit charset of utf-8 (the default)', function (st) { + st.equal(qs.stringify({ a: 'æ' }, { charset: 'utf-8' }), 'a=%C3%A6'); + st.end(); + }); + + t.test('adds the right sentinel when instructed to and the charset is utf-8', function (st) { + st.equal(qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'utf-8' }), 'utf8=%E2%9C%93&a=%C3%A6'); + st.end(); + }); + + t.test('adds the right sentinel when instructed to and the charset is iso-8859-1', function (st) { + st.equal(qs.stringify({ a: 'æ' }, { charsetSentinel: true, charset: 'iso-8859-1' }), 'utf8=%26%2310003%3B&a=%E6'); + st.end(); + }); + + t.test('does not mutate the options argument', function (st) { + var options = {}; + qs.stringify({}, options); + st.deepEqual(options, {}); + st.end(); + }); + + t.test('strictNullHandling works with custom filter', function (st) { + var filter = function (prefix, value) { + return value; + }; + + var options = { strictNullHandling: true, filter: filter }; + st.equal(qs.stringify({ key: null }, options), 'key'); + st.end(); + }); + + t.test('strictNullHandling works with null serializeDate', function (st) { + var serializeDate = function () { + return null; + }; + var options = { strictNullHandling: true, serializeDate: serializeDate }; + var date = new Date(); + st.equal(qs.stringify({ key: date }, options), 'key'); + st.end(); + }); + + t.test('allows for encoding keys and values differently', function (st) { + var encoder = function (str, defaultEncoder, charset, type) { + if (type === 'key') { + return defaultEncoder(str, defaultEncoder, charset, type).toLowerCase(); + } + if (type === 'value') { + return defaultEncoder(str, defaultEncoder, charset, type).toUpperCase(); + } + throw 'this should never happen! type: ' + type; + }; + + st.deepEqual(qs.stringify({ KeY: 'vAlUe' }, { encoder: encoder }), 'key=VALUE'); + st.end(); + }); + + t.test('objects inside arrays', function (st) { + var obj = { a: { b: { c: 'd', e: 'f' } } }; + var withArray = { a: { b: [{ c: 'd', e: 'f' }] } }; + + st.equal(qs.stringify(obj, { encode: false }), 'a[b][c]=d&a[b][e]=f', 'no array, no arrayFormat'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'bracket' }), 'a[b][c]=d&a[b][e]=f', 'no array, bracket'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'indices' }), 'a[b][c]=d&a[b][e]=f', 'no array, indices'); + st.equal(qs.stringify(obj, { encode: false, arrayFormat: 'comma' }), 'a[b][c]=d&a[b][e]=f', 'no array, comma'); + + st.equal(qs.stringify(withArray, { encode: false }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, no arrayFormat'); + st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'bracket' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, bracket'); + st.equal(qs.stringify(withArray, { encode: false, arrayFormat: 'indices' }), 'a[b][0][c]=d&a[b][0][e]=f', 'array, indices'); + st.equal( + qs.stringify(withArray, { encode: false, arrayFormat: 'comma' }), + '???', + 'array, comma', + { skip: 'TODO: figure out what this should do' } + ); + + st.end(); + }); + + t.test('stringifies sparse arrays', function (st) { + /* eslint no-sparse-arrays: 0 */ + st.equal(qs.stringify({ a: [, '2', , , '1'] }, { encodeValuesOnly: true }), 'a[1]=2&a[4]=1'); + st.equal(qs.stringify({ a: [, { b: [, , { c: '1' }] }] }, { encodeValuesOnly: true }), 'a[1][b][2][c]=1'); + st.equal(qs.stringify({ a: [, [, , [, , , { c: '1' }]]] }, { encodeValuesOnly: true }), 'a[1][2][3][c]=1'); + st.equal(qs.stringify({ a: [, [, , [, , , { c: [, '1'] }]]] }, { encodeValuesOnly: true }), 'a[1][2][3][c][1]=1'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/qs/test/utils.js b/node_modules/qs/test/utils.js new file mode 100644 index 0000000..aa84dfd --- /dev/null +++ b/node_modules/qs/test/utils.js @@ -0,0 +1,136 @@ +'use strict'; + +var test = require('tape'); +var inspect = require('object-inspect'); +var SaferBuffer = require('safer-buffer').Buffer; +var forEach = require('for-each'); +var utils = require('../lib/utils'); + +test('merge()', function (t) { + t.deepEqual(utils.merge(null, true), [null, true], 'merges true into null'); + + t.deepEqual(utils.merge(null, [42]), [null, 42], 'merges null into an array'); + + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); + + var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); + t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); + + var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); + t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); + + var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); + t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); + + var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); + t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); + + var noOptionsNonObjectSource = utils.merge({ foo: 'baz' }, 'bar'); + t.deepEqual(noOptionsNonObjectSource, { foo: 'baz', bar: true }); + + t.test( + 'avoids invoking array setters unnecessarily', + { skip: typeof Object.defineProperty !== 'function' }, + function (st) { + var setCount = 0; + var getCount = 0; + var observed = []; + Object.defineProperty(observed, 0, { + get: function () { + getCount += 1; + return { bar: 'baz' }; + }, + set: function () { setCount += 1; } + }); + utils.merge(observed, [null]); + st.equal(setCount, 0); + st.equal(getCount, 1); + observed[0] = observed[0]; // eslint-disable-line no-self-assign + st.equal(setCount, 1); + st.equal(getCount, 2); + st.end(); + } + ); + + t.end(); +}); + +test('assign()', function (t) { + var target = { a: 1, b: 2 }; + var source = { b: 3, c: 4 }; + var result = utils.assign(target, source); + + t.equal(result, target, 'returns the target'); + t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); + t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); + + t.end(); +}); + +test('combine()', function (t) { + t.test('both arrays', function (st) { + var a = [1]; + var b = [2]; + var combined = utils.combine(a, b); + + st.deepEqual(a, [1], 'a is not mutated'); + st.deepEqual(b, [2], 'b is not mutated'); + st.notEqual(a, combined, 'a !== combined'); + st.notEqual(b, combined, 'b !== combined'); + st.deepEqual(combined, [1, 2], 'combined is a + b'); + + st.end(); + }); + + t.test('one array, one non-array', function (st) { + var aN = 1; + var a = [aN]; + var bN = 2; + var b = [bN]; + + var combinedAnB = utils.combine(aN, b); + st.deepEqual(b, [bN], 'b is not mutated'); + st.notEqual(aN, combinedAnB, 'aN + b !== aN'); + st.notEqual(a, combinedAnB, 'aN + b !== a'); + st.notEqual(bN, combinedAnB, 'aN + b !== bN'); + st.notEqual(b, combinedAnB, 'aN + b !== b'); + st.deepEqual([1, 2], combinedAnB, 'first argument is array-wrapped when not an array'); + + var combinedABn = utils.combine(a, bN); + st.deepEqual(a, [aN], 'a is not mutated'); + st.notEqual(aN, combinedABn, 'a + bN !== aN'); + st.notEqual(a, combinedABn, 'a + bN !== a'); + st.notEqual(bN, combinedABn, 'a + bN !== bN'); + st.notEqual(b, combinedABn, 'a + bN !== b'); + st.deepEqual([1, 2], combinedABn, 'second argument is array-wrapped when not an array'); + + st.end(); + }); + + t.test('neither is an array', function (st) { + var combined = utils.combine(1, 2); + st.notEqual(1, combined, '1 + 2 !== 1'); + st.notEqual(2, combined, '1 + 2 !== 2'); + st.deepEqual([1, 2], combined, 'both arguments are array-wrapped when not an array'); + + st.end(); + }); + + t.end(); +}); + +test('isBuffer()', function (t) { + forEach([null, undefined, true, false, '', 'abc', 42, 0, NaN, {}, [], function () {}, /a/g], function (x) { + t.equal(utils.isBuffer(x), false, inspect(x) + ' is not a buffer'); + }); + + var fakeBuffer = { constructor: Buffer }; + t.equal(utils.isBuffer(fakeBuffer), false, 'fake buffer is not a buffer'); + + var saferBuffer = SaferBuffer.from('abc'); + t.equal(utils.isBuffer(saferBuffer), true, 'SaferBuffer instance is a buffer'); + + var buffer = Buffer.from && Buffer.alloc ? Buffer.from('abc') : new Buffer('abc'); + t.equal(utils.isBuffer(buffer), true, 'real Buffer instance is a buffer'); + t.end(); +}); diff --git a/node_modules/side-channel/.eslintignore b/node_modules/side-channel/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/node_modules/side-channel/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/node_modules/side-channel/.eslintrc b/node_modules/side-channel/.eslintrc new file mode 100644 index 0000000..850ac1f --- /dev/null +++ b/node_modules/side-channel/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-lines-per-function": 0, + "max-params": 0, + "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }], + }, +} diff --git a/node_modules/side-channel/.github/FUNDING.yml b/node_modules/side-channel/.github/FUNDING.yml new file mode 100644 index 0000000..2a94840 --- /dev/null +++ b/node_modules/side-channel/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/side-channel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/side-channel/.nycrc b/node_modules/side-channel/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/side-channel/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/side-channel/CHANGELOG.md b/node_modules/side-channel/CHANGELOG.md new file mode 100644 index 0000000..a3d161f --- /dev/null +++ b/node_modules/side-channel/CHANGELOG.md @@ -0,0 +1,65 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.4](https://github.com/ljharb/side-channel/compare/v1.0.3...v1.0.4) - 2020-12-29 + +### Commits + +- [Tests] migrate tests to Github Actions [`10909cb`](https://github.com/ljharb/side-channel/commit/10909cbf8ce9c0bf96f604cf13d7ffd5a22c2d40) +- [Refactor] Use a linked list rather than an array, and move accessed nodes to the beginning [`195613f`](https://github.com/ljharb/side-channel/commit/195613f28b5c1e6072ef0b61b5beebaf2b6a304e) +- [meta] do not publish github action workflow files [`290ec29`](https://github.com/ljharb/side-channel/commit/290ec29cd21a60585145b4a7237ec55228c52c27) +- [Tests] run `nyc` on all tests; use `tape` runner [`ea6d030`](https://github.com/ljharb/side-channel/commit/ea6d030ff3fe6be2eca39e859d644c51ecd88869) +- [actions] add "Allow Edits" workflow [`d464d8f`](https://github.com/ljharb/side-channel/commit/d464d8fe52b5eddf1504a0ed97f0941a90f32c15) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`02daca8`](https://github.com/ljharb/side-channel/commit/02daca87c6809821c97be468d1afa2f5ef447383) +- [Refactor] use `call-bind` and `get-intrinsic` instead of `es-abstract` [`e09d481`](https://github.com/ljharb/side-channel/commit/e09d481528452ebafa5cdeae1af665c35aa2deee) +- [Deps] update `object.assign` [`ee83aa8`](https://github.com/ljharb/side-channel/commit/ee83aa81df313b5e46319a63adb05cf0c179079a) +- [actions] update rebase action to use checkout v2 [`7726b0b`](https://github.com/ljharb/side-channel/commit/7726b0b058b632fccea709f58960871defaaa9d7) + +## [v1.0.3](https://github.com/ljharb/side-channel/compare/v1.0.2...v1.0.3) - 2020-08-23 + +### Commits + +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`1f10561`](https://github.com/ljharb/side-channel/commit/1f105611ef3acf32dec8032ae5c0baa5e56bb868) +- [Deps] update `es-abstract`, `object-inspect` [`bc20159`](https://github.com/ljharb/side-channel/commit/bc201597949a505e37cef9eaf24c7010831e6f03) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`b9b2b22`](https://github.com/ljharb/side-channel/commit/b9b2b225f9e0ea72a6ec2b89348f0bd690bc9ed1) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`7055ab4`](https://github.com/ljharb/side-channel/commit/7055ab4de0860606efd2003674a74f1fe6ebc07e) +- [Dev Deps] update `auto-changelog`; add `aud` [`d278c37`](https://github.com/ljharb/side-channel/commit/d278c37d08227be4f84aa769fcd919e73feeba40) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`3bcf982`](https://github.com/ljharb/side-channel/commit/3bcf982faa122745b39c33ce83d32fdf003741c6) +- [Tests] only audit prod deps [`18d01c4`](https://github.com/ljharb/side-channel/commit/18d01c4015b82a3d75044c4d5ba7917b2eac01ec) +- [Deps] update `es-abstract` [`6ab096d`](https://github.com/ljharb/side-channel/commit/6ab096d9de2b482cf5e0717e34e212f5b2b9bc9a) +- [Dev Deps] update `tape` [`9dc174c`](https://github.com/ljharb/side-channel/commit/9dc174cc651dfd300b4b72da936a0a7eda5f9452) +- [Deps] update `es-abstract` [`431d0f0`](https://github.com/ljharb/side-channel/commit/431d0f0ff11fbd2ae6f3115582a356d3a1cfce82) +- [Deps] update `es-abstract` [`49869fd`](https://github.com/ljharb/side-channel/commit/49869fd323bf4453f0ba515c0fb265cf5ab7b932) +- [meta] Add package.json to package's exports [`77d9cdc`](https://github.com/ljharb/side-channel/commit/77d9cdceb2a9e47700074f2ae0c0a202e7dac0d4) + +## [v1.0.2](https://github.com/ljharb/side-channel/compare/v1.0.1...v1.0.2) - 2019-12-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`4a526df`](https://github.com/ljharb/side-channel/commit/4a526df44e4701566ed001ec78546193f818b082) +- [Deps] update `es-abstract` [`d4f6e62`](https://github.com/ljharb/side-channel/commit/d4f6e629b6fb93a07415db7f30d3c90fd7f264fe) + +## [v1.0.1](https://github.com/ljharb/side-channel/compare/v1.0.0...v1.0.1) - 2019-12-01 + +### Commits + +- [Fix] add missing "exports" [`d212907`](https://github.com/ljharb/side-channel/commit/d2129073abf0701a5343bf28aa2145617604dc2e) + +## v1.0.0 - 2019-12-01 + +### Commits + +- Initial implementation [`dbebd3a`](https://github.com/ljharb/side-channel/commit/dbebd3a4b5ed64242f9a6810efe7c4214cd8cde4) +- Initial tests [`73bdefe`](https://github.com/ljharb/side-channel/commit/73bdefe568c9076cf8c0b8719bc2141aec0e19b8) +- Initial commit [`43c03e1`](https://github.com/ljharb/side-channel/commit/43c03e1c2849ec50a87b7a5cd76238a62b0b8770) +- npm init [`5c090a7`](https://github.com/ljharb/side-channel/commit/5c090a765d66a5527d9889b89aeff78dee91348c) +- [meta] add `auto-changelog` [`a5c4e56`](https://github.com/ljharb/side-channel/commit/a5c4e5675ec02d5eb4d84b4243aeea2a1d38fbec) +- [actions] add automatic rebasing / merge commit blocking [`bab1683`](https://github.com/ljharb/side-channel/commit/bab1683d8f9754b086e94397699fdc645e0d7077) +- [meta] add `funding` field; create FUNDING.yml [`63d7aea`](https://github.com/ljharb/side-channel/commit/63d7aeaf34f5650650ae97ca4b9fae685bd0937c) +- [Tests] add `npm run lint` [`46a5a81`](https://github.com/ljharb/side-channel/commit/46a5a81705cd2664f83df232c01dbbf2ee952885) +- Only apps should have lockfiles [`8b16b03`](https://github.com/ljharb/side-channel/commit/8b16b0305f00895d90c4e2e5773c854cfea0e448) +- [meta] add `safe-publish-latest` [`2f098ef`](https://github.com/ljharb/side-channel/commit/2f098ef092a39399cfe548b19a1fc03c2fd2f490) diff --git a/node_modules/side-channel/LICENSE b/node_modules/side-channel/LICENSE new file mode 100644 index 0000000..3900dd7 --- /dev/null +++ b/node_modules/side-channel/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/side-channel/README.md b/node_modules/side-channel/README.md new file mode 100644 index 0000000..7fa4f06 --- /dev/null +++ b/node_modules/side-channel/README.md @@ -0,0 +1,2 @@ +# side-channel +Store information about any JS value in a side channel. Uses WeakMap if available. diff --git a/node_modules/side-channel/index.js b/node_modules/side-channel/index.js new file mode 100644 index 0000000..f1c4826 --- /dev/null +++ b/node_modules/side-channel/index.js @@ -0,0 +1,124 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); +var callBound = require('call-bind/callBound'); +var inspect = require('object-inspect'); + +var $TypeError = GetIntrinsic('%TypeError%'); +var $WeakMap = GetIntrinsic('%WeakMap%', true); +var $Map = GetIntrinsic('%Map%', true); + +var $weakMapGet = callBound('WeakMap.prototype.get', true); +var $weakMapSet = callBound('WeakMap.prototype.set', true); +var $weakMapHas = callBound('WeakMap.prototype.has', true); +var $mapGet = callBound('Map.prototype.get', true); +var $mapSet = callBound('Map.prototype.set', true); +var $mapHas = callBound('Map.prototype.has', true); + +/* + * This function traverses the list returning the node corresponding to the + * given key. + * + * That node is also moved to the head of the list, so that if it's accessed + * again we don't need to traverse the whole list. By doing so, all the recently + * used nodes can be accessed relatively quickly. + */ +var listGetNode = function (list, key) { // eslint-disable-line consistent-return + for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) { + if (curr.key === key) { + prev.next = curr.next; + curr.next = list.next; + list.next = curr; // eslint-disable-line no-param-reassign + return curr; + } + } +}; + +var listGet = function (objects, key) { + var node = listGetNode(objects, key); + return node && node.value; +}; +var listSet = function (objects, key, value) { + var node = listGetNode(objects, key); + if (node) { + node.value = value; + } else { + // Prepend the new node to the beginning of the list + objects.next = { // eslint-disable-line no-param-reassign + key: key, + next: objects.next, + value: value + }; + } +}; +var listHas = function (objects, key) { + return !!listGetNode(objects, key); +}; + +module.exports = function getSideChannel() { + var $wm; + var $m; + var $o; + var channel = { + assert: function (key) { + if (!channel.has(key)) { + throw new $TypeError('Side channel does not contain ' + inspect(key)); + } + }, + get: function (key) { // eslint-disable-line consistent-return + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapGet($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapGet($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listGet($o, key); + } + } + }, + has: function (key) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if ($wm) { + return $weakMapHas($wm, key); + } + } else if ($Map) { + if ($m) { + return $mapHas($m, key); + } + } else { + if ($o) { // eslint-disable-line no-lonely-if + return listHas($o, key); + } + } + return false; + }, + set: function (key, value) { + if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) { + if (!$wm) { + $wm = new $WeakMap(); + } + $weakMapSet($wm, key, value); + } else if ($Map) { + if (!$m) { + $m = new $Map(); + } + $mapSet($m, key, value); + } else { + if (!$o) { + /* + * Initialize the linked list as an empty node, so that we don't have + * to special-case handling of the first node: we can always refer to + * it as (previous node).next, instead of something like (list).head + */ + $o = { key: {}, next: null }; + } + listSet($o, key, value); + } + } + }; + return channel; +}; diff --git a/node_modules/side-channel/package.json b/node_modules/side-channel/package.json new file mode 100644 index 0000000..a3e33f6 --- /dev/null +++ b/node_modules/side-channel/package.json @@ -0,0 +1,67 @@ +{ + "name": "side-channel", + "version": "1.0.4", + "description": "Store information about any JS value in a side channel. Uses WeakMap if available.", + "main": "index.js", + "exports": { + "./package.json": "./package.json", + ".": [ + { + "default": "./index.js" + }, + "./index.js" + ] + }, + "scripts": { + "prepublish": "safe-publish-latest", + "lint": "eslint .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/side-channel.git" + }, + "keywords": [ + "weakmap", + "map", + "side", + "channel", + "metadata" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/side-channel/issues" + }, + "homepage": "https://github.com/ljharb/side-channel#readme", + "devDependencies": { + "@ljharb/eslint-config": "^17.3.0", + "aud": "^1.1.3", + "auto-changelog": "^2.2.1", + "eslint": "^7.16.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^1.1.4", + "tape": "^5.0.1" + }, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/side-channel/test/index.js b/node_modules/side-channel/test/index.js new file mode 100644 index 0000000..3b92ef7 --- /dev/null +++ b/node_modules/side-channel/test/index.js @@ -0,0 +1,78 @@ +'use strict'; + +var test = require('tape'); + +var getSideChannel = require('../'); + +test('export', function (t) { + t.equal(typeof getSideChannel, 'function', 'is a function'); + t.equal(getSideChannel.length, 0, 'takes no arguments'); + + var channel = getSideChannel(); + t.ok(channel, 'is truthy'); + t.equal(typeof channel, 'object', 'is an object'); + + t.end(); +}); + +test('assert', function (t) { + var channel = getSideChannel(); + t['throws']( + function () { channel.assert({}); }, + TypeError, + 'nonexistent value throws' + ); + + var o = {}; + channel.set(o, 'data'); + t.doesNotThrow(function () { channel.assert(o); }, 'existent value noops'); + + t.end(); +}); + +test('has', function (t) { + var channel = getSideChannel(); + var o = []; + + t.equal(channel.has(o), false, 'nonexistent value yields false'); + + channel.set(o, 'foo'); + t.equal(channel.has(o), true, 'existent value yields true'); + + t.end(); +}); + +test('get', function (t) { + var channel = getSideChannel(); + var o = {}; + t.equal(channel.get(o), undefined, 'nonexistent value yields undefined'); + + var data = {}; + channel.set(o, data); + t.equal(channel.get(o), data, '"get" yields data set by "set"'); + + t.end(); +}); + +test('set', function (t) { + var channel = getSideChannel(); + var o = function () {}; + t.equal(channel.get(o), undefined, 'value not set'); + + channel.set(o, 42); + t.equal(channel.get(o), 42, 'value was set'); + + channel.set(o, Infinity); + t.equal(channel.get(o), Infinity, 'value was set again'); + + var o2 = {}; + channel.set(o2, 17); + t.equal(channel.get(o), Infinity, 'o is not modified'); + t.equal(channel.get(o2), 17, 'o2 is set'); + + channel.set(o, 14); + t.equal(channel.get(o), 14, 'o is modified'); + t.equal(channel.get(o2), 17, 'o2 is not modified'); + + t.end(); +}); diff --git a/node_modules/tr46/.npmignore b/node_modules/tr46/.npmignore new file mode 100644 index 0000000..96e9161 --- /dev/null +++ b/node_modules/tr46/.npmignore @@ -0,0 +1,4 @@ +scripts/ +test/ + +!lib/mapping_table.json diff --git a/node_modules/tr46/index.js b/node_modules/tr46/index.js new file mode 100644 index 0000000..9ce12ca --- /dev/null +++ b/node_modules/tr46/index.js @@ -0,0 +1,193 @@ +"use strict"; + +var punycode = require("punycode"); +var mappingTable = require("./lib/mappingTable.json"); + +var PROCESSING_OPTIONS = { + TRANSITIONAL: 0, + NONTRANSITIONAL: 1 +}; + +function normalize(str) { // fix bug in v8 + return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); +} + +function findStatus(val) { + var start = 0; + var end = mappingTable.length - 1; + + while (start <= end) { + var mid = Math.floor((start + end) / 2); + + var target = mappingTable[mid]; + if (target[0][0] <= val && target[0][1] >= val) { + return target; + } else if (target[0][0] > val) { + end = mid - 1; + } else { + start = mid + 1; + } + } + + return null; +} + +var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + +function countSymbols(string) { + return string + // replace every surrogate pair with a BMP symbol + .replace(regexAstralSymbols, '_') + // then get the length + .length; +} + +function mapChars(domain_name, useSTD3, processing_option) { + var hasError = false; + var processed = ""; + + var len = countSymbols(domain_name); + for (var i = 0; i < len; ++i) { + var codePoint = domain_name.codePointAt(i); + var status = findStatus(codePoint); + + switch (status[1]) { + case "disallowed": + hasError = true; + processed += String.fromCodePoint(codePoint); + break; + case "ignored": + break; + case "mapped": + processed += String.fromCodePoint.apply(String, status[2]); + break; + case "deviation": + if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { + processed += String.fromCodePoint.apply(String, status[2]); + } else { + processed += String.fromCodePoint(codePoint); + } + break; + case "valid": + processed += String.fromCodePoint(codePoint); + break; + case "disallowed_STD3_mapped": + if (useSTD3) { + hasError = true; + processed += String.fromCodePoint(codePoint); + } else { + processed += String.fromCodePoint.apply(String, status[2]); + } + break; + case "disallowed_STD3_valid": + if (useSTD3) { + hasError = true; + } + + processed += String.fromCodePoint(codePoint); + break; + } + } + + return { + string: processed, + error: hasError + }; +} + +var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; + +function validateLabel(label, processing_option) { + if (label.substr(0, 4) === "xn--") { + label = punycode.toUnicode(label); + processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; + } + + var error = false; + + if (normalize(label) !== label || + (label[3] === "-" && label[4] === "-") || + label[0] === "-" || label[label.length - 1] === "-" || + label.indexOf(".") !== -1 || + label.search(combiningMarksRegex) === 0) { + error = true; + } + + var len = countSymbols(label); + for (var i = 0; i < len; ++i) { + var status = findStatus(label.codePointAt(i)); + if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || + (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && + status[1] !== "valid" && status[1] !== "deviation")) { + error = true; + break; + } + } + + return { + label: label, + error: error + }; +} + +function processing(domain_name, useSTD3, processing_option) { + var result = mapChars(domain_name, useSTD3, processing_option); + result.string = normalize(result.string); + + var labels = result.string.split("."); + for (var i = 0; i < labels.length; ++i) { + try { + var validation = validateLabel(labels[i]); + labels[i] = validation.label; + result.error = result.error || validation.error; + } catch(e) { + result.error = true; + } + } + + return { + string: labels.join("."), + error: result.error + }; +} + +module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { + var result = processing(domain_name, useSTD3, processing_option); + var labels = result.string.split("."); + labels = labels.map(function(l) { + try { + return punycode.toASCII(l); + } catch(e) { + result.error = true; + return l; + } + }); + + if (verifyDnsLength) { + var total = labels.slice(0, labels.length - 1).join(".").length; + if (total.length > 253 || total.length === 0) { + result.error = true; + } + + for (var i=0; i < labels.length; ++i) { + if (labels.length > 63 || labels.length === 0) { + result.error = true; + break; + } + } + } + + if (result.error) return null; + return labels.join("."); +}; + +module.exports.toUnicode = function(domain_name, useSTD3) { + var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); + + return { + domain: result.string, + error: result.error + }; +}; + +module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; diff --git a/node_modules/tr46/lib/.gitkeep b/node_modules/tr46/lib/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/tr46/lib/mappingTable.json b/node_modules/tr46/lib/mappingTable.json new file mode 100644 index 0000000..89cf19a --- /dev/null +++ b/node_modules/tr46/lib/mappingTable.json @@ -0,0 +1 @@ +[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mapped",[359]],[[359,359],"valid"],[[360,360],"mapped",[361]],[[361,361],"valid"],[[362,362],"mapped",[363]],[[363,363],"valid"],[[364,364],"mapped",[365]],[[365,365],"valid"],[[366,366],"mapped",[367]],[[367,367],"valid"],[[368,368],"mapped",[369]],[[369,369],"valid"],[[370,370],"mapped",[371]],[[371,371],"valid"],[[372,372],"mapped",[373]],[[373,373],"valid"],[[374,374],"mapped",[375]],[[375,375],"valid"],[[376,376],"mapped",[255]],[[377,377],"mapped",[378]],[[378,378],"valid"],[[379,379],"mapped",[380]],[[380,380],"valid"],[[381,381],"mapped",[382]],[[382,382],"valid"],[[383,383],"mapped",[115]],[[384,384],"valid"],[[385,385],"mapped",[595]],[[386,386],"mapped",[387]],[[387,387],"valid"],[[388,388],"mapped",[389]],[[389,389],"valid"],[[390,390],"mapped",[596]],[[391,391],"mapped",[392]],[[392,392],"valid"],[[393,393],"mapped",[598]],[[394,394],"mapped",[599]],[[395,395],"mapped",[396]],[[396,397],"valid"],[[398,398],"mapped",[477]],[[399,399],"mapped",[601]],[[400,400],"mapped",[603]],[[401,401],"mapped",[402]],[[402,402],"valid"],[[403,403],"mapped",[608]],[[404,404],"mapped",[611]],[[405,405],"valid"],[[406,406],"mapped",[617]],[[407,407],"mapped",[616]],[[408,408],"mapped",[409]],[[409,411],"valid"],[[412,412],"mapped",[623]],[[413,413],"mapped",[626]],[[414,414],"valid"],[[415,415],"mapped",[629]],[[416,416],"mapped",[417]],[[417,417],"valid"],[[418,418],"mapped",[419]],[[419,419],"valid"],[[420,420],"mapped",[421]],[[421,421],"valid"],[[422,422],"mapped",[640]],[[423,423],"mapped",[424]],[[424,424],"valid"],[[425,425],"mapped",[643]],[[426,427],"valid"],[[428,428],"mapped",[429]],[[429,429],"valid"],[[430,430],"mapped",[648]],[[431,431],"mapped",[432]],[[432,432],"valid"],[[433,433],"mapped",[650]],[[434,434],"mapped",[651]],[[435,435],"mapped",[436]],[[436,436],"valid"],[[437,437],"mapped",[438]],[[438,438],"valid"],[[439,439],"mapped",[658]],[[440,440],"mapped",[441]],[[441,443],"valid"],[[444,444],"mapped",[445]],[[445,451],"valid"],[[452,454],"mapped",[100,382]],[[455,457],"mapped",[108,106]],[[458,460],"mapped",[110,106]],[[461,461],"mapped",[462]],[[462,462],"valid"],[[463,463],"mapped",[464]],[[464,464],"valid"],[[465,465],"mapped",[466]],[[466,466],"valid"],[[467,467],"mapped",[468]],[[468,468],"valid"],[[469,469],"mapped",[470]],[[470,470],"valid"],[[471,471],"mapped",[472]],[[472,472],"valid"],[[473,473],"mapped",[474]],[[474,474],"valid"],[[475,475],"mapped",[476]],[[476,477],"valid"],[[478,478],"mapped",[479]],[[479,479],"valid"],[[480,480],"mapped",[481]],[[481,481],"valid"],[[482,482],"mapped",[483]],[[483,483],"valid"],[[484,484],"mapped",[485]],[[485,485],"valid"],[[486,486],"mapped",[487]],[[487,487],"valid"],[[488,488],"mapped",[489]],[[489,489],"valid"],[[490,490],"mapped",[491]],[[491,491],"valid"],[[492,492],"mapped",[493]],[[493,493],"valid"],[[494,494],"mapped",[495]],[[495,496],"valid"],[[497,499],"mapped",[100,122]],[[500,500],"mapped",[501]],[[501,501],"valid"],[[502,502],"mapped",[405]],[[503,503],"mapped",[447]],[[504,504],"mapped",[505]],[[505,505],"valid"],[[506,506],"mapped",[507]],[[507,507],"valid"],[[508,508],"mapped",[509]],[[509,509],"valid"],[[510,510],"mapped",[511]],[[511,511],"valid"],[[512,512],"mapped",[513]],[[513,513],"valid"],[[514,514],"mapped",[515]],[[515,515],"valid"],[[516,516],"mapped",[517]],[[517,517],"valid"],[[518,518],"mapped",[519]],[[519,519],"valid"],[[520,520],"mapped",[521]],[[521,521],"valid"],[[522,522],"mapped",[523]],[[523,523],"valid"],[[524,524],"mapped",[525]],[[525,525],"valid"],[[526,526],"mapped",[527]],[[527,527],"valid"],[[528,528],"mapped",[529]],[[529,529],"valid"],[[530,530],"mapped",[531]],[[531,531],"valid"],[[532,532],"mapped",[533]],[[533,533],"valid"],[[534,534],"mapped",[535]],[[535,535],"valid"],[[536,536],"mapped",[537]],[[537,537],"valid"],[[538,538],"mapped",[539]],[[539,539],"valid"],[[540,540],"mapped",[541]],[[541,541],"valid"],[[542,542],"mapped",[543]],[[543,543],"valid"],[[544,544],"mapped",[414]],[[545,545],"valid"],[[546,546],"mapped",[547]],[[547,547],"valid"],[[548,548],"mapped",[549]],[[549,549],"valid"],[[550,550],"mapped",[551]],[[551,551],"valid"],[[552,552],"mapped",[553]],[[553,553],"valid"],[[554,554],"mapped",[555]],[[555,555],"valid"],[[556,556],"mapped",[557]],[[557,557],"valid"],[[558,558],"mapped",[559]],[[559,559],"valid"],[[560,560],"mapped",[561]],[[561,561],"valid"],[[562,562],"mapped",[563]],[[563,563],"valid"],[[564,566],"valid"],[[567,569],"valid"],[[570,570],"mapped",[11365]],[[571,571],"mapped",[572]],[[572,572],"valid"],[[573,573],"mapped",[410]],[[574,574],"mapped",[11366]],[[575,576],"valid"],[[577,577],"mapped",[578]],[[578,578],"valid"],[[579,579],"mapped",[384]],[[580,580],"mapped",[649]],[[581,581],"mapped",[652]],[[582,582],"mapped",[583]],[[583,583],"valid"],[[584,584],"mapped",[585]],[[585,585],"valid"],[[586,586],"mapped",[587]],[[587,587],"valid"],[[588,588],"mapped",[589]],[[589,589],"valid"],[[590,590],"mapped",[591]],[[591,591],"valid"],[[592,680],"valid"],[[681,685],"valid"],[[686,687],"valid"],[[688,688],"mapped",[104]],[[689,689],"mapped",[614]],[[690,690],"mapped",[106]],[[691,691],"mapped",[114]],[[692,692],"mapped",[633]],[[693,693],"mapped",[635]],[[694,694],"mapped",[641]],[[695,695],"mapped",[119]],[[696,696],"mapped",[121]],[[697,705],"valid"],[[706,709],"valid",[],"NV8"],[[710,721],"valid"],[[722,727],"valid",[],"NV8"],[[728,728],"disallowed_STD3_mapped",[32,774]],[[729,729],"disallowed_STD3_mapped",[32,775]],[[730,730],"disallowed_STD3_mapped",[32,778]],[[731,731],"disallowed_STD3_mapped",[32,808]],[[732,732],"disallowed_STD3_mapped",[32,771]],[[733,733],"disallowed_STD3_mapped",[32,779]],[[734,734],"valid",[],"NV8"],[[735,735],"valid",[],"NV8"],[[736,736],"mapped",[611]],[[737,737],"mapped",[108]],[[738,738],"mapped",[115]],[[739,739],"mapped",[120]],[[740,740],"mapped",[661]],[[741,745],"valid",[],"NV8"],[[746,747],"valid",[],"NV8"],[[748,748],"valid"],[[749,749],"valid",[],"NV8"],[[750,750],"valid"],[[751,767],"valid",[],"NV8"],[[768,831],"valid"],[[832,832],"mapped",[768]],[[833,833],"mapped",[769]],[[834,834],"valid"],[[835,835],"mapped",[787]],[[836,836],"mapped",[776,769]],[[837,837],"mapped",[953]],[[838,846],"valid"],[[847,847],"ignored"],[[848,855],"valid"],[[856,860],"valid"],[[861,863],"valid"],[[864,865],"valid"],[[866,866],"valid"],[[867,879],"valid"],[[880,880],"mapped",[881]],[[881,881],"valid"],[[882,882],"mapped",[883]],[[883,883],"valid"],[[884,884],"mapped",[697]],[[885,885],"valid"],[[886,886],"mapped",[887]],[[887,887],"valid"],[[888,889],"disallowed"],[[890,890],"disallowed_STD3_mapped",[32,953]],[[891,893],"valid"],[[894,894],"disallowed_STD3_mapped",[59]],[[895,895],"mapped",[1011]],[[896,899],"disallowed"],[[900,900],"disallowed_STD3_mapped",[32,769]],[[901,901],"disallowed_STD3_mapped",[32,776,769]],[[902,902],"mapped",[940]],[[903,903],"mapped",[183]],[[904,904],"mapped",[941]],[[905,905],"mapped",[942]],[[906,906],"mapped",[943]],[[907,907],"disallowed"],[[908,908],"mapped",[972]],[[909,909],"disallowed"],[[910,910],"mapped",[973]],[[911,911],"mapped",[974]],[[912,912],"valid"],[[913,913],"mapped",[945]],[[914,914],"mapped",[946]],[[915,915],"mapped",[947]],[[916,916],"mapped",[948]],[[917,917],"mapped",[949]],[[918,918],"mapped",[950]],[[919,919],"mapped",[951]],[[920,920],"mapped",[952]],[[921,921],"mapped",[953]],[[922,922],"mapped",[954]],[[923,923],"mapped",[955]],[[924,924],"mapped",[956]],[[925,925],"mapped",[957]],[[926,926],"mapped",[958]],[[927,927],"mapped",[959]],[[928,928],"mapped",[960]],[[929,929],"mapped",[961]],[[930,930],"disallowed"],[[931,931],"mapped",[963]],[[932,932],"mapped",[964]],[[933,933],"mapped",[965]],[[934,934],"mapped",[966]],[[935,935],"mapped",[967]],[[936,936],"mapped",[968]],[[937,937],"mapped",[969]],[[938,938],"mapped",[970]],[[939,939],"mapped",[971]],[[940,961],"valid"],[[962,962],"deviation",[963]],[[963,974],"valid"],[[975,975],"mapped",[983]],[[976,976],"mapped",[946]],[[977,977],"mapped",[952]],[[978,978],"mapped",[965]],[[979,979],"mapped",[973]],[[980,980],"mapped",[971]],[[981,981],"mapped",[966]],[[982,982],"mapped",[960]],[[983,983],"valid"],[[984,984],"mapped",[985]],[[985,985],"valid"],[[986,986],"mapped",[987]],[[987,987],"valid"],[[988,988],"mapped",[989]],[[989,989],"valid"],[[990,990],"mapped",[991]],[[991,991],"valid"],[[992,992],"mapped",[993]],[[993,993],"valid"],[[994,994],"mapped",[995]],[[995,995],"valid"],[[996,996],"mapped",[997]],[[997,997],"valid"],[[998,998],"mapped",[999]],[[999,999],"valid"],[[1000,1000],"mapped",[1001]],[[1001,1001],"valid"],[[1002,1002],"mapped",[1003]],[[1003,1003],"valid"],[[1004,1004],"mapped",[1005]],[[1005,1005],"valid"],[[1006,1006],"mapped",[1007]],[[1007,1007],"valid"],[[1008,1008],"mapped",[954]],[[1009,1009],"mapped",[961]],[[1010,1010],"mapped",[963]],[[1011,1011],"valid"],[[1012,1012],"mapped",[952]],[[1013,1013],"mapped",[949]],[[1014,1014],"valid",[],"NV8"],[[1015,1015],"mapped",[1016]],[[1016,1016],"valid"],[[1017,1017],"mapped",[963]],[[1018,1018],"mapped",[1019]],[[1019,1019],"valid"],[[1020,1020],"valid"],[[1021,1021],"mapped",[891]],[[1022,1022],"mapped",[892]],[[1023,1023],"mapped",[893]],[[1024,1024],"mapped",[1104]],[[1025,1025],"mapped",[1105]],[[1026,1026],"mapped",[1106]],[[1027,1027],"mapped",[1107]],[[1028,1028],"mapped",[1108]],[[1029,1029],"mapped",[1109]],[[1030,1030],"mapped",[1110]],[[1031,1031],"mapped",[1111]],[[1032,1032],"mapped",[1112]],[[1033,1033],"mapped",[1113]],[[1034,1034],"mapped",[1114]],[[1035,1035],"mapped",[1115]],[[1036,1036],"mapped",[1116]],[[1037,1037],"mapped",[1117]],[[1038,1038],"mapped",[1118]],[[1039,1039],"mapped",[1119]],[[1040,1040],"mapped",[1072]],[[1041,1041],"mapped",[1073]],[[1042,1042],"mapped",[1074]],[[1043,1043],"mapped",[1075]],[[1044,1044],"mapped",[1076]],[[1045,1045],"mapped",[1077]],[[1046,1046],"mapped",[1078]],[[1047,1047],"mapped",[1079]],[[1048,1048],"mapped",[1080]],[[1049,1049],"mapped",[1081]],[[1050,1050],"mapped",[1082]],[[1051,1051],"mapped",[1083]],[[1052,1052],"mapped",[1084]],[[1053,1053],"mapped",[1085]],[[1054,1054],"mapped",[1086]],[[1055,1055],"mapped",[1087]],[[1056,1056],"mapped",[1088]],[[1057,1057],"mapped",[1089]],[[1058,1058],"mapped",[1090]],[[1059,1059],"mapped",[1091]],[[1060,1060],"mapped",[1092]],[[1061,1061],"mapped",[1093]],[[1062,1062],"mapped",[1094]],[[1063,1063],"mapped",[1095]],[[1064,1064],"mapped",[1096]],[[1065,1065],"mapped",[1097]],[[1066,1066],"mapped",[1098]],[[1067,1067],"mapped",[1099]],[[1068,1068],"mapped",[1100]],[[1069,1069],"mapped",[1101]],[[1070,1070],"mapped",[1102]],[[1071,1071],"mapped",[1103]],[[1072,1103],"valid"],[[1104,1104],"valid"],[[1105,1116],"valid"],[[1117,1117],"valid"],[[1118,1119],"valid"],[[1120,1120],"mapped",[1121]],[[1121,1121],"valid"],[[1122,1122],"mapped",[1123]],[[1123,1123],"valid"],[[1124,1124],"mapped",[1125]],[[1125,1125],"valid"],[[1126,1126],"mapped",[1127]],[[1127,1127],"valid"],[[1128,1128],"mapped",[1129]],[[1129,1129],"valid"],[[1130,1130],"mapped",[1131]],[[1131,1131],"valid"],[[1132,1132],"mapped",[1133]],[[1133,1133],"valid"],[[1134,1134],"mapped",[1135]],[[1135,1135],"valid"],[[1136,1136],"mapped",[1137]],[[1137,1137],"valid"],[[1138,1138],"mapped",[1139]],[[1139,1139],"valid"],[[1140,1140],"mapped",[1141]],[[1141,1141],"valid"],[[1142,1142],"mapped",[1143]],[[1143,1143],"valid"],[[1144,1144],"mapped",[1145]],[[1145,1145],"valid"],[[1146,1146],"mapped",[1147]],[[1147,1147],"valid"],[[1148,1148],"mapped",[1149]],[[1149,1149],"valid"],[[1150,1150],"mapped",[1151]],[[1151,1151],"valid"],[[1152,1152],"mapped",[1153]],[[1153,1153],"valid"],[[1154,1154],"valid",[],"NV8"],[[1155,1158],"valid"],[[1159,1159],"valid"],[[1160,1161],"valid",[],"NV8"],[[1162,1162],"mapped",[1163]],[[1163,1163],"valid"],[[1164,1164],"mapped",[1165]],[[1165,1165],"valid"],[[1166,1166],"mapped",[1167]],[[1167,1167],"valid"],[[1168,1168],"mapped",[1169]],[[1169,1169],"valid"],[[1170,1170],"mapped",[1171]],[[1171,1171],"valid"],[[1172,1172],"mapped",[1173]],[[1173,1173],"valid"],[[1174,1174],"mapped",[1175]],[[1175,1175],"valid"],[[1176,1176],"mapped",[1177]],[[1177,1177],"valid"],[[1178,1178],"mapped",[1179]],[[1179,1179],"valid"],[[1180,1180],"mapped",[1181]],[[1181,1181],"valid"],[[1182,1182],"mapped",[1183]],[[1183,1183],"valid"],[[1184,1184],"mapped",[1185]],[[1185,1185],"valid"],[[1186,1186],"mapped",[1187]],[[1187,1187],"valid"],[[1188,1188],"mapped",[1189]],[[1189,1189],"valid"],[[1190,1190],"mapped",[1191]],[[1191,1191],"valid"],[[1192,1192],"mapped",[1193]],[[1193,1193],"valid"],[[1194,1194],"mapped",[1195]],[[1195,1195],"valid"],[[1196,1196],"mapped",[1197]],[[1197,1197],"valid"],[[1198,1198],"mapped",[1199]],[[1199,1199],"valid"],[[1200,1200],"mapped",[1201]],[[1201,1201],"valid"],[[1202,1202],"mapped",[1203]],[[1203,1203],"valid"],[[1204,1204],"mapped",[1205]],[[1205,1205],"valid"],[[1206,1206],"mapped",[1207]],[[1207,1207],"valid"],[[1208,1208],"mapped",[1209]],[[1209,1209],"valid"],[[1210,1210],"mapped",[1211]],[[1211,1211],"valid"],[[1212,1212],"mapped",[1213]],[[1213,1213],"valid"],[[1214,1214],"mapped",[1215]],[[1215,1215],"valid"],[[1216,1216],"disallowed"],[[1217,1217],"mapped",[1218]],[[1218,1218],"valid"],[[1219,1219],"mapped",[1220]],[[1220,1220],"valid"],[[1221,1221],"mapped",[1222]],[[1222,1222],"valid"],[[1223,1223],"mapped",[1224]],[[1224,1224],"valid"],[[1225,1225],"mapped",[1226]],[[1226,1226],"valid"],[[1227,1227],"mapped",[1228]],[[1228,1228],"valid"],[[1229,1229],"mapped",[1230]],[[1230,1230],"valid"],[[1231,1231],"valid"],[[1232,1232],"mapped",[1233]],[[1233,1233],"valid"],[[1234,1234],"mapped",[1235]],[[1235,1235],"valid"],[[1236,1236],"mapped",[1237]],[[1237,1237],"valid"],[[1238,1238],"mapped",[1239]],[[1239,1239],"valid"],[[1240,1240],"mapped",[1241]],[[1241,1241],"valid"],[[1242,1242],"mapped",[1243]],[[1243,1243],"valid"],[[1244,1244],"mapped",[1245]],[[1245,1245],"valid"],[[1246,1246],"mapped",[1247]],[[1247,1247],"valid"],[[1248,1248],"mapped",[1249]],[[1249,1249],"valid"],[[1250,1250],"mapped",[1251]],[[1251,1251],"valid"],[[1252,1252],"mapped",[1253]],[[1253,1253],"valid"],[[1254,1254],"mapped",[1255]],[[1255,1255],"valid"],[[1256,1256],"mapped",[1257]],[[1257,1257],"valid"],[[1258,1258],"mapped",[1259]],[[1259,1259],"valid"],[[1260,1260],"mapped",[1261]],[[1261,1261],"valid"],[[1262,1262],"mapped",[1263]],[[1263,1263],"valid"],[[1264,1264],"mapped",[1265]],[[1265,1265],"valid"],[[1266,1266],"mapped",[1267]],[[1267,1267],"valid"],[[1268,1268],"mapped",[1269]],[[1269,1269],"valid"],[[1270,1270],"mapped",[1271]],[[1271,1271],"valid"],[[1272,1272],"mapped",[1273]],[[1273,1273],"valid"],[[1274,1274],"mapped",[1275]],[[1275,1275],"valid"],[[1276,1276],"mapped",[1277]],[[1277,1277],"valid"],[[1278,1278],"mapped",[1279]],[[1279,1279],"valid"],[[1280,1280],"mapped",[1281]],[[1281,1281],"valid"],[[1282,1282],"mapped",[1283]],[[1283,1283],"valid"],[[1284,1284],"mapped",[1285]],[[1285,1285],"valid"],[[1286,1286],"mapped",[1287]],[[1287,1287],"valid"],[[1288,1288],"mapped",[1289]],[[1289,1289],"valid"],[[1290,1290],"mapped",[1291]],[[1291,1291],"valid"],[[1292,1292],"mapped",[1293]],[[1293,1293],"valid"],[[1294,1294],"mapped",[1295]],[[1295,1295],"valid"],[[1296,1296],"mapped",[1297]],[[1297,1297],"valid"],[[1298,1298],"mapped",[1299]],[[1299,1299],"valid"],[[1300,1300],"mapped",[1301]],[[1301,1301],"valid"],[[1302,1302],"mapped",[1303]],[[1303,1303],"valid"],[[1304,1304],"mapped",[1305]],[[1305,1305],"valid"],[[1306,1306],"mapped",[1307]],[[1307,1307],"valid"],[[1308,1308],"mapped",[1309]],[[1309,1309],"valid"],[[1310,1310],"mapped",[1311]],[[1311,1311],"valid"],[[1312,1312],"mapped",[1313]],[[1313,1313],"valid"],[[1314,1314],"mapped",[1315]],[[1315,1315],"valid"],[[1316,1316],"mapped",[1317]],[[1317,1317],"valid"],[[1318,1318],"mapped",[1319]],[[1319,1319],"valid"],[[1320,1320],"mapped",[1321]],[[1321,1321],"valid"],[[1322,1322],"mapped",[1323]],[[1323,1323],"valid"],[[1324,1324],"mapped",[1325]],[[1325,1325],"valid"],[[1326,1326],"mapped",[1327]],[[1327,1327],"valid"],[[1328,1328],"disallowed"],[[1329,1329],"mapped",[1377]],[[1330,1330],"mapped",[1378]],[[1331,1331],"mapped",[1379]],[[1332,1332],"mapped",[1380]],[[1333,1333],"mapped",[1381]],[[1334,1334],"mapped",[1382]],[[1335,1335],"mapped",[1383]],[[1336,1336],"mapped",[1384]],[[1337,1337],"mapped",[1385]],[[1338,1338],"mapped",[1386]],[[1339,1339],"mapped",[1387]],[[1340,1340],"mapped",[1388]],[[1341,1341],"mapped",[1389]],[[1342,1342],"mapped",[1390]],[[1343,1343],"mapped",[1391]],[[1344,1344],"mapped",[1392]],[[1345,1345],"mapped",[1393]],[[1346,1346],"mapped",[1394]],[[1347,1347],"mapped",[1395]],[[1348,1348],"mapped",[1396]],[[1349,1349],"mapped",[1397]],[[1350,1350],"mapped",[1398]],[[1351,1351],"mapped",[1399]],[[1352,1352],"mapped",[1400]],[[1353,1353],"mapped",[1401]],[[1354,1354],"mapped",[1402]],[[1355,1355],"mapped",[1403]],[[1356,1356],"mapped",[1404]],[[1357,1357],"mapped",[1405]],[[1358,1358],"mapped",[1406]],[[1359,1359],"mapped",[1407]],[[1360,1360],"mapped",[1408]],[[1361,1361],"mapped",[1409]],[[1362,1362],"mapped",[1410]],[[1363,1363],"mapped",[1411]],[[1364,1364],"mapped",[1412]],[[1365,1365],"mapped",[1413]],[[1366,1366],"mapped",[1414]],[[1367,1368],"disallowed"],[[1369,1369],"valid"],[[1370,1375],"valid",[],"NV8"],[[1376,1376],"disallowed"],[[1377,1414],"valid"],[[1415,1415],"mapped",[1381,1410]],[[1416,1416],"disallowed"],[[1417,1417],"valid",[],"NV8"],[[1418,1418],"valid",[],"NV8"],[[1419,1420],"disallowed"],[[1421,1422],"valid",[],"NV8"],[[1423,1423],"valid",[],"NV8"],[[1424,1424],"disallowed"],[[1425,1441],"valid"],[[1442,1442],"valid"],[[1443,1455],"valid"],[[1456,1465],"valid"],[[1466,1466],"valid"],[[1467,1469],"valid"],[[1470,1470],"valid",[],"NV8"],[[1471,1471],"valid"],[[1472,1472],"valid",[],"NV8"],[[1473,1474],"valid"],[[1475,1475],"valid",[],"NV8"],[[1476,1476],"valid"],[[1477,1477],"valid"],[[1478,1478],"valid",[],"NV8"],[[1479,1479],"valid"],[[1480,1487],"disallowed"],[[1488,1514],"valid"],[[1515,1519],"disallowed"],[[1520,1524],"valid"],[[1525,1535],"disallowed"],[[1536,1539],"disallowed"],[[1540,1540],"disallowed"],[[1541,1541],"disallowed"],[[1542,1546],"valid",[],"NV8"],[[1547,1547],"valid",[],"NV8"],[[1548,1548],"valid",[],"NV8"],[[1549,1551],"valid",[],"NV8"],[[1552,1557],"valid"],[[1558,1562],"valid"],[[1563,1563],"valid",[],"NV8"],[[1564,1564],"disallowed"],[[1565,1565],"disallowed"],[[1566,1566],"valid",[],"NV8"],[[1567,1567],"valid",[],"NV8"],[[1568,1568],"valid"],[[1569,1594],"valid"],[[1595,1599],"valid"],[[1600,1600],"valid",[],"NV8"],[[1601,1618],"valid"],[[1619,1621],"valid"],[[1622,1624],"valid"],[[1625,1630],"valid"],[[1631,1631],"valid"],[[1632,1641],"valid"],[[1642,1645],"valid",[],"NV8"],[[1646,1647],"valid"],[[1648,1652],"valid"],[[1653,1653],"mapped",[1575,1652]],[[1654,1654],"mapped",[1608,1652]],[[1655,1655],"mapped",[1735,1652]],[[1656,1656],"mapped",[1610,1652]],[[1657,1719],"valid"],[[1720,1721],"valid"],[[1722,1726],"valid"],[[1727,1727],"valid"],[[1728,1742],"valid"],[[1743,1743],"valid"],[[1744,1747],"valid"],[[1748,1748],"valid",[],"NV8"],[[1749,1756],"valid"],[[1757,1757],"disallowed"],[[1758,1758],"valid",[],"NV8"],[[1759,1768],"valid"],[[1769,1769],"valid",[],"NV8"],[[1770,1773],"valid"],[[1774,1775],"valid"],[[1776,1785],"valid"],[[1786,1790],"valid"],[[1791,1791],"valid"],[[1792,1805],"valid",[],"NV8"],[[1806,1806],"disallowed"],[[1807,1807],"disallowed"],[[1808,1836],"valid"],[[1837,1839],"valid"],[[1840,1866],"valid"],[[1867,1868],"disallowed"],[[1869,1871],"valid"],[[1872,1901],"valid"],[[1902,1919],"valid"],[[1920,1968],"valid"],[[1969,1969],"valid"],[[1970,1983],"disallowed"],[[1984,2037],"valid"],[[2038,2042],"valid",[],"NV8"],[[2043,2047],"disallowed"],[[2048,2093],"valid"],[[2094,2095],"disallowed"],[[2096,2110],"valid",[],"NV8"],[[2111,2111],"disallowed"],[[2112,2139],"valid"],[[2140,2141],"disallowed"],[[2142,2142],"valid",[],"NV8"],[[2143,2207],"disallowed"],[[2208,2208],"valid"],[[2209,2209],"valid"],[[2210,2220],"valid"],[[2221,2226],"valid"],[[2227,2228],"valid"],[[2229,2274],"disallowed"],[[2275,2275],"valid"],[[2276,2302],"valid"],[[2303,2303],"valid"],[[2304,2304],"valid"],[[2305,2307],"valid"],[[2308,2308],"valid"],[[2309,2361],"valid"],[[2362,2363],"valid"],[[2364,2381],"valid"],[[2382,2382],"valid"],[[2383,2383],"valid"],[[2384,2388],"valid"],[[2389,2389],"valid"],[[2390,2391],"valid"],[[2392,2392],"mapped",[2325,2364]],[[2393,2393],"mapped",[2326,2364]],[[2394,2394],"mapped",[2327,2364]],[[2395,2395],"mapped",[2332,2364]],[[2396,2396],"mapped",[2337,2364]],[[2397,2397],"mapped",[2338,2364]],[[2398,2398],"mapped",[2347,2364]],[[2399,2399],"mapped",[2351,2364]],[[2400,2403],"valid"],[[2404,2405],"valid",[],"NV8"],[[2406,2415],"valid"],[[2416,2416],"valid",[],"NV8"],[[2417,2418],"valid"],[[2419,2423],"valid"],[[2424,2424],"valid"],[[2425,2426],"valid"],[[2427,2428],"valid"],[[2429,2429],"valid"],[[2430,2431],"valid"],[[2432,2432],"valid"],[[2433,2435],"valid"],[[2436,2436],"disallowed"],[[2437,2444],"valid"],[[2445,2446],"disallowed"],[[2447,2448],"valid"],[[2449,2450],"disallowed"],[[2451,2472],"valid"],[[2473,2473],"disallowed"],[[2474,2480],"valid"],[[2481,2481],"disallowed"],[[2482,2482],"valid"],[[2483,2485],"disallowed"],[[2486,2489],"valid"],[[2490,2491],"disallowed"],[[2492,2492],"valid"],[[2493,2493],"valid"],[[2494,2500],"valid"],[[2501,2502],"disallowed"],[[2503,2504],"valid"],[[2505,2506],"disallowed"],[[2507,2509],"valid"],[[2510,2510],"valid"],[[2511,2518],"disallowed"],[[2519,2519],"valid"],[[2520,2523],"disallowed"],[[2524,2524],"mapped",[2465,2492]],[[2525,2525],"mapped",[2466,2492]],[[2526,2526],"disallowed"],[[2527,2527],"mapped",[2479,2492]],[[2528,2531],"valid"],[[2532,2533],"disallowed"],[[2534,2545],"valid"],[[2546,2554],"valid",[],"NV8"],[[2555,2555],"valid",[],"NV8"],[[2556,2560],"disallowed"],[[2561,2561],"valid"],[[2562,2562],"valid"],[[2563,2563],"valid"],[[2564,2564],"disallowed"],[[2565,2570],"valid"],[[2571,2574],"disallowed"],[[2575,2576],"valid"],[[2577,2578],"disallowed"],[[2579,2600],"valid"],[[2601,2601],"disallowed"],[[2602,2608],"valid"],[[2609,2609],"disallowed"],[[2610,2610],"valid"],[[2611,2611],"mapped",[2610,2620]],[[2612,2612],"disallowed"],[[2613,2613],"valid"],[[2614,2614],"mapped",[2616,2620]],[[2615,2615],"disallowed"],[[2616,2617],"valid"],[[2618,2619],"disallowed"],[[2620,2620],"valid"],[[2621,2621],"disallowed"],[[2622,2626],"valid"],[[2627,2630],"disallowed"],[[2631,2632],"valid"],[[2633,2634],"disallowed"],[[2635,2637],"valid"],[[2638,2640],"disallowed"],[[2641,2641],"valid"],[[2642,2648],"disallowed"],[[2649,2649],"mapped",[2582,2620]],[[2650,2650],"mapped",[2583,2620]],[[2651,2651],"mapped",[2588,2620]],[[2652,2652],"valid"],[[2653,2653],"disallowed"],[[2654,2654],"mapped",[2603,2620]],[[2655,2661],"disallowed"],[[2662,2676],"valid"],[[2677,2677],"valid"],[[2678,2688],"disallowed"],[[2689,2691],"valid"],[[2692,2692],"disallowed"],[[2693,2699],"valid"],[[2700,2700],"valid"],[[2701,2701],"valid"],[[2702,2702],"disallowed"],[[2703,2705],"valid"],[[2706,2706],"disallowed"],[[2707,2728],"valid"],[[2729,2729],"disallowed"],[[2730,2736],"valid"],[[2737,2737],"disallowed"],[[2738,2739],"valid"],[[2740,2740],"disallowed"],[[2741,2745],"valid"],[[2746,2747],"disallowed"],[[2748,2757],"valid"],[[2758,2758],"disallowed"],[[2759,2761],"valid"],[[2762,2762],"disallowed"],[[2763,2765],"valid"],[[2766,2767],"disallowed"],[[2768,2768],"valid"],[[2769,2783],"disallowed"],[[2784,2784],"valid"],[[2785,2787],"valid"],[[2788,2789],"disallowed"],[[2790,2799],"valid"],[[2800,2800],"valid",[],"NV8"],[[2801,2801],"valid",[],"NV8"],[[2802,2808],"disallowed"],[[2809,2809],"valid"],[[2810,2816],"disallowed"],[[2817,2819],"valid"],[[2820,2820],"disallowed"],[[2821,2828],"valid"],[[2829,2830],"disallowed"],[[2831,2832],"valid"],[[2833,2834],"disallowed"],[[2835,2856],"valid"],[[2857,2857],"disallowed"],[[2858,2864],"valid"],[[2865,2865],"disallowed"],[[2866,2867],"valid"],[[2868,2868],"disallowed"],[[2869,2869],"valid"],[[2870,2873],"valid"],[[2874,2875],"disallowed"],[[2876,2883],"valid"],[[2884,2884],"valid"],[[2885,2886],"disallowed"],[[2887,2888],"valid"],[[2889,2890],"disallowed"],[[2891,2893],"valid"],[[2894,2901],"disallowed"],[[2902,2903],"valid"],[[2904,2907],"disallowed"],[[2908,2908],"mapped",[2849,2876]],[[2909,2909],"mapped",[2850,2876]],[[2910,2910],"disallowed"],[[2911,2913],"valid"],[[2914,2915],"valid"],[[2916,2917],"disallowed"],[[2918,2927],"valid"],[[2928,2928],"valid",[],"NV8"],[[2929,2929],"valid"],[[2930,2935],"valid",[],"NV8"],[[2936,2945],"disallowed"],[[2946,2947],"valid"],[[2948,2948],"disallowed"],[[2949,2954],"valid"],[[2955,2957],"disallowed"],[[2958,2960],"valid"],[[2961,2961],"disallowed"],[[2962,2965],"valid"],[[2966,2968],"disallowed"],[[2969,2970],"valid"],[[2971,2971],"disallowed"],[[2972,2972],"valid"],[[2973,2973],"disallowed"],[[2974,2975],"valid"],[[2976,2978],"disallowed"],[[2979,2980],"valid"],[[2981,2983],"disallowed"],[[2984,2986],"valid"],[[2987,2989],"disallowed"],[[2990,2997],"valid"],[[2998,2998],"valid"],[[2999,3001],"valid"],[[3002,3005],"disallowed"],[[3006,3010],"valid"],[[3011,3013],"disallowed"],[[3014,3016],"valid"],[[3017,3017],"disallowed"],[[3018,3021],"valid"],[[3022,3023],"disallowed"],[[3024,3024],"valid"],[[3025,3030],"disallowed"],[[3031,3031],"valid"],[[3032,3045],"disallowed"],[[3046,3046],"valid"],[[3047,3055],"valid"],[[3056,3058],"valid",[],"NV8"],[[3059,3066],"valid",[],"NV8"],[[3067,3071],"disallowed"],[[3072,3072],"valid"],[[3073,3075],"valid"],[[3076,3076],"disallowed"],[[3077,3084],"valid"],[[3085,3085],"disallowed"],[[3086,3088],"valid"],[[3089,3089],"disallowed"],[[3090,3112],"valid"],[[3113,3113],"disallowed"],[[3114,3123],"valid"],[[3124,3124],"valid"],[[3125,3129],"valid"],[[3130,3132],"disallowed"],[[3133,3133],"valid"],[[3134,3140],"valid"],[[3141,3141],"disallowed"],[[3142,3144],"valid"],[[3145,3145],"disallowed"],[[3146,3149],"valid"],[[3150,3156],"disallowed"],[[3157,3158],"valid"],[[3159,3159],"disallowed"],[[3160,3161],"valid"],[[3162,3162],"valid"],[[3163,3167],"disallowed"],[[3168,3169],"valid"],[[3170,3171],"valid"],[[3172,3173],"disallowed"],[[3174,3183],"valid"],[[3184,3191],"disallowed"],[[3192,3199],"valid",[],"NV8"],[[3200,3200],"disallowed"],[[3201,3201],"valid"],[[3202,3203],"valid"],[[3204,3204],"disallowed"],[[3205,3212],"valid"],[[3213,3213],"disallowed"],[[3214,3216],"valid"],[[3217,3217],"disallowed"],[[3218,3240],"valid"],[[3241,3241],"disallowed"],[[3242,3251],"valid"],[[3252,3252],"disallowed"],[[3253,3257],"valid"],[[3258,3259],"disallowed"],[[3260,3261],"valid"],[[3262,3268],"valid"],[[3269,3269],"disallowed"],[[3270,3272],"valid"],[[3273,3273],"disallowed"],[[3274,3277],"valid"],[[3278,3284],"disallowed"],[[3285,3286],"valid"],[[3287,3293],"disallowed"],[[3294,3294],"valid"],[[3295,3295],"disallowed"],[[3296,3297],"valid"],[[3298,3299],"valid"],[[3300,3301],"disallowed"],[[3302,3311],"valid"],[[3312,3312],"disallowed"],[[3313,3314],"valid"],[[3315,3328],"disallowed"],[[3329,3329],"valid"],[[3330,3331],"valid"],[[3332,3332],"disallowed"],[[3333,3340],"valid"],[[3341,3341],"disallowed"],[[3342,3344],"valid"],[[3345,3345],"disallowed"],[[3346,3368],"valid"],[[3369,3369],"valid"],[[3370,3385],"valid"],[[3386,3386],"valid"],[[3387,3388],"disallowed"],[[3389,3389],"valid"],[[3390,3395],"valid"],[[3396,3396],"valid"],[[3397,3397],"disallowed"],[[3398,3400],"valid"],[[3401,3401],"disallowed"],[[3402,3405],"valid"],[[3406,3406],"valid"],[[3407,3414],"disallowed"],[[3415,3415],"valid"],[[3416,3422],"disallowed"],[[3423,3423],"valid"],[[3424,3425],"valid"],[[3426,3427],"valid"],[[3428,3429],"disallowed"],[[3430,3439],"valid"],[[3440,3445],"valid",[],"NV8"],[[3446,3448],"disallowed"],[[3449,3449],"valid",[],"NV8"],[[3450,3455],"valid"],[[3456,3457],"disallowed"],[[3458,3459],"valid"],[[3460,3460],"disallowed"],[[3461,3478],"valid"],[[3479,3481],"disallowed"],[[3482,3505],"valid"],[[3506,3506],"disallowed"],[[3507,3515],"valid"],[[3516,3516],"disallowed"],[[3517,3517],"valid"],[[3518,3519],"disallowed"],[[3520,3526],"valid"],[[3527,3529],"disallowed"],[[3530,3530],"valid"],[[3531,3534],"disallowed"],[[3535,3540],"valid"],[[3541,3541],"disallowed"],[[3542,3542],"valid"],[[3543,3543],"disallowed"],[[3544,3551],"valid"],[[3552,3557],"disallowed"],[[3558,3567],"valid"],[[3568,3569],"disallowed"],[[3570,3571],"valid"],[[3572,3572],"valid",[],"NV8"],[[3573,3584],"disallowed"],[[3585,3634],"valid"],[[3635,3635],"mapped",[3661,3634]],[[3636,3642],"valid"],[[3643,3646],"disallowed"],[[3647,3647],"valid",[],"NV8"],[[3648,3662],"valid"],[[3663,3663],"valid",[],"NV8"],[[3664,3673],"valid"],[[3674,3675],"valid",[],"NV8"],[[3676,3712],"disallowed"],[[3713,3714],"valid"],[[3715,3715],"disallowed"],[[3716,3716],"valid"],[[3717,3718],"disallowed"],[[3719,3720],"valid"],[[3721,3721],"disallowed"],[[3722,3722],"valid"],[[3723,3724],"disallowed"],[[3725,3725],"valid"],[[3726,3731],"disallowed"],[[3732,3735],"valid"],[[3736,3736],"disallowed"],[[3737,3743],"valid"],[[3744,3744],"disallowed"],[[3745,3747],"valid"],[[3748,3748],"disallowed"],[[3749,3749],"valid"],[[3750,3750],"disallowed"],[[3751,3751],"valid"],[[3752,3753],"disallowed"],[[3754,3755],"valid"],[[3756,3756],"disallowed"],[[3757,3762],"valid"],[[3763,3763],"mapped",[3789,3762]],[[3764,3769],"valid"],[[3770,3770],"disallowed"],[[3771,3773],"valid"],[[3774,3775],"disallowed"],[[3776,3780],"valid"],[[3781,3781],"disallowed"],[[3782,3782],"valid"],[[3783,3783],"disallowed"],[[3784,3789],"valid"],[[3790,3791],"disallowed"],[[3792,3801],"valid"],[[3802,3803],"disallowed"],[[3804,3804],"mapped",[3755,3737]],[[3805,3805],"mapped",[3755,3745]],[[3806,3807],"valid"],[[3808,3839],"disallowed"],[[3840,3840],"valid"],[[3841,3850],"valid",[],"NV8"],[[3851,3851],"valid"],[[3852,3852],"mapped",[3851]],[[3853,3863],"valid",[],"NV8"],[[3864,3865],"valid"],[[3866,3871],"valid",[],"NV8"],[[3872,3881],"valid"],[[3882,3892],"valid",[],"NV8"],[[3893,3893],"valid"],[[3894,3894],"valid",[],"NV8"],[[3895,3895],"valid"],[[3896,3896],"valid",[],"NV8"],[[3897,3897],"valid"],[[3898,3901],"valid",[],"NV8"],[[3902,3906],"valid"],[[3907,3907],"mapped",[3906,4023]],[[3908,3911],"valid"],[[3912,3912],"disallowed"],[[3913,3916],"valid"],[[3917,3917],"mapped",[3916,4023]],[[3918,3921],"valid"],[[3922,3922],"mapped",[3921,4023]],[[3923,3926],"valid"],[[3927,3927],"mapped",[3926,4023]],[[3928,3931],"valid"],[[3932,3932],"mapped",[3931,4023]],[[3933,3944],"valid"],[[3945,3945],"mapped",[3904,4021]],[[3946,3946],"valid"],[[3947,3948],"valid"],[[3949,3952],"disallowed"],[[3953,3954],"valid"],[[3955,3955],"mapped",[3953,3954]],[[3956,3956],"valid"],[[3957,3957],"mapped",[3953,3956]],[[3958,3958],"mapped",[4018,3968]],[[3959,3959],"mapped",[4018,3953,3968]],[[3960,3960],"mapped",[4019,3968]],[[3961,3961],"mapped",[4019,3953,3968]],[[3962,3968],"valid"],[[3969,3969],"mapped",[3953,3968]],[[3970,3972],"valid"],[[3973,3973],"valid",[],"NV8"],[[3974,3979],"valid"],[[3980,3983],"valid"],[[3984,3986],"valid"],[[3987,3987],"mapped",[3986,4023]],[[3988,3989],"valid"],[[3990,3990],"valid"],[[3991,3991],"valid"],[[3992,3992],"disallowed"],[[3993,3996],"valid"],[[3997,3997],"mapped",[3996,4023]],[[3998,4001],"valid"],[[4002,4002],"mapped",[4001,4023]],[[4003,4006],"valid"],[[4007,4007],"mapped",[4006,4023]],[[4008,4011],"valid"],[[4012,4012],"mapped",[4011,4023]],[[4013,4013],"valid"],[[4014,4016],"valid"],[[4017,4023],"valid"],[[4024,4024],"valid"],[[4025,4025],"mapped",[3984,4021]],[[4026,4028],"valid"],[[4029,4029],"disallowed"],[[4030,4037],"valid",[],"NV8"],[[4038,4038],"valid"],[[4039,4044],"valid",[],"NV8"],[[4045,4045],"disallowed"],[[4046,4046],"valid",[],"NV8"],[[4047,4047],"valid",[],"NV8"],[[4048,4049],"valid",[],"NV8"],[[4050,4052],"valid",[],"NV8"],[[4053,4056],"valid",[],"NV8"],[[4057,4058],"valid",[],"NV8"],[[4059,4095],"disallowed"],[[4096,4129],"valid"],[[4130,4130],"valid"],[[4131,4135],"valid"],[[4136,4136],"valid"],[[4137,4138],"valid"],[[4139,4139],"valid"],[[4140,4146],"valid"],[[4147,4149],"valid"],[[4150,4153],"valid"],[[4154,4159],"valid"],[[4160,4169],"valid"],[[4170,4175],"valid",[],"NV8"],[[4176,4185],"valid"],[[4186,4249],"valid"],[[4250,4253],"valid"],[[4254,4255],"valid",[],"NV8"],[[4256,4293],"disallowed"],[[4294,4294],"disallowed"],[[4295,4295],"mapped",[11559]],[[4296,4300],"disallowed"],[[4301,4301],"mapped",[11565]],[[4302,4303],"disallowed"],[[4304,4342],"valid"],[[4343,4344],"valid"],[[4345,4346],"valid"],[[4347,4347],"valid",[],"NV8"],[[4348,4348],"mapped",[4316]],[[4349,4351],"valid"],[[4352,4441],"valid",[],"NV8"],[[4442,4446],"valid",[],"NV8"],[[4447,4448],"disallowed"],[[4449,4514],"valid",[],"NV8"],[[4515,4519],"valid",[],"NV8"],[[4520,4601],"valid",[],"NV8"],[[4602,4607],"valid",[],"NV8"],[[4608,4614],"valid"],[[4615,4615],"valid"],[[4616,4678],"valid"],[[4679,4679],"valid"],[[4680,4680],"valid"],[[4681,4681],"disallowed"],[[4682,4685],"valid"],[[4686,4687],"disallowed"],[[4688,4694],"valid"],[[4695,4695],"disallowed"],[[4696,4696],"valid"],[[4697,4697],"disallowed"],[[4698,4701],"valid"],[[4702,4703],"disallowed"],[[4704,4742],"valid"],[[4743,4743],"valid"],[[4744,4744],"valid"],[[4745,4745],"disallowed"],[[4746,4749],"valid"],[[4750,4751],"disallowed"],[[4752,4782],"valid"],[[4783,4783],"valid"],[[4784,4784],"valid"],[[4785,4785],"disallowed"],[[4786,4789],"valid"],[[4790,4791],"disallowed"],[[4792,4798],"valid"],[[4799,4799],"disallowed"],[[4800,4800],"valid"],[[4801,4801],"disallowed"],[[4802,4805],"valid"],[[4806,4807],"disallowed"],[[4808,4814],"valid"],[[4815,4815],"valid"],[[4816,4822],"valid"],[[4823,4823],"disallowed"],[[4824,4846],"valid"],[[4847,4847],"valid"],[[4848,4878],"valid"],[[4879,4879],"valid"],[[4880,4880],"valid"],[[4881,4881],"disallowed"],[[4882,4885],"valid"],[[4886,4887],"disallowed"],[[4888,4894],"valid"],[[4895,4895],"valid"],[[4896,4934],"valid"],[[4935,4935],"valid"],[[4936,4954],"valid"],[[4955,4956],"disallowed"],[[4957,4958],"valid"],[[4959,4959],"valid"],[[4960,4960],"valid",[],"NV8"],[[4961,4988],"valid",[],"NV8"],[[4989,4991],"disallowed"],[[4992,5007],"valid"],[[5008,5017],"valid",[],"NV8"],[[5018,5023],"disallowed"],[[5024,5108],"valid"],[[5109,5109],"valid"],[[5110,5111],"disallowed"],[[5112,5112],"mapped",[5104]],[[5113,5113],"mapped",[5105]],[[5114,5114],"mapped",[5106]],[[5115,5115],"mapped",[5107]],[[5116,5116],"mapped",[5108]],[[5117,5117],"mapped",[5109]],[[5118,5119],"disallowed"],[[5120,5120],"valid",[],"NV8"],[[5121,5740],"valid"],[[5741,5742],"valid",[],"NV8"],[[5743,5750],"valid"],[[5751,5759],"valid"],[[5760,5760],"disallowed"],[[5761,5786],"valid"],[[5787,5788],"valid",[],"NV8"],[[5789,5791],"disallowed"],[[5792,5866],"valid"],[[5867,5872],"valid",[],"NV8"],[[5873,5880],"valid"],[[5881,5887],"disallowed"],[[5888,5900],"valid"],[[5901,5901],"disallowed"],[[5902,5908],"valid"],[[5909,5919],"disallowed"],[[5920,5940],"valid"],[[5941,5942],"valid",[],"NV8"],[[5943,5951],"disallowed"],[[5952,5971],"valid"],[[5972,5983],"disallowed"],[[5984,5996],"valid"],[[5997,5997],"disallowed"],[[5998,6000],"valid"],[[6001,6001],"disallowed"],[[6002,6003],"valid"],[[6004,6015],"disallowed"],[[6016,6067],"valid"],[[6068,6069],"disallowed"],[[6070,6099],"valid"],[[6100,6102],"valid",[],"NV8"],[[6103,6103],"valid"],[[6104,6107],"valid",[],"NV8"],[[6108,6108],"valid"],[[6109,6109],"valid"],[[6110,6111],"disallowed"],[[6112,6121],"valid"],[[6122,6127],"disallowed"],[[6128,6137],"valid",[],"NV8"],[[6138,6143],"disallowed"],[[6144,6149],"valid",[],"NV8"],[[6150,6150],"disallowed"],[[6151,6154],"valid",[],"NV8"],[[6155,6157],"ignored"],[[6158,6158],"disallowed"],[[6159,6159],"disallowed"],[[6160,6169],"valid"],[[6170,6175],"disallowed"],[[6176,6263],"valid"],[[6264,6271],"disallowed"],[[6272,6313],"valid"],[[6314,6314],"valid"],[[6315,6319],"disallowed"],[[6320,6389],"valid"],[[6390,6399],"disallowed"],[[6400,6428],"valid"],[[6429,6430],"valid"],[[6431,6431],"disallowed"],[[6432,6443],"valid"],[[6444,6447],"disallowed"],[[6448,6459],"valid"],[[6460,6463],"disallowed"],[[6464,6464],"valid",[],"NV8"],[[6465,6467],"disallowed"],[[6468,6469],"valid",[],"NV8"],[[6470,6509],"valid"],[[6510,6511],"disallowed"],[[6512,6516],"valid"],[[6517,6527],"disallowed"],[[6528,6569],"valid"],[[6570,6571],"valid"],[[6572,6575],"disallowed"],[[6576,6601],"valid"],[[6602,6607],"disallowed"],[[6608,6617],"valid"],[[6618,6618],"valid",[],"XV8"],[[6619,6621],"disallowed"],[[6622,6623],"valid",[],"NV8"],[[6624,6655],"valid",[],"NV8"],[[6656,6683],"valid"],[[6684,6685],"disallowed"],[[6686,6687],"valid",[],"NV8"],[[6688,6750],"valid"],[[6751,6751],"disallowed"],[[6752,6780],"valid"],[[6781,6782],"disallowed"],[[6783,6793],"valid"],[[6794,6799],"disallowed"],[[6800,6809],"valid"],[[6810,6815],"disallowed"],[[6816,6822],"valid",[],"NV8"],[[6823,6823],"valid"],[[6824,6829],"valid",[],"NV8"],[[6830,6831],"disallowed"],[[6832,6845],"valid"],[[6846,6846],"valid",[],"NV8"],[[6847,6911],"disallowed"],[[6912,6987],"valid"],[[6988,6991],"disallowed"],[[6992,7001],"valid"],[[7002,7018],"valid",[],"NV8"],[[7019,7027],"valid"],[[7028,7036],"valid",[],"NV8"],[[7037,7039],"disallowed"],[[7040,7082],"valid"],[[7083,7085],"valid"],[[7086,7097],"valid"],[[7098,7103],"valid"],[[7104,7155],"valid"],[[7156,7163],"disallowed"],[[7164,7167],"valid",[],"NV8"],[[7168,7223],"valid"],[[7224,7226],"disallowed"],[[7227,7231],"valid",[],"NV8"],[[7232,7241],"valid"],[[7242,7244],"disallowed"],[[7245,7293],"valid"],[[7294,7295],"valid",[],"NV8"],[[7296,7359],"disallowed"],[[7360,7367],"valid",[],"NV8"],[[7368,7375],"disallowed"],[[7376,7378],"valid"],[[7379,7379],"valid",[],"NV8"],[[7380,7410],"valid"],[[7411,7414],"valid"],[[7415,7415],"disallowed"],[[7416,7417],"valid"],[[7418,7423],"disallowed"],[[7424,7467],"valid"],[[7468,7468],"mapped",[97]],[[7469,7469],"mapped",[230]],[[7470,7470],"mapped",[98]],[[7471,7471],"valid"],[[7472,7472],"mapped",[100]],[[7473,7473],"mapped",[101]],[[7474,7474],"mapped",[477]],[[7475,7475],"mapped",[103]],[[7476,7476],"mapped",[104]],[[7477,7477],"mapped",[105]],[[7478,7478],"mapped",[106]],[[7479,7479],"mapped",[107]],[[7480,7480],"mapped",[108]],[[7481,7481],"mapped",[109]],[[7482,7482],"mapped",[110]],[[7483,7483],"valid"],[[7484,7484],"mapped",[111]],[[7485,7485],"mapped",[547]],[[7486,7486],"mapped",[112]],[[7487,7487],"mapped",[114]],[[7488,7488],"mapped",[116]],[[7489,7489],"mapped",[117]],[[7490,7490],"mapped",[119]],[[7491,7491],"mapped",[97]],[[7492,7492],"mapped",[592]],[[7493,7493],"mapped",[593]],[[7494,7494],"mapped",[7426]],[[7495,7495],"mapped",[98]],[[7496,7496],"mapped",[100]],[[7497,7497],"mapped",[101]],[[7498,7498],"mapped",[601]],[[7499,7499],"mapped",[603]],[[7500,7500],"mapped",[604]],[[7501,7501],"mapped",[103]],[[7502,7502],"valid"],[[7503,7503],"mapped",[107]],[[7504,7504],"mapped",[109]],[[7505,7505],"mapped",[331]],[[7506,7506],"mapped",[111]],[[7507,7507],"mapped",[596]],[[7508,7508],"mapped",[7446]],[[7509,7509],"mapped",[7447]],[[7510,7510],"mapped",[112]],[[7511,7511],"mapped",[116]],[[7512,7512],"mapped",[117]],[[7513,7513],"mapped",[7453]],[[7514,7514],"mapped",[623]],[[7515,7515],"mapped",[118]],[[7516,7516],"mapped",[7461]],[[7517,7517],"mapped",[946]],[[7518,7518],"mapped",[947]],[[7519,7519],"mapped",[948]],[[7520,7520],"mapped",[966]],[[7521,7521],"mapped",[967]],[[7522,7522],"mapped",[105]],[[7523,7523],"mapped",[114]],[[7524,7524],"mapped",[117]],[[7525,7525],"mapped",[118]],[[7526,7526],"mapped",[946]],[[7527,7527],"mapped",[947]],[[7528,7528],"mapped",[961]],[[7529,7529],"mapped",[966]],[[7530,7530],"mapped",[967]],[[7531,7531],"valid"],[[7532,7543],"valid"],[[7544,7544],"mapped",[1085]],[[7545,7578],"valid"],[[7579,7579],"mapped",[594]],[[7580,7580],"mapped",[99]],[[7581,7581],"mapped",[597]],[[7582,7582],"mapped",[240]],[[7583,7583],"mapped",[604]],[[7584,7584],"mapped",[102]],[[7585,7585],"mapped",[607]],[[7586,7586],"mapped",[609]],[[7587,7587],"mapped",[613]],[[7588,7588],"mapped",[616]],[[7589,7589],"mapped",[617]],[[7590,7590],"mapped",[618]],[[7591,7591],"mapped",[7547]],[[7592,7592],"mapped",[669]],[[7593,7593],"mapped",[621]],[[7594,7594],"mapped",[7557]],[[7595,7595],"mapped",[671]],[[7596,7596],"mapped",[625]],[[7597,7597],"mapped",[624]],[[7598,7598],"mapped",[626]],[[7599,7599],"mapped",[627]],[[7600,7600],"mapped",[628]],[[7601,7601],"mapped",[629]],[[7602,7602],"mapped",[632]],[[7603,7603],"mapped",[642]],[[7604,7604],"mapped",[643]],[[7605,7605],"mapped",[427]],[[7606,7606],"mapped",[649]],[[7607,7607],"mapped",[650]],[[7608,7608],"mapped",[7452]],[[7609,7609],"mapped",[651]],[[7610,7610],"mapped",[652]],[[7611,7611],"mapped",[122]],[[7612,7612],"mapped",[656]],[[7613,7613],"mapped",[657]],[[7614,7614],"mapped",[658]],[[7615,7615],"mapped",[952]],[[7616,7619],"valid"],[[7620,7626],"valid"],[[7627,7654],"valid"],[[7655,7669],"valid"],[[7670,7675],"disallowed"],[[7676,7676],"valid"],[[7677,7677],"valid"],[[7678,7679],"valid"],[[7680,7680],"mapped",[7681]],[[7681,7681],"valid"],[[7682,7682],"mapped",[7683]],[[7683,7683],"valid"],[[7684,7684],"mapped",[7685]],[[7685,7685],"valid"],[[7686,7686],"mapped",[7687]],[[7687,7687],"valid"],[[7688,7688],"mapped",[7689]],[[7689,7689],"valid"],[[7690,7690],"mapped",[7691]],[[7691,7691],"valid"],[[7692,7692],"mapped",[7693]],[[7693,7693],"valid"],[[7694,7694],"mapped",[7695]],[[7695,7695],"valid"],[[7696,7696],"mapped",[7697]],[[7697,7697],"valid"],[[7698,7698],"mapped",[7699]],[[7699,7699],"valid"],[[7700,7700],"mapped",[7701]],[[7701,7701],"valid"],[[7702,7702],"mapped",[7703]],[[7703,7703],"valid"],[[7704,7704],"mapped",[7705]],[[7705,7705],"valid"],[[7706,7706],"mapped",[7707]],[[7707,7707],"valid"],[[7708,7708],"mapped",[7709]],[[7709,7709],"valid"],[[7710,7710],"mapped",[7711]],[[7711,7711],"valid"],[[7712,7712],"mapped",[7713]],[[7713,7713],"valid"],[[7714,7714],"mapped",[7715]],[[7715,7715],"valid"],[[7716,7716],"mapped",[7717]],[[7717,7717],"valid"],[[7718,7718],"mapped",[7719]],[[7719,7719],"valid"],[[7720,7720],"mapped",[7721]],[[7721,7721],"valid"],[[7722,7722],"mapped",[7723]],[[7723,7723],"valid"],[[7724,7724],"mapped",[7725]],[[7725,7725],"valid"],[[7726,7726],"mapped",[7727]],[[7727,7727],"valid"],[[7728,7728],"mapped",[7729]],[[7729,7729],"valid"],[[7730,7730],"mapped",[7731]],[[7731,7731],"valid"],[[7732,7732],"mapped",[7733]],[[7733,7733],"valid"],[[7734,7734],"mapped",[7735]],[[7735,7735],"valid"],[[7736,7736],"mapped",[7737]],[[7737,7737],"valid"],[[7738,7738],"mapped",[7739]],[[7739,7739],"valid"],[[7740,7740],"mapped",[7741]],[[7741,7741],"valid"],[[7742,7742],"mapped",[7743]],[[7743,7743],"valid"],[[7744,7744],"mapped",[7745]],[[7745,7745],"valid"],[[7746,7746],"mapped",[7747]],[[7747,7747],"valid"],[[7748,7748],"mapped",[7749]],[[7749,7749],"valid"],[[7750,7750],"mapped",[7751]],[[7751,7751],"valid"],[[7752,7752],"mapped",[7753]],[[7753,7753],"valid"],[[7754,7754],"mapped",[7755]],[[7755,7755],"valid"],[[7756,7756],"mapped",[7757]],[[7757,7757],"valid"],[[7758,7758],"mapped",[7759]],[[7759,7759],"valid"],[[7760,7760],"mapped",[7761]],[[7761,7761],"valid"],[[7762,7762],"mapped",[7763]],[[7763,7763],"valid"],[[7764,7764],"mapped",[7765]],[[7765,7765],"valid"],[[7766,7766],"mapped",[7767]],[[7767,7767],"valid"],[[7768,7768],"mapped",[7769]],[[7769,7769],"valid"],[[7770,7770],"mapped",[7771]],[[7771,7771],"valid"],[[7772,7772],"mapped",[7773]],[[7773,7773],"valid"],[[7774,7774],"mapped",[7775]],[[7775,7775],"valid"],[[7776,7776],"mapped",[7777]],[[7777,7777],"valid"],[[7778,7778],"mapped",[7779]],[[7779,7779],"valid"],[[7780,7780],"mapped",[7781]],[[7781,7781],"valid"],[[7782,7782],"mapped",[7783]],[[7783,7783],"valid"],[[7784,7784],"mapped",[7785]],[[7785,7785],"valid"],[[7786,7786],"mapped",[7787]],[[7787,7787],"valid"],[[7788,7788],"mapped",[7789]],[[7789,7789],"valid"],[[7790,7790],"mapped",[7791]],[[7791,7791],"valid"],[[7792,7792],"mapped",[7793]],[[7793,7793],"valid"],[[7794,7794],"mapped",[7795]],[[7795,7795],"valid"],[[7796,7796],"mapped",[7797]],[[7797,7797],"valid"],[[7798,7798],"mapped",[7799]],[[7799,7799],"valid"],[[7800,7800],"mapped",[7801]],[[7801,7801],"valid"],[[7802,7802],"mapped",[7803]],[[7803,7803],"valid"],[[7804,7804],"mapped",[7805]],[[7805,7805],"valid"],[[7806,7806],"mapped",[7807]],[[7807,7807],"valid"],[[7808,7808],"mapped",[7809]],[[7809,7809],"valid"],[[7810,7810],"mapped",[7811]],[[7811,7811],"valid"],[[7812,7812],"mapped",[7813]],[[7813,7813],"valid"],[[7814,7814],"mapped",[7815]],[[7815,7815],"valid"],[[7816,7816],"mapped",[7817]],[[7817,7817],"valid"],[[7818,7818],"mapped",[7819]],[[7819,7819],"valid"],[[7820,7820],"mapped",[7821]],[[7821,7821],"valid"],[[7822,7822],"mapped",[7823]],[[7823,7823],"valid"],[[7824,7824],"mapped",[7825]],[[7825,7825],"valid"],[[7826,7826],"mapped",[7827]],[[7827,7827],"valid"],[[7828,7828],"mapped",[7829]],[[7829,7833],"valid"],[[7834,7834],"mapped",[97,702]],[[7835,7835],"mapped",[7777]],[[7836,7837],"valid"],[[7838,7838],"mapped",[115,115]],[[7839,7839],"valid"],[[7840,7840],"mapped",[7841]],[[7841,7841],"valid"],[[7842,7842],"mapped",[7843]],[[7843,7843],"valid"],[[7844,7844],"mapped",[7845]],[[7845,7845],"valid"],[[7846,7846],"mapped",[7847]],[[7847,7847],"valid"],[[7848,7848],"mapped",[7849]],[[7849,7849],"valid"],[[7850,7850],"mapped",[7851]],[[7851,7851],"valid"],[[7852,7852],"mapped",[7853]],[[7853,7853],"valid"],[[7854,7854],"mapped",[7855]],[[7855,7855],"valid"],[[7856,7856],"mapped",[7857]],[[7857,7857],"valid"],[[7858,7858],"mapped",[7859]],[[7859,7859],"valid"],[[7860,7860],"mapped",[7861]],[[7861,7861],"valid"],[[7862,7862],"mapped",[7863]],[[7863,7863],"valid"],[[7864,7864],"mapped",[7865]],[[7865,7865],"valid"],[[7866,7866],"mapped",[7867]],[[7867,7867],"valid"],[[7868,7868],"mapped",[7869]],[[7869,7869],"valid"],[[7870,7870],"mapped",[7871]],[[7871,7871],"valid"],[[7872,7872],"mapped",[7873]],[[7873,7873],"valid"],[[7874,7874],"mapped",[7875]],[[7875,7875],"valid"],[[7876,7876],"mapped",[7877]],[[7877,7877],"valid"],[[7878,7878],"mapped",[7879]],[[7879,7879],"valid"],[[7880,7880],"mapped",[7881]],[[7881,7881],"valid"],[[7882,7882],"mapped",[7883]],[[7883,7883],"valid"],[[7884,7884],"mapped",[7885]],[[7885,7885],"valid"],[[7886,7886],"mapped",[7887]],[[7887,7887],"valid"],[[7888,7888],"mapped",[7889]],[[7889,7889],"valid"],[[7890,7890],"mapped",[7891]],[[7891,7891],"valid"],[[7892,7892],"mapped",[7893]],[[7893,7893],"valid"],[[7894,7894],"mapped",[7895]],[[7895,7895],"valid"],[[7896,7896],"mapped",[7897]],[[7897,7897],"valid"],[[7898,7898],"mapped",[7899]],[[7899,7899],"valid"],[[7900,7900],"mapped",[7901]],[[7901,7901],"valid"],[[7902,7902],"mapped",[7903]],[[7903,7903],"valid"],[[7904,7904],"mapped",[7905]],[[7905,7905],"valid"],[[7906,7906],"mapped",[7907]],[[7907,7907],"valid"],[[7908,7908],"mapped",[7909]],[[7909,7909],"valid"],[[7910,7910],"mapped",[7911]],[[7911,7911],"valid"],[[7912,7912],"mapped",[7913]],[[7913,7913],"valid"],[[7914,7914],"mapped",[7915]],[[7915,7915],"valid"],[[7916,7916],"mapped",[7917]],[[7917,7917],"valid"],[[7918,7918],"mapped",[7919]],[[7919,7919],"valid"],[[7920,7920],"mapped",[7921]],[[7921,7921],"valid"],[[7922,7922],"mapped",[7923]],[[7923,7923],"valid"],[[7924,7924],"mapped",[7925]],[[7925,7925],"valid"],[[7926,7926],"mapped",[7927]],[[7927,7927],"valid"],[[7928,7928],"mapped",[7929]],[[7929,7929],"valid"],[[7930,7930],"mapped",[7931]],[[7931,7931],"valid"],[[7932,7932],"mapped",[7933]],[[7933,7933],"valid"],[[7934,7934],"mapped",[7935]],[[7935,7935],"valid"],[[7936,7943],"valid"],[[7944,7944],"mapped",[7936]],[[7945,7945],"mapped",[7937]],[[7946,7946],"mapped",[7938]],[[7947,7947],"mapped",[7939]],[[7948,7948],"mapped",[7940]],[[7949,7949],"mapped",[7941]],[[7950,7950],"mapped",[7942]],[[7951,7951],"mapped",[7943]],[[7952,7957],"valid"],[[7958,7959],"disallowed"],[[7960,7960],"mapped",[7952]],[[7961,7961],"mapped",[7953]],[[7962,7962],"mapped",[7954]],[[7963,7963],"mapped",[7955]],[[7964,7964],"mapped",[7956]],[[7965,7965],"mapped",[7957]],[[7966,7967],"disallowed"],[[7968,7975],"valid"],[[7976,7976],"mapped",[7968]],[[7977,7977],"mapped",[7969]],[[7978,7978],"mapped",[7970]],[[7979,7979],"mapped",[7971]],[[7980,7980],"mapped",[7972]],[[7981,7981],"mapped",[7973]],[[7982,7982],"mapped",[7974]],[[7983,7983],"mapped",[7975]],[[7984,7991],"valid"],[[7992,7992],"mapped",[7984]],[[7993,7993],"mapped",[7985]],[[7994,7994],"mapped",[7986]],[[7995,7995],"mapped",[7987]],[[7996,7996],"mapped",[7988]],[[7997,7997],"mapped",[7989]],[[7998,7998],"mapped",[7990]],[[7999,7999],"mapped",[7991]],[[8000,8005],"valid"],[[8006,8007],"disallowed"],[[8008,8008],"mapped",[8000]],[[8009,8009],"mapped",[8001]],[[8010,8010],"mapped",[8002]],[[8011,8011],"mapped",[8003]],[[8012,8012],"mapped",[8004]],[[8013,8013],"mapped",[8005]],[[8014,8015],"disallowed"],[[8016,8023],"valid"],[[8024,8024],"disallowed"],[[8025,8025],"mapped",[8017]],[[8026,8026],"disallowed"],[[8027,8027],"mapped",[8019]],[[8028,8028],"disallowed"],[[8029,8029],"mapped",[8021]],[[8030,8030],"disallowed"],[[8031,8031],"mapped",[8023]],[[8032,8039],"valid"],[[8040,8040],"mapped",[8032]],[[8041,8041],"mapped",[8033]],[[8042,8042],"mapped",[8034]],[[8043,8043],"mapped",[8035]],[[8044,8044],"mapped",[8036]],[[8045,8045],"mapped",[8037]],[[8046,8046],"mapped",[8038]],[[8047,8047],"mapped",[8039]],[[8048,8048],"valid"],[[8049,8049],"mapped",[940]],[[8050,8050],"valid"],[[8051,8051],"mapped",[941]],[[8052,8052],"valid"],[[8053,8053],"mapped",[942]],[[8054,8054],"valid"],[[8055,8055],"mapped",[943]],[[8056,8056],"valid"],[[8057,8057],"mapped",[972]],[[8058,8058],"valid"],[[8059,8059],"mapped",[973]],[[8060,8060],"valid"],[[8061,8061],"mapped",[974]],[[8062,8063],"disallowed"],[[8064,8064],"mapped",[7936,953]],[[8065,8065],"mapped",[7937,953]],[[8066,8066],"mapped",[7938,953]],[[8067,8067],"mapped",[7939,953]],[[8068,8068],"mapped",[7940,953]],[[8069,8069],"mapped",[7941,953]],[[8070,8070],"mapped",[7942,953]],[[8071,8071],"mapped",[7943,953]],[[8072,8072],"mapped",[7936,953]],[[8073,8073],"mapped",[7937,953]],[[8074,8074],"mapped",[7938,953]],[[8075,8075],"mapped",[7939,953]],[[8076,8076],"mapped",[7940,953]],[[8077,8077],"mapped",[7941,953]],[[8078,8078],"mapped",[7942,953]],[[8079,8079],"mapped",[7943,953]],[[8080,8080],"mapped",[7968,953]],[[8081,8081],"mapped",[7969,953]],[[8082,8082],"mapped",[7970,953]],[[8083,8083],"mapped",[7971,953]],[[8084,8084],"mapped",[7972,953]],[[8085,8085],"mapped",[7973,953]],[[8086,8086],"mapped",[7974,953]],[[8087,8087],"mapped",[7975,953]],[[8088,8088],"mapped",[7968,953]],[[8089,8089],"mapped",[7969,953]],[[8090,8090],"mapped",[7970,953]],[[8091,8091],"mapped",[7971,953]],[[8092,8092],"mapped",[7972,953]],[[8093,8093],"mapped",[7973,953]],[[8094,8094],"mapped",[7974,953]],[[8095,8095],"mapped",[7975,953]],[[8096,8096],"mapped",[8032,953]],[[8097,8097],"mapped",[8033,953]],[[8098,8098],"mapped",[8034,953]],[[8099,8099],"mapped",[8035,953]],[[8100,8100],"mapped",[8036,953]],[[8101,8101],"mapped",[8037,953]],[[8102,8102],"mapped",[8038,953]],[[8103,8103],"mapped",[8039,953]],[[8104,8104],"mapped",[8032,953]],[[8105,8105],"mapped",[8033,953]],[[8106,8106],"mapped",[8034,953]],[[8107,8107],"mapped",[8035,953]],[[8108,8108],"mapped",[8036,953]],[[8109,8109],"mapped",[8037,953]],[[8110,8110],"mapped",[8038,953]],[[8111,8111],"mapped",[8039,953]],[[8112,8113],"valid"],[[8114,8114],"mapped",[8048,953]],[[8115,8115],"mapped",[945,953]],[[8116,8116],"mapped",[940,953]],[[8117,8117],"disallowed"],[[8118,8118],"valid"],[[8119,8119],"mapped",[8118,953]],[[8120,8120],"mapped",[8112]],[[8121,8121],"mapped",[8113]],[[8122,8122],"mapped",[8048]],[[8123,8123],"mapped",[940]],[[8124,8124],"mapped",[945,953]],[[8125,8125],"disallowed_STD3_mapped",[32,787]],[[8126,8126],"mapped",[953]],[[8127,8127],"disallowed_STD3_mapped",[32,787]],[[8128,8128],"disallowed_STD3_mapped",[32,834]],[[8129,8129],"disallowed_STD3_mapped",[32,776,834]],[[8130,8130],"mapped",[8052,953]],[[8131,8131],"mapped",[951,953]],[[8132,8132],"mapped",[942,953]],[[8133,8133],"disallowed"],[[8134,8134],"valid"],[[8135,8135],"mapped",[8134,953]],[[8136,8136],"mapped",[8050]],[[8137,8137],"mapped",[941]],[[8138,8138],"mapped",[8052]],[[8139,8139],"mapped",[942]],[[8140,8140],"mapped",[951,953]],[[8141,8141],"disallowed_STD3_mapped",[32,787,768]],[[8142,8142],"disallowed_STD3_mapped",[32,787,769]],[[8143,8143],"disallowed_STD3_mapped",[32,787,834]],[[8144,8146],"valid"],[[8147,8147],"mapped",[912]],[[8148,8149],"disallowed"],[[8150,8151],"valid"],[[8152,8152],"mapped",[8144]],[[8153,8153],"mapped",[8145]],[[8154,8154],"mapped",[8054]],[[8155,8155],"mapped",[943]],[[8156,8156],"disallowed"],[[8157,8157],"disallowed_STD3_mapped",[32,788,768]],[[8158,8158],"disallowed_STD3_mapped",[32,788,769]],[[8159,8159],"disallowed_STD3_mapped",[32,788,834]],[[8160,8162],"valid"],[[8163,8163],"mapped",[944]],[[8164,8167],"valid"],[[8168,8168],"mapped",[8160]],[[8169,8169],"mapped",[8161]],[[8170,8170],"mapped",[8058]],[[8171,8171],"mapped",[973]],[[8172,8172],"mapped",[8165]],[[8173,8173],"disallowed_STD3_mapped",[32,776,768]],[[8174,8174],"disallowed_STD3_mapped",[32,776,769]],[[8175,8175],"disallowed_STD3_mapped",[96]],[[8176,8177],"disallowed"],[[8178,8178],"mapped",[8060,953]],[[8179,8179],"mapped",[969,953]],[[8180,8180],"mapped",[974,953]],[[8181,8181],"disallowed"],[[8182,8182],"valid"],[[8183,8183],"mapped",[8182,953]],[[8184,8184],"mapped",[8056]],[[8185,8185],"mapped",[972]],[[8186,8186],"mapped",[8060]],[[8187,8187],"mapped",[974]],[[8188,8188],"mapped",[969,953]],[[8189,8189],"disallowed_STD3_mapped",[32,769]],[[8190,8190],"disallowed_STD3_mapped",[32,788]],[[8191,8191],"disallowed"],[[8192,8202],"disallowed_STD3_mapped",[32]],[[8203,8203],"ignored"],[[8204,8205],"deviation",[]],[[8206,8207],"disallowed"],[[8208,8208],"valid",[],"NV8"],[[8209,8209],"mapped",[8208]],[[8210,8214],"valid",[],"NV8"],[[8215,8215],"disallowed_STD3_mapped",[32,819]],[[8216,8227],"valid",[],"NV8"],[[8228,8230],"disallowed"],[[8231,8231],"valid",[],"NV8"],[[8232,8238],"disallowed"],[[8239,8239],"disallowed_STD3_mapped",[32]],[[8240,8242],"valid",[],"NV8"],[[8243,8243],"mapped",[8242,8242]],[[8244,8244],"mapped",[8242,8242,8242]],[[8245,8245],"valid",[],"NV8"],[[8246,8246],"mapped",[8245,8245]],[[8247,8247],"mapped",[8245,8245,8245]],[[8248,8251],"valid",[],"NV8"],[[8252,8252],"disallowed_STD3_mapped",[33,33]],[[8253,8253],"valid",[],"NV8"],[[8254,8254],"disallowed_STD3_mapped",[32,773]],[[8255,8262],"valid",[],"NV8"],[[8263,8263],"disallowed_STD3_mapped",[63,63]],[[8264,8264],"disallowed_STD3_mapped",[63,33]],[[8265,8265],"disallowed_STD3_mapped",[33,63]],[[8266,8269],"valid",[],"NV8"],[[8270,8274],"valid",[],"NV8"],[[8275,8276],"valid",[],"NV8"],[[8277,8278],"valid",[],"NV8"],[[8279,8279],"mapped",[8242,8242,8242,8242]],[[8280,8286],"valid",[],"NV8"],[[8287,8287],"disallowed_STD3_mapped",[32]],[[8288,8288],"ignored"],[[8289,8291],"disallowed"],[[8292,8292],"ignored"],[[8293,8293],"disallowed"],[[8294,8297],"disallowed"],[[8298,8303],"disallowed"],[[8304,8304],"mapped",[48]],[[8305,8305],"mapped",[105]],[[8306,8307],"disallowed"],[[8308,8308],"mapped",[52]],[[8309,8309],"mapped",[53]],[[8310,8310],"mapped",[54]],[[8311,8311],"mapped",[55]],[[8312,8312],"mapped",[56]],[[8313,8313],"mapped",[57]],[[8314,8314],"disallowed_STD3_mapped",[43]],[[8315,8315],"mapped",[8722]],[[8316,8316],"disallowed_STD3_mapped",[61]],[[8317,8317],"disallowed_STD3_mapped",[40]],[[8318,8318],"disallowed_STD3_mapped",[41]],[[8319,8319],"mapped",[110]],[[8320,8320],"mapped",[48]],[[8321,8321],"mapped",[49]],[[8322,8322],"mapped",[50]],[[8323,8323],"mapped",[51]],[[8324,8324],"mapped",[52]],[[8325,8325],"mapped",[53]],[[8326,8326],"mapped",[54]],[[8327,8327],"mapped",[55]],[[8328,8328],"mapped",[56]],[[8329,8329],"mapped",[57]],[[8330,8330],"disallowed_STD3_mapped",[43]],[[8331,8331],"mapped",[8722]],[[8332,8332],"disallowed_STD3_mapped",[61]],[[8333,8333],"disallowed_STD3_mapped",[40]],[[8334,8334],"disallowed_STD3_mapped",[41]],[[8335,8335],"disallowed"],[[8336,8336],"mapped",[97]],[[8337,8337],"mapped",[101]],[[8338,8338],"mapped",[111]],[[8339,8339],"mapped",[120]],[[8340,8340],"mapped",[601]],[[8341,8341],"mapped",[104]],[[8342,8342],"mapped",[107]],[[8343,8343],"mapped",[108]],[[8344,8344],"mapped",[109]],[[8345,8345],"mapped",[110]],[[8346,8346],"mapped",[112]],[[8347,8347],"mapped",[115]],[[8348,8348],"mapped",[116]],[[8349,8351],"disallowed"],[[8352,8359],"valid",[],"NV8"],[[8360,8360],"mapped",[114,115]],[[8361,8362],"valid",[],"NV8"],[[8363,8363],"valid",[],"NV8"],[[8364,8364],"valid",[],"NV8"],[[8365,8367],"valid",[],"NV8"],[[8368,8369],"valid",[],"NV8"],[[8370,8373],"valid",[],"NV8"],[[8374,8376],"valid",[],"NV8"],[[8377,8377],"valid",[],"NV8"],[[8378,8378],"valid",[],"NV8"],[[8379,8381],"valid",[],"NV8"],[[8382,8382],"valid",[],"NV8"],[[8383,8399],"disallowed"],[[8400,8417],"valid",[],"NV8"],[[8418,8419],"valid",[],"NV8"],[[8420,8426],"valid",[],"NV8"],[[8427,8427],"valid",[],"NV8"],[[8428,8431],"valid",[],"NV8"],[[8432,8432],"valid",[],"NV8"],[[8433,8447],"disallowed"],[[8448,8448],"disallowed_STD3_mapped",[97,47,99]],[[8449,8449],"disallowed_STD3_mapped",[97,47,115]],[[8450,8450],"mapped",[99]],[[8451,8451],"mapped",[176,99]],[[8452,8452],"valid",[],"NV8"],[[8453,8453],"disallowed_STD3_mapped",[99,47,111]],[[8454,8454],"disallowed_STD3_mapped",[99,47,117]],[[8455,8455],"mapped",[603]],[[8456,8456],"valid",[],"NV8"],[[8457,8457],"mapped",[176,102]],[[8458,8458],"mapped",[103]],[[8459,8462],"mapped",[104]],[[8463,8463],"mapped",[295]],[[8464,8465],"mapped",[105]],[[8466,8467],"mapped",[108]],[[8468,8468],"valid",[],"NV8"],[[8469,8469],"mapped",[110]],[[8470,8470],"mapped",[110,111]],[[8471,8472],"valid",[],"NV8"],[[8473,8473],"mapped",[112]],[[8474,8474],"mapped",[113]],[[8475,8477],"mapped",[114]],[[8478,8479],"valid",[],"NV8"],[[8480,8480],"mapped",[115,109]],[[8481,8481],"mapped",[116,101,108]],[[8482,8482],"mapped",[116,109]],[[8483,8483],"valid",[],"NV8"],[[8484,8484],"mapped",[122]],[[8485,8485],"valid",[],"NV8"],[[8486,8486],"mapped",[969]],[[8487,8487],"valid",[],"NV8"],[[8488,8488],"mapped",[122]],[[8489,8489],"valid",[],"NV8"],[[8490,8490],"mapped",[107]],[[8491,8491],"mapped",[229]],[[8492,8492],"mapped",[98]],[[8493,8493],"mapped",[99]],[[8494,8494],"valid",[],"NV8"],[[8495,8496],"mapped",[101]],[[8497,8497],"mapped",[102]],[[8498,8498],"disallowed"],[[8499,8499],"mapped",[109]],[[8500,8500],"mapped",[111]],[[8501,8501],"mapped",[1488]],[[8502,8502],"mapped",[1489]],[[8503,8503],"mapped",[1490]],[[8504,8504],"mapped",[1491]],[[8505,8505],"mapped",[105]],[[8506,8506],"valid",[],"NV8"],[[8507,8507],"mapped",[102,97,120]],[[8508,8508],"mapped",[960]],[[8509,8510],"mapped",[947]],[[8511,8511],"mapped",[960]],[[8512,8512],"mapped",[8721]],[[8513,8516],"valid",[],"NV8"],[[8517,8518],"mapped",[100]],[[8519,8519],"mapped",[101]],[[8520,8520],"mapped",[105]],[[8521,8521],"mapped",[106]],[[8522,8523],"valid",[],"NV8"],[[8524,8524],"valid",[],"NV8"],[[8525,8525],"valid",[],"NV8"],[[8526,8526],"valid"],[[8527,8527],"valid",[],"NV8"],[[8528,8528],"mapped",[49,8260,55]],[[8529,8529],"mapped",[49,8260,57]],[[8530,8530],"mapped",[49,8260,49,48]],[[8531,8531],"mapped",[49,8260,51]],[[8532,8532],"mapped",[50,8260,51]],[[8533,8533],"mapped",[49,8260,53]],[[8534,8534],"mapped",[50,8260,53]],[[8535,8535],"mapped",[51,8260,53]],[[8536,8536],"mapped",[52,8260,53]],[[8537,8537],"mapped",[49,8260,54]],[[8538,8538],"mapped",[53,8260,54]],[[8539,8539],"mapped",[49,8260,56]],[[8540,8540],"mapped",[51,8260,56]],[[8541,8541],"mapped",[53,8260,56]],[[8542,8542],"mapped",[55,8260,56]],[[8543,8543],"mapped",[49,8260]],[[8544,8544],"mapped",[105]],[[8545,8545],"mapped",[105,105]],[[8546,8546],"mapped",[105,105,105]],[[8547,8547],"mapped",[105,118]],[[8548,8548],"mapped",[118]],[[8549,8549],"mapped",[118,105]],[[8550,8550],"mapped",[118,105,105]],[[8551,8551],"mapped",[118,105,105,105]],[[8552,8552],"mapped",[105,120]],[[8553,8553],"mapped",[120]],[[8554,8554],"mapped",[120,105]],[[8555,8555],"mapped",[120,105,105]],[[8556,8556],"mapped",[108]],[[8557,8557],"mapped",[99]],[[8558,8558],"mapped",[100]],[[8559,8559],"mapped",[109]],[[8560,8560],"mapped",[105]],[[8561,8561],"mapped",[105,105]],[[8562,8562],"mapped",[105,105,105]],[[8563,8563],"mapped",[105,118]],[[8564,8564],"mapped",[118]],[[8565,8565],"mapped",[118,105]],[[8566,8566],"mapped",[118,105,105]],[[8567,8567],"mapped",[118,105,105,105]],[[8568,8568],"mapped",[105,120]],[[8569,8569],"mapped",[120]],[[8570,8570],"mapped",[120,105]],[[8571,8571],"mapped",[120,105,105]],[[8572,8572],"mapped",[108]],[[8573,8573],"mapped",[99]],[[8574,8574],"mapped",[100]],[[8575,8575],"mapped",[109]],[[8576,8578],"valid",[],"NV8"],[[8579,8579],"disallowed"],[[8580,8580],"valid"],[[8581,8584],"valid",[],"NV8"],[[8585,8585],"mapped",[48,8260,51]],[[8586,8587],"valid",[],"NV8"],[[8588,8591],"disallowed"],[[8592,8682],"valid",[],"NV8"],[[8683,8691],"valid",[],"NV8"],[[8692,8703],"valid",[],"NV8"],[[8704,8747],"valid",[],"NV8"],[[8748,8748],"mapped",[8747,8747]],[[8749,8749],"mapped",[8747,8747,8747]],[[8750,8750],"valid",[],"NV8"],[[8751,8751],"mapped",[8750,8750]],[[8752,8752],"mapped",[8750,8750,8750]],[[8753,8799],"valid",[],"NV8"],[[8800,8800],"disallowed_STD3_valid"],[[8801,8813],"valid",[],"NV8"],[[8814,8815],"disallowed_STD3_valid"],[[8816,8945],"valid",[],"NV8"],[[8946,8959],"valid",[],"NV8"],[[8960,8960],"valid",[],"NV8"],[[8961,8961],"valid",[],"NV8"],[[8962,9000],"valid",[],"NV8"],[[9001,9001],"mapped",[12296]],[[9002,9002],"mapped",[12297]],[[9003,9082],"valid",[],"NV8"],[[9083,9083],"valid",[],"NV8"],[[9084,9084],"valid",[],"NV8"],[[9085,9114],"valid",[],"NV8"],[[9115,9166],"valid",[],"NV8"],[[9167,9168],"valid",[],"NV8"],[[9169,9179],"valid",[],"NV8"],[[9180,9191],"valid",[],"NV8"],[[9192,9192],"valid",[],"NV8"],[[9193,9203],"valid",[],"NV8"],[[9204,9210],"valid",[],"NV8"],[[9211,9215],"disallowed"],[[9216,9252],"valid",[],"NV8"],[[9253,9254],"valid",[],"NV8"],[[9255,9279],"disallowed"],[[9280,9290],"valid",[],"NV8"],[[9291,9311],"disallowed"],[[9312,9312],"mapped",[49]],[[9313,9313],"mapped",[50]],[[9314,9314],"mapped",[51]],[[9315,9315],"mapped",[52]],[[9316,9316],"mapped",[53]],[[9317,9317],"mapped",[54]],[[9318,9318],"mapped",[55]],[[9319,9319],"mapped",[56]],[[9320,9320],"mapped",[57]],[[9321,9321],"mapped",[49,48]],[[9322,9322],"mapped",[49,49]],[[9323,9323],"mapped",[49,50]],[[9324,9324],"mapped",[49,51]],[[9325,9325],"mapped",[49,52]],[[9326,9326],"mapped",[49,53]],[[9327,9327],"mapped",[49,54]],[[9328,9328],"mapped",[49,55]],[[9329,9329],"mapped",[49,56]],[[9330,9330],"mapped",[49,57]],[[9331,9331],"mapped",[50,48]],[[9332,9332],"disallowed_STD3_mapped",[40,49,41]],[[9333,9333],"disallowed_STD3_mapped",[40,50,41]],[[9334,9334],"disallowed_STD3_mapped",[40,51,41]],[[9335,9335],"disallowed_STD3_mapped",[40,52,41]],[[9336,9336],"disallowed_STD3_mapped",[40,53,41]],[[9337,9337],"disallowed_STD3_mapped",[40,54,41]],[[9338,9338],"disallowed_STD3_mapped",[40,55,41]],[[9339,9339],"disallowed_STD3_mapped",[40,56,41]],[[9340,9340],"disallowed_STD3_mapped",[40,57,41]],[[9341,9341],"disallowed_STD3_mapped",[40,49,48,41]],[[9342,9342],"disallowed_STD3_mapped",[40,49,49,41]],[[9343,9343],"disallowed_STD3_mapped",[40,49,50,41]],[[9344,9344],"disallowed_STD3_mapped",[40,49,51,41]],[[9345,9345],"disallowed_STD3_mapped",[40,49,52,41]],[[9346,9346],"disallowed_STD3_mapped",[40,49,53,41]],[[9347,9347],"disallowed_STD3_mapped",[40,49,54,41]],[[9348,9348],"disallowed_STD3_mapped",[40,49,55,41]],[[9349,9349],"disallowed_STD3_mapped",[40,49,56,41]],[[9350,9350],"disallowed_STD3_mapped",[40,49,57,41]],[[9351,9351],"disallowed_STD3_mapped",[40,50,48,41]],[[9352,9371],"disallowed"],[[9372,9372],"disallowed_STD3_mapped",[40,97,41]],[[9373,9373],"disallowed_STD3_mapped",[40,98,41]],[[9374,9374],"disallowed_STD3_mapped",[40,99,41]],[[9375,9375],"disallowed_STD3_mapped",[40,100,41]],[[9376,9376],"disallowed_STD3_mapped",[40,101,41]],[[9377,9377],"disallowed_STD3_mapped",[40,102,41]],[[9378,9378],"disallowed_STD3_mapped",[40,103,41]],[[9379,9379],"disallowed_STD3_mapped",[40,104,41]],[[9380,9380],"disallowed_STD3_mapped",[40,105,41]],[[9381,9381],"disallowed_STD3_mapped",[40,106,41]],[[9382,9382],"disallowed_STD3_mapped",[40,107,41]],[[9383,9383],"disallowed_STD3_mapped",[40,108,41]],[[9384,9384],"disallowed_STD3_mapped",[40,109,41]],[[9385,9385],"disallowed_STD3_mapped",[40,110,41]],[[9386,9386],"disallowed_STD3_mapped",[40,111,41]],[[9387,9387],"disallowed_STD3_mapped",[40,112,41]],[[9388,9388],"disallowed_STD3_mapped",[40,113,41]],[[9389,9389],"disallowed_STD3_mapped",[40,114,41]],[[9390,9390],"disallowed_STD3_mapped",[40,115,41]],[[9391,9391],"disallowed_STD3_mapped",[40,116,41]],[[9392,9392],"disallowed_STD3_mapped",[40,117,41]],[[9393,9393],"disallowed_STD3_mapped",[40,118,41]],[[9394,9394],"disallowed_STD3_mapped",[40,119,41]],[[9395,9395],"disallowed_STD3_mapped",[40,120,41]],[[9396,9396],"disallowed_STD3_mapped",[40,121,41]],[[9397,9397],"disallowed_STD3_mapped",[40,122,41]],[[9398,9398],"mapped",[97]],[[9399,9399],"mapped",[98]],[[9400,9400],"mapped",[99]],[[9401,9401],"mapped",[100]],[[9402,9402],"mapped",[101]],[[9403,9403],"mapped",[102]],[[9404,9404],"mapped",[103]],[[9405,9405],"mapped",[104]],[[9406,9406],"mapped",[105]],[[9407,9407],"mapped",[106]],[[9408,9408],"mapped",[107]],[[9409,9409],"mapped",[108]],[[9410,9410],"mapped",[109]],[[9411,9411],"mapped",[110]],[[9412,9412],"mapped",[111]],[[9413,9413],"mapped",[112]],[[9414,9414],"mapped",[113]],[[9415,9415],"mapped",[114]],[[9416,9416],"mapped",[115]],[[9417,9417],"mapped",[116]],[[9418,9418],"mapped",[117]],[[9419,9419],"mapped",[118]],[[9420,9420],"mapped",[119]],[[9421,9421],"mapped",[120]],[[9422,9422],"mapped",[121]],[[9423,9423],"mapped",[122]],[[9424,9424],"mapped",[97]],[[9425,9425],"mapped",[98]],[[9426,9426],"mapped",[99]],[[9427,9427],"mapped",[100]],[[9428,9428],"mapped",[101]],[[9429,9429],"mapped",[102]],[[9430,9430],"mapped",[103]],[[9431,9431],"mapped",[104]],[[9432,9432],"mapped",[105]],[[9433,9433],"mapped",[106]],[[9434,9434],"mapped",[107]],[[9435,9435],"mapped",[108]],[[9436,9436],"mapped",[109]],[[9437,9437],"mapped",[110]],[[9438,9438],"mapped",[111]],[[9439,9439],"mapped",[112]],[[9440,9440],"mapped",[113]],[[9441,9441],"mapped",[114]],[[9442,9442],"mapped",[115]],[[9443,9443],"mapped",[116]],[[9444,9444],"mapped",[117]],[[9445,9445],"mapped",[118]],[[9446,9446],"mapped",[119]],[[9447,9447],"mapped",[120]],[[9448,9448],"mapped",[121]],[[9449,9449],"mapped",[122]],[[9450,9450],"mapped",[48]],[[9451,9470],"valid",[],"NV8"],[[9471,9471],"valid",[],"NV8"],[[9472,9621],"valid",[],"NV8"],[[9622,9631],"valid",[],"NV8"],[[9632,9711],"valid",[],"NV8"],[[9712,9719],"valid",[],"NV8"],[[9720,9727],"valid",[],"NV8"],[[9728,9747],"valid",[],"NV8"],[[9748,9749],"valid",[],"NV8"],[[9750,9751],"valid",[],"NV8"],[[9752,9752],"valid",[],"NV8"],[[9753,9753],"valid",[],"NV8"],[[9754,9839],"valid",[],"NV8"],[[9840,9841],"valid",[],"NV8"],[[9842,9853],"valid",[],"NV8"],[[9854,9855],"valid",[],"NV8"],[[9856,9865],"valid",[],"NV8"],[[9866,9873],"valid",[],"NV8"],[[9874,9884],"valid",[],"NV8"],[[9885,9885],"valid",[],"NV8"],[[9886,9887],"valid",[],"NV8"],[[9888,9889],"valid",[],"NV8"],[[9890,9905],"valid",[],"NV8"],[[9906,9906],"valid",[],"NV8"],[[9907,9916],"valid",[],"NV8"],[[9917,9919],"valid",[],"NV8"],[[9920,9923],"valid",[],"NV8"],[[9924,9933],"valid",[],"NV8"],[[9934,9934],"valid",[],"NV8"],[[9935,9953],"valid",[],"NV8"],[[9954,9954],"valid",[],"NV8"],[[9955,9955],"valid",[],"NV8"],[[9956,9959],"valid",[],"NV8"],[[9960,9983],"valid",[],"NV8"],[[9984,9984],"valid",[],"NV8"],[[9985,9988],"valid",[],"NV8"],[[9989,9989],"valid",[],"NV8"],[[9990,9993],"valid",[],"NV8"],[[9994,9995],"valid",[],"NV8"],[[9996,10023],"valid",[],"NV8"],[[10024,10024],"valid",[],"NV8"],[[10025,10059],"valid",[],"NV8"],[[10060,10060],"valid",[],"NV8"],[[10061,10061],"valid",[],"NV8"],[[10062,10062],"valid",[],"NV8"],[[10063,10066],"valid",[],"NV8"],[[10067,10069],"valid",[],"NV8"],[[10070,10070],"valid",[],"NV8"],[[10071,10071],"valid",[],"NV8"],[[10072,10078],"valid",[],"NV8"],[[10079,10080],"valid",[],"NV8"],[[10081,10087],"valid",[],"NV8"],[[10088,10101],"valid",[],"NV8"],[[10102,10132],"valid",[],"NV8"],[[10133,10135],"valid",[],"NV8"],[[10136,10159],"valid",[],"NV8"],[[10160,10160],"valid",[],"NV8"],[[10161,10174],"valid",[],"NV8"],[[10175,10175],"valid",[],"NV8"],[[10176,10182],"valid",[],"NV8"],[[10183,10186],"valid",[],"NV8"],[[10187,10187],"valid",[],"NV8"],[[10188,10188],"valid",[],"NV8"],[[10189,10189],"valid",[],"NV8"],[[10190,10191],"valid",[],"NV8"],[[10192,10219],"valid",[],"NV8"],[[10220,10223],"valid",[],"NV8"],[[10224,10239],"valid",[],"NV8"],[[10240,10495],"valid",[],"NV8"],[[10496,10763],"valid",[],"NV8"],[[10764,10764],"mapped",[8747,8747,8747,8747]],[[10765,10867],"valid",[],"NV8"],[[10868,10868],"disallowed_STD3_mapped",[58,58,61]],[[10869,10869],"disallowed_STD3_mapped",[61,61]],[[10870,10870],"disallowed_STD3_mapped",[61,61,61]],[[10871,10971],"valid",[],"NV8"],[[10972,10972],"mapped",[10973,824]],[[10973,11007],"valid",[],"NV8"],[[11008,11021],"valid",[],"NV8"],[[11022,11027],"valid",[],"NV8"],[[11028,11034],"valid",[],"NV8"],[[11035,11039],"valid",[],"NV8"],[[11040,11043],"valid",[],"NV8"],[[11044,11084],"valid",[],"NV8"],[[11085,11087],"valid",[],"NV8"],[[11088,11092],"valid",[],"NV8"],[[11093,11097],"valid",[],"NV8"],[[11098,11123],"valid",[],"NV8"],[[11124,11125],"disallowed"],[[11126,11157],"valid",[],"NV8"],[[11158,11159],"disallowed"],[[11160,11193],"valid",[],"NV8"],[[11194,11196],"disallowed"],[[11197,11208],"valid",[],"NV8"],[[11209,11209],"disallowed"],[[11210,11217],"valid",[],"NV8"],[[11218,11243],"disallowed"],[[11244,11247],"valid",[],"NV8"],[[11248,11263],"disallowed"],[[11264,11264],"mapped",[11312]],[[11265,11265],"mapped",[11313]],[[11266,11266],"mapped",[11314]],[[11267,11267],"mapped",[11315]],[[11268,11268],"mapped",[11316]],[[11269,11269],"mapped",[11317]],[[11270,11270],"mapped",[11318]],[[11271,11271],"mapped",[11319]],[[11272,11272],"mapped",[11320]],[[11273,11273],"mapped",[11321]],[[11274,11274],"mapped",[11322]],[[11275,11275],"mapped",[11323]],[[11276,11276],"mapped",[11324]],[[11277,11277],"mapped",[11325]],[[11278,11278],"mapped",[11326]],[[11279,11279],"mapped",[11327]],[[11280,11280],"mapped",[11328]],[[11281,11281],"mapped",[11329]],[[11282,11282],"mapped",[11330]],[[11283,11283],"mapped",[11331]],[[11284,11284],"mapped",[11332]],[[11285,11285],"mapped",[11333]],[[11286,11286],"mapped",[11334]],[[11287,11287],"mapped",[11335]],[[11288,11288],"mapped",[11336]],[[11289,11289],"mapped",[11337]],[[11290,11290],"mapped",[11338]],[[11291,11291],"mapped",[11339]],[[11292,11292],"mapped",[11340]],[[11293,11293],"mapped",[11341]],[[11294,11294],"mapped",[11342]],[[11295,11295],"mapped",[11343]],[[11296,11296],"mapped",[11344]],[[11297,11297],"mapped",[11345]],[[11298,11298],"mapped",[11346]],[[11299,11299],"mapped",[11347]],[[11300,11300],"mapped",[11348]],[[11301,11301],"mapped",[11349]],[[11302,11302],"mapped",[11350]],[[11303,11303],"mapped",[11351]],[[11304,11304],"mapped",[11352]],[[11305,11305],"mapped",[11353]],[[11306,11306],"mapped",[11354]],[[11307,11307],"mapped",[11355]],[[11308,11308],"mapped",[11356]],[[11309,11309],"mapped",[11357]],[[11310,11310],"mapped",[11358]],[[11311,11311],"disallowed"],[[11312,11358],"valid"],[[11359,11359],"disallowed"],[[11360,11360],"mapped",[11361]],[[11361,11361],"valid"],[[11362,11362],"mapped",[619]],[[11363,11363],"mapped",[7549]],[[11364,11364],"mapped",[637]],[[11365,11366],"valid"],[[11367,11367],"mapped",[11368]],[[11368,11368],"valid"],[[11369,11369],"mapped",[11370]],[[11370,11370],"valid"],[[11371,11371],"mapped",[11372]],[[11372,11372],"valid"],[[11373,11373],"mapped",[593]],[[11374,11374],"mapped",[625]],[[11375,11375],"mapped",[592]],[[11376,11376],"mapped",[594]],[[11377,11377],"valid"],[[11378,11378],"mapped",[11379]],[[11379,11379],"valid"],[[11380,11380],"valid"],[[11381,11381],"mapped",[11382]],[[11382,11383],"valid"],[[11384,11387],"valid"],[[11388,11388],"mapped",[106]],[[11389,11389],"mapped",[118]],[[11390,11390],"mapped",[575]],[[11391,11391],"mapped",[576]],[[11392,11392],"mapped",[11393]],[[11393,11393],"valid"],[[11394,11394],"mapped",[11395]],[[11395,11395],"valid"],[[11396,11396],"mapped",[11397]],[[11397,11397],"valid"],[[11398,11398],"mapped",[11399]],[[11399,11399],"valid"],[[11400,11400],"mapped",[11401]],[[11401,11401],"valid"],[[11402,11402],"mapped",[11403]],[[11403,11403],"valid"],[[11404,11404],"mapped",[11405]],[[11405,11405],"valid"],[[11406,11406],"mapped",[11407]],[[11407,11407],"valid"],[[11408,11408],"mapped",[11409]],[[11409,11409],"valid"],[[11410,11410],"mapped",[11411]],[[11411,11411],"valid"],[[11412,11412],"mapped",[11413]],[[11413,11413],"valid"],[[11414,11414],"mapped",[11415]],[[11415,11415],"valid"],[[11416,11416],"mapped",[11417]],[[11417,11417],"valid"],[[11418,11418],"mapped",[11419]],[[11419,11419],"valid"],[[11420,11420],"mapped",[11421]],[[11421,11421],"valid"],[[11422,11422],"mapped",[11423]],[[11423,11423],"valid"],[[11424,11424],"mapped",[11425]],[[11425,11425],"valid"],[[11426,11426],"mapped",[11427]],[[11427,11427],"valid"],[[11428,11428],"mapped",[11429]],[[11429,11429],"valid"],[[11430,11430],"mapped",[11431]],[[11431,11431],"valid"],[[11432,11432],"mapped",[11433]],[[11433,11433],"valid"],[[11434,11434],"mapped",[11435]],[[11435,11435],"valid"],[[11436,11436],"mapped",[11437]],[[11437,11437],"valid"],[[11438,11438],"mapped",[11439]],[[11439,11439],"valid"],[[11440,11440],"mapped",[11441]],[[11441,11441],"valid"],[[11442,11442],"mapped",[11443]],[[11443,11443],"valid"],[[11444,11444],"mapped",[11445]],[[11445,11445],"valid"],[[11446,11446],"mapped",[11447]],[[11447,11447],"valid"],[[11448,11448],"mapped",[11449]],[[11449,11449],"valid"],[[11450,11450],"mapped",[11451]],[[11451,11451],"valid"],[[11452,11452],"mapped",[11453]],[[11453,11453],"valid"],[[11454,11454],"mapped",[11455]],[[11455,11455],"valid"],[[11456,11456],"mapped",[11457]],[[11457,11457],"valid"],[[11458,11458],"mapped",[11459]],[[11459,11459],"valid"],[[11460,11460],"mapped",[11461]],[[11461,11461],"valid"],[[11462,11462],"mapped",[11463]],[[11463,11463],"valid"],[[11464,11464],"mapped",[11465]],[[11465,11465],"valid"],[[11466,11466],"mapped",[11467]],[[11467,11467],"valid"],[[11468,11468],"mapped",[11469]],[[11469,11469],"valid"],[[11470,11470],"mapped",[11471]],[[11471,11471],"valid"],[[11472,11472],"mapped",[11473]],[[11473,11473],"valid"],[[11474,11474],"mapped",[11475]],[[11475,11475],"valid"],[[11476,11476],"mapped",[11477]],[[11477,11477],"valid"],[[11478,11478],"mapped",[11479]],[[11479,11479],"valid"],[[11480,11480],"mapped",[11481]],[[11481,11481],"valid"],[[11482,11482],"mapped",[11483]],[[11483,11483],"valid"],[[11484,11484],"mapped",[11485]],[[11485,11485],"valid"],[[11486,11486],"mapped",[11487]],[[11487,11487],"valid"],[[11488,11488],"mapped",[11489]],[[11489,11489],"valid"],[[11490,11490],"mapped",[11491]],[[11491,11492],"valid"],[[11493,11498],"valid",[],"NV8"],[[11499,11499],"mapped",[11500]],[[11500,11500],"valid"],[[11501,11501],"mapped",[11502]],[[11502,11505],"valid"],[[11506,11506],"mapped",[11507]],[[11507,11507],"valid"],[[11508,11512],"disallowed"],[[11513,11519],"valid",[],"NV8"],[[11520,11557],"valid"],[[11558,11558],"disallowed"],[[11559,11559],"valid"],[[11560,11564],"disallowed"],[[11565,11565],"valid"],[[11566,11567],"disallowed"],[[11568,11621],"valid"],[[11622,11623],"valid"],[[11624,11630],"disallowed"],[[11631,11631],"mapped",[11617]],[[11632,11632],"valid",[],"NV8"],[[11633,11646],"disallowed"],[[11647,11647],"valid"],[[11648,11670],"valid"],[[11671,11679],"disallowed"],[[11680,11686],"valid"],[[11687,11687],"disallowed"],[[11688,11694],"valid"],[[11695,11695],"disallowed"],[[11696,11702],"valid"],[[11703,11703],"disallowed"],[[11704,11710],"valid"],[[11711,11711],"disallowed"],[[11712,11718],"valid"],[[11719,11719],"disallowed"],[[11720,11726],"valid"],[[11727,11727],"disallowed"],[[11728,11734],"valid"],[[11735,11735],"disallowed"],[[11736,11742],"valid"],[[11743,11743],"disallowed"],[[11744,11775],"valid"],[[11776,11799],"valid",[],"NV8"],[[11800,11803],"valid",[],"NV8"],[[11804,11805],"valid",[],"NV8"],[[11806,11822],"valid",[],"NV8"],[[11823,11823],"valid"],[[11824,11824],"valid",[],"NV8"],[[11825,11825],"valid",[],"NV8"],[[11826,11835],"valid",[],"NV8"],[[11836,11842],"valid",[],"NV8"],[[11843,11903],"disallowed"],[[11904,11929],"valid",[],"NV8"],[[11930,11930],"disallowed"],[[11931,11934],"valid",[],"NV8"],[[11935,11935],"mapped",[27597]],[[11936,12018],"valid",[],"NV8"],[[12019,12019],"mapped",[40863]],[[12020,12031],"disallowed"],[[12032,12032],"mapped",[19968]],[[12033,12033],"mapped",[20008]],[[12034,12034],"mapped",[20022]],[[12035,12035],"mapped",[20031]],[[12036,12036],"mapped",[20057]],[[12037,12037],"mapped",[20101]],[[12038,12038],"mapped",[20108]],[[12039,12039],"mapped",[20128]],[[12040,12040],"mapped",[20154]],[[12041,12041],"mapped",[20799]],[[12042,12042],"mapped",[20837]],[[12043,12043],"mapped",[20843]],[[12044,12044],"mapped",[20866]],[[12045,12045],"mapped",[20886]],[[12046,12046],"mapped",[20907]],[[12047,12047],"mapped",[20960]],[[12048,12048],"mapped",[20981]],[[12049,12049],"mapped",[20992]],[[12050,12050],"mapped",[21147]],[[12051,12051],"mapped",[21241]],[[12052,12052],"mapped",[21269]],[[12053,12053],"mapped",[21274]],[[12054,12054],"mapped",[21304]],[[12055,12055],"mapped",[21313]],[[12056,12056],"mapped",[21340]],[[12057,12057],"mapped",[21353]],[[12058,12058],"mapped",[21378]],[[12059,12059],"mapped",[21430]],[[12060,12060],"mapped",[21448]],[[12061,12061],"mapped",[21475]],[[12062,12062],"mapped",[22231]],[[12063,12063],"mapped",[22303]],[[12064,12064],"mapped",[22763]],[[12065,12065],"mapped",[22786]],[[12066,12066],"mapped",[22794]],[[12067,12067],"mapped",[22805]],[[12068,12068],"mapped",[22823]],[[12069,12069],"mapped",[22899]],[[12070,12070],"mapped",[23376]],[[12071,12071],"mapped",[23424]],[[12072,12072],"mapped",[23544]],[[12073,12073],"mapped",[23567]],[[12074,12074],"mapped",[23586]],[[12075,12075],"mapped",[23608]],[[12076,12076],"mapped",[23662]],[[12077,12077],"mapped",[23665]],[[12078,12078],"mapped",[24027]],[[12079,12079],"mapped",[24037]],[[12080,12080],"mapped",[24049]],[[12081,12081],"mapped",[24062]],[[12082,12082],"mapped",[24178]],[[12083,12083],"mapped",[24186]],[[12084,12084],"mapped",[24191]],[[12085,12085],"mapped",[24308]],[[12086,12086],"mapped",[24318]],[[12087,12087],"mapped",[24331]],[[12088,12088],"mapped",[24339]],[[12089,12089],"mapped",[24400]],[[12090,12090],"mapped",[24417]],[[12091,12091],"mapped",[24435]],[[12092,12092],"mapped",[24515]],[[12093,12093],"mapped",[25096]],[[12094,12094],"mapped",[25142]],[[12095,12095],"mapped",[25163]],[[12096,12096],"mapped",[25903]],[[12097,12097],"mapped",[25908]],[[12098,12098],"mapped",[25991]],[[12099,12099],"mapped",[26007]],[[12100,12100],"mapped",[26020]],[[12101,12101],"mapped",[26041]],[[12102,12102],"mapped",[26080]],[[12103,12103],"mapped",[26085]],[[12104,12104],"mapped",[26352]],[[12105,12105],"mapped",[26376]],[[12106,12106],"mapped",[26408]],[[12107,12107],"mapped",[27424]],[[12108,12108],"mapped",[27490]],[[12109,12109],"mapped",[27513]],[[12110,12110],"mapped",[27571]],[[12111,12111],"mapped",[27595]],[[12112,12112],"mapped",[27604]],[[12113,12113],"mapped",[27611]],[[12114,12114],"mapped",[27663]],[[12115,12115],"mapped",[27668]],[[12116,12116],"mapped",[27700]],[[12117,12117],"mapped",[28779]],[[12118,12118],"mapped",[29226]],[[12119,12119],"mapped",[29238]],[[12120,12120],"mapped",[29243]],[[12121,12121],"mapped",[29247]],[[12122,12122],"mapped",[29255]],[[12123,12123],"mapped",[29273]],[[12124,12124],"mapped",[29275]],[[12125,12125],"mapped",[29356]],[[12126,12126],"mapped",[29572]],[[12127,12127],"mapped",[29577]],[[12128,12128],"mapped",[29916]],[[12129,12129],"mapped",[29926]],[[12130,12130],"mapped",[29976]],[[12131,12131],"mapped",[29983]],[[12132,12132],"mapped",[29992]],[[12133,12133],"mapped",[30000]],[[12134,12134],"mapped",[30091]],[[12135,12135],"mapped",[30098]],[[12136,12136],"mapped",[30326]],[[12137,12137],"mapped",[30333]],[[12138,12138],"mapped",[30382]],[[12139,12139],"mapped",[30399]],[[12140,12140],"mapped",[30446]],[[12141,12141],"mapped",[30683]],[[12142,12142],"mapped",[30690]],[[12143,12143],"mapped",[30707]],[[12144,12144],"mapped",[31034]],[[12145,12145],"mapped",[31160]],[[12146,12146],"mapped",[31166]],[[12147,12147],"mapped",[31348]],[[12148,12148],"mapped",[31435]],[[12149,12149],"mapped",[31481]],[[12150,12150],"mapped",[31859]],[[12151,12151],"mapped",[31992]],[[12152,12152],"mapped",[32566]],[[12153,12153],"mapped",[32593]],[[12154,12154],"mapped",[32650]],[[12155,12155],"mapped",[32701]],[[12156,12156],"mapped",[32769]],[[12157,12157],"mapped",[32780]],[[12158,12158],"mapped",[32786]],[[12159,12159],"mapped",[32819]],[[12160,12160],"mapped",[32895]],[[12161,12161],"mapped",[32905]],[[12162,12162],"mapped",[33251]],[[12163,12163],"mapped",[33258]],[[12164,12164],"mapped",[33267]],[[12165,12165],"mapped",[33276]],[[12166,12166],"mapped",[33292]],[[12167,12167],"mapped",[33307]],[[12168,12168],"mapped",[33311]],[[12169,12169],"mapped",[33390]],[[12170,12170],"mapped",[33394]],[[12171,12171],"mapped",[33400]],[[12172,12172],"mapped",[34381]],[[12173,12173],"mapped",[34411]],[[12174,12174],"mapped",[34880]],[[12175,12175],"mapped",[34892]],[[12176,12176],"mapped",[34915]],[[12177,12177],"mapped",[35198]],[[12178,12178],"mapped",[35211]],[[12179,12179],"mapped",[35282]],[[12180,12180],"mapped",[35328]],[[12181,12181],"mapped",[35895]],[[12182,12182],"mapped",[35910]],[[12183,12183],"mapped",[35925]],[[12184,12184],"mapped",[35960]],[[12185,12185],"mapped",[35997]],[[12186,12186],"mapped",[36196]],[[12187,12187],"mapped",[36208]],[[12188,12188],"mapped",[36275]],[[12189,12189],"mapped",[36523]],[[12190,12190],"mapped",[36554]],[[12191,12191],"mapped",[36763]],[[12192,12192],"mapped",[36784]],[[12193,12193],"mapped",[36789]],[[12194,12194],"mapped",[37009]],[[12195,12195],"mapped",[37193]],[[12196,12196],"mapped",[37318]],[[12197,12197],"mapped",[37324]],[[12198,12198],"mapped",[37329]],[[12199,12199],"mapped",[38263]],[[12200,12200],"mapped",[38272]],[[12201,12201],"mapped",[38428]],[[12202,12202],"mapped",[38582]],[[12203,12203],"mapped",[38585]],[[12204,12204],"mapped",[38632]],[[12205,12205],"mapped",[38737]],[[12206,12206],"mapped",[38750]],[[12207,12207],"mapped",[38754]],[[12208,12208],"mapped",[38761]],[[12209,12209],"mapped",[38859]],[[12210,12210],"mapped",[38893]],[[12211,12211],"mapped",[38899]],[[12212,12212],"mapped",[38913]],[[12213,12213],"mapped",[39080]],[[12214,12214],"mapped",[39131]],[[12215,12215],"mapped",[39135]],[[12216,12216],"mapped",[39318]],[[12217,12217],"mapped",[39321]],[[12218,12218],"mapped",[39340]],[[12219,12219],"mapped",[39592]],[[12220,12220],"mapped",[39640]],[[12221,12221],"mapped",[39647]],[[12222,12222],"mapped",[39717]],[[12223,12223],"mapped",[39727]],[[12224,12224],"mapped",[39730]],[[12225,12225],"mapped",[39740]],[[12226,12226],"mapped",[39770]],[[12227,12227],"mapped",[40165]],[[12228,12228],"mapped",[40565]],[[12229,12229],"mapped",[40575]],[[12230,12230],"mapped",[40613]],[[12231,12231],"mapped",[40635]],[[12232,12232],"mapped",[40643]],[[12233,12233],"mapped",[40653]],[[12234,12234],"mapped",[40657]],[[12235,12235],"mapped",[40697]],[[12236,12236],"mapped",[40701]],[[12237,12237],"mapped",[40718]],[[12238,12238],"mapped",[40723]],[[12239,12239],"mapped",[40736]],[[12240,12240],"mapped",[40763]],[[12241,12241],"mapped",[40778]],[[12242,12242],"mapped",[40786]],[[12243,12243],"mapped",[40845]],[[12244,12244],"mapped",[40860]],[[12245,12245],"mapped",[40864]],[[12246,12271],"disallowed"],[[12272,12283],"disallowed"],[[12284,12287],"disallowed"],[[12288,12288],"disallowed_STD3_mapped",[32]],[[12289,12289],"valid",[],"NV8"],[[12290,12290],"mapped",[46]],[[12291,12292],"valid",[],"NV8"],[[12293,12295],"valid"],[[12296,12329],"valid",[],"NV8"],[[12330,12333],"valid"],[[12334,12341],"valid",[],"NV8"],[[12342,12342],"mapped",[12306]],[[12343,12343],"valid",[],"NV8"],[[12344,12344],"mapped",[21313]],[[12345,12345],"mapped",[21316]],[[12346,12346],"mapped",[21317]],[[12347,12347],"valid",[],"NV8"],[[12348,12348],"valid"],[[12349,12349],"valid",[],"NV8"],[[12350,12350],"valid",[],"NV8"],[[12351,12351],"valid",[],"NV8"],[[12352,12352],"disallowed"],[[12353,12436],"valid"],[[12437,12438],"valid"],[[12439,12440],"disallowed"],[[12441,12442],"valid"],[[12443,12443],"disallowed_STD3_mapped",[32,12441]],[[12444,12444],"disallowed_STD3_mapped",[32,12442]],[[12445,12446],"valid"],[[12447,12447],"mapped",[12424,12426]],[[12448,12448],"valid",[],"NV8"],[[12449,12542],"valid"],[[12543,12543],"mapped",[12467,12488]],[[12544,12548],"disallowed"],[[12549,12588],"valid"],[[12589,12589],"valid"],[[12590,12592],"disallowed"],[[12593,12593],"mapped",[4352]],[[12594,12594],"mapped",[4353]],[[12595,12595],"mapped",[4522]],[[12596,12596],"mapped",[4354]],[[12597,12597],"mapped",[4524]],[[12598,12598],"mapped",[4525]],[[12599,12599],"mapped",[4355]],[[12600,12600],"mapped",[4356]],[[12601,12601],"mapped",[4357]],[[12602,12602],"mapped",[4528]],[[12603,12603],"mapped",[4529]],[[12604,12604],"mapped",[4530]],[[12605,12605],"mapped",[4531]],[[12606,12606],"mapped",[4532]],[[12607,12607],"mapped",[4533]],[[12608,12608],"mapped",[4378]],[[12609,12609],"mapped",[4358]],[[12610,12610],"mapped",[4359]],[[12611,12611],"mapped",[4360]],[[12612,12612],"mapped",[4385]],[[12613,12613],"mapped",[4361]],[[12614,12614],"mapped",[4362]],[[12615,12615],"mapped",[4363]],[[12616,12616],"mapped",[4364]],[[12617,12617],"mapped",[4365]],[[12618,12618],"mapped",[4366]],[[12619,12619],"mapped",[4367]],[[12620,12620],"mapped",[4368]],[[12621,12621],"mapped",[4369]],[[12622,12622],"mapped",[4370]],[[12623,12623],"mapped",[4449]],[[12624,12624],"mapped",[4450]],[[12625,12625],"mapped",[4451]],[[12626,12626],"mapped",[4452]],[[12627,12627],"mapped",[4453]],[[12628,12628],"mapped",[4454]],[[12629,12629],"mapped",[4455]],[[12630,12630],"mapped",[4456]],[[12631,12631],"mapped",[4457]],[[12632,12632],"mapped",[4458]],[[12633,12633],"mapped",[4459]],[[12634,12634],"mapped",[4460]],[[12635,12635],"mapped",[4461]],[[12636,12636],"mapped",[4462]],[[12637,12637],"mapped",[4463]],[[12638,12638],"mapped",[4464]],[[12639,12639],"mapped",[4465]],[[12640,12640],"mapped",[4466]],[[12641,12641],"mapped",[4467]],[[12642,12642],"mapped",[4468]],[[12643,12643],"mapped",[4469]],[[12644,12644],"disallowed"],[[12645,12645],"mapped",[4372]],[[12646,12646],"mapped",[4373]],[[12647,12647],"mapped",[4551]],[[12648,12648],"mapped",[4552]],[[12649,12649],"mapped",[4556]],[[12650,12650],"mapped",[4558]],[[12651,12651],"mapped",[4563]],[[12652,12652],"mapped",[4567]],[[12653,12653],"mapped",[4569]],[[12654,12654],"mapped",[4380]],[[12655,12655],"mapped",[4573]],[[12656,12656],"mapped",[4575]],[[12657,12657],"mapped",[4381]],[[12658,12658],"mapped",[4382]],[[12659,12659],"mapped",[4384]],[[12660,12660],"mapped",[4386]],[[12661,12661],"mapped",[4387]],[[12662,12662],"mapped",[4391]],[[12663,12663],"mapped",[4393]],[[12664,12664],"mapped",[4395]],[[12665,12665],"mapped",[4396]],[[12666,12666],"mapped",[4397]],[[12667,12667],"mapped",[4398]],[[12668,12668],"mapped",[4399]],[[12669,12669],"mapped",[4402]],[[12670,12670],"mapped",[4406]],[[12671,12671],"mapped",[4416]],[[12672,12672],"mapped",[4423]],[[12673,12673],"mapped",[4428]],[[12674,12674],"mapped",[4593]],[[12675,12675],"mapped",[4594]],[[12676,12676],"mapped",[4439]],[[12677,12677],"mapped",[4440]],[[12678,12678],"mapped",[4441]],[[12679,12679],"mapped",[4484]],[[12680,12680],"mapped",[4485]],[[12681,12681],"mapped",[4488]],[[12682,12682],"mapped",[4497]],[[12683,12683],"mapped",[4498]],[[12684,12684],"mapped",[4500]],[[12685,12685],"mapped",[4510]],[[12686,12686],"mapped",[4513]],[[12687,12687],"disallowed"],[[12688,12689],"valid",[],"NV8"],[[12690,12690],"mapped",[19968]],[[12691,12691],"mapped",[20108]],[[12692,12692],"mapped",[19977]],[[12693,12693],"mapped",[22235]],[[12694,12694],"mapped",[19978]],[[12695,12695],"mapped",[20013]],[[12696,12696],"mapped",[19979]],[[12697,12697],"mapped",[30002]],[[12698,12698],"mapped",[20057]],[[12699,12699],"mapped",[19993]],[[12700,12700],"mapped",[19969]],[[12701,12701],"mapped",[22825]],[[12702,12702],"mapped",[22320]],[[12703,12703],"mapped",[20154]],[[12704,12727],"valid"],[[12728,12730],"valid"],[[12731,12735],"disallowed"],[[12736,12751],"valid",[],"NV8"],[[12752,12771],"valid",[],"NV8"],[[12772,12783],"disallowed"],[[12784,12799],"valid"],[[12800,12800],"disallowed_STD3_mapped",[40,4352,41]],[[12801,12801],"disallowed_STD3_mapped",[40,4354,41]],[[12802,12802],"disallowed_STD3_mapped",[40,4355,41]],[[12803,12803],"disallowed_STD3_mapped",[40,4357,41]],[[12804,12804],"disallowed_STD3_mapped",[40,4358,41]],[[12805,12805],"disallowed_STD3_mapped",[40,4359,41]],[[12806,12806],"disallowed_STD3_mapped",[40,4361,41]],[[12807,12807],"disallowed_STD3_mapped",[40,4363,41]],[[12808,12808],"disallowed_STD3_mapped",[40,4364,41]],[[12809,12809],"disallowed_STD3_mapped",[40,4366,41]],[[12810,12810],"disallowed_STD3_mapped",[40,4367,41]],[[12811,12811],"disallowed_STD3_mapped",[40,4368,41]],[[12812,12812],"disallowed_STD3_mapped",[40,4369,41]],[[12813,12813],"disallowed_STD3_mapped",[40,4370,41]],[[12814,12814],"disallowed_STD3_mapped",[40,44032,41]],[[12815,12815],"disallowed_STD3_mapped",[40,45208,41]],[[12816,12816],"disallowed_STD3_mapped",[40,45796,41]],[[12817,12817],"disallowed_STD3_mapped",[40,46972,41]],[[12818,12818],"disallowed_STD3_mapped",[40,47560,41]],[[12819,12819],"disallowed_STD3_mapped",[40,48148,41]],[[12820,12820],"disallowed_STD3_mapped",[40,49324,41]],[[12821,12821],"disallowed_STD3_mapped",[40,50500,41]],[[12822,12822],"disallowed_STD3_mapped",[40,51088,41]],[[12823,12823],"disallowed_STD3_mapped",[40,52264,41]],[[12824,12824],"disallowed_STD3_mapped",[40,52852,41]],[[12825,12825],"disallowed_STD3_mapped",[40,53440,41]],[[12826,12826],"disallowed_STD3_mapped",[40,54028,41]],[[12827,12827],"disallowed_STD3_mapped",[40,54616,41]],[[12828,12828],"disallowed_STD3_mapped",[40,51452,41]],[[12829,12829],"disallowed_STD3_mapped",[40,50724,51204,41]],[[12830,12830],"disallowed_STD3_mapped",[40,50724,54980,41]],[[12831,12831],"disallowed"],[[12832,12832],"disallowed_STD3_mapped",[40,19968,41]],[[12833,12833],"disallowed_STD3_mapped",[40,20108,41]],[[12834,12834],"disallowed_STD3_mapped",[40,19977,41]],[[12835,12835],"disallowed_STD3_mapped",[40,22235,41]],[[12836,12836],"disallowed_STD3_mapped",[40,20116,41]],[[12837,12837],"disallowed_STD3_mapped",[40,20845,41]],[[12838,12838],"disallowed_STD3_mapped",[40,19971,41]],[[12839,12839],"disallowed_STD3_mapped",[40,20843,41]],[[12840,12840],"disallowed_STD3_mapped",[40,20061,41]],[[12841,12841],"disallowed_STD3_mapped",[40,21313,41]],[[12842,12842],"disallowed_STD3_mapped",[40,26376,41]],[[12843,12843],"disallowed_STD3_mapped",[40,28779,41]],[[12844,12844],"disallowed_STD3_mapped",[40,27700,41]],[[12845,12845],"disallowed_STD3_mapped",[40,26408,41]],[[12846,12846],"disallowed_STD3_mapped",[40,37329,41]],[[12847,12847],"disallowed_STD3_mapped",[40,22303,41]],[[12848,12848],"disallowed_STD3_mapped",[40,26085,41]],[[12849,12849],"disallowed_STD3_mapped",[40,26666,41]],[[12850,12850],"disallowed_STD3_mapped",[40,26377,41]],[[12851,12851],"disallowed_STD3_mapped",[40,31038,41]],[[12852,12852],"disallowed_STD3_mapped",[40,21517,41]],[[12853,12853],"disallowed_STD3_mapped",[40,29305,41]],[[12854,12854],"disallowed_STD3_mapped",[40,36001,41]],[[12855,12855],"disallowed_STD3_mapped",[40,31069,41]],[[12856,12856],"disallowed_STD3_mapped",[40,21172,41]],[[12857,12857],"disallowed_STD3_mapped",[40,20195,41]],[[12858,12858],"disallowed_STD3_mapped",[40,21628,41]],[[12859,12859],"disallowed_STD3_mapped",[40,23398,41]],[[12860,12860],"disallowed_STD3_mapped",[40,30435,41]],[[12861,12861],"disallowed_STD3_mapped",[40,20225,41]],[[12862,12862],"disallowed_STD3_mapped",[40,36039,41]],[[12863,12863],"disallowed_STD3_mapped",[40,21332,41]],[[12864,12864],"disallowed_STD3_mapped",[40,31085,41]],[[12865,12865],"disallowed_STD3_mapped",[40,20241,41]],[[12866,12866],"disallowed_STD3_mapped",[40,33258,41]],[[12867,12867],"disallowed_STD3_mapped",[40,33267,41]],[[12868,12868],"mapped",[21839]],[[12869,12869],"mapped",[24188]],[[12870,12870],"mapped",[25991]],[[12871,12871],"mapped",[31631]],[[12872,12879],"valid",[],"NV8"],[[12880,12880],"mapped",[112,116,101]],[[12881,12881],"mapped",[50,49]],[[12882,12882],"mapped",[50,50]],[[12883,12883],"mapped",[50,51]],[[12884,12884],"mapped",[50,52]],[[12885,12885],"mapped",[50,53]],[[12886,12886],"mapped",[50,54]],[[12887,12887],"mapped",[50,55]],[[12888,12888],"mapped",[50,56]],[[12889,12889],"mapped",[50,57]],[[12890,12890],"mapped",[51,48]],[[12891,12891],"mapped",[51,49]],[[12892,12892],"mapped",[51,50]],[[12893,12893],"mapped",[51,51]],[[12894,12894],"mapped",[51,52]],[[12895,12895],"mapped",[51,53]],[[12896,12896],"mapped",[4352]],[[12897,12897],"mapped",[4354]],[[12898,12898],"mapped",[4355]],[[12899,12899],"mapped",[4357]],[[12900,12900],"mapped",[4358]],[[12901,12901],"mapped",[4359]],[[12902,12902],"mapped",[4361]],[[12903,12903],"mapped",[4363]],[[12904,12904],"mapped",[4364]],[[12905,12905],"mapped",[4366]],[[12906,12906],"mapped",[4367]],[[12907,12907],"mapped",[4368]],[[12908,12908],"mapped",[4369]],[[12909,12909],"mapped",[4370]],[[12910,12910],"mapped",[44032]],[[12911,12911],"mapped",[45208]],[[12912,12912],"mapped",[45796]],[[12913,12913],"mapped",[46972]],[[12914,12914],"mapped",[47560]],[[12915,12915],"mapped",[48148]],[[12916,12916],"mapped",[49324]],[[12917,12917],"mapped",[50500]],[[12918,12918],"mapped",[51088]],[[12919,12919],"mapped",[52264]],[[12920,12920],"mapped",[52852]],[[12921,12921],"mapped",[53440]],[[12922,12922],"mapped",[54028]],[[12923,12923],"mapped",[54616]],[[12924,12924],"mapped",[52280,44256]],[[12925,12925],"mapped",[51452,51032]],[[12926,12926],"mapped",[50864]],[[12927,12927],"valid",[],"NV8"],[[12928,12928],"mapped",[19968]],[[12929,12929],"mapped",[20108]],[[12930,12930],"mapped",[19977]],[[12931,12931],"mapped",[22235]],[[12932,12932],"mapped",[20116]],[[12933,12933],"mapped",[20845]],[[12934,12934],"mapped",[19971]],[[12935,12935],"mapped",[20843]],[[12936,12936],"mapped",[20061]],[[12937,12937],"mapped",[21313]],[[12938,12938],"mapped",[26376]],[[12939,12939],"mapped",[28779]],[[12940,12940],"mapped",[27700]],[[12941,12941],"mapped",[26408]],[[12942,12942],"mapped",[37329]],[[12943,12943],"mapped",[22303]],[[12944,12944],"mapped",[26085]],[[12945,12945],"mapped",[26666]],[[12946,12946],"mapped",[26377]],[[12947,12947],"mapped",[31038]],[[12948,12948],"mapped",[21517]],[[12949,12949],"mapped",[29305]],[[12950,12950],"mapped",[36001]],[[12951,12951],"mapped",[31069]],[[12952,12952],"mapped",[21172]],[[12953,12953],"mapped",[31192]],[[12954,12954],"mapped",[30007]],[[12955,12955],"mapped",[22899]],[[12956,12956],"mapped",[36969]],[[12957,12957],"mapped",[20778]],[[12958,12958],"mapped",[21360]],[[12959,12959],"mapped",[27880]],[[12960,12960],"mapped",[38917]],[[12961,12961],"mapped",[20241]],[[12962,12962],"mapped",[20889]],[[12963,12963],"mapped",[27491]],[[12964,12964],"mapped",[19978]],[[12965,12965],"mapped",[20013]],[[12966,12966],"mapped",[19979]],[[12967,12967],"mapped",[24038]],[[12968,12968],"mapped",[21491]],[[12969,12969],"mapped",[21307]],[[12970,12970],"mapped",[23447]],[[12971,12971],"mapped",[23398]],[[12972,12972],"mapped",[30435]],[[12973,12973],"mapped",[20225]],[[12974,12974],"mapped",[36039]],[[12975,12975],"mapped",[21332]],[[12976,12976],"mapped",[22812]],[[12977,12977],"mapped",[51,54]],[[12978,12978],"mapped",[51,55]],[[12979,12979],"mapped",[51,56]],[[12980,12980],"mapped",[51,57]],[[12981,12981],"mapped",[52,48]],[[12982,12982],"mapped",[52,49]],[[12983,12983],"mapped",[52,50]],[[12984,12984],"mapped",[52,51]],[[12985,12985],"mapped",[52,52]],[[12986,12986],"mapped",[52,53]],[[12987,12987],"mapped",[52,54]],[[12988,12988],"mapped",[52,55]],[[12989,12989],"mapped",[52,56]],[[12990,12990],"mapped",[52,57]],[[12991,12991],"mapped",[53,48]],[[12992,12992],"mapped",[49,26376]],[[12993,12993],"mapped",[50,26376]],[[12994,12994],"mapped",[51,26376]],[[12995,12995],"mapped",[52,26376]],[[12996,12996],"mapped",[53,26376]],[[12997,12997],"mapped",[54,26376]],[[12998,12998],"mapped",[55,26376]],[[12999,12999],"mapped",[56,26376]],[[13000,13000],"mapped",[57,26376]],[[13001,13001],"mapped",[49,48,26376]],[[13002,13002],"mapped",[49,49,26376]],[[13003,13003],"mapped",[49,50,26376]],[[13004,13004],"mapped",[104,103]],[[13005,13005],"mapped",[101,114,103]],[[13006,13006],"mapped",[101,118]],[[13007,13007],"mapped",[108,116,100]],[[13008,13008],"mapped",[12450]],[[13009,13009],"mapped",[12452]],[[13010,13010],"mapped",[12454]],[[13011,13011],"mapped",[12456]],[[13012,13012],"mapped",[12458]],[[13013,13013],"mapped",[12459]],[[13014,13014],"mapped",[12461]],[[13015,13015],"mapped",[12463]],[[13016,13016],"mapped",[12465]],[[13017,13017],"mapped",[12467]],[[13018,13018],"mapped",[12469]],[[13019,13019],"mapped",[12471]],[[13020,13020],"mapped",[12473]],[[13021,13021],"mapped",[12475]],[[13022,13022],"mapped",[12477]],[[13023,13023],"mapped",[12479]],[[13024,13024],"mapped",[12481]],[[13025,13025],"mapped",[12484]],[[13026,13026],"mapped",[12486]],[[13027,13027],"mapped",[12488]],[[13028,13028],"mapped",[12490]],[[13029,13029],"mapped",[12491]],[[13030,13030],"mapped",[12492]],[[13031,13031],"mapped",[12493]],[[13032,13032],"mapped",[12494]],[[13033,13033],"mapped",[12495]],[[13034,13034],"mapped",[12498]],[[13035,13035],"mapped",[12501]],[[13036,13036],"mapped",[12504]],[[13037,13037],"mapped",[12507]],[[13038,13038],"mapped",[12510]],[[13039,13039],"mapped",[12511]],[[13040,13040],"mapped",[12512]],[[13041,13041],"mapped",[12513]],[[13042,13042],"mapped",[12514]],[[13043,13043],"mapped",[12516]],[[13044,13044],"mapped",[12518]],[[13045,13045],"mapped",[12520]],[[13046,13046],"mapped",[12521]],[[13047,13047],"mapped",[12522]],[[13048,13048],"mapped",[12523]],[[13049,13049],"mapped",[12524]],[[13050,13050],"mapped",[12525]],[[13051,13051],"mapped",[12527]],[[13052,13052],"mapped",[12528]],[[13053,13053],"mapped",[12529]],[[13054,13054],"mapped",[12530]],[[13055,13055],"disallowed"],[[13056,13056],"mapped",[12450,12497,12540,12488]],[[13057,13057],"mapped",[12450,12523,12501,12449]],[[13058,13058],"mapped",[12450,12531,12506,12450]],[[13059,13059],"mapped",[12450,12540,12523]],[[13060,13060],"mapped",[12452,12491,12531,12464]],[[13061,13061],"mapped",[12452,12531,12481]],[[13062,13062],"mapped",[12454,12457,12531]],[[13063,13063],"mapped",[12456,12473,12463,12540,12489]],[[13064,13064],"mapped",[12456,12540,12459,12540]],[[13065,13065],"mapped",[12458,12531,12473]],[[13066,13066],"mapped",[12458,12540,12512]],[[13067,13067],"mapped",[12459,12452,12522]],[[13068,13068],"mapped",[12459,12521,12483,12488]],[[13069,13069],"mapped",[12459,12525,12522,12540]],[[13070,13070],"mapped",[12460,12525,12531]],[[13071,13071],"mapped",[12460,12531,12510]],[[13072,13072],"mapped",[12462,12460]],[[13073,13073],"mapped",[12462,12491,12540]],[[13074,13074],"mapped",[12461,12517,12522,12540]],[[13075,13075],"mapped",[12462,12523,12480,12540]],[[13076,13076],"mapped",[12461,12525]],[[13077,13077],"mapped",[12461,12525,12464,12521,12512]],[[13078,13078],"mapped",[12461,12525,12513,12540,12488,12523]],[[13079,13079],"mapped",[12461,12525,12527,12483,12488]],[[13080,13080],"mapped",[12464,12521,12512]],[[13081,13081],"mapped",[12464,12521,12512,12488,12531]],[[13082,13082],"mapped",[12463,12523,12476,12452,12525]],[[13083,13083],"mapped",[12463,12525,12540,12493]],[[13084,13084],"mapped",[12465,12540,12473]],[[13085,13085],"mapped",[12467,12523,12490]],[[13086,13086],"mapped",[12467,12540,12509]],[[13087,13087],"mapped",[12469,12452,12463,12523]],[[13088,13088],"mapped",[12469,12531,12481,12540,12512]],[[13089,13089],"mapped",[12471,12522,12531,12464]],[[13090,13090],"mapped",[12475,12531,12481]],[[13091,13091],"mapped",[12475,12531,12488]],[[13092,13092],"mapped",[12480,12540,12473]],[[13093,13093],"mapped",[12487,12471]],[[13094,13094],"mapped",[12489,12523]],[[13095,13095],"mapped",[12488,12531]],[[13096,13096],"mapped",[12490,12494]],[[13097,13097],"mapped",[12494,12483,12488]],[[13098,13098],"mapped",[12495,12452,12484]],[[13099,13099],"mapped",[12497,12540,12475,12531,12488]],[[13100,13100],"mapped",[12497,12540,12484]],[[13101,13101],"mapped",[12496,12540,12524,12523]],[[13102,13102],"mapped",[12500,12450,12473,12488,12523]],[[13103,13103],"mapped",[12500,12463,12523]],[[13104,13104],"mapped",[12500,12467]],[[13105,13105],"mapped",[12499,12523]],[[13106,13106],"mapped",[12501,12449,12521,12483,12489]],[[13107,13107],"mapped",[12501,12451,12540,12488]],[[13108,13108],"mapped",[12502,12483,12471,12455,12523]],[[13109,13109],"mapped",[12501,12521,12531]],[[13110,13110],"mapped",[12504,12463,12479,12540,12523]],[[13111,13111],"mapped",[12506,12477]],[[13112,13112],"mapped",[12506,12491,12498]],[[13113,13113],"mapped",[12504,12523,12484]],[[13114,13114],"mapped",[12506,12531,12473]],[[13115,13115],"mapped",[12506,12540,12472]],[[13116,13116],"mapped",[12505,12540,12479]],[[13117,13117],"mapped",[12509,12452,12531,12488]],[[13118,13118],"mapped",[12508,12523,12488]],[[13119,13119],"mapped",[12507,12531]],[[13120,13120],"mapped",[12509,12531,12489]],[[13121,13121],"mapped",[12507,12540,12523]],[[13122,13122],"mapped",[12507,12540,12531]],[[13123,13123],"mapped",[12510,12452,12463,12525]],[[13124,13124],"mapped",[12510,12452,12523]],[[13125,13125],"mapped",[12510,12483,12495]],[[13126,13126],"mapped",[12510,12523,12463]],[[13127,13127],"mapped",[12510,12531,12471,12519,12531]],[[13128,13128],"mapped",[12511,12463,12525,12531]],[[13129,13129],"mapped",[12511,12522]],[[13130,13130],"mapped",[12511,12522,12496,12540,12523]],[[13131,13131],"mapped",[12513,12460]],[[13132,13132],"mapped",[12513,12460,12488,12531]],[[13133,13133],"mapped",[12513,12540,12488,12523]],[[13134,13134],"mapped",[12516,12540,12489]],[[13135,13135],"mapped",[12516,12540,12523]],[[13136,13136],"mapped",[12518,12450,12531]],[[13137,13137],"mapped",[12522,12483,12488,12523]],[[13138,13138],"mapped",[12522,12521]],[[13139,13139],"mapped",[12523,12500,12540]],[[13140,13140],"mapped",[12523,12540,12502,12523]],[[13141,13141],"mapped",[12524,12512]],[[13142,13142],"mapped",[12524,12531,12488,12466,12531]],[[13143,13143],"mapped",[12527,12483,12488]],[[13144,13144],"mapped",[48,28857]],[[13145,13145],"mapped",[49,28857]],[[13146,13146],"mapped",[50,28857]],[[13147,13147],"mapped",[51,28857]],[[13148,13148],"mapped",[52,28857]],[[13149,13149],"mapped",[53,28857]],[[13150,13150],"mapped",[54,28857]],[[13151,13151],"mapped",[55,28857]],[[13152,13152],"mapped",[56,28857]],[[13153,13153],"mapped",[57,28857]],[[13154,13154],"mapped",[49,48,28857]],[[13155,13155],"mapped",[49,49,28857]],[[13156,13156],"mapped",[49,50,28857]],[[13157,13157],"mapped",[49,51,28857]],[[13158,13158],"mapped",[49,52,28857]],[[13159,13159],"mapped",[49,53,28857]],[[13160,13160],"mapped",[49,54,28857]],[[13161,13161],"mapped",[49,55,28857]],[[13162,13162],"mapped",[49,56,28857]],[[13163,13163],"mapped",[49,57,28857]],[[13164,13164],"mapped",[50,48,28857]],[[13165,13165],"mapped",[50,49,28857]],[[13166,13166],"mapped",[50,50,28857]],[[13167,13167],"mapped",[50,51,28857]],[[13168,13168],"mapped",[50,52,28857]],[[13169,13169],"mapped",[104,112,97]],[[13170,13170],"mapped",[100,97]],[[13171,13171],"mapped",[97,117]],[[13172,13172],"mapped",[98,97,114]],[[13173,13173],"mapped",[111,118]],[[13174,13174],"mapped",[112,99]],[[13175,13175],"mapped",[100,109]],[[13176,13176],"mapped",[100,109,50]],[[13177,13177],"mapped",[100,109,51]],[[13178,13178],"mapped",[105,117]],[[13179,13179],"mapped",[24179,25104]],[[13180,13180],"mapped",[26157,21644]],[[13181,13181],"mapped",[22823,27491]],[[13182,13182],"mapped",[26126,27835]],[[13183,13183],"mapped",[26666,24335,20250,31038]],[[13184,13184],"mapped",[112,97]],[[13185,13185],"mapped",[110,97]],[[13186,13186],"mapped",[956,97]],[[13187,13187],"mapped",[109,97]],[[13188,13188],"mapped",[107,97]],[[13189,13189],"mapped",[107,98]],[[13190,13190],"mapped",[109,98]],[[13191,13191],"mapped",[103,98]],[[13192,13192],"mapped",[99,97,108]],[[13193,13193],"mapped",[107,99,97,108]],[[13194,13194],"mapped",[112,102]],[[13195,13195],"mapped",[110,102]],[[13196,13196],"mapped",[956,102]],[[13197,13197],"mapped",[956,103]],[[13198,13198],"mapped",[109,103]],[[13199,13199],"mapped",[107,103]],[[13200,13200],"mapped",[104,122]],[[13201,13201],"mapped",[107,104,122]],[[13202,13202],"mapped",[109,104,122]],[[13203,13203],"mapped",[103,104,122]],[[13204,13204],"mapped",[116,104,122]],[[13205,13205],"mapped",[956,108]],[[13206,13206],"mapped",[109,108]],[[13207,13207],"mapped",[100,108]],[[13208,13208],"mapped",[107,108]],[[13209,13209],"mapped",[102,109]],[[13210,13210],"mapped",[110,109]],[[13211,13211],"mapped",[956,109]],[[13212,13212],"mapped",[109,109]],[[13213,13213],"mapped",[99,109]],[[13214,13214],"mapped",[107,109]],[[13215,13215],"mapped",[109,109,50]],[[13216,13216],"mapped",[99,109,50]],[[13217,13217],"mapped",[109,50]],[[13218,13218],"mapped",[107,109,50]],[[13219,13219],"mapped",[109,109,51]],[[13220,13220],"mapped",[99,109,51]],[[13221,13221],"mapped",[109,51]],[[13222,13222],"mapped",[107,109,51]],[[13223,13223],"mapped",[109,8725,115]],[[13224,13224],"mapped",[109,8725,115,50]],[[13225,13225],"mapped",[112,97]],[[13226,13226],"mapped",[107,112,97]],[[13227,13227],"mapped",[109,112,97]],[[13228,13228],"mapped",[103,112,97]],[[13229,13229],"mapped",[114,97,100]],[[13230,13230],"mapped",[114,97,100,8725,115]],[[13231,13231],"mapped",[114,97,100,8725,115,50]],[[13232,13232],"mapped",[112,115]],[[13233,13233],"mapped",[110,115]],[[13234,13234],"mapped",[956,115]],[[13235,13235],"mapped",[109,115]],[[13236,13236],"mapped",[112,118]],[[13237,13237],"mapped",[110,118]],[[13238,13238],"mapped",[956,118]],[[13239,13239],"mapped",[109,118]],[[13240,13240],"mapped",[107,118]],[[13241,13241],"mapped",[109,118]],[[13242,13242],"mapped",[112,119]],[[13243,13243],"mapped",[110,119]],[[13244,13244],"mapped",[956,119]],[[13245,13245],"mapped",[109,119]],[[13246,13246],"mapped",[107,119]],[[13247,13247],"mapped",[109,119]],[[13248,13248],"mapped",[107,969]],[[13249,13249],"mapped",[109,969]],[[13250,13250],"disallowed"],[[13251,13251],"mapped",[98,113]],[[13252,13252],"mapped",[99,99]],[[13253,13253],"mapped",[99,100]],[[13254,13254],"mapped",[99,8725,107,103]],[[13255,13255],"disallowed"],[[13256,13256],"mapped",[100,98]],[[13257,13257],"mapped",[103,121]],[[13258,13258],"mapped",[104,97]],[[13259,13259],"mapped",[104,112]],[[13260,13260],"mapped",[105,110]],[[13261,13261],"mapped",[107,107]],[[13262,13262],"mapped",[107,109]],[[13263,13263],"mapped",[107,116]],[[13264,13264],"mapped",[108,109]],[[13265,13265],"mapped",[108,110]],[[13266,13266],"mapped",[108,111,103]],[[13267,13267],"mapped",[108,120]],[[13268,13268],"mapped",[109,98]],[[13269,13269],"mapped",[109,105,108]],[[13270,13270],"mapped",[109,111,108]],[[13271,13271],"mapped",[112,104]],[[13272,13272],"disallowed"],[[13273,13273],"mapped",[112,112,109]],[[13274,13274],"mapped",[112,114]],[[13275,13275],"mapped",[115,114]],[[13276,13276],"mapped",[115,118]],[[13277,13277],"mapped",[119,98]],[[13278,13278],"mapped",[118,8725,109]],[[13279,13279],"mapped",[97,8725,109]],[[13280,13280],"mapped",[49,26085]],[[13281,13281],"mapped",[50,26085]],[[13282,13282],"mapped",[51,26085]],[[13283,13283],"mapped",[52,26085]],[[13284,13284],"mapped",[53,26085]],[[13285,13285],"mapped",[54,26085]],[[13286,13286],"mapped",[55,26085]],[[13287,13287],"mapped",[56,26085]],[[13288,13288],"mapped",[57,26085]],[[13289,13289],"mapped",[49,48,26085]],[[13290,13290],"mapped",[49,49,26085]],[[13291,13291],"mapped",[49,50,26085]],[[13292,13292],"mapped",[49,51,26085]],[[13293,13293],"mapped",[49,52,26085]],[[13294,13294],"mapped",[49,53,26085]],[[13295,13295],"mapped",[49,54,26085]],[[13296,13296],"mapped",[49,55,26085]],[[13297,13297],"mapped",[49,56,26085]],[[13298,13298],"mapped",[49,57,26085]],[[13299,13299],"mapped",[50,48,26085]],[[13300,13300],"mapped",[50,49,26085]],[[13301,13301],"mapped",[50,50,26085]],[[13302,13302],"mapped",[50,51,26085]],[[13303,13303],"mapped",[50,52,26085]],[[13304,13304],"mapped",[50,53,26085]],[[13305,13305],"mapped",[50,54,26085]],[[13306,13306],"mapped",[50,55,26085]],[[13307,13307],"mapped",[50,56,26085]],[[13308,13308],"mapped",[50,57,26085]],[[13309,13309],"mapped",[51,48,26085]],[[13310,13310],"mapped",[51,49,26085]],[[13311,13311],"mapped",[103,97,108]],[[13312,19893],"valid"],[[19894,19903],"disallowed"],[[19904,19967],"valid",[],"NV8"],[[19968,40869],"valid"],[[40870,40891],"valid"],[[40892,40899],"valid"],[[40900,40907],"valid"],[[40908,40908],"valid"],[[40909,40917],"valid"],[[40918,40959],"disallowed"],[[40960,42124],"valid"],[[42125,42127],"disallowed"],[[42128,42145],"valid",[],"NV8"],[[42146,42147],"valid",[],"NV8"],[[42148,42163],"valid",[],"NV8"],[[42164,42164],"valid",[],"NV8"],[[42165,42176],"valid",[],"NV8"],[[42177,42177],"valid",[],"NV8"],[[42178,42180],"valid",[],"NV8"],[[42181,42181],"valid",[],"NV8"],[[42182,42182],"valid",[],"NV8"],[[42183,42191],"disallowed"],[[42192,42237],"valid"],[[42238,42239],"valid",[],"NV8"],[[42240,42508],"valid"],[[42509,42511],"valid",[],"NV8"],[[42512,42539],"valid"],[[42540,42559],"disallowed"],[[42560,42560],"mapped",[42561]],[[42561,42561],"valid"],[[42562,42562],"mapped",[42563]],[[42563,42563],"valid"],[[42564,42564],"mapped",[42565]],[[42565,42565],"valid"],[[42566,42566],"mapped",[42567]],[[42567,42567],"valid"],[[42568,42568],"mapped",[42569]],[[42569,42569],"valid"],[[42570,42570],"mapped",[42571]],[[42571,42571],"valid"],[[42572,42572],"mapped",[42573]],[[42573,42573],"valid"],[[42574,42574],"mapped",[42575]],[[42575,42575],"valid"],[[42576,42576],"mapped",[42577]],[[42577,42577],"valid"],[[42578,42578],"mapped",[42579]],[[42579,42579],"valid"],[[42580,42580],"mapped",[42581]],[[42581,42581],"valid"],[[42582,42582],"mapped",[42583]],[[42583,42583],"valid"],[[42584,42584],"mapped",[42585]],[[42585,42585],"valid"],[[42586,42586],"mapped",[42587]],[[42587,42587],"valid"],[[42588,42588],"mapped",[42589]],[[42589,42589],"valid"],[[42590,42590],"mapped",[42591]],[[42591,42591],"valid"],[[42592,42592],"mapped",[42593]],[[42593,42593],"valid"],[[42594,42594],"mapped",[42595]],[[42595,42595],"valid"],[[42596,42596],"mapped",[42597]],[[42597,42597],"valid"],[[42598,42598],"mapped",[42599]],[[42599,42599],"valid"],[[42600,42600],"mapped",[42601]],[[42601,42601],"valid"],[[42602,42602],"mapped",[42603]],[[42603,42603],"valid"],[[42604,42604],"mapped",[42605]],[[42605,42607],"valid"],[[42608,42611],"valid",[],"NV8"],[[42612,42619],"valid"],[[42620,42621],"valid"],[[42622,42622],"valid",[],"NV8"],[[42623,42623],"valid"],[[42624,42624],"mapped",[42625]],[[42625,42625],"valid"],[[42626,42626],"mapped",[42627]],[[42627,42627],"valid"],[[42628,42628],"mapped",[42629]],[[42629,42629],"valid"],[[42630,42630],"mapped",[42631]],[[42631,42631],"valid"],[[42632,42632],"mapped",[42633]],[[42633,42633],"valid"],[[42634,42634],"mapped",[42635]],[[42635,42635],"valid"],[[42636,42636],"mapped",[42637]],[[42637,42637],"valid"],[[42638,42638],"mapped",[42639]],[[42639,42639],"valid"],[[42640,42640],"mapped",[42641]],[[42641,42641],"valid"],[[42642,42642],"mapped",[42643]],[[42643,42643],"valid"],[[42644,42644],"mapped",[42645]],[[42645,42645],"valid"],[[42646,42646],"mapped",[42647]],[[42647,42647],"valid"],[[42648,42648],"mapped",[42649]],[[42649,42649],"valid"],[[42650,42650],"mapped",[42651]],[[42651,42651],"valid"],[[42652,42652],"mapped",[1098]],[[42653,42653],"mapped",[1100]],[[42654,42654],"valid"],[[42655,42655],"valid"],[[42656,42725],"valid"],[[42726,42735],"valid",[],"NV8"],[[42736,42737],"valid"],[[42738,42743],"valid",[],"NV8"],[[42744,42751],"disallowed"],[[42752,42774],"valid",[],"NV8"],[[42775,42778],"valid"],[[42779,42783],"valid"],[[42784,42785],"valid",[],"NV8"],[[42786,42786],"mapped",[42787]],[[42787,42787],"valid"],[[42788,42788],"mapped",[42789]],[[42789,42789],"valid"],[[42790,42790],"mapped",[42791]],[[42791,42791],"valid"],[[42792,42792],"mapped",[42793]],[[42793,42793],"valid"],[[42794,42794],"mapped",[42795]],[[42795,42795],"valid"],[[42796,42796],"mapped",[42797]],[[42797,42797],"valid"],[[42798,42798],"mapped",[42799]],[[42799,42801],"valid"],[[42802,42802],"mapped",[42803]],[[42803,42803],"valid"],[[42804,42804],"mapped",[42805]],[[42805,42805],"valid"],[[42806,42806],"mapped",[42807]],[[42807,42807],"valid"],[[42808,42808],"mapped",[42809]],[[42809,42809],"valid"],[[42810,42810],"mapped",[42811]],[[42811,42811],"valid"],[[42812,42812],"mapped",[42813]],[[42813,42813],"valid"],[[42814,42814],"mapped",[42815]],[[42815,42815],"valid"],[[42816,42816],"mapped",[42817]],[[42817,42817],"valid"],[[42818,42818],"mapped",[42819]],[[42819,42819],"valid"],[[42820,42820],"mapped",[42821]],[[42821,42821],"valid"],[[42822,42822],"mapped",[42823]],[[42823,42823],"valid"],[[42824,42824],"mapped",[42825]],[[42825,42825],"valid"],[[42826,42826],"mapped",[42827]],[[42827,42827],"valid"],[[42828,42828],"mapped",[42829]],[[42829,42829],"valid"],[[42830,42830],"mapped",[42831]],[[42831,42831],"valid"],[[42832,42832],"mapped",[42833]],[[42833,42833],"valid"],[[42834,42834],"mapped",[42835]],[[42835,42835],"valid"],[[42836,42836],"mapped",[42837]],[[42837,42837],"valid"],[[42838,42838],"mapped",[42839]],[[42839,42839],"valid"],[[42840,42840],"mapped",[42841]],[[42841,42841],"valid"],[[42842,42842],"mapped",[42843]],[[42843,42843],"valid"],[[42844,42844],"mapped",[42845]],[[42845,42845],"valid"],[[42846,42846],"mapped",[42847]],[[42847,42847],"valid"],[[42848,42848],"mapped",[42849]],[[42849,42849],"valid"],[[42850,42850],"mapped",[42851]],[[42851,42851],"valid"],[[42852,42852],"mapped",[42853]],[[42853,42853],"valid"],[[42854,42854],"mapped",[42855]],[[42855,42855],"valid"],[[42856,42856],"mapped",[42857]],[[42857,42857],"valid"],[[42858,42858],"mapped",[42859]],[[42859,42859],"valid"],[[42860,42860],"mapped",[42861]],[[42861,42861],"valid"],[[42862,42862],"mapped",[42863]],[[42863,42863],"valid"],[[42864,42864],"mapped",[42863]],[[42865,42872],"valid"],[[42873,42873],"mapped",[42874]],[[42874,42874],"valid"],[[42875,42875],"mapped",[42876]],[[42876,42876],"valid"],[[42877,42877],"mapped",[7545]],[[42878,42878],"mapped",[42879]],[[42879,42879],"valid"],[[42880,42880],"mapped",[42881]],[[42881,42881],"valid"],[[42882,42882],"mapped",[42883]],[[42883,42883],"valid"],[[42884,42884],"mapped",[42885]],[[42885,42885],"valid"],[[42886,42886],"mapped",[42887]],[[42887,42888],"valid"],[[42889,42890],"valid",[],"NV8"],[[42891,42891],"mapped",[42892]],[[42892,42892],"valid"],[[42893,42893],"mapped",[613]],[[42894,42894],"valid"],[[42895,42895],"valid"],[[42896,42896],"mapped",[42897]],[[42897,42897],"valid"],[[42898,42898],"mapped",[42899]],[[42899,42899],"valid"],[[42900,42901],"valid"],[[42902,42902],"mapped",[42903]],[[42903,42903],"valid"],[[42904,42904],"mapped",[42905]],[[42905,42905],"valid"],[[42906,42906],"mapped",[42907]],[[42907,42907],"valid"],[[42908,42908],"mapped",[42909]],[[42909,42909],"valid"],[[42910,42910],"mapped",[42911]],[[42911,42911],"valid"],[[42912,42912],"mapped",[42913]],[[42913,42913],"valid"],[[42914,42914],"mapped",[42915]],[[42915,42915],"valid"],[[42916,42916],"mapped",[42917]],[[42917,42917],"valid"],[[42918,42918],"mapped",[42919]],[[42919,42919],"valid"],[[42920,42920],"mapped",[42921]],[[42921,42921],"valid"],[[42922,42922],"mapped",[614]],[[42923,42923],"mapped",[604]],[[42924,42924],"mapped",[609]],[[42925,42925],"mapped",[620]],[[42926,42927],"disallowed"],[[42928,42928],"mapped",[670]],[[42929,42929],"mapped",[647]],[[42930,42930],"mapped",[669]],[[42931,42931],"mapped",[43859]],[[42932,42932],"mapped",[42933]],[[42933,42933],"valid"],[[42934,42934],"mapped",[42935]],[[42935,42935],"valid"],[[42936,42998],"disallowed"],[[42999,42999],"valid"],[[43000,43000],"mapped",[295]],[[43001,43001],"mapped",[339]],[[43002,43002],"valid"],[[43003,43007],"valid"],[[43008,43047],"valid"],[[43048,43051],"valid",[],"NV8"],[[43052,43055],"disallowed"],[[43056,43065],"valid",[],"NV8"],[[43066,43071],"disallowed"],[[43072,43123],"valid"],[[43124,43127],"valid",[],"NV8"],[[43128,43135],"disallowed"],[[43136,43204],"valid"],[[43205,43213],"disallowed"],[[43214,43215],"valid",[],"NV8"],[[43216,43225],"valid"],[[43226,43231],"disallowed"],[[43232,43255],"valid"],[[43256,43258],"valid",[],"NV8"],[[43259,43259],"valid"],[[43260,43260],"valid",[],"NV8"],[[43261,43261],"valid"],[[43262,43263],"disallowed"],[[43264,43309],"valid"],[[43310,43311],"valid",[],"NV8"],[[43312,43347],"valid"],[[43348,43358],"disallowed"],[[43359,43359],"valid",[],"NV8"],[[43360,43388],"valid",[],"NV8"],[[43389,43391],"disallowed"],[[43392,43456],"valid"],[[43457,43469],"valid",[],"NV8"],[[43470,43470],"disallowed"],[[43471,43481],"valid"],[[43482,43485],"disallowed"],[[43486,43487],"valid",[],"NV8"],[[43488,43518],"valid"],[[43519,43519],"disallowed"],[[43520,43574],"valid"],[[43575,43583],"disallowed"],[[43584,43597],"valid"],[[43598,43599],"disallowed"],[[43600,43609],"valid"],[[43610,43611],"disallowed"],[[43612,43615],"valid",[],"NV8"],[[43616,43638],"valid"],[[43639,43641],"valid",[],"NV8"],[[43642,43643],"valid"],[[43644,43647],"valid"],[[43648,43714],"valid"],[[43715,43738],"disallowed"],[[43739,43741],"valid"],[[43742,43743],"valid",[],"NV8"],[[43744,43759],"valid"],[[43760,43761],"valid",[],"NV8"],[[43762,43766],"valid"],[[43767,43776],"disallowed"],[[43777,43782],"valid"],[[43783,43784],"disallowed"],[[43785,43790],"valid"],[[43791,43792],"disallowed"],[[43793,43798],"valid"],[[43799,43807],"disallowed"],[[43808,43814],"valid"],[[43815,43815],"disallowed"],[[43816,43822],"valid"],[[43823,43823],"disallowed"],[[43824,43866],"valid"],[[43867,43867],"valid",[],"NV8"],[[43868,43868],"mapped",[42791]],[[43869,43869],"mapped",[43831]],[[43870,43870],"mapped",[619]],[[43871,43871],"mapped",[43858]],[[43872,43875],"valid"],[[43876,43877],"valid"],[[43878,43887],"disallowed"],[[43888,43888],"mapped",[5024]],[[43889,43889],"mapped",[5025]],[[43890,43890],"mapped",[5026]],[[43891,43891],"mapped",[5027]],[[43892,43892],"mapped",[5028]],[[43893,43893],"mapped",[5029]],[[43894,43894],"mapped",[5030]],[[43895,43895],"mapped",[5031]],[[43896,43896],"mapped",[5032]],[[43897,43897],"mapped",[5033]],[[43898,43898],"mapped",[5034]],[[43899,43899],"mapped",[5035]],[[43900,43900],"mapped",[5036]],[[43901,43901],"mapped",[5037]],[[43902,43902],"mapped",[5038]],[[43903,43903],"mapped",[5039]],[[43904,43904],"mapped",[5040]],[[43905,43905],"mapped",[5041]],[[43906,43906],"mapped",[5042]],[[43907,43907],"mapped",[5043]],[[43908,43908],"mapped",[5044]],[[43909,43909],"mapped",[5045]],[[43910,43910],"mapped",[5046]],[[43911,43911],"mapped",[5047]],[[43912,43912],"mapped",[5048]],[[43913,43913],"mapped",[5049]],[[43914,43914],"mapped",[5050]],[[43915,43915],"mapped",[5051]],[[43916,43916],"mapped",[5052]],[[43917,43917],"mapped",[5053]],[[43918,43918],"mapped",[5054]],[[43919,43919],"mapped",[5055]],[[43920,43920],"mapped",[5056]],[[43921,43921],"mapped",[5057]],[[43922,43922],"mapped",[5058]],[[43923,43923],"mapped",[5059]],[[43924,43924],"mapped",[5060]],[[43925,43925],"mapped",[5061]],[[43926,43926],"mapped",[5062]],[[43927,43927],"mapped",[5063]],[[43928,43928],"mapped",[5064]],[[43929,43929],"mapped",[5065]],[[43930,43930],"mapped",[5066]],[[43931,43931],"mapped",[5067]],[[43932,43932],"mapped",[5068]],[[43933,43933],"mapped",[5069]],[[43934,43934],"mapped",[5070]],[[43935,43935],"mapped",[5071]],[[43936,43936],"mapped",[5072]],[[43937,43937],"mapped",[5073]],[[43938,43938],"mapped",[5074]],[[43939,43939],"mapped",[5075]],[[43940,43940],"mapped",[5076]],[[43941,43941],"mapped",[5077]],[[43942,43942],"mapped",[5078]],[[43943,43943],"mapped",[5079]],[[43944,43944],"mapped",[5080]],[[43945,43945],"mapped",[5081]],[[43946,43946],"mapped",[5082]],[[43947,43947],"mapped",[5083]],[[43948,43948],"mapped",[5084]],[[43949,43949],"mapped",[5085]],[[43950,43950],"mapped",[5086]],[[43951,43951],"mapped",[5087]],[[43952,43952],"mapped",[5088]],[[43953,43953],"mapped",[5089]],[[43954,43954],"mapped",[5090]],[[43955,43955],"mapped",[5091]],[[43956,43956],"mapped",[5092]],[[43957,43957],"mapped",[5093]],[[43958,43958],"mapped",[5094]],[[43959,43959],"mapped",[5095]],[[43960,43960],"mapped",[5096]],[[43961,43961],"mapped",[5097]],[[43962,43962],"mapped",[5098]],[[43963,43963],"mapped",[5099]],[[43964,43964],"mapped",[5100]],[[43965,43965],"mapped",[5101]],[[43966,43966],"mapped",[5102]],[[43967,43967],"mapped",[5103]],[[43968,44010],"valid"],[[44011,44011],"valid",[],"NV8"],[[44012,44013],"valid"],[[44014,44015],"disallowed"],[[44016,44025],"valid"],[[44026,44031],"disallowed"],[[44032,55203],"valid"],[[55204,55215],"disallowed"],[[55216,55238],"valid",[],"NV8"],[[55239,55242],"disallowed"],[[55243,55291],"valid",[],"NV8"],[[55292,55295],"disallowed"],[[55296,57343],"disallowed"],[[57344,63743],"disallowed"],[[63744,63744],"mapped",[35912]],[[63745,63745],"mapped",[26356]],[[63746,63746],"mapped",[36554]],[[63747,63747],"mapped",[36040]],[[63748,63748],"mapped",[28369]],[[63749,63749],"mapped",[20018]],[[63750,63750],"mapped",[21477]],[[63751,63752],"mapped",[40860]],[[63753,63753],"mapped",[22865]],[[63754,63754],"mapped",[37329]],[[63755,63755],"mapped",[21895]],[[63756,63756],"mapped",[22856]],[[63757,63757],"mapped",[25078]],[[63758,63758],"mapped",[30313]],[[63759,63759],"mapped",[32645]],[[63760,63760],"mapped",[34367]],[[63761,63761],"mapped",[34746]],[[63762,63762],"mapped",[35064]],[[63763,63763],"mapped",[37007]],[[63764,63764],"mapped",[27138]],[[63765,63765],"mapped",[27931]],[[63766,63766],"mapped",[28889]],[[63767,63767],"mapped",[29662]],[[63768,63768],"mapped",[33853]],[[63769,63769],"mapped",[37226]],[[63770,63770],"mapped",[39409]],[[63771,63771],"mapped",[20098]],[[63772,63772],"mapped",[21365]],[[63773,63773],"mapped",[27396]],[[63774,63774],"mapped",[29211]],[[63775,63775],"mapped",[34349]],[[63776,63776],"mapped",[40478]],[[63777,63777],"mapped",[23888]],[[63778,63778],"mapped",[28651]],[[63779,63779],"mapped",[34253]],[[63780,63780],"mapped",[35172]],[[63781,63781],"mapped",[25289]],[[63782,63782],"mapped",[33240]],[[63783,63783],"mapped",[34847]],[[63784,63784],"mapped",[24266]],[[63785,63785],"mapped",[26391]],[[63786,63786],"mapped",[28010]],[[63787,63787],"mapped",[29436]],[[63788,63788],"mapped",[37070]],[[63789,63789],"mapped",[20358]],[[63790,63790],"mapped",[20919]],[[63791,63791],"mapped",[21214]],[[63792,63792],"mapped",[25796]],[[63793,63793],"mapped",[27347]],[[63794,63794],"mapped",[29200]],[[63795,63795],"mapped",[30439]],[[63796,63796],"mapped",[32769]],[[63797,63797],"mapped",[34310]],[[63798,63798],"mapped",[34396]],[[63799,63799],"mapped",[36335]],[[63800,63800],"mapped",[38706]],[[63801,63801],"mapped",[39791]],[[63802,63802],"mapped",[40442]],[[63803,63803],"mapped",[30860]],[[63804,63804],"mapped",[31103]],[[63805,63805],"mapped",[32160]],[[63806,63806],"mapped",[33737]],[[63807,63807],"mapped",[37636]],[[63808,63808],"mapped",[40575]],[[63809,63809],"mapped",[35542]],[[63810,63810],"mapped",[22751]],[[63811,63811],"mapped",[24324]],[[63812,63812],"mapped",[31840]],[[63813,63813],"mapped",[32894]],[[63814,63814],"mapped",[29282]],[[63815,63815],"mapped",[30922]],[[63816,63816],"mapped",[36034]],[[63817,63817],"mapped",[38647]],[[63818,63818],"mapped",[22744]],[[63819,63819],"mapped",[23650]],[[63820,63820],"mapped",[27155]],[[63821,63821],"mapped",[28122]],[[63822,63822],"mapped",[28431]],[[63823,63823],"mapped",[32047]],[[63824,63824],"mapped",[32311]],[[63825,63825],"mapped",[38475]],[[63826,63826],"mapped",[21202]],[[63827,63827],"mapped",[32907]],[[63828,63828],"mapped",[20956]],[[63829,63829],"mapped",[20940]],[[63830,63830],"mapped",[31260]],[[63831,63831],"mapped",[32190]],[[63832,63832],"mapped",[33777]],[[63833,63833],"mapped",[38517]],[[63834,63834],"mapped",[35712]],[[63835,63835],"mapped",[25295]],[[63836,63836],"mapped",[27138]],[[63837,63837],"mapped",[35582]],[[63838,63838],"mapped",[20025]],[[63839,63839],"mapped",[23527]],[[63840,63840],"mapped",[24594]],[[63841,63841],"mapped",[29575]],[[63842,63842],"mapped",[30064]],[[63843,63843],"mapped",[21271]],[[63844,63844],"mapped",[30971]],[[63845,63845],"mapped",[20415]],[[63846,63846],"mapped",[24489]],[[63847,63847],"mapped",[19981]],[[63848,63848],"mapped",[27852]],[[63849,63849],"mapped",[25976]],[[63850,63850],"mapped",[32034]],[[63851,63851],"mapped",[21443]],[[63852,63852],"mapped",[22622]],[[63853,63853],"mapped",[30465]],[[63854,63854],"mapped",[33865]],[[63855,63855],"mapped",[35498]],[[63856,63856],"mapped",[27578]],[[63857,63857],"mapped",[36784]],[[63858,63858],"mapped",[27784]],[[63859,63859],"mapped",[25342]],[[63860,63860],"mapped",[33509]],[[63861,63861],"mapped",[25504]],[[63862,63862],"mapped",[30053]],[[63863,63863],"mapped",[20142]],[[63864,63864],"mapped",[20841]],[[63865,63865],"mapped",[20937]],[[63866,63866],"mapped",[26753]],[[63867,63867],"mapped",[31975]],[[63868,63868],"mapped",[33391]],[[63869,63869],"mapped",[35538]],[[63870,63870],"mapped",[37327]],[[63871,63871],"mapped",[21237]],[[63872,63872],"mapped",[21570]],[[63873,63873],"mapped",[22899]],[[63874,63874],"mapped",[24300]],[[63875,63875],"mapped",[26053]],[[63876,63876],"mapped",[28670]],[[63877,63877],"mapped",[31018]],[[63878,63878],"mapped",[38317]],[[63879,63879],"mapped",[39530]],[[63880,63880],"mapped",[40599]],[[63881,63881],"mapped",[40654]],[[63882,63882],"mapped",[21147]],[[63883,63883],"mapped",[26310]],[[63884,63884],"mapped",[27511]],[[63885,63885],"mapped",[36706]],[[63886,63886],"mapped",[24180]],[[63887,63887],"mapped",[24976]],[[63888,63888],"mapped",[25088]],[[63889,63889],"mapped",[25754]],[[63890,63890],"mapped",[28451]],[[63891,63891],"mapped",[29001]],[[63892,63892],"mapped",[29833]],[[63893,63893],"mapped",[31178]],[[63894,63894],"mapped",[32244]],[[63895,63895],"mapped",[32879]],[[63896,63896],"mapped",[36646]],[[63897,63897],"mapped",[34030]],[[63898,63898],"mapped",[36899]],[[63899,63899],"mapped",[37706]],[[63900,63900],"mapped",[21015]],[[63901,63901],"mapped",[21155]],[[63902,63902],"mapped",[21693]],[[63903,63903],"mapped",[28872]],[[63904,63904],"mapped",[35010]],[[63905,63905],"mapped",[35498]],[[63906,63906],"mapped",[24265]],[[63907,63907],"mapped",[24565]],[[63908,63908],"mapped",[25467]],[[63909,63909],"mapped",[27566]],[[63910,63910],"mapped",[31806]],[[63911,63911],"mapped",[29557]],[[63912,63912],"mapped",[20196]],[[63913,63913],"mapped",[22265]],[[63914,63914],"mapped",[23527]],[[63915,63915],"mapped",[23994]],[[63916,63916],"mapped",[24604]],[[63917,63917],"mapped",[29618]],[[63918,63918],"mapped",[29801]],[[63919,63919],"mapped",[32666]],[[63920,63920],"mapped",[32838]],[[63921,63921],"mapped",[37428]],[[63922,63922],"mapped",[38646]],[[63923,63923],"mapped",[38728]],[[63924,63924],"mapped",[38936]],[[63925,63925],"mapped",[20363]],[[63926,63926],"mapped",[31150]],[[63927,63927],"mapped",[37300]],[[63928,63928],"mapped",[38584]],[[63929,63929],"mapped",[24801]],[[63930,63930],"mapped",[20102]],[[63931,63931],"mapped",[20698]],[[63932,63932],"mapped",[23534]],[[63933,63933],"mapped",[23615]],[[63934,63934],"mapped",[26009]],[[63935,63935],"mapped",[27138]],[[63936,63936],"mapped",[29134]],[[63937,63937],"mapped",[30274]],[[63938,63938],"mapped",[34044]],[[63939,63939],"mapped",[36988]],[[63940,63940],"mapped",[40845]],[[63941,63941],"mapped",[26248]],[[63942,63942],"mapped",[38446]],[[63943,63943],"mapped",[21129]],[[63944,63944],"mapped",[26491]],[[63945,63945],"mapped",[26611]],[[63946,63946],"mapped",[27969]],[[63947,63947],"mapped",[28316]],[[63948,63948],"mapped",[29705]],[[63949,63949],"mapped",[30041]],[[63950,63950],"mapped",[30827]],[[63951,63951],"mapped",[32016]],[[63952,63952],"mapped",[39006]],[[63953,63953],"mapped",[20845]],[[63954,63954],"mapped",[25134]],[[63955,63955],"mapped",[38520]],[[63956,63956],"mapped",[20523]],[[63957,63957],"mapped",[23833]],[[63958,63958],"mapped",[28138]],[[63959,63959],"mapped",[36650]],[[63960,63960],"mapped",[24459]],[[63961,63961],"mapped",[24900]],[[63962,63962],"mapped",[26647]],[[63963,63963],"mapped",[29575]],[[63964,63964],"mapped",[38534]],[[63965,63965],"mapped",[21033]],[[63966,63966],"mapped",[21519]],[[63967,63967],"mapped",[23653]],[[63968,63968],"mapped",[26131]],[[63969,63969],"mapped",[26446]],[[63970,63970],"mapped",[26792]],[[63971,63971],"mapped",[27877]],[[63972,63972],"mapped",[29702]],[[63973,63973],"mapped",[30178]],[[63974,63974],"mapped",[32633]],[[63975,63975],"mapped",[35023]],[[63976,63976],"mapped",[35041]],[[63977,63977],"mapped",[37324]],[[63978,63978],"mapped",[38626]],[[63979,63979],"mapped",[21311]],[[63980,63980],"mapped",[28346]],[[63981,63981],"mapped",[21533]],[[63982,63982],"mapped",[29136]],[[63983,63983],"mapped",[29848]],[[63984,63984],"mapped",[34298]],[[63985,63985],"mapped",[38563]],[[63986,63986],"mapped",[40023]],[[63987,63987],"mapped",[40607]],[[63988,63988],"mapped",[26519]],[[63989,63989],"mapped",[28107]],[[63990,63990],"mapped",[33256]],[[63991,63991],"mapped",[31435]],[[63992,63992],"mapped",[31520]],[[63993,63993],"mapped",[31890]],[[63994,63994],"mapped",[29376]],[[63995,63995],"mapped",[28825]],[[63996,63996],"mapped",[35672]],[[63997,63997],"mapped",[20160]],[[63998,63998],"mapped",[33590]],[[63999,63999],"mapped",[21050]],[[64000,64000],"mapped",[20999]],[[64001,64001],"mapped",[24230]],[[64002,64002],"mapped",[25299]],[[64003,64003],"mapped",[31958]],[[64004,64004],"mapped",[23429]],[[64005,64005],"mapped",[27934]],[[64006,64006],"mapped",[26292]],[[64007,64007],"mapped",[36667]],[[64008,64008],"mapped",[34892]],[[64009,64009],"mapped",[38477]],[[64010,64010],"mapped",[35211]],[[64011,64011],"mapped",[24275]],[[64012,64012],"mapped",[20800]],[[64013,64013],"mapped",[21952]],[[64014,64015],"valid"],[[64016,64016],"mapped",[22618]],[[64017,64017],"valid"],[[64018,64018],"mapped",[26228]],[[64019,64020],"valid"],[[64021,64021],"mapped",[20958]],[[64022,64022],"mapped",[29482]],[[64023,64023],"mapped",[30410]],[[64024,64024],"mapped",[31036]],[[64025,64025],"mapped",[31070]],[[64026,64026],"mapped",[31077]],[[64027,64027],"mapped",[31119]],[[64028,64028],"mapped",[38742]],[[64029,64029],"mapped",[31934]],[[64030,64030],"mapped",[32701]],[[64031,64031],"valid"],[[64032,64032],"mapped",[34322]],[[64033,64033],"valid"],[[64034,64034],"mapped",[35576]],[[64035,64036],"valid"],[[64037,64037],"mapped",[36920]],[[64038,64038],"mapped",[37117]],[[64039,64041],"valid"],[[64042,64042],"mapped",[39151]],[[64043,64043],"mapped",[39164]],[[64044,64044],"mapped",[39208]],[[64045,64045],"mapped",[40372]],[[64046,64046],"mapped",[37086]],[[64047,64047],"mapped",[38583]],[[64048,64048],"mapped",[20398]],[[64049,64049],"mapped",[20711]],[[64050,64050],"mapped",[20813]],[[64051,64051],"mapped",[21193]],[[64052,64052],"mapped",[21220]],[[64053,64053],"mapped",[21329]],[[64054,64054],"mapped",[21917]],[[64055,64055],"mapped",[22022]],[[64056,64056],"mapped",[22120]],[[64057,64057],"mapped",[22592]],[[64058,64058],"mapped",[22696]],[[64059,64059],"mapped",[23652]],[[64060,64060],"mapped",[23662]],[[64061,64061],"mapped",[24724]],[[64062,64062],"mapped",[24936]],[[64063,64063],"mapped",[24974]],[[64064,64064],"mapped",[25074]],[[64065,64065],"mapped",[25935]],[[64066,64066],"mapped",[26082]],[[64067,64067],"mapped",[26257]],[[64068,64068],"mapped",[26757]],[[64069,64069],"mapped",[28023]],[[64070,64070],"mapped",[28186]],[[64071,64071],"mapped",[28450]],[[64072,64072],"mapped",[29038]],[[64073,64073],"mapped",[29227]],[[64074,64074],"mapped",[29730]],[[64075,64075],"mapped",[30865]],[[64076,64076],"mapped",[31038]],[[64077,64077],"mapped",[31049]],[[64078,64078],"mapped",[31048]],[[64079,64079],"mapped",[31056]],[[64080,64080],"mapped",[31062]],[[64081,64081],"mapped",[31069]],[[64082,64082],"mapped",[31117]],[[64083,64083],"mapped",[31118]],[[64084,64084],"mapped",[31296]],[[64085,64085],"mapped",[31361]],[[64086,64086],"mapped",[31680]],[[64087,64087],"mapped",[32244]],[[64088,64088],"mapped",[32265]],[[64089,64089],"mapped",[32321]],[[64090,64090],"mapped",[32626]],[[64091,64091],"mapped",[32773]],[[64092,64092],"mapped",[33261]],[[64093,64094],"mapped",[33401]],[[64095,64095],"mapped",[33879]],[[64096,64096],"mapped",[35088]],[[64097,64097],"mapped",[35222]],[[64098,64098],"mapped",[35585]],[[64099,64099],"mapped",[35641]],[[64100,64100],"mapped",[36051]],[[64101,64101],"mapped",[36104]],[[64102,64102],"mapped",[36790]],[[64103,64103],"mapped",[36920]],[[64104,64104],"mapped",[38627]],[[64105,64105],"mapped",[38911]],[[64106,64106],"mapped",[38971]],[[64107,64107],"mapped",[24693]],[[64108,64108],"mapped",[148206]],[[64109,64109],"mapped",[33304]],[[64110,64111],"disallowed"],[[64112,64112],"mapped",[20006]],[[64113,64113],"mapped",[20917]],[[64114,64114],"mapped",[20840]],[[64115,64115],"mapped",[20352]],[[64116,64116],"mapped",[20805]],[[64117,64117],"mapped",[20864]],[[64118,64118],"mapped",[21191]],[[64119,64119],"mapped",[21242]],[[64120,64120],"mapped",[21917]],[[64121,64121],"mapped",[21845]],[[64122,64122],"mapped",[21913]],[[64123,64123],"mapped",[21986]],[[64124,64124],"mapped",[22618]],[[64125,64125],"mapped",[22707]],[[64126,64126],"mapped",[22852]],[[64127,64127],"mapped",[22868]],[[64128,64128],"mapped",[23138]],[[64129,64129],"mapped",[23336]],[[64130,64130],"mapped",[24274]],[[64131,64131],"mapped",[24281]],[[64132,64132],"mapped",[24425]],[[64133,64133],"mapped",[24493]],[[64134,64134],"mapped",[24792]],[[64135,64135],"mapped",[24910]],[[64136,64136],"mapped",[24840]],[[64137,64137],"mapped",[24974]],[[64138,64138],"mapped",[24928]],[[64139,64139],"mapped",[25074]],[[64140,64140],"mapped",[25140]],[[64141,64141],"mapped",[25540]],[[64142,64142],"mapped",[25628]],[[64143,64143],"mapped",[25682]],[[64144,64144],"mapped",[25942]],[[64145,64145],"mapped",[26228]],[[64146,64146],"mapped",[26391]],[[64147,64147],"mapped",[26395]],[[64148,64148],"mapped",[26454]],[[64149,64149],"mapped",[27513]],[[64150,64150],"mapped",[27578]],[[64151,64151],"mapped",[27969]],[[64152,64152],"mapped",[28379]],[[64153,64153],"mapped",[28363]],[[64154,64154],"mapped",[28450]],[[64155,64155],"mapped",[28702]],[[64156,64156],"mapped",[29038]],[[64157,64157],"mapped",[30631]],[[64158,64158],"mapped",[29237]],[[64159,64159],"mapped",[29359]],[[64160,64160],"mapped",[29482]],[[64161,64161],"mapped",[29809]],[[64162,64162],"mapped",[29958]],[[64163,64163],"mapped",[30011]],[[64164,64164],"mapped",[30237]],[[64165,64165],"mapped",[30239]],[[64166,64166],"mapped",[30410]],[[64167,64167],"mapped",[30427]],[[64168,64168],"mapped",[30452]],[[64169,64169],"mapped",[30538]],[[64170,64170],"mapped",[30528]],[[64171,64171],"mapped",[30924]],[[64172,64172],"mapped",[31409]],[[64173,64173],"mapped",[31680]],[[64174,64174],"mapped",[31867]],[[64175,64175],"mapped",[32091]],[[64176,64176],"mapped",[32244]],[[64177,64177],"mapped",[32574]],[[64178,64178],"mapped",[32773]],[[64179,64179],"mapped",[33618]],[[64180,64180],"mapped",[33775]],[[64181,64181],"mapped",[34681]],[[64182,64182],"mapped",[35137]],[[64183,64183],"mapped",[35206]],[[64184,64184],"mapped",[35222]],[[64185,64185],"mapped",[35519]],[[64186,64186],"mapped",[35576]],[[64187,64187],"mapped",[35531]],[[64188,64188],"mapped",[35585]],[[64189,64189],"mapped",[35582]],[[64190,64190],"mapped",[35565]],[[64191,64191],"mapped",[35641]],[[64192,64192],"mapped",[35722]],[[64193,64193],"mapped",[36104]],[[64194,64194],"mapped",[36664]],[[64195,64195],"mapped",[36978]],[[64196,64196],"mapped",[37273]],[[64197,64197],"mapped",[37494]],[[64198,64198],"mapped",[38524]],[[64199,64199],"mapped",[38627]],[[64200,64200],"mapped",[38742]],[[64201,64201],"mapped",[38875]],[[64202,64202],"mapped",[38911]],[[64203,64203],"mapped",[38923]],[[64204,64204],"mapped",[38971]],[[64205,64205],"mapped",[39698]],[[64206,64206],"mapped",[40860]],[[64207,64207],"mapped",[141386]],[[64208,64208],"mapped",[141380]],[[64209,64209],"mapped",[144341]],[[64210,64210],"mapped",[15261]],[[64211,64211],"mapped",[16408]],[[64212,64212],"mapped",[16441]],[[64213,64213],"mapped",[152137]],[[64214,64214],"mapped",[154832]],[[64215,64215],"mapped",[163539]],[[64216,64216],"mapped",[40771]],[[64217,64217],"mapped",[40846]],[[64218,64255],"disallowed"],[[64256,64256],"mapped",[102,102]],[[64257,64257],"mapped",[102,105]],[[64258,64258],"mapped",[102,108]],[[64259,64259],"mapped",[102,102,105]],[[64260,64260],"mapped",[102,102,108]],[[64261,64262],"mapped",[115,116]],[[64263,64274],"disallowed"],[[64275,64275],"mapped",[1396,1398]],[[64276,64276],"mapped",[1396,1381]],[[64277,64277],"mapped",[1396,1387]],[[64278,64278],"mapped",[1406,1398]],[[64279,64279],"mapped",[1396,1389]],[[64280,64284],"disallowed"],[[64285,64285],"mapped",[1497,1460]],[[64286,64286],"valid"],[[64287,64287],"mapped",[1522,1463]],[[64288,64288],"mapped",[1506]],[[64289,64289],"mapped",[1488]],[[64290,64290],"mapped",[1491]],[[64291,64291],"mapped",[1492]],[[64292,64292],"mapped",[1499]],[[64293,64293],"mapped",[1500]],[[64294,64294],"mapped",[1501]],[[64295,64295],"mapped",[1512]],[[64296,64296],"mapped",[1514]],[[64297,64297],"disallowed_STD3_mapped",[43]],[[64298,64298],"mapped",[1513,1473]],[[64299,64299],"mapped",[1513,1474]],[[64300,64300],"mapped",[1513,1468,1473]],[[64301,64301],"mapped",[1513,1468,1474]],[[64302,64302],"mapped",[1488,1463]],[[64303,64303],"mapped",[1488,1464]],[[64304,64304],"mapped",[1488,1468]],[[64305,64305],"mapped",[1489,1468]],[[64306,64306],"mapped",[1490,1468]],[[64307,64307],"mapped",[1491,1468]],[[64308,64308],"mapped",[1492,1468]],[[64309,64309],"mapped",[1493,1468]],[[64310,64310],"mapped",[1494,1468]],[[64311,64311],"disallowed"],[[64312,64312],"mapped",[1496,1468]],[[64313,64313],"mapped",[1497,1468]],[[64314,64314],"mapped",[1498,1468]],[[64315,64315],"mapped",[1499,1468]],[[64316,64316],"mapped",[1500,1468]],[[64317,64317],"disallowed"],[[64318,64318],"mapped",[1502,1468]],[[64319,64319],"disallowed"],[[64320,64320],"mapped",[1504,1468]],[[64321,64321],"mapped",[1505,1468]],[[64322,64322],"disallowed"],[[64323,64323],"mapped",[1507,1468]],[[64324,64324],"mapped",[1508,1468]],[[64325,64325],"disallowed"],[[64326,64326],"mapped",[1510,1468]],[[64327,64327],"mapped",[1511,1468]],[[64328,64328],"mapped",[1512,1468]],[[64329,64329],"mapped",[1513,1468]],[[64330,64330],"mapped",[1514,1468]],[[64331,64331],"mapped",[1493,1465]],[[64332,64332],"mapped",[1489,1471]],[[64333,64333],"mapped",[1499,1471]],[[64334,64334],"mapped",[1508,1471]],[[64335,64335],"mapped",[1488,1500]],[[64336,64337],"mapped",[1649]],[[64338,64341],"mapped",[1659]],[[64342,64345],"mapped",[1662]],[[64346,64349],"mapped",[1664]],[[64350,64353],"mapped",[1658]],[[64354,64357],"mapped",[1663]],[[64358,64361],"mapped",[1657]],[[64362,64365],"mapped",[1700]],[[64366,64369],"mapped",[1702]],[[64370,64373],"mapped",[1668]],[[64374,64377],"mapped",[1667]],[[64378,64381],"mapped",[1670]],[[64382,64385],"mapped",[1671]],[[64386,64387],"mapped",[1677]],[[64388,64389],"mapped",[1676]],[[64390,64391],"mapped",[1678]],[[64392,64393],"mapped",[1672]],[[64394,64395],"mapped",[1688]],[[64396,64397],"mapped",[1681]],[[64398,64401],"mapped",[1705]],[[64402,64405],"mapped",[1711]],[[64406,64409],"mapped",[1715]],[[64410,64413],"mapped",[1713]],[[64414,64415],"mapped",[1722]],[[64416,64419],"mapped",[1723]],[[64420,64421],"mapped",[1728]],[[64422,64425],"mapped",[1729]],[[64426,64429],"mapped",[1726]],[[64430,64431],"mapped",[1746]],[[64432,64433],"mapped",[1747]],[[64434,64449],"valid",[],"NV8"],[[64450,64466],"disallowed"],[[64467,64470],"mapped",[1709]],[[64471,64472],"mapped",[1735]],[[64473,64474],"mapped",[1734]],[[64475,64476],"mapped",[1736]],[[64477,64477],"mapped",[1735,1652]],[[64478,64479],"mapped",[1739]],[[64480,64481],"mapped",[1733]],[[64482,64483],"mapped",[1737]],[[64484,64487],"mapped",[1744]],[[64488,64489],"mapped",[1609]],[[64490,64491],"mapped",[1574,1575]],[[64492,64493],"mapped",[1574,1749]],[[64494,64495],"mapped",[1574,1608]],[[64496,64497],"mapped",[1574,1735]],[[64498,64499],"mapped",[1574,1734]],[[64500,64501],"mapped",[1574,1736]],[[64502,64504],"mapped",[1574,1744]],[[64505,64507],"mapped",[1574,1609]],[[64508,64511],"mapped",[1740]],[[64512,64512],"mapped",[1574,1580]],[[64513,64513],"mapped",[1574,1581]],[[64514,64514],"mapped",[1574,1605]],[[64515,64515],"mapped",[1574,1609]],[[64516,64516],"mapped",[1574,1610]],[[64517,64517],"mapped",[1576,1580]],[[64518,64518],"mapped",[1576,1581]],[[64519,64519],"mapped",[1576,1582]],[[64520,64520],"mapped",[1576,1605]],[[64521,64521],"mapped",[1576,1609]],[[64522,64522],"mapped",[1576,1610]],[[64523,64523],"mapped",[1578,1580]],[[64524,64524],"mapped",[1578,1581]],[[64525,64525],"mapped",[1578,1582]],[[64526,64526],"mapped",[1578,1605]],[[64527,64527],"mapped",[1578,1609]],[[64528,64528],"mapped",[1578,1610]],[[64529,64529],"mapped",[1579,1580]],[[64530,64530],"mapped",[1579,1605]],[[64531,64531],"mapped",[1579,1609]],[[64532,64532],"mapped",[1579,1610]],[[64533,64533],"mapped",[1580,1581]],[[64534,64534],"mapped",[1580,1605]],[[64535,64535],"mapped",[1581,1580]],[[64536,64536],"mapped",[1581,1605]],[[64537,64537],"mapped",[1582,1580]],[[64538,64538],"mapped",[1582,1581]],[[64539,64539],"mapped",[1582,1605]],[[64540,64540],"mapped",[1587,1580]],[[64541,64541],"mapped",[1587,1581]],[[64542,64542],"mapped",[1587,1582]],[[64543,64543],"mapped",[1587,1605]],[[64544,64544],"mapped",[1589,1581]],[[64545,64545],"mapped",[1589,1605]],[[64546,64546],"mapped",[1590,1580]],[[64547,64547],"mapped",[1590,1581]],[[64548,64548],"mapped",[1590,1582]],[[64549,64549],"mapped",[1590,1605]],[[64550,64550],"mapped",[1591,1581]],[[64551,64551],"mapped",[1591,1605]],[[64552,64552],"mapped",[1592,1605]],[[64553,64553],"mapped",[1593,1580]],[[64554,64554],"mapped",[1593,1605]],[[64555,64555],"mapped",[1594,1580]],[[64556,64556],"mapped",[1594,1605]],[[64557,64557],"mapped",[1601,1580]],[[64558,64558],"mapped",[1601,1581]],[[64559,64559],"mapped",[1601,1582]],[[64560,64560],"mapped",[1601,1605]],[[64561,64561],"mapped",[1601,1609]],[[64562,64562],"mapped",[1601,1610]],[[64563,64563],"mapped",[1602,1581]],[[64564,64564],"mapped",[1602,1605]],[[64565,64565],"mapped",[1602,1609]],[[64566,64566],"mapped",[1602,1610]],[[64567,64567],"mapped",[1603,1575]],[[64568,64568],"mapped",[1603,1580]],[[64569,64569],"mapped",[1603,1581]],[[64570,64570],"mapped",[1603,1582]],[[64571,64571],"mapped",[1603,1604]],[[64572,64572],"mapped",[1603,1605]],[[64573,64573],"mapped",[1603,1609]],[[64574,64574],"mapped",[1603,1610]],[[64575,64575],"mapped",[1604,1580]],[[64576,64576],"mapped",[1604,1581]],[[64577,64577],"mapped",[1604,1582]],[[64578,64578],"mapped",[1604,1605]],[[64579,64579],"mapped",[1604,1609]],[[64580,64580],"mapped",[1604,1610]],[[64581,64581],"mapped",[1605,1580]],[[64582,64582],"mapped",[1605,1581]],[[64583,64583],"mapped",[1605,1582]],[[64584,64584],"mapped",[1605,1605]],[[64585,64585],"mapped",[1605,1609]],[[64586,64586],"mapped",[1605,1610]],[[64587,64587],"mapped",[1606,1580]],[[64588,64588],"mapped",[1606,1581]],[[64589,64589],"mapped",[1606,1582]],[[64590,64590],"mapped",[1606,1605]],[[64591,64591],"mapped",[1606,1609]],[[64592,64592],"mapped",[1606,1610]],[[64593,64593],"mapped",[1607,1580]],[[64594,64594],"mapped",[1607,1605]],[[64595,64595],"mapped",[1607,1609]],[[64596,64596],"mapped",[1607,1610]],[[64597,64597],"mapped",[1610,1580]],[[64598,64598],"mapped",[1610,1581]],[[64599,64599],"mapped",[1610,1582]],[[64600,64600],"mapped",[1610,1605]],[[64601,64601],"mapped",[1610,1609]],[[64602,64602],"mapped",[1610,1610]],[[64603,64603],"mapped",[1584,1648]],[[64604,64604],"mapped",[1585,1648]],[[64605,64605],"mapped",[1609,1648]],[[64606,64606],"disallowed_STD3_mapped",[32,1612,1617]],[[64607,64607],"disallowed_STD3_mapped",[32,1613,1617]],[[64608,64608],"disallowed_STD3_mapped",[32,1614,1617]],[[64609,64609],"disallowed_STD3_mapped",[32,1615,1617]],[[64610,64610],"disallowed_STD3_mapped",[32,1616,1617]],[[64611,64611],"disallowed_STD3_mapped",[32,1617,1648]],[[64612,64612],"mapped",[1574,1585]],[[64613,64613],"mapped",[1574,1586]],[[64614,64614],"mapped",[1574,1605]],[[64615,64615],"mapped",[1574,1606]],[[64616,64616],"mapped",[1574,1609]],[[64617,64617],"mapped",[1574,1610]],[[64618,64618],"mapped",[1576,1585]],[[64619,64619],"mapped",[1576,1586]],[[64620,64620],"mapped",[1576,1605]],[[64621,64621],"mapped",[1576,1606]],[[64622,64622],"mapped",[1576,1609]],[[64623,64623],"mapped",[1576,1610]],[[64624,64624],"mapped",[1578,1585]],[[64625,64625],"mapped",[1578,1586]],[[64626,64626],"mapped",[1578,1605]],[[64627,64627],"mapped",[1578,1606]],[[64628,64628],"mapped",[1578,1609]],[[64629,64629],"mapped",[1578,1610]],[[64630,64630],"mapped",[1579,1585]],[[64631,64631],"mapped",[1579,1586]],[[64632,64632],"mapped",[1579,1605]],[[64633,64633],"mapped",[1579,1606]],[[64634,64634],"mapped",[1579,1609]],[[64635,64635],"mapped",[1579,1610]],[[64636,64636],"mapped",[1601,1609]],[[64637,64637],"mapped",[1601,1610]],[[64638,64638],"mapped",[1602,1609]],[[64639,64639],"mapped",[1602,1610]],[[64640,64640],"mapped",[1603,1575]],[[64641,64641],"mapped",[1603,1604]],[[64642,64642],"mapped",[1603,1605]],[[64643,64643],"mapped",[1603,1609]],[[64644,64644],"mapped",[1603,1610]],[[64645,64645],"mapped",[1604,1605]],[[64646,64646],"mapped",[1604,1609]],[[64647,64647],"mapped",[1604,1610]],[[64648,64648],"mapped",[1605,1575]],[[64649,64649],"mapped",[1605,1605]],[[64650,64650],"mapped",[1606,1585]],[[64651,64651],"mapped",[1606,1586]],[[64652,64652],"mapped",[1606,1605]],[[64653,64653],"mapped",[1606,1606]],[[64654,64654],"mapped",[1606,1609]],[[64655,64655],"mapped",[1606,1610]],[[64656,64656],"mapped",[1609,1648]],[[64657,64657],"mapped",[1610,1585]],[[64658,64658],"mapped",[1610,1586]],[[64659,64659],"mapped",[1610,1605]],[[64660,64660],"mapped",[1610,1606]],[[64661,64661],"mapped",[1610,1609]],[[64662,64662],"mapped",[1610,1610]],[[64663,64663],"mapped",[1574,1580]],[[64664,64664],"mapped",[1574,1581]],[[64665,64665],"mapped",[1574,1582]],[[64666,64666],"mapped",[1574,1605]],[[64667,64667],"mapped",[1574,1607]],[[64668,64668],"mapped",[1576,1580]],[[64669,64669],"mapped",[1576,1581]],[[64670,64670],"mapped",[1576,1582]],[[64671,64671],"mapped",[1576,1605]],[[64672,64672],"mapped",[1576,1607]],[[64673,64673],"mapped",[1578,1580]],[[64674,64674],"mapped",[1578,1581]],[[64675,64675],"mapped",[1578,1582]],[[64676,64676],"mapped",[1578,1605]],[[64677,64677],"mapped",[1578,1607]],[[64678,64678],"mapped",[1579,1605]],[[64679,64679],"mapped",[1580,1581]],[[64680,64680],"mapped",[1580,1605]],[[64681,64681],"mapped",[1581,1580]],[[64682,64682],"mapped",[1581,1605]],[[64683,64683],"mapped",[1582,1580]],[[64684,64684],"mapped",[1582,1605]],[[64685,64685],"mapped",[1587,1580]],[[64686,64686],"mapped",[1587,1581]],[[64687,64687],"mapped",[1587,1582]],[[64688,64688],"mapped",[1587,1605]],[[64689,64689],"mapped",[1589,1581]],[[64690,64690],"mapped",[1589,1582]],[[64691,64691],"mapped",[1589,1605]],[[64692,64692],"mapped",[1590,1580]],[[64693,64693],"mapped",[1590,1581]],[[64694,64694],"mapped",[1590,1582]],[[64695,64695],"mapped",[1590,1605]],[[64696,64696],"mapped",[1591,1581]],[[64697,64697],"mapped",[1592,1605]],[[64698,64698],"mapped",[1593,1580]],[[64699,64699],"mapped",[1593,1605]],[[64700,64700],"mapped",[1594,1580]],[[64701,64701],"mapped",[1594,1605]],[[64702,64702],"mapped",[1601,1580]],[[64703,64703],"mapped",[1601,1581]],[[64704,64704],"mapped",[1601,1582]],[[64705,64705],"mapped",[1601,1605]],[[64706,64706],"mapped",[1602,1581]],[[64707,64707],"mapped",[1602,1605]],[[64708,64708],"mapped",[1603,1580]],[[64709,64709],"mapped",[1603,1581]],[[64710,64710],"mapped",[1603,1582]],[[64711,64711],"mapped",[1603,1604]],[[64712,64712],"mapped",[1603,1605]],[[64713,64713],"mapped",[1604,1580]],[[64714,64714],"mapped",[1604,1581]],[[64715,64715],"mapped",[1604,1582]],[[64716,64716],"mapped",[1604,1605]],[[64717,64717],"mapped",[1604,1607]],[[64718,64718],"mapped",[1605,1580]],[[64719,64719],"mapped",[1605,1581]],[[64720,64720],"mapped",[1605,1582]],[[64721,64721],"mapped",[1605,1605]],[[64722,64722],"mapped",[1606,1580]],[[64723,64723],"mapped",[1606,1581]],[[64724,64724],"mapped",[1606,1582]],[[64725,64725],"mapped",[1606,1605]],[[64726,64726],"mapped",[1606,1607]],[[64727,64727],"mapped",[1607,1580]],[[64728,64728],"mapped",[1607,1605]],[[64729,64729],"mapped",[1607,1648]],[[64730,64730],"mapped",[1610,1580]],[[64731,64731],"mapped",[1610,1581]],[[64732,64732],"mapped",[1610,1582]],[[64733,64733],"mapped",[1610,1605]],[[64734,64734],"mapped",[1610,1607]],[[64735,64735],"mapped",[1574,1605]],[[64736,64736],"mapped",[1574,1607]],[[64737,64737],"mapped",[1576,1605]],[[64738,64738],"mapped",[1576,1607]],[[64739,64739],"mapped",[1578,1605]],[[64740,64740],"mapped",[1578,1607]],[[64741,64741],"mapped",[1579,1605]],[[64742,64742],"mapped",[1579,1607]],[[64743,64743],"mapped",[1587,1605]],[[64744,64744],"mapped",[1587,1607]],[[64745,64745],"mapped",[1588,1605]],[[64746,64746],"mapped",[1588,1607]],[[64747,64747],"mapped",[1603,1604]],[[64748,64748],"mapped",[1603,1605]],[[64749,64749],"mapped",[1604,1605]],[[64750,64750],"mapped",[1606,1605]],[[64751,64751],"mapped",[1606,1607]],[[64752,64752],"mapped",[1610,1605]],[[64753,64753],"mapped",[1610,1607]],[[64754,64754],"mapped",[1600,1614,1617]],[[64755,64755],"mapped",[1600,1615,1617]],[[64756,64756],"mapped",[1600,1616,1617]],[[64757,64757],"mapped",[1591,1609]],[[64758,64758],"mapped",[1591,1610]],[[64759,64759],"mapped",[1593,1609]],[[64760,64760],"mapped",[1593,1610]],[[64761,64761],"mapped",[1594,1609]],[[64762,64762],"mapped",[1594,1610]],[[64763,64763],"mapped",[1587,1609]],[[64764,64764],"mapped",[1587,1610]],[[64765,64765],"mapped",[1588,1609]],[[64766,64766],"mapped",[1588,1610]],[[64767,64767],"mapped",[1581,1609]],[[64768,64768],"mapped",[1581,1610]],[[64769,64769],"mapped",[1580,1609]],[[64770,64770],"mapped",[1580,1610]],[[64771,64771],"mapped",[1582,1609]],[[64772,64772],"mapped",[1582,1610]],[[64773,64773],"mapped",[1589,1609]],[[64774,64774],"mapped",[1589,1610]],[[64775,64775],"mapped",[1590,1609]],[[64776,64776],"mapped",[1590,1610]],[[64777,64777],"mapped",[1588,1580]],[[64778,64778],"mapped",[1588,1581]],[[64779,64779],"mapped",[1588,1582]],[[64780,64780],"mapped",[1588,1605]],[[64781,64781],"mapped",[1588,1585]],[[64782,64782],"mapped",[1587,1585]],[[64783,64783],"mapped",[1589,1585]],[[64784,64784],"mapped",[1590,1585]],[[64785,64785],"mapped",[1591,1609]],[[64786,64786],"mapped",[1591,1610]],[[64787,64787],"mapped",[1593,1609]],[[64788,64788],"mapped",[1593,1610]],[[64789,64789],"mapped",[1594,1609]],[[64790,64790],"mapped",[1594,1610]],[[64791,64791],"mapped",[1587,1609]],[[64792,64792],"mapped",[1587,1610]],[[64793,64793],"mapped",[1588,1609]],[[64794,64794],"mapped",[1588,1610]],[[64795,64795],"mapped",[1581,1609]],[[64796,64796],"mapped",[1581,1610]],[[64797,64797],"mapped",[1580,1609]],[[64798,64798],"mapped",[1580,1610]],[[64799,64799],"mapped",[1582,1609]],[[64800,64800],"mapped",[1582,1610]],[[64801,64801],"mapped",[1589,1609]],[[64802,64802],"mapped",[1589,1610]],[[64803,64803],"mapped",[1590,1609]],[[64804,64804],"mapped",[1590,1610]],[[64805,64805],"mapped",[1588,1580]],[[64806,64806],"mapped",[1588,1581]],[[64807,64807],"mapped",[1588,1582]],[[64808,64808],"mapped",[1588,1605]],[[64809,64809],"mapped",[1588,1585]],[[64810,64810],"mapped",[1587,1585]],[[64811,64811],"mapped",[1589,1585]],[[64812,64812],"mapped",[1590,1585]],[[64813,64813],"mapped",[1588,1580]],[[64814,64814],"mapped",[1588,1581]],[[64815,64815],"mapped",[1588,1582]],[[64816,64816],"mapped",[1588,1605]],[[64817,64817],"mapped",[1587,1607]],[[64818,64818],"mapped",[1588,1607]],[[64819,64819],"mapped",[1591,1605]],[[64820,64820],"mapped",[1587,1580]],[[64821,64821],"mapped",[1587,1581]],[[64822,64822],"mapped",[1587,1582]],[[64823,64823],"mapped",[1588,1580]],[[64824,64824],"mapped",[1588,1581]],[[64825,64825],"mapped",[1588,1582]],[[64826,64826],"mapped",[1591,1605]],[[64827,64827],"mapped",[1592,1605]],[[64828,64829],"mapped",[1575,1611]],[[64830,64831],"valid",[],"NV8"],[[64832,64847],"disallowed"],[[64848,64848],"mapped",[1578,1580,1605]],[[64849,64850],"mapped",[1578,1581,1580]],[[64851,64851],"mapped",[1578,1581,1605]],[[64852,64852],"mapped",[1578,1582,1605]],[[64853,64853],"mapped",[1578,1605,1580]],[[64854,64854],"mapped",[1578,1605,1581]],[[64855,64855],"mapped",[1578,1605,1582]],[[64856,64857],"mapped",[1580,1605,1581]],[[64858,64858],"mapped",[1581,1605,1610]],[[64859,64859],"mapped",[1581,1605,1609]],[[64860,64860],"mapped",[1587,1581,1580]],[[64861,64861],"mapped",[1587,1580,1581]],[[64862,64862],"mapped",[1587,1580,1609]],[[64863,64864],"mapped",[1587,1605,1581]],[[64865,64865],"mapped",[1587,1605,1580]],[[64866,64867],"mapped",[1587,1605,1605]],[[64868,64869],"mapped",[1589,1581,1581]],[[64870,64870],"mapped",[1589,1605,1605]],[[64871,64872],"mapped",[1588,1581,1605]],[[64873,64873],"mapped",[1588,1580,1610]],[[64874,64875],"mapped",[1588,1605,1582]],[[64876,64877],"mapped",[1588,1605,1605]],[[64878,64878],"mapped",[1590,1581,1609]],[[64879,64880],"mapped",[1590,1582,1605]],[[64881,64882],"mapped",[1591,1605,1581]],[[64883,64883],"mapped",[1591,1605,1605]],[[64884,64884],"mapped",[1591,1605,1610]],[[64885,64885],"mapped",[1593,1580,1605]],[[64886,64887],"mapped",[1593,1605,1605]],[[64888,64888],"mapped",[1593,1605,1609]],[[64889,64889],"mapped",[1594,1605,1605]],[[64890,64890],"mapped",[1594,1605,1610]],[[64891,64891],"mapped",[1594,1605,1609]],[[64892,64893],"mapped",[1601,1582,1605]],[[64894,64894],"mapped",[1602,1605,1581]],[[64895,64895],"mapped",[1602,1605,1605]],[[64896,64896],"mapped",[1604,1581,1605]],[[64897,64897],"mapped",[1604,1581,1610]],[[64898,64898],"mapped",[1604,1581,1609]],[[64899,64900],"mapped",[1604,1580,1580]],[[64901,64902],"mapped",[1604,1582,1605]],[[64903,64904],"mapped",[1604,1605,1581]],[[64905,64905],"mapped",[1605,1581,1580]],[[64906,64906],"mapped",[1605,1581,1605]],[[64907,64907],"mapped",[1605,1581,1610]],[[64908,64908],"mapped",[1605,1580,1581]],[[64909,64909],"mapped",[1605,1580,1605]],[[64910,64910],"mapped",[1605,1582,1580]],[[64911,64911],"mapped",[1605,1582,1605]],[[64912,64913],"disallowed"],[[64914,64914],"mapped",[1605,1580,1582]],[[64915,64915],"mapped",[1607,1605,1580]],[[64916,64916],"mapped",[1607,1605,1605]],[[64917,64917],"mapped",[1606,1581,1605]],[[64918,64918],"mapped",[1606,1581,1609]],[[64919,64920],"mapped",[1606,1580,1605]],[[64921,64921],"mapped",[1606,1580,1609]],[[64922,64922],"mapped",[1606,1605,1610]],[[64923,64923],"mapped",[1606,1605,1609]],[[64924,64925],"mapped",[1610,1605,1605]],[[64926,64926],"mapped",[1576,1582,1610]],[[64927,64927],"mapped",[1578,1580,1610]],[[64928,64928],"mapped",[1578,1580,1609]],[[64929,64929],"mapped",[1578,1582,1610]],[[64930,64930],"mapped",[1578,1582,1609]],[[64931,64931],"mapped",[1578,1605,1610]],[[64932,64932],"mapped",[1578,1605,1609]],[[64933,64933],"mapped",[1580,1605,1610]],[[64934,64934],"mapped",[1580,1581,1609]],[[64935,64935],"mapped",[1580,1605,1609]],[[64936,64936],"mapped",[1587,1582,1609]],[[64937,64937],"mapped",[1589,1581,1610]],[[64938,64938],"mapped",[1588,1581,1610]],[[64939,64939],"mapped",[1590,1581,1610]],[[64940,64940],"mapped",[1604,1580,1610]],[[64941,64941],"mapped",[1604,1605,1610]],[[64942,64942],"mapped",[1610,1581,1610]],[[64943,64943],"mapped",[1610,1580,1610]],[[64944,64944],"mapped",[1610,1605,1610]],[[64945,64945],"mapped",[1605,1605,1610]],[[64946,64946],"mapped",[1602,1605,1610]],[[64947,64947],"mapped",[1606,1581,1610]],[[64948,64948],"mapped",[1602,1605,1581]],[[64949,64949],"mapped",[1604,1581,1605]],[[64950,64950],"mapped",[1593,1605,1610]],[[64951,64951],"mapped",[1603,1605,1610]],[[64952,64952],"mapped",[1606,1580,1581]],[[64953,64953],"mapped",[1605,1582,1610]],[[64954,64954],"mapped",[1604,1580,1605]],[[64955,64955],"mapped",[1603,1605,1605]],[[64956,64956],"mapped",[1604,1580,1605]],[[64957,64957],"mapped",[1606,1580,1581]],[[64958,64958],"mapped",[1580,1581,1610]],[[64959,64959],"mapped",[1581,1580,1610]],[[64960,64960],"mapped",[1605,1580,1610]],[[64961,64961],"mapped",[1601,1605,1610]],[[64962,64962],"mapped",[1576,1581,1610]],[[64963,64963],"mapped",[1603,1605,1605]],[[64964,64964],"mapped",[1593,1580,1605]],[[64965,64965],"mapped",[1589,1605,1605]],[[64966,64966],"mapped",[1587,1582,1610]],[[64967,64967],"mapped",[1606,1580,1610]],[[64968,64975],"disallowed"],[[64976,65007],"disallowed"],[[65008,65008],"mapped",[1589,1604,1746]],[[65009,65009],"mapped",[1602,1604,1746]],[[65010,65010],"mapped",[1575,1604,1604,1607]],[[65011,65011],"mapped",[1575,1603,1576,1585]],[[65012,65012],"mapped",[1605,1581,1605,1583]],[[65013,65013],"mapped",[1589,1604,1593,1605]],[[65014,65014],"mapped",[1585,1587,1608,1604]],[[65015,65015],"mapped",[1593,1604,1610,1607]],[[65016,65016],"mapped",[1608,1587,1604,1605]],[[65017,65017],"mapped",[1589,1604,1609]],[[65018,65018],"disallowed_STD3_mapped",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],"disallowed_STD3_mapped",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],"mapped",[1585,1740,1575,1604]],[[65021,65021],"valid",[],"NV8"],[[65022,65023],"disallowed"],[[65024,65039],"ignored"],[[65040,65040],"disallowed_STD3_mapped",[44]],[[65041,65041],"mapped",[12289]],[[65042,65042],"disallowed"],[[65043,65043],"disallowed_STD3_mapped",[58]],[[65044,65044],"disallowed_STD3_mapped",[59]],[[65045,65045],"disallowed_STD3_mapped",[33]],[[65046,65046],"disallowed_STD3_mapped",[63]],[[65047,65047],"mapped",[12310]],[[65048,65048],"mapped",[12311]],[[65049,65049],"disallowed"],[[65050,65055],"disallowed"],[[65056,65059],"valid"],[[65060,65062],"valid"],[[65063,65069],"valid"],[[65070,65071],"valid"],[[65072,65072],"disallowed"],[[65073,65073],"mapped",[8212]],[[65074,65074],"mapped",[8211]],[[65075,65076],"disallowed_STD3_mapped",[95]],[[65077,65077],"disallowed_STD3_mapped",[40]],[[65078,65078],"disallowed_STD3_mapped",[41]],[[65079,65079],"disallowed_STD3_mapped",[123]],[[65080,65080],"disallowed_STD3_mapped",[125]],[[65081,65081],"mapped",[12308]],[[65082,65082],"mapped",[12309]],[[65083,65083],"mapped",[12304]],[[65084,65084],"mapped",[12305]],[[65085,65085],"mapped",[12298]],[[65086,65086],"mapped",[12299]],[[65087,65087],"mapped",[12296]],[[65088,65088],"mapped",[12297]],[[65089,65089],"mapped",[12300]],[[65090,65090],"mapped",[12301]],[[65091,65091],"mapped",[12302]],[[65092,65092],"mapped",[12303]],[[65093,65094],"valid",[],"NV8"],[[65095,65095],"disallowed_STD3_mapped",[91]],[[65096,65096],"disallowed_STD3_mapped",[93]],[[65097,65100],"disallowed_STD3_mapped",[32,773]],[[65101,65103],"disallowed_STD3_mapped",[95]],[[65104,65104],"disallowed_STD3_mapped",[44]],[[65105,65105],"mapped",[12289]],[[65106,65106],"disallowed"],[[65107,65107],"disallowed"],[[65108,65108],"disallowed_STD3_mapped",[59]],[[65109,65109],"disallowed_STD3_mapped",[58]],[[65110,65110],"disallowed_STD3_mapped",[63]],[[65111,65111],"disallowed_STD3_mapped",[33]],[[65112,65112],"mapped",[8212]],[[65113,65113],"disallowed_STD3_mapped",[40]],[[65114,65114],"disallowed_STD3_mapped",[41]],[[65115,65115],"disallowed_STD3_mapped",[123]],[[65116,65116],"disallowed_STD3_mapped",[125]],[[65117,65117],"mapped",[12308]],[[65118,65118],"mapped",[12309]],[[65119,65119],"disallowed_STD3_mapped",[35]],[[65120,65120],"disallowed_STD3_mapped",[38]],[[65121,65121],"disallowed_STD3_mapped",[42]],[[65122,65122],"disallowed_STD3_mapped",[43]],[[65123,65123],"mapped",[45]],[[65124,65124],"disallowed_STD3_mapped",[60]],[[65125,65125],"disallowed_STD3_mapped",[62]],[[65126,65126],"disallowed_STD3_mapped",[61]],[[65127,65127],"disallowed"],[[65128,65128],"disallowed_STD3_mapped",[92]],[[65129,65129],"disallowed_STD3_mapped",[36]],[[65130,65130],"disallowed_STD3_mapped",[37]],[[65131,65131],"disallowed_STD3_mapped",[64]],[[65132,65135],"disallowed"],[[65136,65136],"disallowed_STD3_mapped",[32,1611]],[[65137,65137],"mapped",[1600,1611]],[[65138,65138],"disallowed_STD3_mapped",[32,1612]],[[65139,65139],"valid"],[[65140,65140],"disallowed_STD3_mapped",[32,1613]],[[65141,65141],"disallowed"],[[65142,65142],"disallowed_STD3_mapped",[32,1614]],[[65143,65143],"mapped",[1600,1614]],[[65144,65144],"disallowed_STD3_mapped",[32,1615]],[[65145,65145],"mapped",[1600,1615]],[[65146,65146],"disallowed_STD3_mapped",[32,1616]],[[65147,65147],"mapped",[1600,1616]],[[65148,65148],"disallowed_STD3_mapped",[32,1617]],[[65149,65149],"mapped",[1600,1617]],[[65150,65150],"disallowed_STD3_mapped",[32,1618]],[[65151,65151],"mapped",[1600,1618]],[[65152,65152],"mapped",[1569]],[[65153,65154],"mapped",[1570]],[[65155,65156],"mapped",[1571]],[[65157,65158],"mapped",[1572]],[[65159,65160],"mapped",[1573]],[[65161,65164],"mapped",[1574]],[[65165,65166],"mapped",[1575]],[[65167,65170],"mapped",[1576]],[[65171,65172],"mapped",[1577]],[[65173,65176],"mapped",[1578]],[[65177,65180],"mapped",[1579]],[[65181,65184],"mapped",[1580]],[[65185,65188],"mapped",[1581]],[[65189,65192],"mapped",[1582]],[[65193,65194],"mapped",[1583]],[[65195,65196],"mapped",[1584]],[[65197,65198],"mapped",[1585]],[[65199,65200],"mapped",[1586]],[[65201,65204],"mapped",[1587]],[[65205,65208],"mapped",[1588]],[[65209,65212],"mapped",[1589]],[[65213,65216],"mapped",[1590]],[[65217,65220],"mapped",[1591]],[[65221,65224],"mapped",[1592]],[[65225,65228],"mapped",[1593]],[[65229,65232],"mapped",[1594]],[[65233,65236],"mapped",[1601]],[[65237,65240],"mapped",[1602]],[[65241,65244],"mapped",[1603]],[[65245,65248],"mapped",[1604]],[[65249,65252],"mapped",[1605]],[[65253,65256],"mapped",[1606]],[[65257,65260],"mapped",[1607]],[[65261,65262],"mapped",[1608]],[[65263,65264],"mapped",[1609]],[[65265,65268],"mapped",[1610]],[[65269,65270],"mapped",[1604,1570]],[[65271,65272],"mapped",[1604,1571]],[[65273,65274],"mapped",[1604,1573]],[[65275,65276],"mapped",[1604,1575]],[[65277,65278],"disallowed"],[[65279,65279],"ignored"],[[65280,65280],"disallowed"],[[65281,65281],"disallowed_STD3_mapped",[33]],[[65282,65282],"disallowed_STD3_mapped",[34]],[[65283,65283],"disallowed_STD3_mapped",[35]],[[65284,65284],"disallowed_STD3_mapped",[36]],[[65285,65285],"disallowed_STD3_mapped",[37]],[[65286,65286],"disallowed_STD3_mapped",[38]],[[65287,65287],"disallowed_STD3_mapped",[39]],[[65288,65288],"disallowed_STD3_mapped",[40]],[[65289,65289],"disallowed_STD3_mapped",[41]],[[65290,65290],"disallowed_STD3_mapped",[42]],[[65291,65291],"disallowed_STD3_mapped",[43]],[[65292,65292],"disallowed_STD3_mapped",[44]],[[65293,65293],"mapped",[45]],[[65294,65294],"mapped",[46]],[[65295,65295],"disallowed_STD3_mapped",[47]],[[65296,65296],"mapped",[48]],[[65297,65297],"mapped",[49]],[[65298,65298],"mapped",[50]],[[65299,65299],"mapped",[51]],[[65300,65300],"mapped",[52]],[[65301,65301],"mapped",[53]],[[65302,65302],"mapped",[54]],[[65303,65303],"mapped",[55]],[[65304,65304],"mapped",[56]],[[65305,65305],"mapped",[57]],[[65306,65306],"disallowed_STD3_mapped",[58]],[[65307,65307],"disallowed_STD3_mapped",[59]],[[65308,65308],"disallowed_STD3_mapped",[60]],[[65309,65309],"disallowed_STD3_mapped",[61]],[[65310,65310],"disallowed_STD3_mapped",[62]],[[65311,65311],"disallowed_STD3_mapped",[63]],[[65312,65312],"disallowed_STD3_mapped",[64]],[[65313,65313],"mapped",[97]],[[65314,65314],"mapped",[98]],[[65315,65315],"mapped",[99]],[[65316,65316],"mapped",[100]],[[65317,65317],"mapped",[101]],[[65318,65318],"mapped",[102]],[[65319,65319],"mapped",[103]],[[65320,65320],"mapped",[104]],[[65321,65321],"mapped",[105]],[[65322,65322],"mapped",[106]],[[65323,65323],"mapped",[107]],[[65324,65324],"mapped",[108]],[[65325,65325],"mapped",[109]],[[65326,65326],"mapped",[110]],[[65327,65327],"mapped",[111]],[[65328,65328],"mapped",[112]],[[65329,65329],"mapped",[113]],[[65330,65330],"mapped",[114]],[[65331,65331],"mapped",[115]],[[65332,65332],"mapped",[116]],[[65333,65333],"mapped",[117]],[[65334,65334],"mapped",[118]],[[65335,65335],"mapped",[119]],[[65336,65336],"mapped",[120]],[[65337,65337],"mapped",[121]],[[65338,65338],"mapped",[122]],[[65339,65339],"disallowed_STD3_mapped",[91]],[[65340,65340],"disallowed_STD3_mapped",[92]],[[65341,65341],"disallowed_STD3_mapped",[93]],[[65342,65342],"disallowed_STD3_mapped",[94]],[[65343,65343],"disallowed_STD3_mapped",[95]],[[65344,65344],"disallowed_STD3_mapped",[96]],[[65345,65345],"mapped",[97]],[[65346,65346],"mapped",[98]],[[65347,65347],"mapped",[99]],[[65348,65348],"mapped",[100]],[[65349,65349],"mapped",[101]],[[65350,65350],"mapped",[102]],[[65351,65351],"mapped",[103]],[[65352,65352],"mapped",[104]],[[65353,65353],"mapped",[105]],[[65354,65354],"mapped",[106]],[[65355,65355],"mapped",[107]],[[65356,65356],"mapped",[108]],[[65357,65357],"mapped",[109]],[[65358,65358],"mapped",[110]],[[65359,65359],"mapped",[111]],[[65360,65360],"mapped",[112]],[[65361,65361],"mapped",[113]],[[65362,65362],"mapped",[114]],[[65363,65363],"mapped",[115]],[[65364,65364],"mapped",[116]],[[65365,65365],"mapped",[117]],[[65366,65366],"mapped",[118]],[[65367,65367],"mapped",[119]],[[65368,65368],"mapped",[120]],[[65369,65369],"mapped",[121]],[[65370,65370],"mapped",[122]],[[65371,65371],"disallowed_STD3_mapped",[123]],[[65372,65372],"disallowed_STD3_mapped",[124]],[[65373,65373],"disallowed_STD3_mapped",[125]],[[65374,65374],"disallowed_STD3_mapped",[126]],[[65375,65375],"mapped",[10629]],[[65376,65376],"mapped",[10630]],[[65377,65377],"mapped",[46]],[[65378,65378],"mapped",[12300]],[[65379,65379],"mapped",[12301]],[[65380,65380],"mapped",[12289]],[[65381,65381],"mapped",[12539]],[[65382,65382],"mapped",[12530]],[[65383,65383],"mapped",[12449]],[[65384,65384],"mapped",[12451]],[[65385,65385],"mapped",[12453]],[[65386,65386],"mapped",[12455]],[[65387,65387],"mapped",[12457]],[[65388,65388],"mapped",[12515]],[[65389,65389],"mapped",[12517]],[[65390,65390],"mapped",[12519]],[[65391,65391],"mapped",[12483]],[[65392,65392],"mapped",[12540]],[[65393,65393],"mapped",[12450]],[[65394,65394],"mapped",[12452]],[[65395,65395],"mapped",[12454]],[[65396,65396],"mapped",[12456]],[[65397,65397],"mapped",[12458]],[[65398,65398],"mapped",[12459]],[[65399,65399],"mapped",[12461]],[[65400,65400],"mapped",[12463]],[[65401,65401],"mapped",[12465]],[[65402,65402],"mapped",[12467]],[[65403,65403],"mapped",[12469]],[[65404,65404],"mapped",[12471]],[[65405,65405],"mapped",[12473]],[[65406,65406],"mapped",[12475]],[[65407,65407],"mapped",[12477]],[[65408,65408],"mapped",[12479]],[[65409,65409],"mapped",[12481]],[[65410,65410],"mapped",[12484]],[[65411,65411],"mapped",[12486]],[[65412,65412],"mapped",[12488]],[[65413,65413],"mapped",[12490]],[[65414,65414],"mapped",[12491]],[[65415,65415],"mapped",[12492]],[[65416,65416],"mapped",[12493]],[[65417,65417],"mapped",[12494]],[[65418,65418],"mapped",[12495]],[[65419,65419],"mapped",[12498]],[[65420,65420],"mapped",[12501]],[[65421,65421],"mapped",[12504]],[[65422,65422],"mapped",[12507]],[[65423,65423],"mapped",[12510]],[[65424,65424],"mapped",[12511]],[[65425,65425],"mapped",[12512]],[[65426,65426],"mapped",[12513]],[[65427,65427],"mapped",[12514]],[[65428,65428],"mapped",[12516]],[[65429,65429],"mapped",[12518]],[[65430,65430],"mapped",[12520]],[[65431,65431],"mapped",[12521]],[[65432,65432],"mapped",[12522]],[[65433,65433],"mapped",[12523]],[[65434,65434],"mapped",[12524]],[[65435,65435],"mapped",[12525]],[[65436,65436],"mapped",[12527]],[[65437,65437],"mapped",[12531]],[[65438,65438],"mapped",[12441]],[[65439,65439],"mapped",[12442]],[[65440,65440],"disallowed"],[[65441,65441],"mapped",[4352]],[[65442,65442],"mapped",[4353]],[[65443,65443],"mapped",[4522]],[[65444,65444],"mapped",[4354]],[[65445,65445],"mapped",[4524]],[[65446,65446],"mapped",[4525]],[[65447,65447],"mapped",[4355]],[[65448,65448],"mapped",[4356]],[[65449,65449],"mapped",[4357]],[[65450,65450],"mapped",[4528]],[[65451,65451],"mapped",[4529]],[[65452,65452],"mapped",[4530]],[[65453,65453],"mapped",[4531]],[[65454,65454],"mapped",[4532]],[[65455,65455],"mapped",[4533]],[[65456,65456],"mapped",[4378]],[[65457,65457],"mapped",[4358]],[[65458,65458],"mapped",[4359]],[[65459,65459],"mapped",[4360]],[[65460,65460],"mapped",[4385]],[[65461,65461],"mapped",[4361]],[[65462,65462],"mapped",[4362]],[[65463,65463],"mapped",[4363]],[[65464,65464],"mapped",[4364]],[[65465,65465],"mapped",[4365]],[[65466,65466],"mapped",[4366]],[[65467,65467],"mapped",[4367]],[[65468,65468],"mapped",[4368]],[[65469,65469],"mapped",[4369]],[[65470,65470],"mapped",[4370]],[[65471,65473],"disallowed"],[[65474,65474],"mapped",[4449]],[[65475,65475],"mapped",[4450]],[[65476,65476],"mapped",[4451]],[[65477,65477],"mapped",[4452]],[[65478,65478],"mapped",[4453]],[[65479,65479],"mapped",[4454]],[[65480,65481],"disallowed"],[[65482,65482],"mapped",[4455]],[[65483,65483],"mapped",[4456]],[[65484,65484],"mapped",[4457]],[[65485,65485],"mapped",[4458]],[[65486,65486],"mapped",[4459]],[[65487,65487],"mapped",[4460]],[[65488,65489],"disallowed"],[[65490,65490],"mapped",[4461]],[[65491,65491],"mapped",[4462]],[[65492,65492],"mapped",[4463]],[[65493,65493],"mapped",[4464]],[[65494,65494],"mapped",[4465]],[[65495,65495],"mapped",[4466]],[[65496,65497],"disallowed"],[[65498,65498],"mapped",[4467]],[[65499,65499],"mapped",[4468]],[[65500,65500],"mapped",[4469]],[[65501,65503],"disallowed"],[[65504,65504],"mapped",[162]],[[65505,65505],"mapped",[163]],[[65506,65506],"mapped",[172]],[[65507,65507],"disallowed_STD3_mapped",[32,772]],[[65508,65508],"mapped",[166]],[[65509,65509],"mapped",[165]],[[65510,65510],"mapped",[8361]],[[65511,65511],"disallowed"],[[65512,65512],"mapped",[9474]],[[65513,65513],"mapped",[8592]],[[65514,65514],"mapped",[8593]],[[65515,65515],"mapped",[8594]],[[65516,65516],"mapped",[8595]],[[65517,65517],"mapped",[9632]],[[65518,65518],"mapped",[9675]],[[65519,65528],"disallowed"],[[65529,65531],"disallowed"],[[65532,65532],"disallowed"],[[65533,65533],"disallowed"],[[65534,65535],"disallowed"],[[65536,65547],"valid"],[[65548,65548],"disallowed"],[[65549,65574],"valid"],[[65575,65575],"disallowed"],[[65576,65594],"valid"],[[65595,65595],"disallowed"],[[65596,65597],"valid"],[[65598,65598],"disallowed"],[[65599,65613],"valid"],[[65614,65615],"disallowed"],[[65616,65629],"valid"],[[65630,65663],"disallowed"],[[65664,65786],"valid"],[[65787,65791],"disallowed"],[[65792,65794],"valid",[],"NV8"],[[65795,65798],"disallowed"],[[65799,65843],"valid",[],"NV8"],[[65844,65846],"disallowed"],[[65847,65855],"valid",[],"NV8"],[[65856,65930],"valid",[],"NV8"],[[65931,65932],"valid",[],"NV8"],[[65933,65935],"disallowed"],[[65936,65947],"valid",[],"NV8"],[[65948,65951],"disallowed"],[[65952,65952],"valid",[],"NV8"],[[65953,65999],"disallowed"],[[66000,66044],"valid",[],"NV8"],[[66045,66045],"valid"],[[66046,66175],"disallowed"],[[66176,66204],"valid"],[[66205,66207],"disallowed"],[[66208,66256],"valid"],[[66257,66271],"disallowed"],[[66272,66272],"valid"],[[66273,66299],"valid",[],"NV8"],[[66300,66303],"disallowed"],[[66304,66334],"valid"],[[66335,66335],"valid"],[[66336,66339],"valid",[],"NV8"],[[66340,66351],"disallowed"],[[66352,66368],"valid"],[[66369,66369],"valid",[],"NV8"],[[66370,66377],"valid"],[[66378,66378],"valid",[],"NV8"],[[66379,66383],"disallowed"],[[66384,66426],"valid"],[[66427,66431],"disallowed"],[[66432,66461],"valid"],[[66462,66462],"disallowed"],[[66463,66463],"valid",[],"NV8"],[[66464,66499],"valid"],[[66500,66503],"disallowed"],[[66504,66511],"valid"],[[66512,66517],"valid",[],"NV8"],[[66518,66559],"disallowed"],[[66560,66560],"mapped",[66600]],[[66561,66561],"mapped",[66601]],[[66562,66562],"mapped",[66602]],[[66563,66563],"mapped",[66603]],[[66564,66564],"mapped",[66604]],[[66565,66565],"mapped",[66605]],[[66566,66566],"mapped",[66606]],[[66567,66567],"mapped",[66607]],[[66568,66568],"mapped",[66608]],[[66569,66569],"mapped",[66609]],[[66570,66570],"mapped",[66610]],[[66571,66571],"mapped",[66611]],[[66572,66572],"mapped",[66612]],[[66573,66573],"mapped",[66613]],[[66574,66574],"mapped",[66614]],[[66575,66575],"mapped",[66615]],[[66576,66576],"mapped",[66616]],[[66577,66577],"mapped",[66617]],[[66578,66578],"mapped",[66618]],[[66579,66579],"mapped",[66619]],[[66580,66580],"mapped",[66620]],[[66581,66581],"mapped",[66621]],[[66582,66582],"mapped",[66622]],[[66583,66583],"mapped",[66623]],[[66584,66584],"mapped",[66624]],[[66585,66585],"mapped",[66625]],[[66586,66586],"mapped",[66626]],[[66587,66587],"mapped",[66627]],[[66588,66588],"mapped",[66628]],[[66589,66589],"mapped",[66629]],[[66590,66590],"mapped",[66630]],[[66591,66591],"mapped",[66631]],[[66592,66592],"mapped",[66632]],[[66593,66593],"mapped",[66633]],[[66594,66594],"mapped",[66634]],[[66595,66595],"mapped",[66635]],[[66596,66596],"mapped",[66636]],[[66597,66597],"mapped",[66637]],[[66598,66598],"mapped",[66638]],[[66599,66599],"mapped",[66639]],[[66600,66637],"valid"],[[66638,66717],"valid"],[[66718,66719],"disallowed"],[[66720,66729],"valid"],[[66730,66815],"disallowed"],[[66816,66855],"valid"],[[66856,66863],"disallowed"],[[66864,66915],"valid"],[[66916,66926],"disallowed"],[[66927,66927],"valid",[],"NV8"],[[66928,67071],"disallowed"],[[67072,67382],"valid"],[[67383,67391],"disallowed"],[[67392,67413],"valid"],[[67414,67423],"disallowed"],[[67424,67431],"valid"],[[67432,67583],"disallowed"],[[67584,67589],"valid"],[[67590,67591],"disallowed"],[[67592,67592],"valid"],[[67593,67593],"disallowed"],[[67594,67637],"valid"],[[67638,67638],"disallowed"],[[67639,67640],"valid"],[[67641,67643],"disallowed"],[[67644,67644],"valid"],[[67645,67646],"disallowed"],[[67647,67647],"valid"],[[67648,67669],"valid"],[[67670,67670],"disallowed"],[[67671,67679],"valid",[],"NV8"],[[67680,67702],"valid"],[[67703,67711],"valid",[],"NV8"],[[67712,67742],"valid"],[[67743,67750],"disallowed"],[[67751,67759],"valid",[],"NV8"],[[67760,67807],"disallowed"],[[67808,67826],"valid"],[[67827,67827],"disallowed"],[[67828,67829],"valid"],[[67830,67834],"disallowed"],[[67835,67839],"valid",[],"NV8"],[[67840,67861],"valid"],[[67862,67865],"valid",[],"NV8"],[[67866,67867],"valid",[],"NV8"],[[67868,67870],"disallowed"],[[67871,67871],"valid",[],"NV8"],[[67872,67897],"valid"],[[67898,67902],"disallowed"],[[67903,67903],"valid",[],"NV8"],[[67904,67967],"disallowed"],[[67968,68023],"valid"],[[68024,68027],"disallowed"],[[68028,68029],"valid",[],"NV8"],[[68030,68031],"valid"],[[68032,68047],"valid",[],"NV8"],[[68048,68049],"disallowed"],[[68050,68095],"valid",[],"NV8"],[[68096,68099],"valid"],[[68100,68100],"disallowed"],[[68101,68102],"valid"],[[68103,68107],"disallowed"],[[68108,68115],"valid"],[[68116,68116],"disallowed"],[[68117,68119],"valid"],[[68120,68120],"disallowed"],[[68121,68147],"valid"],[[68148,68151],"disallowed"],[[68152,68154],"valid"],[[68155,68158],"disallowed"],[[68159,68159],"valid"],[[68160,68167],"valid",[],"NV8"],[[68168,68175],"disallowed"],[[68176,68184],"valid",[],"NV8"],[[68185,68191],"disallowed"],[[68192,68220],"valid"],[[68221,68223],"valid",[],"NV8"],[[68224,68252],"valid"],[[68253,68255],"valid",[],"NV8"],[[68256,68287],"disallowed"],[[68288,68295],"valid"],[[68296,68296],"valid",[],"NV8"],[[68297,68326],"valid"],[[68327,68330],"disallowed"],[[68331,68342],"valid",[],"NV8"],[[68343,68351],"disallowed"],[[68352,68405],"valid"],[[68406,68408],"disallowed"],[[68409,68415],"valid",[],"NV8"],[[68416,68437],"valid"],[[68438,68439],"disallowed"],[[68440,68447],"valid",[],"NV8"],[[68448,68466],"valid"],[[68467,68471],"disallowed"],[[68472,68479],"valid",[],"NV8"],[[68480,68497],"valid"],[[68498,68504],"disallowed"],[[68505,68508],"valid",[],"NV8"],[[68509,68520],"disallowed"],[[68521,68527],"valid",[],"NV8"],[[68528,68607],"disallowed"],[[68608,68680],"valid"],[[68681,68735],"disallowed"],[[68736,68736],"mapped",[68800]],[[68737,68737],"mapped",[68801]],[[68738,68738],"mapped",[68802]],[[68739,68739],"mapped",[68803]],[[68740,68740],"mapped",[68804]],[[68741,68741],"mapped",[68805]],[[68742,68742],"mapped",[68806]],[[68743,68743],"mapped",[68807]],[[68744,68744],"mapped",[68808]],[[68745,68745],"mapped",[68809]],[[68746,68746],"mapped",[68810]],[[68747,68747],"mapped",[68811]],[[68748,68748],"mapped",[68812]],[[68749,68749],"mapped",[68813]],[[68750,68750],"mapped",[68814]],[[68751,68751],"mapped",[68815]],[[68752,68752],"mapped",[68816]],[[68753,68753],"mapped",[68817]],[[68754,68754],"mapped",[68818]],[[68755,68755],"mapped",[68819]],[[68756,68756],"mapped",[68820]],[[68757,68757],"mapped",[68821]],[[68758,68758],"mapped",[68822]],[[68759,68759],"mapped",[68823]],[[68760,68760],"mapped",[68824]],[[68761,68761],"mapped",[68825]],[[68762,68762],"mapped",[68826]],[[68763,68763],"mapped",[68827]],[[68764,68764],"mapped",[68828]],[[68765,68765],"mapped",[68829]],[[68766,68766],"mapped",[68830]],[[68767,68767],"mapped",[68831]],[[68768,68768],"mapped",[68832]],[[68769,68769],"mapped",[68833]],[[68770,68770],"mapped",[68834]],[[68771,68771],"mapped",[68835]],[[68772,68772],"mapped",[68836]],[[68773,68773],"mapped",[68837]],[[68774,68774],"mapped",[68838]],[[68775,68775],"mapped",[68839]],[[68776,68776],"mapped",[68840]],[[68777,68777],"mapped",[68841]],[[68778,68778],"mapped",[68842]],[[68779,68779],"mapped",[68843]],[[68780,68780],"mapped",[68844]],[[68781,68781],"mapped",[68845]],[[68782,68782],"mapped",[68846]],[[68783,68783],"mapped",[68847]],[[68784,68784],"mapped",[68848]],[[68785,68785],"mapped",[68849]],[[68786,68786],"mapped",[68850]],[[68787,68799],"disallowed"],[[68800,68850],"valid"],[[68851,68857],"disallowed"],[[68858,68863],"valid",[],"NV8"],[[68864,69215],"disallowed"],[[69216,69246],"valid",[],"NV8"],[[69247,69631],"disallowed"],[[69632,69702],"valid"],[[69703,69709],"valid",[],"NV8"],[[69710,69713],"disallowed"],[[69714,69733],"valid",[],"NV8"],[[69734,69743],"valid"],[[69744,69758],"disallowed"],[[69759,69759],"valid"],[[69760,69818],"valid"],[[69819,69820],"valid",[],"NV8"],[[69821,69821],"disallowed"],[[69822,69825],"valid",[],"NV8"],[[69826,69839],"disallowed"],[[69840,69864],"valid"],[[69865,69871],"disallowed"],[[69872,69881],"valid"],[[69882,69887],"disallowed"],[[69888,69940],"valid"],[[69941,69941],"disallowed"],[[69942,69951],"valid"],[[69952,69955],"valid",[],"NV8"],[[69956,69967],"disallowed"],[[69968,70003],"valid"],[[70004,70005],"valid",[],"NV8"],[[70006,70006],"valid"],[[70007,70015],"disallowed"],[[70016,70084],"valid"],[[70085,70088],"valid",[],"NV8"],[[70089,70089],"valid",[],"NV8"],[[70090,70092],"valid"],[[70093,70093],"valid",[],"NV8"],[[70094,70095],"disallowed"],[[70096,70105],"valid"],[[70106,70106],"valid"],[[70107,70107],"valid",[],"NV8"],[[70108,70108],"valid"],[[70109,70111],"valid",[],"NV8"],[[70112,70112],"disallowed"],[[70113,70132],"valid",[],"NV8"],[[70133,70143],"disallowed"],[[70144,70161],"valid"],[[70162,70162],"disallowed"],[[70163,70199],"valid"],[[70200,70205],"valid",[],"NV8"],[[70206,70271],"disallowed"],[[70272,70278],"valid"],[[70279,70279],"disallowed"],[[70280,70280],"valid"],[[70281,70281],"disallowed"],[[70282,70285],"valid"],[[70286,70286],"disallowed"],[[70287,70301],"valid"],[[70302,70302],"disallowed"],[[70303,70312],"valid"],[[70313,70313],"valid",[],"NV8"],[[70314,70319],"disallowed"],[[70320,70378],"valid"],[[70379,70383],"disallowed"],[[70384,70393],"valid"],[[70394,70399],"disallowed"],[[70400,70400],"valid"],[[70401,70403],"valid"],[[70404,70404],"disallowed"],[[70405,70412],"valid"],[[70413,70414],"disallowed"],[[70415,70416],"valid"],[[70417,70418],"disallowed"],[[70419,70440],"valid"],[[70441,70441],"disallowed"],[[70442,70448],"valid"],[[70449,70449],"disallowed"],[[70450,70451],"valid"],[[70452,70452],"disallowed"],[[70453,70457],"valid"],[[70458,70459],"disallowed"],[[70460,70468],"valid"],[[70469,70470],"disallowed"],[[70471,70472],"valid"],[[70473,70474],"disallowed"],[[70475,70477],"valid"],[[70478,70479],"disallowed"],[[70480,70480],"valid"],[[70481,70486],"disallowed"],[[70487,70487],"valid"],[[70488,70492],"disallowed"],[[70493,70499],"valid"],[[70500,70501],"disallowed"],[[70502,70508],"valid"],[[70509,70511],"disallowed"],[[70512,70516],"valid"],[[70517,70783],"disallowed"],[[70784,70853],"valid"],[[70854,70854],"valid",[],"NV8"],[[70855,70855],"valid"],[[70856,70863],"disallowed"],[[70864,70873],"valid"],[[70874,71039],"disallowed"],[[71040,71093],"valid"],[[71094,71095],"disallowed"],[[71096,71104],"valid"],[[71105,71113],"valid",[],"NV8"],[[71114,71127],"valid",[],"NV8"],[[71128,71133],"valid"],[[71134,71167],"disallowed"],[[71168,71232],"valid"],[[71233,71235],"valid",[],"NV8"],[[71236,71236],"valid"],[[71237,71247],"disallowed"],[[71248,71257],"valid"],[[71258,71295],"disallowed"],[[71296,71351],"valid"],[[71352,71359],"disallowed"],[[71360,71369],"valid"],[[71370,71423],"disallowed"],[[71424,71449],"valid"],[[71450,71452],"disallowed"],[[71453,71467],"valid"],[[71468,71471],"disallowed"],[[71472,71481],"valid"],[[71482,71487],"valid",[],"NV8"],[[71488,71839],"disallowed"],[[71840,71840],"mapped",[71872]],[[71841,71841],"mapped",[71873]],[[71842,71842],"mapped",[71874]],[[71843,71843],"mapped",[71875]],[[71844,71844],"mapped",[71876]],[[71845,71845],"mapped",[71877]],[[71846,71846],"mapped",[71878]],[[71847,71847],"mapped",[71879]],[[71848,71848],"mapped",[71880]],[[71849,71849],"mapped",[71881]],[[71850,71850],"mapped",[71882]],[[71851,71851],"mapped",[71883]],[[71852,71852],"mapped",[71884]],[[71853,71853],"mapped",[71885]],[[71854,71854],"mapped",[71886]],[[71855,71855],"mapped",[71887]],[[71856,71856],"mapped",[71888]],[[71857,71857],"mapped",[71889]],[[71858,71858],"mapped",[71890]],[[71859,71859],"mapped",[71891]],[[71860,71860],"mapped",[71892]],[[71861,71861],"mapped",[71893]],[[71862,71862],"mapped",[71894]],[[71863,71863],"mapped",[71895]],[[71864,71864],"mapped",[71896]],[[71865,71865],"mapped",[71897]],[[71866,71866],"mapped",[71898]],[[71867,71867],"mapped",[71899]],[[71868,71868],"mapped",[71900]],[[71869,71869],"mapped",[71901]],[[71870,71870],"mapped",[71902]],[[71871,71871],"mapped",[71903]],[[71872,71913],"valid"],[[71914,71922],"valid",[],"NV8"],[[71923,71934],"disallowed"],[[71935,71935],"valid"],[[71936,72383],"disallowed"],[[72384,72440],"valid"],[[72441,73727],"disallowed"],[[73728,74606],"valid"],[[74607,74648],"valid"],[[74649,74649],"valid"],[[74650,74751],"disallowed"],[[74752,74850],"valid",[],"NV8"],[[74851,74862],"valid",[],"NV8"],[[74863,74863],"disallowed"],[[74864,74867],"valid",[],"NV8"],[[74868,74868],"valid",[],"NV8"],[[74869,74879],"disallowed"],[[74880,75075],"valid"],[[75076,77823],"disallowed"],[[77824,78894],"valid"],[[78895,82943],"disallowed"],[[82944,83526],"valid"],[[83527,92159],"disallowed"],[[92160,92728],"valid"],[[92729,92735],"disallowed"],[[92736,92766],"valid"],[[92767,92767],"disallowed"],[[92768,92777],"valid"],[[92778,92781],"disallowed"],[[92782,92783],"valid",[],"NV8"],[[92784,92879],"disallowed"],[[92880,92909],"valid"],[[92910,92911],"disallowed"],[[92912,92916],"valid"],[[92917,92917],"valid",[],"NV8"],[[92918,92927],"disallowed"],[[92928,92982],"valid"],[[92983,92991],"valid",[],"NV8"],[[92992,92995],"valid"],[[92996,92997],"valid",[],"NV8"],[[92998,93007],"disallowed"],[[93008,93017],"valid"],[[93018,93018],"disallowed"],[[93019,93025],"valid",[],"NV8"],[[93026,93026],"disallowed"],[[93027,93047],"valid"],[[93048,93052],"disallowed"],[[93053,93071],"valid"],[[93072,93951],"disallowed"],[[93952,94020],"valid"],[[94021,94031],"disallowed"],[[94032,94078],"valid"],[[94079,94094],"disallowed"],[[94095,94111],"valid"],[[94112,110591],"disallowed"],[[110592,110593],"valid"],[[110594,113663],"disallowed"],[[113664,113770],"valid"],[[113771,113775],"disallowed"],[[113776,113788],"valid"],[[113789,113791],"disallowed"],[[113792,113800],"valid"],[[113801,113807],"disallowed"],[[113808,113817],"valid"],[[113818,113819],"disallowed"],[[113820,113820],"valid",[],"NV8"],[[113821,113822],"valid"],[[113823,113823],"valid",[],"NV8"],[[113824,113827],"ignored"],[[113828,118783],"disallowed"],[[118784,119029],"valid",[],"NV8"],[[119030,119039],"disallowed"],[[119040,119078],"valid",[],"NV8"],[[119079,119080],"disallowed"],[[119081,119081],"valid",[],"NV8"],[[119082,119133],"valid",[],"NV8"],[[119134,119134],"mapped",[119127,119141]],[[119135,119135],"mapped",[119128,119141]],[[119136,119136],"mapped",[119128,119141,119150]],[[119137,119137],"mapped",[119128,119141,119151]],[[119138,119138],"mapped",[119128,119141,119152]],[[119139,119139],"mapped",[119128,119141,119153]],[[119140,119140],"mapped",[119128,119141,119154]],[[119141,119154],"valid",[],"NV8"],[[119155,119162],"disallowed"],[[119163,119226],"valid",[],"NV8"],[[119227,119227],"mapped",[119225,119141]],[[119228,119228],"mapped",[119226,119141]],[[119229,119229],"mapped",[119225,119141,119150]],[[119230,119230],"mapped",[119226,119141,119150]],[[119231,119231],"mapped",[119225,119141,119151]],[[119232,119232],"mapped",[119226,119141,119151]],[[119233,119261],"valid",[],"NV8"],[[119262,119272],"valid",[],"NV8"],[[119273,119295],"disallowed"],[[119296,119365],"valid",[],"NV8"],[[119366,119551],"disallowed"],[[119552,119638],"valid",[],"NV8"],[[119639,119647],"disallowed"],[[119648,119665],"valid",[],"NV8"],[[119666,119807],"disallowed"],[[119808,119808],"mapped",[97]],[[119809,119809],"mapped",[98]],[[119810,119810],"mapped",[99]],[[119811,119811],"mapped",[100]],[[119812,119812],"mapped",[101]],[[119813,119813],"mapped",[102]],[[119814,119814],"mapped",[103]],[[119815,119815],"mapped",[104]],[[119816,119816],"mapped",[105]],[[119817,119817],"mapped",[106]],[[119818,119818],"mapped",[107]],[[119819,119819],"mapped",[108]],[[119820,119820],"mapped",[109]],[[119821,119821],"mapped",[110]],[[119822,119822],"mapped",[111]],[[119823,119823],"mapped",[112]],[[119824,119824],"mapped",[113]],[[119825,119825],"mapped",[114]],[[119826,119826],"mapped",[115]],[[119827,119827],"mapped",[116]],[[119828,119828],"mapped",[117]],[[119829,119829],"mapped",[118]],[[119830,119830],"mapped",[119]],[[119831,119831],"mapped",[120]],[[119832,119832],"mapped",[121]],[[119833,119833],"mapped",[122]],[[119834,119834],"mapped",[97]],[[119835,119835],"mapped",[98]],[[119836,119836],"mapped",[99]],[[119837,119837],"mapped",[100]],[[119838,119838],"mapped",[101]],[[119839,119839],"mapped",[102]],[[119840,119840],"mapped",[103]],[[119841,119841],"mapped",[104]],[[119842,119842],"mapped",[105]],[[119843,119843],"mapped",[106]],[[119844,119844],"mapped",[107]],[[119845,119845],"mapped",[108]],[[119846,119846],"mapped",[109]],[[119847,119847],"mapped",[110]],[[119848,119848],"mapped",[111]],[[119849,119849],"mapped",[112]],[[119850,119850],"mapped",[113]],[[119851,119851],"mapped",[114]],[[119852,119852],"mapped",[115]],[[119853,119853],"mapped",[116]],[[119854,119854],"mapped",[117]],[[119855,119855],"mapped",[118]],[[119856,119856],"mapped",[119]],[[119857,119857],"mapped",[120]],[[119858,119858],"mapped",[121]],[[119859,119859],"mapped",[122]],[[119860,119860],"mapped",[97]],[[119861,119861],"mapped",[98]],[[119862,119862],"mapped",[99]],[[119863,119863],"mapped",[100]],[[119864,119864],"mapped",[101]],[[119865,119865],"mapped",[102]],[[119866,119866],"mapped",[103]],[[119867,119867],"mapped",[104]],[[119868,119868],"mapped",[105]],[[119869,119869],"mapped",[106]],[[119870,119870],"mapped",[107]],[[119871,119871],"mapped",[108]],[[119872,119872],"mapped",[109]],[[119873,119873],"mapped",[110]],[[119874,119874],"mapped",[111]],[[119875,119875],"mapped",[112]],[[119876,119876],"mapped",[113]],[[119877,119877],"mapped",[114]],[[119878,119878],"mapped",[115]],[[119879,119879],"mapped",[116]],[[119880,119880],"mapped",[117]],[[119881,119881],"mapped",[118]],[[119882,119882],"mapped",[119]],[[119883,119883],"mapped",[120]],[[119884,119884],"mapped",[121]],[[119885,119885],"mapped",[122]],[[119886,119886],"mapped",[97]],[[119887,119887],"mapped",[98]],[[119888,119888],"mapped",[99]],[[119889,119889],"mapped",[100]],[[119890,119890],"mapped",[101]],[[119891,119891],"mapped",[102]],[[119892,119892],"mapped",[103]],[[119893,119893],"disallowed"],[[119894,119894],"mapped",[105]],[[119895,119895],"mapped",[106]],[[119896,119896],"mapped",[107]],[[119897,119897],"mapped",[108]],[[119898,119898],"mapped",[109]],[[119899,119899],"mapped",[110]],[[119900,119900],"mapped",[111]],[[119901,119901],"mapped",[112]],[[119902,119902],"mapped",[113]],[[119903,119903],"mapped",[114]],[[119904,119904],"mapped",[115]],[[119905,119905],"mapped",[116]],[[119906,119906],"mapped",[117]],[[119907,119907],"mapped",[118]],[[119908,119908],"mapped",[119]],[[119909,119909],"mapped",[120]],[[119910,119910],"mapped",[121]],[[119911,119911],"mapped",[122]],[[119912,119912],"mapped",[97]],[[119913,119913],"mapped",[98]],[[119914,119914],"mapped",[99]],[[119915,119915],"mapped",[100]],[[119916,119916],"mapped",[101]],[[119917,119917],"mapped",[102]],[[119918,119918],"mapped",[103]],[[119919,119919],"mapped",[104]],[[119920,119920],"mapped",[105]],[[119921,119921],"mapped",[106]],[[119922,119922],"mapped",[107]],[[119923,119923],"mapped",[108]],[[119924,119924],"mapped",[109]],[[119925,119925],"mapped",[110]],[[119926,119926],"mapped",[111]],[[119927,119927],"mapped",[112]],[[119928,119928],"mapped",[113]],[[119929,119929],"mapped",[114]],[[119930,119930],"mapped",[115]],[[119931,119931],"mapped",[116]],[[119932,119932],"mapped",[117]],[[119933,119933],"mapped",[118]],[[119934,119934],"mapped",[119]],[[119935,119935],"mapped",[120]],[[119936,119936],"mapped",[121]],[[119937,119937],"mapped",[122]],[[119938,119938],"mapped",[97]],[[119939,119939],"mapped",[98]],[[119940,119940],"mapped",[99]],[[119941,119941],"mapped",[100]],[[119942,119942],"mapped",[101]],[[119943,119943],"mapped",[102]],[[119944,119944],"mapped",[103]],[[119945,119945],"mapped",[104]],[[119946,119946],"mapped",[105]],[[119947,119947],"mapped",[106]],[[119948,119948],"mapped",[107]],[[119949,119949],"mapped",[108]],[[119950,119950],"mapped",[109]],[[119951,119951],"mapped",[110]],[[119952,119952],"mapped",[111]],[[119953,119953],"mapped",[112]],[[119954,119954],"mapped",[113]],[[119955,119955],"mapped",[114]],[[119956,119956],"mapped",[115]],[[119957,119957],"mapped",[116]],[[119958,119958],"mapped",[117]],[[119959,119959],"mapped",[118]],[[119960,119960],"mapped",[119]],[[119961,119961],"mapped",[120]],[[119962,119962],"mapped",[121]],[[119963,119963],"mapped",[122]],[[119964,119964],"mapped",[97]],[[119965,119965],"disallowed"],[[119966,119966],"mapped",[99]],[[119967,119967],"mapped",[100]],[[119968,119969],"disallowed"],[[119970,119970],"mapped",[103]],[[119971,119972],"disallowed"],[[119973,119973],"mapped",[106]],[[119974,119974],"mapped",[107]],[[119975,119976],"disallowed"],[[119977,119977],"mapped",[110]],[[119978,119978],"mapped",[111]],[[119979,119979],"mapped",[112]],[[119980,119980],"mapped",[113]],[[119981,119981],"disallowed"],[[119982,119982],"mapped",[115]],[[119983,119983],"mapped",[116]],[[119984,119984],"mapped",[117]],[[119985,119985],"mapped",[118]],[[119986,119986],"mapped",[119]],[[119987,119987],"mapped",[120]],[[119988,119988],"mapped",[121]],[[119989,119989],"mapped",[122]],[[119990,119990],"mapped",[97]],[[119991,119991],"mapped",[98]],[[119992,119992],"mapped",[99]],[[119993,119993],"mapped",[100]],[[119994,119994],"disallowed"],[[119995,119995],"mapped",[102]],[[119996,119996],"disallowed"],[[119997,119997],"mapped",[104]],[[119998,119998],"mapped",[105]],[[119999,119999],"mapped",[106]],[[120000,120000],"mapped",[107]],[[120001,120001],"mapped",[108]],[[120002,120002],"mapped",[109]],[[120003,120003],"mapped",[110]],[[120004,120004],"disallowed"],[[120005,120005],"mapped",[112]],[[120006,120006],"mapped",[113]],[[120007,120007],"mapped",[114]],[[120008,120008],"mapped",[115]],[[120009,120009],"mapped",[116]],[[120010,120010],"mapped",[117]],[[120011,120011],"mapped",[118]],[[120012,120012],"mapped",[119]],[[120013,120013],"mapped",[120]],[[120014,120014],"mapped",[121]],[[120015,120015],"mapped",[122]],[[120016,120016],"mapped",[97]],[[120017,120017],"mapped",[98]],[[120018,120018],"mapped",[99]],[[120019,120019],"mapped",[100]],[[120020,120020],"mapped",[101]],[[120021,120021],"mapped",[102]],[[120022,120022],"mapped",[103]],[[120023,120023],"mapped",[104]],[[120024,120024],"mapped",[105]],[[120025,120025],"mapped",[106]],[[120026,120026],"mapped",[107]],[[120027,120027],"mapped",[108]],[[120028,120028],"mapped",[109]],[[120029,120029],"mapped",[110]],[[120030,120030],"mapped",[111]],[[120031,120031],"mapped",[112]],[[120032,120032],"mapped",[113]],[[120033,120033],"mapped",[114]],[[120034,120034],"mapped",[115]],[[120035,120035],"mapped",[116]],[[120036,120036],"mapped",[117]],[[120037,120037],"mapped",[118]],[[120038,120038],"mapped",[119]],[[120039,120039],"mapped",[120]],[[120040,120040],"mapped",[121]],[[120041,120041],"mapped",[122]],[[120042,120042],"mapped",[97]],[[120043,120043],"mapped",[98]],[[120044,120044],"mapped",[99]],[[120045,120045],"mapped",[100]],[[120046,120046],"mapped",[101]],[[120047,120047],"mapped",[102]],[[120048,120048],"mapped",[103]],[[120049,120049],"mapped",[104]],[[120050,120050],"mapped",[105]],[[120051,120051],"mapped",[106]],[[120052,120052],"mapped",[107]],[[120053,120053],"mapped",[108]],[[120054,120054],"mapped",[109]],[[120055,120055],"mapped",[110]],[[120056,120056],"mapped",[111]],[[120057,120057],"mapped",[112]],[[120058,120058],"mapped",[113]],[[120059,120059],"mapped",[114]],[[120060,120060],"mapped",[115]],[[120061,120061],"mapped",[116]],[[120062,120062],"mapped",[117]],[[120063,120063],"mapped",[118]],[[120064,120064],"mapped",[119]],[[120065,120065],"mapped",[120]],[[120066,120066],"mapped",[121]],[[120067,120067],"mapped",[122]],[[120068,120068],"mapped",[97]],[[120069,120069],"mapped",[98]],[[120070,120070],"disallowed"],[[120071,120071],"mapped",[100]],[[120072,120072],"mapped",[101]],[[120073,120073],"mapped",[102]],[[120074,120074],"mapped",[103]],[[120075,120076],"disallowed"],[[120077,120077],"mapped",[106]],[[120078,120078],"mapped",[107]],[[120079,120079],"mapped",[108]],[[120080,120080],"mapped",[109]],[[120081,120081],"mapped",[110]],[[120082,120082],"mapped",[111]],[[120083,120083],"mapped",[112]],[[120084,120084],"mapped",[113]],[[120085,120085],"disallowed"],[[120086,120086],"mapped",[115]],[[120087,120087],"mapped",[116]],[[120088,120088],"mapped",[117]],[[120089,120089],"mapped",[118]],[[120090,120090],"mapped",[119]],[[120091,120091],"mapped",[120]],[[120092,120092],"mapped",[121]],[[120093,120093],"disallowed"],[[120094,120094],"mapped",[97]],[[120095,120095],"mapped",[98]],[[120096,120096],"mapped",[99]],[[120097,120097],"mapped",[100]],[[120098,120098],"mapped",[101]],[[120099,120099],"mapped",[102]],[[120100,120100],"mapped",[103]],[[120101,120101],"mapped",[104]],[[120102,120102],"mapped",[105]],[[120103,120103],"mapped",[106]],[[120104,120104],"mapped",[107]],[[120105,120105],"mapped",[108]],[[120106,120106],"mapped",[109]],[[120107,120107],"mapped",[110]],[[120108,120108],"mapped",[111]],[[120109,120109],"mapped",[112]],[[120110,120110],"mapped",[113]],[[120111,120111],"mapped",[114]],[[120112,120112],"mapped",[115]],[[120113,120113],"mapped",[116]],[[120114,120114],"mapped",[117]],[[120115,120115],"mapped",[118]],[[120116,120116],"mapped",[119]],[[120117,120117],"mapped",[120]],[[120118,120118],"mapped",[121]],[[120119,120119],"mapped",[122]],[[120120,120120],"mapped",[97]],[[120121,120121],"mapped",[98]],[[120122,120122],"disallowed"],[[120123,120123],"mapped",[100]],[[120124,120124],"mapped",[101]],[[120125,120125],"mapped",[102]],[[120126,120126],"mapped",[103]],[[120127,120127],"disallowed"],[[120128,120128],"mapped",[105]],[[120129,120129],"mapped",[106]],[[120130,120130],"mapped",[107]],[[120131,120131],"mapped",[108]],[[120132,120132],"mapped",[109]],[[120133,120133],"disallowed"],[[120134,120134],"mapped",[111]],[[120135,120137],"disallowed"],[[120138,120138],"mapped",[115]],[[120139,120139],"mapped",[116]],[[120140,120140],"mapped",[117]],[[120141,120141],"mapped",[118]],[[120142,120142],"mapped",[119]],[[120143,120143],"mapped",[120]],[[120144,120144],"mapped",[121]],[[120145,120145],"disallowed"],[[120146,120146],"mapped",[97]],[[120147,120147],"mapped",[98]],[[120148,120148],"mapped",[99]],[[120149,120149],"mapped",[100]],[[120150,120150],"mapped",[101]],[[120151,120151],"mapped",[102]],[[120152,120152],"mapped",[103]],[[120153,120153],"mapped",[104]],[[120154,120154],"mapped",[105]],[[120155,120155],"mapped",[106]],[[120156,120156],"mapped",[107]],[[120157,120157],"mapped",[108]],[[120158,120158],"mapped",[109]],[[120159,120159],"mapped",[110]],[[120160,120160],"mapped",[111]],[[120161,120161],"mapped",[112]],[[120162,120162],"mapped",[113]],[[120163,120163],"mapped",[114]],[[120164,120164],"mapped",[115]],[[120165,120165],"mapped",[116]],[[120166,120166],"mapped",[117]],[[120167,120167],"mapped",[118]],[[120168,120168],"mapped",[119]],[[120169,120169],"mapped",[120]],[[120170,120170],"mapped",[121]],[[120171,120171],"mapped",[122]],[[120172,120172],"mapped",[97]],[[120173,120173],"mapped",[98]],[[120174,120174],"mapped",[99]],[[120175,120175],"mapped",[100]],[[120176,120176],"mapped",[101]],[[120177,120177],"mapped",[102]],[[120178,120178],"mapped",[103]],[[120179,120179],"mapped",[104]],[[120180,120180],"mapped",[105]],[[120181,120181],"mapped",[106]],[[120182,120182],"mapped",[107]],[[120183,120183],"mapped",[108]],[[120184,120184],"mapped",[109]],[[120185,120185],"mapped",[110]],[[120186,120186],"mapped",[111]],[[120187,120187],"mapped",[112]],[[120188,120188],"mapped",[113]],[[120189,120189],"mapped",[114]],[[120190,120190],"mapped",[115]],[[120191,120191],"mapped",[116]],[[120192,120192],"mapped",[117]],[[120193,120193],"mapped",[118]],[[120194,120194],"mapped",[119]],[[120195,120195],"mapped",[120]],[[120196,120196],"mapped",[121]],[[120197,120197],"mapped",[122]],[[120198,120198],"mapped",[97]],[[120199,120199],"mapped",[98]],[[120200,120200],"mapped",[99]],[[120201,120201],"mapped",[100]],[[120202,120202],"mapped",[101]],[[120203,120203],"mapped",[102]],[[120204,120204],"mapped",[103]],[[120205,120205],"mapped",[104]],[[120206,120206],"mapped",[105]],[[120207,120207],"mapped",[106]],[[120208,120208],"mapped",[107]],[[120209,120209],"mapped",[108]],[[120210,120210],"mapped",[109]],[[120211,120211],"mapped",[110]],[[120212,120212],"mapped",[111]],[[120213,120213],"mapped",[112]],[[120214,120214],"mapped",[113]],[[120215,120215],"mapped",[114]],[[120216,120216],"mapped",[115]],[[120217,120217],"mapped",[116]],[[120218,120218],"mapped",[117]],[[120219,120219],"mapped",[118]],[[120220,120220],"mapped",[119]],[[120221,120221],"mapped",[120]],[[120222,120222],"mapped",[121]],[[120223,120223],"mapped",[122]],[[120224,120224],"mapped",[97]],[[120225,120225],"mapped",[98]],[[120226,120226],"mapped",[99]],[[120227,120227],"mapped",[100]],[[120228,120228],"mapped",[101]],[[120229,120229],"mapped",[102]],[[120230,120230],"mapped",[103]],[[120231,120231],"mapped",[104]],[[120232,120232],"mapped",[105]],[[120233,120233],"mapped",[106]],[[120234,120234],"mapped",[107]],[[120235,120235],"mapped",[108]],[[120236,120236],"mapped",[109]],[[120237,120237],"mapped",[110]],[[120238,120238],"mapped",[111]],[[120239,120239],"mapped",[112]],[[120240,120240],"mapped",[113]],[[120241,120241],"mapped",[114]],[[120242,120242],"mapped",[115]],[[120243,120243],"mapped",[116]],[[120244,120244],"mapped",[117]],[[120245,120245],"mapped",[118]],[[120246,120246],"mapped",[119]],[[120247,120247],"mapped",[120]],[[120248,120248],"mapped",[121]],[[120249,120249],"mapped",[122]],[[120250,120250],"mapped",[97]],[[120251,120251],"mapped",[98]],[[120252,120252],"mapped",[99]],[[120253,120253],"mapped",[100]],[[120254,120254],"mapped",[101]],[[120255,120255],"mapped",[102]],[[120256,120256],"mapped",[103]],[[120257,120257],"mapped",[104]],[[120258,120258],"mapped",[105]],[[120259,120259],"mapped",[106]],[[120260,120260],"mapped",[107]],[[120261,120261],"mapped",[108]],[[120262,120262],"mapped",[109]],[[120263,120263],"mapped",[110]],[[120264,120264],"mapped",[111]],[[120265,120265],"mapped",[112]],[[120266,120266],"mapped",[113]],[[120267,120267],"mapped",[114]],[[120268,120268],"mapped",[115]],[[120269,120269],"mapped",[116]],[[120270,120270],"mapped",[117]],[[120271,120271],"mapped",[118]],[[120272,120272],"mapped",[119]],[[120273,120273],"mapped",[120]],[[120274,120274],"mapped",[121]],[[120275,120275],"mapped",[122]],[[120276,120276],"mapped",[97]],[[120277,120277],"mapped",[98]],[[120278,120278],"mapped",[99]],[[120279,120279],"mapped",[100]],[[120280,120280],"mapped",[101]],[[120281,120281],"mapped",[102]],[[120282,120282],"mapped",[103]],[[120283,120283],"mapped",[104]],[[120284,120284],"mapped",[105]],[[120285,120285],"mapped",[106]],[[120286,120286],"mapped",[107]],[[120287,120287],"mapped",[108]],[[120288,120288],"mapped",[109]],[[120289,120289],"mapped",[110]],[[120290,120290],"mapped",[111]],[[120291,120291],"mapped",[112]],[[120292,120292],"mapped",[113]],[[120293,120293],"mapped",[114]],[[120294,120294],"mapped",[115]],[[120295,120295],"mapped",[116]],[[120296,120296],"mapped",[117]],[[120297,120297],"mapped",[118]],[[120298,120298],"mapped",[119]],[[120299,120299],"mapped",[120]],[[120300,120300],"mapped",[121]],[[120301,120301],"mapped",[122]],[[120302,120302],"mapped",[97]],[[120303,120303],"mapped",[98]],[[120304,120304],"mapped",[99]],[[120305,120305],"mapped",[100]],[[120306,120306],"mapped",[101]],[[120307,120307],"mapped",[102]],[[120308,120308],"mapped",[103]],[[120309,120309],"mapped",[104]],[[120310,120310],"mapped",[105]],[[120311,120311],"mapped",[106]],[[120312,120312],"mapped",[107]],[[120313,120313],"mapped",[108]],[[120314,120314],"mapped",[109]],[[120315,120315],"mapped",[110]],[[120316,120316],"mapped",[111]],[[120317,120317],"mapped",[112]],[[120318,120318],"mapped",[113]],[[120319,120319],"mapped",[114]],[[120320,120320],"mapped",[115]],[[120321,120321],"mapped",[116]],[[120322,120322],"mapped",[117]],[[120323,120323],"mapped",[118]],[[120324,120324],"mapped",[119]],[[120325,120325],"mapped",[120]],[[120326,120326],"mapped",[121]],[[120327,120327],"mapped",[122]],[[120328,120328],"mapped",[97]],[[120329,120329],"mapped",[98]],[[120330,120330],"mapped",[99]],[[120331,120331],"mapped",[100]],[[120332,120332],"mapped",[101]],[[120333,120333],"mapped",[102]],[[120334,120334],"mapped",[103]],[[120335,120335],"mapped",[104]],[[120336,120336],"mapped",[105]],[[120337,120337],"mapped",[106]],[[120338,120338],"mapped",[107]],[[120339,120339],"mapped",[108]],[[120340,120340],"mapped",[109]],[[120341,120341],"mapped",[110]],[[120342,120342],"mapped",[111]],[[120343,120343],"mapped",[112]],[[120344,120344],"mapped",[113]],[[120345,120345],"mapped",[114]],[[120346,120346],"mapped",[115]],[[120347,120347],"mapped",[116]],[[120348,120348],"mapped",[117]],[[120349,120349],"mapped",[118]],[[120350,120350],"mapped",[119]],[[120351,120351],"mapped",[120]],[[120352,120352],"mapped",[121]],[[120353,120353],"mapped",[122]],[[120354,120354],"mapped",[97]],[[120355,120355],"mapped",[98]],[[120356,120356],"mapped",[99]],[[120357,120357],"mapped",[100]],[[120358,120358],"mapped",[101]],[[120359,120359],"mapped",[102]],[[120360,120360],"mapped",[103]],[[120361,120361],"mapped",[104]],[[120362,120362],"mapped",[105]],[[120363,120363],"mapped",[106]],[[120364,120364],"mapped",[107]],[[120365,120365],"mapped",[108]],[[120366,120366],"mapped",[109]],[[120367,120367],"mapped",[110]],[[120368,120368],"mapped",[111]],[[120369,120369],"mapped",[112]],[[120370,120370],"mapped",[113]],[[120371,120371],"mapped",[114]],[[120372,120372],"mapped",[115]],[[120373,120373],"mapped",[116]],[[120374,120374],"mapped",[117]],[[120375,120375],"mapped",[118]],[[120376,120376],"mapped",[119]],[[120377,120377],"mapped",[120]],[[120378,120378],"mapped",[121]],[[120379,120379],"mapped",[122]],[[120380,120380],"mapped",[97]],[[120381,120381],"mapped",[98]],[[120382,120382],"mapped",[99]],[[120383,120383],"mapped",[100]],[[120384,120384],"mapped",[101]],[[120385,120385],"mapped",[102]],[[120386,120386],"mapped",[103]],[[120387,120387],"mapped",[104]],[[120388,120388],"mapped",[105]],[[120389,120389],"mapped",[106]],[[120390,120390],"mapped",[107]],[[120391,120391],"mapped",[108]],[[120392,120392],"mapped",[109]],[[120393,120393],"mapped",[110]],[[120394,120394],"mapped",[111]],[[120395,120395],"mapped",[112]],[[120396,120396],"mapped",[113]],[[120397,120397],"mapped",[114]],[[120398,120398],"mapped",[115]],[[120399,120399],"mapped",[116]],[[120400,120400],"mapped",[117]],[[120401,120401],"mapped",[118]],[[120402,120402],"mapped",[119]],[[120403,120403],"mapped",[120]],[[120404,120404],"mapped",[121]],[[120405,120405],"mapped",[122]],[[120406,120406],"mapped",[97]],[[120407,120407],"mapped",[98]],[[120408,120408],"mapped",[99]],[[120409,120409],"mapped",[100]],[[120410,120410],"mapped",[101]],[[120411,120411],"mapped",[102]],[[120412,120412],"mapped",[103]],[[120413,120413],"mapped",[104]],[[120414,120414],"mapped",[105]],[[120415,120415],"mapped",[106]],[[120416,120416],"mapped",[107]],[[120417,120417],"mapped",[108]],[[120418,120418],"mapped",[109]],[[120419,120419],"mapped",[110]],[[120420,120420],"mapped",[111]],[[120421,120421],"mapped",[112]],[[120422,120422],"mapped",[113]],[[120423,120423],"mapped",[114]],[[120424,120424],"mapped",[115]],[[120425,120425],"mapped",[116]],[[120426,120426],"mapped",[117]],[[120427,120427],"mapped",[118]],[[120428,120428],"mapped",[119]],[[120429,120429],"mapped",[120]],[[120430,120430],"mapped",[121]],[[120431,120431],"mapped",[122]],[[120432,120432],"mapped",[97]],[[120433,120433],"mapped",[98]],[[120434,120434],"mapped",[99]],[[120435,120435],"mapped",[100]],[[120436,120436],"mapped",[101]],[[120437,120437],"mapped",[102]],[[120438,120438],"mapped",[103]],[[120439,120439],"mapped",[104]],[[120440,120440],"mapped",[105]],[[120441,120441],"mapped",[106]],[[120442,120442],"mapped",[107]],[[120443,120443],"mapped",[108]],[[120444,120444],"mapped",[109]],[[120445,120445],"mapped",[110]],[[120446,120446],"mapped",[111]],[[120447,120447],"mapped",[112]],[[120448,120448],"mapped",[113]],[[120449,120449],"mapped",[114]],[[120450,120450],"mapped",[115]],[[120451,120451],"mapped",[116]],[[120452,120452],"mapped",[117]],[[120453,120453],"mapped",[118]],[[120454,120454],"mapped",[119]],[[120455,120455],"mapped",[120]],[[120456,120456],"mapped",[121]],[[120457,120457],"mapped",[122]],[[120458,120458],"mapped",[97]],[[120459,120459],"mapped",[98]],[[120460,120460],"mapped",[99]],[[120461,120461],"mapped",[100]],[[120462,120462],"mapped",[101]],[[120463,120463],"mapped",[102]],[[120464,120464],"mapped",[103]],[[120465,120465],"mapped",[104]],[[120466,120466],"mapped",[105]],[[120467,120467],"mapped",[106]],[[120468,120468],"mapped",[107]],[[120469,120469],"mapped",[108]],[[120470,120470],"mapped",[109]],[[120471,120471],"mapped",[110]],[[120472,120472],"mapped",[111]],[[120473,120473],"mapped",[112]],[[120474,120474],"mapped",[113]],[[120475,120475],"mapped",[114]],[[120476,120476],"mapped",[115]],[[120477,120477],"mapped",[116]],[[120478,120478],"mapped",[117]],[[120479,120479],"mapped",[118]],[[120480,120480],"mapped",[119]],[[120481,120481],"mapped",[120]],[[120482,120482],"mapped",[121]],[[120483,120483],"mapped",[122]],[[120484,120484],"mapped",[305]],[[120485,120485],"mapped",[567]],[[120486,120487],"disallowed"],[[120488,120488],"mapped",[945]],[[120489,120489],"mapped",[946]],[[120490,120490],"mapped",[947]],[[120491,120491],"mapped",[948]],[[120492,120492],"mapped",[949]],[[120493,120493],"mapped",[950]],[[120494,120494],"mapped",[951]],[[120495,120495],"mapped",[952]],[[120496,120496],"mapped",[953]],[[120497,120497],"mapped",[954]],[[120498,120498],"mapped",[955]],[[120499,120499],"mapped",[956]],[[120500,120500],"mapped",[957]],[[120501,120501],"mapped",[958]],[[120502,120502],"mapped",[959]],[[120503,120503],"mapped",[960]],[[120504,120504],"mapped",[961]],[[120505,120505],"mapped",[952]],[[120506,120506],"mapped",[963]],[[120507,120507],"mapped",[964]],[[120508,120508],"mapped",[965]],[[120509,120509],"mapped",[966]],[[120510,120510],"mapped",[967]],[[120511,120511],"mapped",[968]],[[120512,120512],"mapped",[969]],[[120513,120513],"mapped",[8711]],[[120514,120514],"mapped",[945]],[[120515,120515],"mapped",[946]],[[120516,120516],"mapped",[947]],[[120517,120517],"mapped",[948]],[[120518,120518],"mapped",[949]],[[120519,120519],"mapped",[950]],[[120520,120520],"mapped",[951]],[[120521,120521],"mapped",[952]],[[120522,120522],"mapped",[953]],[[120523,120523],"mapped",[954]],[[120524,120524],"mapped",[955]],[[120525,120525],"mapped",[956]],[[120526,120526],"mapped",[957]],[[120527,120527],"mapped",[958]],[[120528,120528],"mapped",[959]],[[120529,120529],"mapped",[960]],[[120530,120530],"mapped",[961]],[[120531,120532],"mapped",[963]],[[120533,120533],"mapped",[964]],[[120534,120534],"mapped",[965]],[[120535,120535],"mapped",[966]],[[120536,120536],"mapped",[967]],[[120537,120537],"mapped",[968]],[[120538,120538],"mapped",[969]],[[120539,120539],"mapped",[8706]],[[120540,120540],"mapped",[949]],[[120541,120541],"mapped",[952]],[[120542,120542],"mapped",[954]],[[120543,120543],"mapped",[966]],[[120544,120544],"mapped",[961]],[[120545,120545],"mapped",[960]],[[120546,120546],"mapped",[945]],[[120547,120547],"mapped",[946]],[[120548,120548],"mapped",[947]],[[120549,120549],"mapped",[948]],[[120550,120550],"mapped",[949]],[[120551,120551],"mapped",[950]],[[120552,120552],"mapped",[951]],[[120553,120553],"mapped",[952]],[[120554,120554],"mapped",[953]],[[120555,120555],"mapped",[954]],[[120556,120556],"mapped",[955]],[[120557,120557],"mapped",[956]],[[120558,120558],"mapped",[957]],[[120559,120559],"mapped",[958]],[[120560,120560],"mapped",[959]],[[120561,120561],"mapped",[960]],[[120562,120562],"mapped",[961]],[[120563,120563],"mapped",[952]],[[120564,120564],"mapped",[963]],[[120565,120565],"mapped",[964]],[[120566,120566],"mapped",[965]],[[120567,120567],"mapped",[966]],[[120568,120568],"mapped",[967]],[[120569,120569],"mapped",[968]],[[120570,120570],"mapped",[969]],[[120571,120571],"mapped",[8711]],[[120572,120572],"mapped",[945]],[[120573,120573],"mapped",[946]],[[120574,120574],"mapped",[947]],[[120575,120575],"mapped",[948]],[[120576,120576],"mapped",[949]],[[120577,120577],"mapped",[950]],[[120578,120578],"mapped",[951]],[[120579,120579],"mapped",[952]],[[120580,120580],"mapped",[953]],[[120581,120581],"mapped",[954]],[[120582,120582],"mapped",[955]],[[120583,120583],"mapped",[956]],[[120584,120584],"mapped",[957]],[[120585,120585],"mapped",[958]],[[120586,120586],"mapped",[959]],[[120587,120587],"mapped",[960]],[[120588,120588],"mapped",[961]],[[120589,120590],"mapped",[963]],[[120591,120591],"mapped",[964]],[[120592,120592],"mapped",[965]],[[120593,120593],"mapped",[966]],[[120594,120594],"mapped",[967]],[[120595,120595],"mapped",[968]],[[120596,120596],"mapped",[969]],[[120597,120597],"mapped",[8706]],[[120598,120598],"mapped",[949]],[[120599,120599],"mapped",[952]],[[120600,120600],"mapped",[954]],[[120601,120601],"mapped",[966]],[[120602,120602],"mapped",[961]],[[120603,120603],"mapped",[960]],[[120604,120604],"mapped",[945]],[[120605,120605],"mapped",[946]],[[120606,120606],"mapped",[947]],[[120607,120607],"mapped",[948]],[[120608,120608],"mapped",[949]],[[120609,120609],"mapped",[950]],[[120610,120610],"mapped",[951]],[[120611,120611],"mapped",[952]],[[120612,120612],"mapped",[953]],[[120613,120613],"mapped",[954]],[[120614,120614],"mapped",[955]],[[120615,120615],"mapped",[956]],[[120616,120616],"mapped",[957]],[[120617,120617],"mapped",[958]],[[120618,120618],"mapped",[959]],[[120619,120619],"mapped",[960]],[[120620,120620],"mapped",[961]],[[120621,120621],"mapped",[952]],[[120622,120622],"mapped",[963]],[[120623,120623],"mapped",[964]],[[120624,120624],"mapped",[965]],[[120625,120625],"mapped",[966]],[[120626,120626],"mapped",[967]],[[120627,120627],"mapped",[968]],[[120628,120628],"mapped",[969]],[[120629,120629],"mapped",[8711]],[[120630,120630],"mapped",[945]],[[120631,120631],"mapped",[946]],[[120632,120632],"mapped",[947]],[[120633,120633],"mapped",[948]],[[120634,120634],"mapped",[949]],[[120635,120635],"mapped",[950]],[[120636,120636],"mapped",[951]],[[120637,120637],"mapped",[952]],[[120638,120638],"mapped",[953]],[[120639,120639],"mapped",[954]],[[120640,120640],"mapped",[955]],[[120641,120641],"mapped",[956]],[[120642,120642],"mapped",[957]],[[120643,120643],"mapped",[958]],[[120644,120644],"mapped",[959]],[[120645,120645],"mapped",[960]],[[120646,120646],"mapped",[961]],[[120647,120648],"mapped",[963]],[[120649,120649],"mapped",[964]],[[120650,120650],"mapped",[965]],[[120651,120651],"mapped",[966]],[[120652,120652],"mapped",[967]],[[120653,120653],"mapped",[968]],[[120654,120654],"mapped",[969]],[[120655,120655],"mapped",[8706]],[[120656,120656],"mapped",[949]],[[120657,120657],"mapped",[952]],[[120658,120658],"mapped",[954]],[[120659,120659],"mapped",[966]],[[120660,120660],"mapped",[961]],[[120661,120661],"mapped",[960]],[[120662,120662],"mapped",[945]],[[120663,120663],"mapped",[946]],[[120664,120664],"mapped",[947]],[[120665,120665],"mapped",[948]],[[120666,120666],"mapped",[949]],[[120667,120667],"mapped",[950]],[[120668,120668],"mapped",[951]],[[120669,120669],"mapped",[952]],[[120670,120670],"mapped",[953]],[[120671,120671],"mapped",[954]],[[120672,120672],"mapped",[955]],[[120673,120673],"mapped",[956]],[[120674,120674],"mapped",[957]],[[120675,120675],"mapped",[958]],[[120676,120676],"mapped",[959]],[[120677,120677],"mapped",[960]],[[120678,120678],"mapped",[961]],[[120679,120679],"mapped",[952]],[[120680,120680],"mapped",[963]],[[120681,120681],"mapped",[964]],[[120682,120682],"mapped",[965]],[[120683,120683],"mapped",[966]],[[120684,120684],"mapped",[967]],[[120685,120685],"mapped",[968]],[[120686,120686],"mapped",[969]],[[120687,120687],"mapped",[8711]],[[120688,120688],"mapped",[945]],[[120689,120689],"mapped",[946]],[[120690,120690],"mapped",[947]],[[120691,120691],"mapped",[948]],[[120692,120692],"mapped",[949]],[[120693,120693],"mapped",[950]],[[120694,120694],"mapped",[951]],[[120695,120695],"mapped",[952]],[[120696,120696],"mapped",[953]],[[120697,120697],"mapped",[954]],[[120698,120698],"mapped",[955]],[[120699,120699],"mapped",[956]],[[120700,120700],"mapped",[957]],[[120701,120701],"mapped",[958]],[[120702,120702],"mapped",[959]],[[120703,120703],"mapped",[960]],[[120704,120704],"mapped",[961]],[[120705,120706],"mapped",[963]],[[120707,120707],"mapped",[964]],[[120708,120708],"mapped",[965]],[[120709,120709],"mapped",[966]],[[120710,120710],"mapped",[967]],[[120711,120711],"mapped",[968]],[[120712,120712],"mapped",[969]],[[120713,120713],"mapped",[8706]],[[120714,120714],"mapped",[949]],[[120715,120715],"mapped",[952]],[[120716,120716],"mapped",[954]],[[120717,120717],"mapped",[966]],[[120718,120718],"mapped",[961]],[[120719,120719],"mapped",[960]],[[120720,120720],"mapped",[945]],[[120721,120721],"mapped",[946]],[[120722,120722],"mapped",[947]],[[120723,120723],"mapped",[948]],[[120724,120724],"mapped",[949]],[[120725,120725],"mapped",[950]],[[120726,120726],"mapped",[951]],[[120727,120727],"mapped",[952]],[[120728,120728],"mapped",[953]],[[120729,120729],"mapped",[954]],[[120730,120730],"mapped",[955]],[[120731,120731],"mapped",[956]],[[120732,120732],"mapped",[957]],[[120733,120733],"mapped",[958]],[[120734,120734],"mapped",[959]],[[120735,120735],"mapped",[960]],[[120736,120736],"mapped",[961]],[[120737,120737],"mapped",[952]],[[120738,120738],"mapped",[963]],[[120739,120739],"mapped",[964]],[[120740,120740],"mapped",[965]],[[120741,120741],"mapped",[966]],[[120742,120742],"mapped",[967]],[[120743,120743],"mapped",[968]],[[120744,120744],"mapped",[969]],[[120745,120745],"mapped",[8711]],[[120746,120746],"mapped",[945]],[[120747,120747],"mapped",[946]],[[120748,120748],"mapped",[947]],[[120749,120749],"mapped",[948]],[[120750,120750],"mapped",[949]],[[120751,120751],"mapped",[950]],[[120752,120752],"mapped",[951]],[[120753,120753],"mapped",[952]],[[120754,120754],"mapped",[953]],[[120755,120755],"mapped",[954]],[[120756,120756],"mapped",[955]],[[120757,120757],"mapped",[956]],[[120758,120758],"mapped",[957]],[[120759,120759],"mapped",[958]],[[120760,120760],"mapped",[959]],[[120761,120761],"mapped",[960]],[[120762,120762],"mapped",[961]],[[120763,120764],"mapped",[963]],[[120765,120765],"mapped",[964]],[[120766,120766],"mapped",[965]],[[120767,120767],"mapped",[966]],[[120768,120768],"mapped",[967]],[[120769,120769],"mapped",[968]],[[120770,120770],"mapped",[969]],[[120771,120771],"mapped",[8706]],[[120772,120772],"mapped",[949]],[[120773,120773],"mapped",[952]],[[120774,120774],"mapped",[954]],[[120775,120775],"mapped",[966]],[[120776,120776],"mapped",[961]],[[120777,120777],"mapped",[960]],[[120778,120779],"mapped",[989]],[[120780,120781],"disallowed"],[[120782,120782],"mapped",[48]],[[120783,120783],"mapped",[49]],[[120784,120784],"mapped",[50]],[[120785,120785],"mapped",[51]],[[120786,120786],"mapped",[52]],[[120787,120787],"mapped",[53]],[[120788,120788],"mapped",[54]],[[120789,120789],"mapped",[55]],[[120790,120790],"mapped",[56]],[[120791,120791],"mapped",[57]],[[120792,120792],"mapped",[48]],[[120793,120793],"mapped",[49]],[[120794,120794],"mapped",[50]],[[120795,120795],"mapped",[51]],[[120796,120796],"mapped",[52]],[[120797,120797],"mapped",[53]],[[120798,120798],"mapped",[54]],[[120799,120799],"mapped",[55]],[[120800,120800],"mapped",[56]],[[120801,120801],"mapped",[57]],[[120802,120802],"mapped",[48]],[[120803,120803],"mapped",[49]],[[120804,120804],"mapped",[50]],[[120805,120805],"mapped",[51]],[[120806,120806],"mapped",[52]],[[120807,120807],"mapped",[53]],[[120808,120808],"mapped",[54]],[[120809,120809],"mapped",[55]],[[120810,120810],"mapped",[56]],[[120811,120811],"mapped",[57]],[[120812,120812],"mapped",[48]],[[120813,120813],"mapped",[49]],[[120814,120814],"mapped",[50]],[[120815,120815],"mapped",[51]],[[120816,120816],"mapped",[52]],[[120817,120817],"mapped",[53]],[[120818,120818],"mapped",[54]],[[120819,120819],"mapped",[55]],[[120820,120820],"mapped",[56]],[[120821,120821],"mapped",[57]],[[120822,120822],"mapped",[48]],[[120823,120823],"mapped",[49]],[[120824,120824],"mapped",[50]],[[120825,120825],"mapped",[51]],[[120826,120826],"mapped",[52]],[[120827,120827],"mapped",[53]],[[120828,120828],"mapped",[54]],[[120829,120829],"mapped",[55]],[[120830,120830],"mapped",[56]],[[120831,120831],"mapped",[57]],[[120832,121343],"valid",[],"NV8"],[[121344,121398],"valid"],[[121399,121402],"valid",[],"NV8"],[[121403,121452],"valid"],[[121453,121460],"valid",[],"NV8"],[[121461,121461],"valid"],[[121462,121475],"valid",[],"NV8"],[[121476,121476],"valid"],[[121477,121483],"valid",[],"NV8"],[[121484,121498],"disallowed"],[[121499,121503],"valid"],[[121504,121504],"disallowed"],[[121505,121519],"valid"],[[121520,124927],"disallowed"],[[124928,125124],"valid"],[[125125,125126],"disallowed"],[[125127,125135],"valid",[],"NV8"],[[125136,125142],"valid"],[[125143,126463],"disallowed"],[[126464,126464],"mapped",[1575]],[[126465,126465],"mapped",[1576]],[[126466,126466],"mapped",[1580]],[[126467,126467],"mapped",[1583]],[[126468,126468],"disallowed"],[[126469,126469],"mapped",[1608]],[[126470,126470],"mapped",[1586]],[[126471,126471],"mapped",[1581]],[[126472,126472],"mapped",[1591]],[[126473,126473],"mapped",[1610]],[[126474,126474],"mapped",[1603]],[[126475,126475],"mapped",[1604]],[[126476,126476],"mapped",[1605]],[[126477,126477],"mapped",[1606]],[[126478,126478],"mapped",[1587]],[[126479,126479],"mapped",[1593]],[[126480,126480],"mapped",[1601]],[[126481,126481],"mapped",[1589]],[[126482,126482],"mapped",[1602]],[[126483,126483],"mapped",[1585]],[[126484,126484],"mapped",[1588]],[[126485,126485],"mapped",[1578]],[[126486,126486],"mapped",[1579]],[[126487,126487],"mapped",[1582]],[[126488,126488],"mapped",[1584]],[[126489,126489],"mapped",[1590]],[[126490,126490],"mapped",[1592]],[[126491,126491],"mapped",[1594]],[[126492,126492],"mapped",[1646]],[[126493,126493],"mapped",[1722]],[[126494,126494],"mapped",[1697]],[[126495,126495],"mapped",[1647]],[[126496,126496],"disallowed"],[[126497,126497],"mapped",[1576]],[[126498,126498],"mapped",[1580]],[[126499,126499],"disallowed"],[[126500,126500],"mapped",[1607]],[[126501,126502],"disallowed"],[[126503,126503],"mapped",[1581]],[[126504,126504],"disallowed"],[[126505,126505],"mapped",[1610]],[[126506,126506],"mapped",[1603]],[[126507,126507],"mapped",[1604]],[[126508,126508],"mapped",[1605]],[[126509,126509],"mapped",[1606]],[[126510,126510],"mapped",[1587]],[[126511,126511],"mapped",[1593]],[[126512,126512],"mapped",[1601]],[[126513,126513],"mapped",[1589]],[[126514,126514],"mapped",[1602]],[[126515,126515],"disallowed"],[[126516,126516],"mapped",[1588]],[[126517,126517],"mapped",[1578]],[[126518,126518],"mapped",[1579]],[[126519,126519],"mapped",[1582]],[[126520,126520],"disallowed"],[[126521,126521],"mapped",[1590]],[[126522,126522],"disallowed"],[[126523,126523],"mapped",[1594]],[[126524,126529],"disallowed"],[[126530,126530],"mapped",[1580]],[[126531,126534],"disallowed"],[[126535,126535],"mapped",[1581]],[[126536,126536],"disallowed"],[[126537,126537],"mapped",[1610]],[[126538,126538],"disallowed"],[[126539,126539],"mapped",[1604]],[[126540,126540],"disallowed"],[[126541,126541],"mapped",[1606]],[[126542,126542],"mapped",[1587]],[[126543,126543],"mapped",[1593]],[[126544,126544],"disallowed"],[[126545,126545],"mapped",[1589]],[[126546,126546],"mapped",[1602]],[[126547,126547],"disallowed"],[[126548,126548],"mapped",[1588]],[[126549,126550],"disallowed"],[[126551,126551],"mapped",[1582]],[[126552,126552],"disallowed"],[[126553,126553],"mapped",[1590]],[[126554,126554],"disallowed"],[[126555,126555],"mapped",[1594]],[[126556,126556],"disallowed"],[[126557,126557],"mapped",[1722]],[[126558,126558],"disallowed"],[[126559,126559],"mapped",[1647]],[[126560,126560],"disallowed"],[[126561,126561],"mapped",[1576]],[[126562,126562],"mapped",[1580]],[[126563,126563],"disallowed"],[[126564,126564],"mapped",[1607]],[[126565,126566],"disallowed"],[[126567,126567],"mapped",[1581]],[[126568,126568],"mapped",[1591]],[[126569,126569],"mapped",[1610]],[[126570,126570],"mapped",[1603]],[[126571,126571],"disallowed"],[[126572,126572],"mapped",[1605]],[[126573,126573],"mapped",[1606]],[[126574,126574],"mapped",[1587]],[[126575,126575],"mapped",[1593]],[[126576,126576],"mapped",[1601]],[[126577,126577],"mapped",[1589]],[[126578,126578],"mapped",[1602]],[[126579,126579],"disallowed"],[[126580,126580],"mapped",[1588]],[[126581,126581],"mapped",[1578]],[[126582,126582],"mapped",[1579]],[[126583,126583],"mapped",[1582]],[[126584,126584],"disallowed"],[[126585,126585],"mapped",[1590]],[[126586,126586],"mapped",[1592]],[[126587,126587],"mapped",[1594]],[[126588,126588],"mapped",[1646]],[[126589,126589],"disallowed"],[[126590,126590],"mapped",[1697]],[[126591,126591],"disallowed"],[[126592,126592],"mapped",[1575]],[[126593,126593],"mapped",[1576]],[[126594,126594],"mapped",[1580]],[[126595,126595],"mapped",[1583]],[[126596,126596],"mapped",[1607]],[[126597,126597],"mapped",[1608]],[[126598,126598],"mapped",[1586]],[[126599,126599],"mapped",[1581]],[[126600,126600],"mapped",[1591]],[[126601,126601],"mapped",[1610]],[[126602,126602],"disallowed"],[[126603,126603],"mapped",[1604]],[[126604,126604],"mapped",[1605]],[[126605,126605],"mapped",[1606]],[[126606,126606],"mapped",[1587]],[[126607,126607],"mapped",[1593]],[[126608,126608],"mapped",[1601]],[[126609,126609],"mapped",[1589]],[[126610,126610],"mapped",[1602]],[[126611,126611],"mapped",[1585]],[[126612,126612],"mapped",[1588]],[[126613,126613],"mapped",[1578]],[[126614,126614],"mapped",[1579]],[[126615,126615],"mapped",[1582]],[[126616,126616],"mapped",[1584]],[[126617,126617],"mapped",[1590]],[[126618,126618],"mapped",[1592]],[[126619,126619],"mapped",[1594]],[[126620,126624],"disallowed"],[[126625,126625],"mapped",[1576]],[[126626,126626],"mapped",[1580]],[[126627,126627],"mapped",[1583]],[[126628,126628],"disallowed"],[[126629,126629],"mapped",[1608]],[[126630,126630],"mapped",[1586]],[[126631,126631],"mapped",[1581]],[[126632,126632],"mapped",[1591]],[[126633,126633],"mapped",[1610]],[[126634,126634],"disallowed"],[[126635,126635],"mapped",[1604]],[[126636,126636],"mapped",[1605]],[[126637,126637],"mapped",[1606]],[[126638,126638],"mapped",[1587]],[[126639,126639],"mapped",[1593]],[[126640,126640],"mapped",[1601]],[[126641,126641],"mapped",[1589]],[[126642,126642],"mapped",[1602]],[[126643,126643],"mapped",[1585]],[[126644,126644],"mapped",[1588]],[[126645,126645],"mapped",[1578]],[[126646,126646],"mapped",[1579]],[[126647,126647],"mapped",[1582]],[[126648,126648],"mapped",[1584]],[[126649,126649],"mapped",[1590]],[[126650,126650],"mapped",[1592]],[[126651,126651],"mapped",[1594]],[[126652,126703],"disallowed"],[[126704,126705],"valid",[],"NV8"],[[126706,126975],"disallowed"],[[126976,127019],"valid",[],"NV8"],[[127020,127023],"disallowed"],[[127024,127123],"valid",[],"NV8"],[[127124,127135],"disallowed"],[[127136,127150],"valid",[],"NV8"],[[127151,127152],"disallowed"],[[127153,127166],"valid",[],"NV8"],[[127167,127167],"valid",[],"NV8"],[[127168,127168],"disallowed"],[[127169,127183],"valid",[],"NV8"],[[127184,127184],"disallowed"],[[127185,127199],"valid",[],"NV8"],[[127200,127221],"valid",[],"NV8"],[[127222,127231],"disallowed"],[[127232,127232],"disallowed"],[[127233,127233],"disallowed_STD3_mapped",[48,44]],[[127234,127234],"disallowed_STD3_mapped",[49,44]],[[127235,127235],"disallowed_STD3_mapped",[50,44]],[[127236,127236],"disallowed_STD3_mapped",[51,44]],[[127237,127237],"disallowed_STD3_mapped",[52,44]],[[127238,127238],"disallowed_STD3_mapped",[53,44]],[[127239,127239],"disallowed_STD3_mapped",[54,44]],[[127240,127240],"disallowed_STD3_mapped",[55,44]],[[127241,127241],"disallowed_STD3_mapped",[56,44]],[[127242,127242],"disallowed_STD3_mapped",[57,44]],[[127243,127244],"valid",[],"NV8"],[[127245,127247],"disallowed"],[[127248,127248],"disallowed_STD3_mapped",[40,97,41]],[[127249,127249],"disallowed_STD3_mapped",[40,98,41]],[[127250,127250],"disallowed_STD3_mapped",[40,99,41]],[[127251,127251],"disallowed_STD3_mapped",[40,100,41]],[[127252,127252],"disallowed_STD3_mapped",[40,101,41]],[[127253,127253],"disallowed_STD3_mapped",[40,102,41]],[[127254,127254],"disallowed_STD3_mapped",[40,103,41]],[[127255,127255],"disallowed_STD3_mapped",[40,104,41]],[[127256,127256],"disallowed_STD3_mapped",[40,105,41]],[[127257,127257],"disallowed_STD3_mapped",[40,106,41]],[[127258,127258],"disallowed_STD3_mapped",[40,107,41]],[[127259,127259],"disallowed_STD3_mapped",[40,108,41]],[[127260,127260],"disallowed_STD3_mapped",[40,109,41]],[[127261,127261],"disallowed_STD3_mapped",[40,110,41]],[[127262,127262],"disallowed_STD3_mapped",[40,111,41]],[[127263,127263],"disallowed_STD3_mapped",[40,112,41]],[[127264,127264],"disallowed_STD3_mapped",[40,113,41]],[[127265,127265],"disallowed_STD3_mapped",[40,114,41]],[[127266,127266],"disallowed_STD3_mapped",[40,115,41]],[[127267,127267],"disallowed_STD3_mapped",[40,116,41]],[[127268,127268],"disallowed_STD3_mapped",[40,117,41]],[[127269,127269],"disallowed_STD3_mapped",[40,118,41]],[[127270,127270],"disallowed_STD3_mapped",[40,119,41]],[[127271,127271],"disallowed_STD3_mapped",[40,120,41]],[[127272,127272],"disallowed_STD3_mapped",[40,121,41]],[[127273,127273],"disallowed_STD3_mapped",[40,122,41]],[[127274,127274],"mapped",[12308,115,12309]],[[127275,127275],"mapped",[99]],[[127276,127276],"mapped",[114]],[[127277,127277],"mapped",[99,100]],[[127278,127278],"mapped",[119,122]],[[127279,127279],"disallowed"],[[127280,127280],"mapped",[97]],[[127281,127281],"mapped",[98]],[[127282,127282],"mapped",[99]],[[127283,127283],"mapped",[100]],[[127284,127284],"mapped",[101]],[[127285,127285],"mapped",[102]],[[127286,127286],"mapped",[103]],[[127287,127287],"mapped",[104]],[[127288,127288],"mapped",[105]],[[127289,127289],"mapped",[106]],[[127290,127290],"mapped",[107]],[[127291,127291],"mapped",[108]],[[127292,127292],"mapped",[109]],[[127293,127293],"mapped",[110]],[[127294,127294],"mapped",[111]],[[127295,127295],"mapped",[112]],[[127296,127296],"mapped",[113]],[[127297,127297],"mapped",[114]],[[127298,127298],"mapped",[115]],[[127299,127299],"mapped",[116]],[[127300,127300],"mapped",[117]],[[127301,127301],"mapped",[118]],[[127302,127302],"mapped",[119]],[[127303,127303],"mapped",[120]],[[127304,127304],"mapped",[121]],[[127305,127305],"mapped",[122]],[[127306,127306],"mapped",[104,118]],[[127307,127307],"mapped",[109,118]],[[127308,127308],"mapped",[115,100]],[[127309,127309],"mapped",[115,115]],[[127310,127310],"mapped",[112,112,118]],[[127311,127311],"mapped",[119,99]],[[127312,127318],"valid",[],"NV8"],[[127319,127319],"valid",[],"NV8"],[[127320,127326],"valid",[],"NV8"],[[127327,127327],"valid",[],"NV8"],[[127328,127337],"valid",[],"NV8"],[[127338,127338],"mapped",[109,99]],[[127339,127339],"mapped",[109,100]],[[127340,127343],"disallowed"],[[127344,127352],"valid",[],"NV8"],[[127353,127353],"valid",[],"NV8"],[[127354,127354],"valid",[],"NV8"],[[127355,127356],"valid",[],"NV8"],[[127357,127358],"valid",[],"NV8"],[[127359,127359],"valid",[],"NV8"],[[127360,127369],"valid",[],"NV8"],[[127370,127373],"valid",[],"NV8"],[[127374,127375],"valid",[],"NV8"],[[127376,127376],"mapped",[100,106]],[[127377,127386],"valid",[],"NV8"],[[127387,127461],"disallowed"],[[127462,127487],"valid",[],"NV8"],[[127488,127488],"mapped",[12411,12363]],[[127489,127489],"mapped",[12467,12467]],[[127490,127490],"mapped",[12469]],[[127491,127503],"disallowed"],[[127504,127504],"mapped",[25163]],[[127505,127505],"mapped",[23383]],[[127506,127506],"mapped",[21452]],[[127507,127507],"mapped",[12487]],[[127508,127508],"mapped",[20108]],[[127509,127509],"mapped",[22810]],[[127510,127510],"mapped",[35299]],[[127511,127511],"mapped",[22825]],[[127512,127512],"mapped",[20132]],[[127513,127513],"mapped",[26144]],[[127514,127514],"mapped",[28961]],[[127515,127515],"mapped",[26009]],[[127516,127516],"mapped",[21069]],[[127517,127517],"mapped",[24460]],[[127518,127518],"mapped",[20877]],[[127519,127519],"mapped",[26032]],[[127520,127520],"mapped",[21021]],[[127521,127521],"mapped",[32066]],[[127522,127522],"mapped",[29983]],[[127523,127523],"mapped",[36009]],[[127524,127524],"mapped",[22768]],[[127525,127525],"mapped",[21561]],[[127526,127526],"mapped",[28436]],[[127527,127527],"mapped",[25237]],[[127528,127528],"mapped",[25429]],[[127529,127529],"mapped",[19968]],[[127530,127530],"mapped",[19977]],[[127531,127531],"mapped",[36938]],[[127532,127532],"mapped",[24038]],[[127533,127533],"mapped",[20013]],[[127534,127534],"mapped",[21491]],[[127535,127535],"mapped",[25351]],[[127536,127536],"mapped",[36208]],[[127537,127537],"mapped",[25171]],[[127538,127538],"mapped",[31105]],[[127539,127539],"mapped",[31354]],[[127540,127540],"mapped",[21512]],[[127541,127541],"mapped",[28288]],[[127542,127542],"mapped",[26377]],[[127543,127543],"mapped",[26376]],[[127544,127544],"mapped",[30003]],[[127545,127545],"mapped",[21106]],[[127546,127546],"mapped",[21942]],[[127547,127551],"disallowed"],[[127552,127552],"mapped",[12308,26412,12309]],[[127553,127553],"mapped",[12308,19977,12309]],[[127554,127554],"mapped",[12308,20108,12309]],[[127555,127555],"mapped",[12308,23433,12309]],[[127556,127556],"mapped",[12308,28857,12309]],[[127557,127557],"mapped",[12308,25171,12309]],[[127558,127558],"mapped",[12308,30423,12309]],[[127559,127559],"mapped",[12308,21213,12309]],[[127560,127560],"mapped",[12308,25943,12309]],[[127561,127567],"disallowed"],[[127568,127568],"mapped",[24471]],[[127569,127569],"mapped",[21487]],[[127570,127743],"disallowed"],[[127744,127776],"valid",[],"NV8"],[[127777,127788],"valid",[],"NV8"],[[127789,127791],"valid",[],"NV8"],[[127792,127797],"valid",[],"NV8"],[[127798,127798],"valid",[],"NV8"],[[127799,127868],"valid",[],"NV8"],[[127869,127869],"valid",[],"NV8"],[[127870,127871],"valid",[],"NV8"],[[127872,127891],"valid",[],"NV8"],[[127892,127903],"valid",[],"NV8"],[[127904,127940],"valid",[],"NV8"],[[127941,127941],"valid",[],"NV8"],[[127942,127946],"valid",[],"NV8"],[[127947,127950],"valid",[],"NV8"],[[127951,127955],"valid",[],"NV8"],[[127956,127967],"valid",[],"NV8"],[[127968,127984],"valid",[],"NV8"],[[127985,127991],"valid",[],"NV8"],[[127992,127999],"valid",[],"NV8"],[[128000,128062],"valid",[],"NV8"],[[128063,128063],"valid",[],"NV8"],[[128064,128064],"valid",[],"NV8"],[[128065,128065],"valid",[],"NV8"],[[128066,128247],"valid",[],"NV8"],[[128248,128248],"valid",[],"NV8"],[[128249,128252],"valid",[],"NV8"],[[128253,128254],"valid",[],"NV8"],[[128255,128255],"valid",[],"NV8"],[[128256,128317],"valid",[],"NV8"],[[128318,128319],"valid",[],"NV8"],[[128320,128323],"valid",[],"NV8"],[[128324,128330],"valid",[],"NV8"],[[128331,128335],"valid",[],"NV8"],[[128336,128359],"valid",[],"NV8"],[[128360,128377],"valid",[],"NV8"],[[128378,128378],"disallowed"],[[128379,128419],"valid",[],"NV8"],[[128420,128420],"disallowed"],[[128421,128506],"valid",[],"NV8"],[[128507,128511],"valid",[],"NV8"],[[128512,128512],"valid",[],"NV8"],[[128513,128528],"valid",[],"NV8"],[[128529,128529],"valid",[],"NV8"],[[128530,128532],"valid",[],"NV8"],[[128533,128533],"valid",[],"NV8"],[[128534,128534],"valid",[],"NV8"],[[128535,128535],"valid",[],"NV8"],[[128536,128536],"valid",[],"NV8"],[[128537,128537],"valid",[],"NV8"],[[128538,128538],"valid",[],"NV8"],[[128539,128539],"valid",[],"NV8"],[[128540,128542],"valid",[],"NV8"],[[128543,128543],"valid",[],"NV8"],[[128544,128549],"valid",[],"NV8"],[[128550,128551],"valid",[],"NV8"],[[128552,128555],"valid",[],"NV8"],[[128556,128556],"valid",[],"NV8"],[[128557,128557],"valid",[],"NV8"],[[128558,128559],"valid",[],"NV8"],[[128560,128563],"valid",[],"NV8"],[[128564,128564],"valid",[],"NV8"],[[128565,128576],"valid",[],"NV8"],[[128577,128578],"valid",[],"NV8"],[[128579,128580],"valid",[],"NV8"],[[128581,128591],"valid",[],"NV8"],[[128592,128639],"valid",[],"NV8"],[[128640,128709],"valid",[],"NV8"],[[128710,128719],"valid",[],"NV8"],[[128720,128720],"valid",[],"NV8"],[[128721,128735],"disallowed"],[[128736,128748],"valid",[],"NV8"],[[128749,128751],"disallowed"],[[128752,128755],"valid",[],"NV8"],[[128756,128767],"disallowed"],[[128768,128883],"valid",[],"NV8"],[[128884,128895],"disallowed"],[[128896,128980],"valid",[],"NV8"],[[128981,129023],"disallowed"],[[129024,129035],"valid",[],"NV8"],[[129036,129039],"disallowed"],[[129040,129095],"valid",[],"NV8"],[[129096,129103],"disallowed"],[[129104,129113],"valid",[],"NV8"],[[129114,129119],"disallowed"],[[129120,129159],"valid",[],"NV8"],[[129160,129167],"disallowed"],[[129168,129197],"valid",[],"NV8"],[[129198,129295],"disallowed"],[[129296,129304],"valid",[],"NV8"],[[129305,129407],"disallowed"],[[129408,129412],"valid",[],"NV8"],[[129413,129471],"disallowed"],[[129472,129472],"valid",[],"NV8"],[[129473,131069],"disallowed"],[[131070,131071],"disallowed"],[[131072,173782],"valid"],[[173783,173823],"disallowed"],[[173824,177972],"valid"],[[177973,177983],"disallowed"],[[177984,178205],"valid"],[[178206,178207],"disallowed"],[[178208,183969],"valid"],[[183970,194559],"disallowed"],[[194560,194560],"mapped",[20029]],[[194561,194561],"mapped",[20024]],[[194562,194562],"mapped",[20033]],[[194563,194563],"mapped",[131362]],[[194564,194564],"mapped",[20320]],[[194565,194565],"mapped",[20398]],[[194566,194566],"mapped",[20411]],[[194567,194567],"mapped",[20482]],[[194568,194568],"mapped",[20602]],[[194569,194569],"mapped",[20633]],[[194570,194570],"mapped",[20711]],[[194571,194571],"mapped",[20687]],[[194572,194572],"mapped",[13470]],[[194573,194573],"mapped",[132666]],[[194574,194574],"mapped",[20813]],[[194575,194575],"mapped",[20820]],[[194576,194576],"mapped",[20836]],[[194577,194577],"mapped",[20855]],[[194578,194578],"mapped",[132380]],[[194579,194579],"mapped",[13497]],[[194580,194580],"mapped",[20839]],[[194581,194581],"mapped",[20877]],[[194582,194582],"mapped",[132427]],[[194583,194583],"mapped",[20887]],[[194584,194584],"mapped",[20900]],[[194585,194585],"mapped",[20172]],[[194586,194586],"mapped",[20908]],[[194587,194587],"mapped",[20917]],[[194588,194588],"mapped",[168415]],[[194589,194589],"mapped",[20981]],[[194590,194590],"mapped",[20995]],[[194591,194591],"mapped",[13535]],[[194592,194592],"mapped",[21051]],[[194593,194593],"mapped",[21062]],[[194594,194594],"mapped",[21106]],[[194595,194595],"mapped",[21111]],[[194596,194596],"mapped",[13589]],[[194597,194597],"mapped",[21191]],[[194598,194598],"mapped",[21193]],[[194599,194599],"mapped",[21220]],[[194600,194600],"mapped",[21242]],[[194601,194601],"mapped",[21253]],[[194602,194602],"mapped",[21254]],[[194603,194603],"mapped",[21271]],[[194604,194604],"mapped",[21321]],[[194605,194605],"mapped",[21329]],[[194606,194606],"mapped",[21338]],[[194607,194607],"mapped",[21363]],[[194608,194608],"mapped",[21373]],[[194609,194611],"mapped",[21375]],[[194612,194612],"mapped",[133676]],[[194613,194613],"mapped",[28784]],[[194614,194614],"mapped",[21450]],[[194615,194615],"mapped",[21471]],[[194616,194616],"mapped",[133987]],[[194617,194617],"mapped",[21483]],[[194618,194618],"mapped",[21489]],[[194619,194619],"mapped",[21510]],[[194620,194620],"mapped",[21662]],[[194621,194621],"mapped",[21560]],[[194622,194622],"mapped",[21576]],[[194623,194623],"mapped",[21608]],[[194624,194624],"mapped",[21666]],[[194625,194625],"mapped",[21750]],[[194626,194626],"mapped",[21776]],[[194627,194627],"mapped",[21843]],[[194628,194628],"mapped",[21859]],[[194629,194630],"mapped",[21892]],[[194631,194631],"mapped",[21913]],[[194632,194632],"mapped",[21931]],[[194633,194633],"mapped",[21939]],[[194634,194634],"mapped",[21954]],[[194635,194635],"mapped",[22294]],[[194636,194636],"mapped",[22022]],[[194637,194637],"mapped",[22295]],[[194638,194638],"mapped",[22097]],[[194639,194639],"mapped",[22132]],[[194640,194640],"mapped",[20999]],[[194641,194641],"mapped",[22766]],[[194642,194642],"mapped",[22478]],[[194643,194643],"mapped",[22516]],[[194644,194644],"mapped",[22541]],[[194645,194645],"mapped",[22411]],[[194646,194646],"mapped",[22578]],[[194647,194647],"mapped",[22577]],[[194648,194648],"mapped",[22700]],[[194649,194649],"mapped",[136420]],[[194650,194650],"mapped",[22770]],[[194651,194651],"mapped",[22775]],[[194652,194652],"mapped",[22790]],[[194653,194653],"mapped",[22810]],[[194654,194654],"mapped",[22818]],[[194655,194655],"mapped",[22882]],[[194656,194656],"mapped",[136872]],[[194657,194657],"mapped",[136938]],[[194658,194658],"mapped",[23020]],[[194659,194659],"mapped",[23067]],[[194660,194660],"mapped",[23079]],[[194661,194661],"mapped",[23000]],[[194662,194662],"mapped",[23142]],[[194663,194663],"mapped",[14062]],[[194664,194664],"disallowed"],[[194665,194665],"mapped",[23304]],[[194666,194667],"mapped",[23358]],[[194668,194668],"mapped",[137672]],[[194669,194669],"mapped",[23491]],[[194670,194670],"mapped",[23512]],[[194671,194671],"mapped",[23527]],[[194672,194672],"mapped",[23539]],[[194673,194673],"mapped",[138008]],[[194674,194674],"mapped",[23551]],[[194675,194675],"mapped",[23558]],[[194676,194676],"disallowed"],[[194677,194677],"mapped",[23586]],[[194678,194678],"mapped",[14209]],[[194679,194679],"mapped",[23648]],[[194680,194680],"mapped",[23662]],[[194681,194681],"mapped",[23744]],[[194682,194682],"mapped",[23693]],[[194683,194683],"mapped",[138724]],[[194684,194684],"mapped",[23875]],[[194685,194685],"mapped",[138726]],[[194686,194686],"mapped",[23918]],[[194687,194687],"mapped",[23915]],[[194688,194688],"mapped",[23932]],[[194689,194689],"mapped",[24033]],[[194690,194690],"mapped",[24034]],[[194691,194691],"mapped",[14383]],[[194692,194692],"mapped",[24061]],[[194693,194693],"mapped",[24104]],[[194694,194694],"mapped",[24125]],[[194695,194695],"mapped",[24169]],[[194696,194696],"mapped",[14434]],[[194697,194697],"mapped",[139651]],[[194698,194698],"mapped",[14460]],[[194699,194699],"mapped",[24240]],[[194700,194700],"mapped",[24243]],[[194701,194701],"mapped",[24246]],[[194702,194702],"mapped",[24266]],[[194703,194703],"mapped",[172946]],[[194704,194704],"mapped",[24318]],[[194705,194706],"mapped",[140081]],[[194707,194707],"mapped",[33281]],[[194708,194709],"mapped",[24354]],[[194710,194710],"mapped",[14535]],[[194711,194711],"mapped",[144056]],[[194712,194712],"mapped",[156122]],[[194713,194713],"mapped",[24418]],[[194714,194714],"mapped",[24427]],[[194715,194715],"mapped",[14563]],[[194716,194716],"mapped",[24474]],[[194717,194717],"mapped",[24525]],[[194718,194718],"mapped",[24535]],[[194719,194719],"mapped",[24569]],[[194720,194720],"mapped",[24705]],[[194721,194721],"mapped",[14650]],[[194722,194722],"mapped",[14620]],[[194723,194723],"mapped",[24724]],[[194724,194724],"mapped",[141012]],[[194725,194725],"mapped",[24775]],[[194726,194726],"mapped",[24904]],[[194727,194727],"mapped",[24908]],[[194728,194728],"mapped",[24910]],[[194729,194729],"mapped",[24908]],[[194730,194730],"mapped",[24954]],[[194731,194731],"mapped",[24974]],[[194732,194732],"mapped",[25010]],[[194733,194733],"mapped",[24996]],[[194734,194734],"mapped",[25007]],[[194735,194735],"mapped",[25054]],[[194736,194736],"mapped",[25074]],[[194737,194737],"mapped",[25078]],[[194738,194738],"mapped",[25104]],[[194739,194739],"mapped",[25115]],[[194740,194740],"mapped",[25181]],[[194741,194741],"mapped",[25265]],[[194742,194742],"mapped",[25300]],[[194743,194743],"mapped",[25424]],[[194744,194744],"mapped",[142092]],[[194745,194745],"mapped",[25405]],[[194746,194746],"mapped",[25340]],[[194747,194747],"mapped",[25448]],[[194748,194748],"mapped",[25475]],[[194749,194749],"mapped",[25572]],[[194750,194750],"mapped",[142321]],[[194751,194751],"mapped",[25634]],[[194752,194752],"mapped",[25541]],[[194753,194753],"mapped",[25513]],[[194754,194754],"mapped",[14894]],[[194755,194755],"mapped",[25705]],[[194756,194756],"mapped",[25726]],[[194757,194757],"mapped",[25757]],[[194758,194758],"mapped",[25719]],[[194759,194759],"mapped",[14956]],[[194760,194760],"mapped",[25935]],[[194761,194761],"mapped",[25964]],[[194762,194762],"mapped",[143370]],[[194763,194763],"mapped",[26083]],[[194764,194764],"mapped",[26360]],[[194765,194765],"mapped",[26185]],[[194766,194766],"mapped",[15129]],[[194767,194767],"mapped",[26257]],[[194768,194768],"mapped",[15112]],[[194769,194769],"mapped",[15076]],[[194770,194770],"mapped",[20882]],[[194771,194771],"mapped",[20885]],[[194772,194772],"mapped",[26368]],[[194773,194773],"mapped",[26268]],[[194774,194774],"mapped",[32941]],[[194775,194775],"mapped",[17369]],[[194776,194776],"mapped",[26391]],[[194777,194777],"mapped",[26395]],[[194778,194778],"mapped",[26401]],[[194779,194779],"mapped",[26462]],[[194780,194780],"mapped",[26451]],[[194781,194781],"mapped",[144323]],[[194782,194782],"mapped",[15177]],[[194783,194783],"mapped",[26618]],[[194784,194784],"mapped",[26501]],[[194785,194785],"mapped",[26706]],[[194786,194786],"mapped",[26757]],[[194787,194787],"mapped",[144493]],[[194788,194788],"mapped",[26766]],[[194789,194789],"mapped",[26655]],[[194790,194790],"mapped",[26900]],[[194791,194791],"mapped",[15261]],[[194792,194792],"mapped",[26946]],[[194793,194793],"mapped",[27043]],[[194794,194794],"mapped",[27114]],[[194795,194795],"mapped",[27304]],[[194796,194796],"mapped",[145059]],[[194797,194797],"mapped",[27355]],[[194798,194798],"mapped",[15384]],[[194799,194799],"mapped",[27425]],[[194800,194800],"mapped",[145575]],[[194801,194801],"mapped",[27476]],[[194802,194802],"mapped",[15438]],[[194803,194803],"mapped",[27506]],[[194804,194804],"mapped",[27551]],[[194805,194805],"mapped",[27578]],[[194806,194806],"mapped",[27579]],[[194807,194807],"mapped",[146061]],[[194808,194808],"mapped",[138507]],[[194809,194809],"mapped",[146170]],[[194810,194810],"mapped",[27726]],[[194811,194811],"mapped",[146620]],[[194812,194812],"mapped",[27839]],[[194813,194813],"mapped",[27853]],[[194814,194814],"mapped",[27751]],[[194815,194815],"mapped",[27926]],[[194816,194816],"mapped",[27966]],[[194817,194817],"mapped",[28023]],[[194818,194818],"mapped",[27969]],[[194819,194819],"mapped",[28009]],[[194820,194820],"mapped",[28024]],[[194821,194821],"mapped",[28037]],[[194822,194822],"mapped",[146718]],[[194823,194823],"mapped",[27956]],[[194824,194824],"mapped",[28207]],[[194825,194825],"mapped",[28270]],[[194826,194826],"mapped",[15667]],[[194827,194827],"mapped",[28363]],[[194828,194828],"mapped",[28359]],[[194829,194829],"mapped",[147153]],[[194830,194830],"mapped",[28153]],[[194831,194831],"mapped",[28526]],[[194832,194832],"mapped",[147294]],[[194833,194833],"mapped",[147342]],[[194834,194834],"mapped",[28614]],[[194835,194835],"mapped",[28729]],[[194836,194836],"mapped",[28702]],[[194837,194837],"mapped",[28699]],[[194838,194838],"mapped",[15766]],[[194839,194839],"mapped",[28746]],[[194840,194840],"mapped",[28797]],[[194841,194841],"mapped",[28791]],[[194842,194842],"mapped",[28845]],[[194843,194843],"mapped",[132389]],[[194844,194844],"mapped",[28997]],[[194845,194845],"mapped",[148067]],[[194846,194846],"mapped",[29084]],[[194847,194847],"disallowed"],[[194848,194848],"mapped",[29224]],[[194849,194849],"mapped",[29237]],[[194850,194850],"mapped",[29264]],[[194851,194851],"mapped",[149000]],[[194852,194852],"mapped",[29312]],[[194853,194853],"mapped",[29333]],[[194854,194854],"mapped",[149301]],[[194855,194855],"mapped",[149524]],[[194856,194856],"mapped",[29562]],[[194857,194857],"mapped",[29579]],[[194858,194858],"mapped",[16044]],[[194859,194859],"mapped",[29605]],[[194860,194861],"mapped",[16056]],[[194862,194862],"mapped",[29767]],[[194863,194863],"mapped",[29788]],[[194864,194864],"mapped",[29809]],[[194865,194865],"mapped",[29829]],[[194866,194866],"mapped",[29898]],[[194867,194867],"mapped",[16155]],[[194868,194868],"mapped",[29988]],[[194869,194869],"mapped",[150582]],[[194870,194870],"mapped",[30014]],[[194871,194871],"mapped",[150674]],[[194872,194872],"mapped",[30064]],[[194873,194873],"mapped",[139679]],[[194874,194874],"mapped",[30224]],[[194875,194875],"mapped",[151457]],[[194876,194876],"mapped",[151480]],[[194877,194877],"mapped",[151620]],[[194878,194878],"mapped",[16380]],[[194879,194879],"mapped",[16392]],[[194880,194880],"mapped",[30452]],[[194881,194881],"mapped",[151795]],[[194882,194882],"mapped",[151794]],[[194883,194883],"mapped",[151833]],[[194884,194884],"mapped",[151859]],[[194885,194885],"mapped",[30494]],[[194886,194887],"mapped",[30495]],[[194888,194888],"mapped",[30538]],[[194889,194889],"mapped",[16441]],[[194890,194890],"mapped",[30603]],[[194891,194891],"mapped",[16454]],[[194892,194892],"mapped",[16534]],[[194893,194893],"mapped",[152605]],[[194894,194894],"mapped",[30798]],[[194895,194895],"mapped",[30860]],[[194896,194896],"mapped",[30924]],[[194897,194897],"mapped",[16611]],[[194898,194898],"mapped",[153126]],[[194899,194899],"mapped",[31062]],[[194900,194900],"mapped",[153242]],[[194901,194901],"mapped",[153285]],[[194902,194902],"mapped",[31119]],[[194903,194903],"mapped",[31211]],[[194904,194904],"mapped",[16687]],[[194905,194905],"mapped",[31296]],[[194906,194906],"mapped",[31306]],[[194907,194907],"mapped",[31311]],[[194908,194908],"mapped",[153980]],[[194909,194910],"mapped",[154279]],[[194911,194911],"disallowed"],[[194912,194912],"mapped",[16898]],[[194913,194913],"mapped",[154539]],[[194914,194914],"mapped",[31686]],[[194915,194915],"mapped",[31689]],[[194916,194916],"mapped",[16935]],[[194917,194917],"mapped",[154752]],[[194918,194918],"mapped",[31954]],[[194919,194919],"mapped",[17056]],[[194920,194920],"mapped",[31976]],[[194921,194921],"mapped",[31971]],[[194922,194922],"mapped",[32000]],[[194923,194923],"mapped",[155526]],[[194924,194924],"mapped",[32099]],[[194925,194925],"mapped",[17153]],[[194926,194926],"mapped",[32199]],[[194927,194927],"mapped",[32258]],[[194928,194928],"mapped",[32325]],[[194929,194929],"mapped",[17204]],[[194930,194930],"mapped",[156200]],[[194931,194931],"mapped",[156231]],[[194932,194932],"mapped",[17241]],[[194933,194933],"mapped",[156377]],[[194934,194934],"mapped",[32634]],[[194935,194935],"mapped",[156478]],[[194936,194936],"mapped",[32661]],[[194937,194937],"mapped",[32762]],[[194938,194938],"mapped",[32773]],[[194939,194939],"mapped",[156890]],[[194940,194940],"mapped",[156963]],[[194941,194941],"mapped",[32864]],[[194942,194942],"mapped",[157096]],[[194943,194943],"mapped",[32880]],[[194944,194944],"mapped",[144223]],[[194945,194945],"mapped",[17365]],[[194946,194946],"mapped",[32946]],[[194947,194947],"mapped",[33027]],[[194948,194948],"mapped",[17419]],[[194949,194949],"mapped",[33086]],[[194950,194950],"mapped",[23221]],[[194951,194951],"mapped",[157607]],[[194952,194952],"mapped",[157621]],[[194953,194953],"mapped",[144275]],[[194954,194954],"mapped",[144284]],[[194955,194955],"mapped",[33281]],[[194956,194956],"mapped",[33284]],[[194957,194957],"mapped",[36766]],[[194958,194958],"mapped",[17515]],[[194959,194959],"mapped",[33425]],[[194960,194960],"mapped",[33419]],[[194961,194961],"mapped",[33437]],[[194962,194962],"mapped",[21171]],[[194963,194963],"mapped",[33457]],[[194964,194964],"mapped",[33459]],[[194965,194965],"mapped",[33469]],[[194966,194966],"mapped",[33510]],[[194967,194967],"mapped",[158524]],[[194968,194968],"mapped",[33509]],[[194969,194969],"mapped",[33565]],[[194970,194970],"mapped",[33635]],[[194971,194971],"mapped",[33709]],[[194972,194972],"mapped",[33571]],[[194973,194973],"mapped",[33725]],[[194974,194974],"mapped",[33767]],[[194975,194975],"mapped",[33879]],[[194976,194976],"mapped",[33619]],[[194977,194977],"mapped",[33738]],[[194978,194978],"mapped",[33740]],[[194979,194979],"mapped",[33756]],[[194980,194980],"mapped",[158774]],[[194981,194981],"mapped",[159083]],[[194982,194982],"mapped",[158933]],[[194983,194983],"mapped",[17707]],[[194984,194984],"mapped",[34033]],[[194985,194985],"mapped",[34035]],[[194986,194986],"mapped",[34070]],[[194987,194987],"mapped",[160714]],[[194988,194988],"mapped",[34148]],[[194989,194989],"mapped",[159532]],[[194990,194990],"mapped",[17757]],[[194991,194991],"mapped",[17761]],[[194992,194992],"mapped",[159665]],[[194993,194993],"mapped",[159954]],[[194994,194994],"mapped",[17771]],[[194995,194995],"mapped",[34384]],[[194996,194996],"mapped",[34396]],[[194997,194997],"mapped",[34407]],[[194998,194998],"mapped",[34409]],[[194999,194999],"mapped",[34473]],[[195000,195000],"mapped",[34440]],[[195001,195001],"mapped",[34574]],[[195002,195002],"mapped",[34530]],[[195003,195003],"mapped",[34681]],[[195004,195004],"mapped",[34600]],[[195005,195005],"mapped",[34667]],[[195006,195006],"mapped",[34694]],[[195007,195007],"disallowed"],[[195008,195008],"mapped",[34785]],[[195009,195009],"mapped",[34817]],[[195010,195010],"mapped",[17913]],[[195011,195011],"mapped",[34912]],[[195012,195012],"mapped",[34915]],[[195013,195013],"mapped",[161383]],[[195014,195014],"mapped",[35031]],[[195015,195015],"mapped",[35038]],[[195016,195016],"mapped",[17973]],[[195017,195017],"mapped",[35066]],[[195018,195018],"mapped",[13499]],[[195019,195019],"mapped",[161966]],[[195020,195020],"mapped",[162150]],[[195021,195021],"mapped",[18110]],[[195022,195022],"mapped",[18119]],[[195023,195023],"mapped",[35488]],[[195024,195024],"mapped",[35565]],[[195025,195025],"mapped",[35722]],[[195026,195026],"mapped",[35925]],[[195027,195027],"mapped",[162984]],[[195028,195028],"mapped",[36011]],[[195029,195029],"mapped",[36033]],[[195030,195030],"mapped",[36123]],[[195031,195031],"mapped",[36215]],[[195032,195032],"mapped",[163631]],[[195033,195033],"mapped",[133124]],[[195034,195034],"mapped",[36299]],[[195035,195035],"mapped",[36284]],[[195036,195036],"mapped",[36336]],[[195037,195037],"mapped",[133342]],[[195038,195038],"mapped",[36564]],[[195039,195039],"mapped",[36664]],[[195040,195040],"mapped",[165330]],[[195041,195041],"mapped",[165357]],[[195042,195042],"mapped",[37012]],[[195043,195043],"mapped",[37105]],[[195044,195044],"mapped",[37137]],[[195045,195045],"mapped",[165678]],[[195046,195046],"mapped",[37147]],[[195047,195047],"mapped",[37432]],[[195048,195048],"mapped",[37591]],[[195049,195049],"mapped",[37592]],[[195050,195050],"mapped",[37500]],[[195051,195051],"mapped",[37881]],[[195052,195052],"mapped",[37909]],[[195053,195053],"mapped",[166906]],[[195054,195054],"mapped",[38283]],[[195055,195055],"mapped",[18837]],[[195056,195056],"mapped",[38327]],[[195057,195057],"mapped",[167287]],[[195058,195058],"mapped",[18918]],[[195059,195059],"mapped",[38595]],[[195060,195060],"mapped",[23986]],[[195061,195061],"mapped",[38691]],[[195062,195062],"mapped",[168261]],[[195063,195063],"mapped",[168474]],[[195064,195064],"mapped",[19054]],[[195065,195065],"mapped",[19062]],[[195066,195066],"mapped",[38880]],[[195067,195067],"mapped",[168970]],[[195068,195068],"mapped",[19122]],[[195069,195069],"mapped",[169110]],[[195070,195071],"mapped",[38923]],[[195072,195072],"mapped",[38953]],[[195073,195073],"mapped",[169398]],[[195074,195074],"mapped",[39138]],[[195075,195075],"mapped",[19251]],[[195076,195076],"mapped",[39209]],[[195077,195077],"mapped",[39335]],[[195078,195078],"mapped",[39362]],[[195079,195079],"mapped",[39422]],[[195080,195080],"mapped",[19406]],[[195081,195081],"mapped",[170800]],[[195082,195082],"mapped",[39698]],[[195083,195083],"mapped",[40000]],[[195084,195084],"mapped",[40189]],[[195085,195085],"mapped",[19662]],[[195086,195086],"mapped",[19693]],[[195087,195087],"mapped",[40295]],[[195088,195088],"mapped",[172238]],[[195089,195089],"mapped",[19704]],[[195090,195090],"mapped",[172293]],[[195091,195091],"mapped",[172558]],[[195092,195092],"mapped",[172689]],[[195093,195093],"mapped",[40635]],[[195094,195094],"mapped",[19798]],[[195095,195095],"mapped",[40697]],[[195096,195096],"mapped",[40702]],[[195097,195097],"mapped",[40709]],[[195098,195098],"mapped",[40719]],[[195099,195099],"mapped",[40726]],[[195100,195100],"mapped",[40763]],[[195101,195101],"mapped",[173568]],[[195102,196605],"disallowed"],[[196606,196607],"disallowed"],[[196608,262141],"disallowed"],[[262142,262143],"disallowed"],[[262144,327677],"disallowed"],[[327678,327679],"disallowed"],[[327680,393213],"disallowed"],[[393214,393215],"disallowed"],[[393216,458749],"disallowed"],[[458750,458751],"disallowed"],[[458752,524285],"disallowed"],[[524286,524287],"disallowed"],[[524288,589821],"disallowed"],[[589822,589823],"disallowed"],[[589824,655357],"disallowed"],[[655358,655359],"disallowed"],[[655360,720893],"disallowed"],[[720894,720895],"disallowed"],[[720896,786429],"disallowed"],[[786430,786431],"disallowed"],[[786432,851965],"disallowed"],[[851966,851967],"disallowed"],[[851968,917501],"disallowed"],[[917502,917503],"disallowed"],[[917504,917504],"disallowed"],[[917505,917505],"disallowed"],[[917506,917535],"disallowed"],[[917536,917631],"disallowed"],[[917632,917759],"disallowed"],[[917760,917999],"ignored"],[[918000,983037],"disallowed"],[[983038,983039],"disallowed"],[[983040,1048573],"disallowed"],[[1048574,1048575],"disallowed"],[[1048576,1114109],"disallowed"],[[1114110,1114111],"disallowed"]] \ No newline at end of file diff --git a/node_modules/tr46/package.json b/node_modules/tr46/package.json new file mode 100644 index 0000000..b6826da --- /dev/null +++ b/node_modules/tr46/package.json @@ -0,0 +1,31 @@ +{ + "name": "tr46", + "version": "0.0.3", + "description": "An implementation of the Unicode TR46 spec", + "main": "index.js", + "scripts": { + "test": "mocha", + "pretest": "node scripts/getLatestUnicodeTests.js", + "prepublish": "node scripts/generateMappingTable.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Sebmaster/tr46.js.git" + }, + "keywords": [ + "unicode", + "tr46", + "url", + "whatwg" + ], + "author": "Sebastian Mayr ", + "license": "MIT", + "bugs": { + "url": "https://github.com/Sebmaster/tr46.js/issues" + }, + "homepage": "https://github.com/Sebmaster/tr46.js#readme", + "devDependencies": { + "mocha": "^2.2.5", + "request": "^2.57.0" + } +} diff --git a/node_modules/tunnel/.idea/encodings.xml b/node_modules/tunnel/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/node_modules/tunnel/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/node_modules/tunnel/.idea/modules.xml b/node_modules/tunnel/.idea/modules.xml new file mode 100644 index 0000000..27bf888 --- /dev/null +++ b/node_modules/tunnel/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/node_modules/tunnel/.idea/node-tunnel.iml b/node_modules/tunnel/.idea/node-tunnel.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/node_modules/tunnel/.idea/node-tunnel.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/node_modules/tunnel/.idea/vcs.xml b/node_modules/tunnel/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/node_modules/tunnel/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/node_modules/tunnel/.idea/workspace.xml b/node_modules/tunnel/.idea/workspace.xml new file mode 100644 index 0000000..1a318c8 --- /dev/null +++ b/node_modules/tunnel/.idea/workspace.xml @@ -0,0 +1,797 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + max + onconne + + + + + + + + + + + + + false + + false + false + true + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +